Divide by 100 to get percent. (20/100 = 0.2 AKA 20%)
multiply result to get percentage (0.2 * 60 = 12 AKA 20% of 60)
subtract percentage from self (60-12 = 48 AKA 60 dmg - 20% (armor))
subtract result from health (150 - 48 = 102)
Health - (Damage - Damage * Armor/100)
150 - (60 - 60 * 20/100) = 102
Yeah that does not work because we cant willy nilly pick any number, the armors are fixed Variables. Try to do it with these variables instead -
Health = 150
Damage = 60
Armor = 20
Now go. When hit, *Substract from Health* = ???
Your part above, go show me - The armor on each target vill vary and not be the same, so we cant use random numbers in the code, must be Damage and Armor and Health.