This trigger works as should as long as the hero has no extra armor from items/auras, etc.
I tested it several times and noticed something is wrong when I was testing my level up trigger from my previous post and noticed that the bonus armor from items destroys my formula.
Agi 2 + Tough 4 = 3 Armor, but the unit has extra 3 armor so the formula changes that the base armor is actually set to 0.
So technically the math is correct, it gives me 0 base armor + 3 bonus armor. So the unit armor is set to 3.
If the unit has 2 bonus armor and the Agi + Tough are the same as above the unit gains 1 base armor + 2 extra armor from the item, so once again the unit armor is technically set to 3.
I am pretty sure this is not working as intented.
All help appreciated.
EDIT: Made an empty map for testing, attached here:
I tested it several times and noticed something is wrong when I was testing my level up trigger from my previous post and noticed that the bonus armor from items destroys my formula.
-
Unit - Set Armor of HeroUnit[StatsPlayerNumber] to ((Real(Agility[StatsPlayerNumber])) + ((Real(Toughness[StatsPlayerNumber])) / 2.00))
Agi 2 + Tough 4 = 3 Armor, but the unit has extra 3 armor so the formula changes that the base armor is actually set to 0.
So technically the math is correct, it gives me 0 base armor + 3 bonus armor. So the unit armor is set to 3.
If the unit has 2 bonus armor and the Agi + Tough are the same as above the unit gains 1 base armor + 2 extra armor from the item, so once again the unit armor is technically set to 3.
I am pretty sure this is not working as intented.
All help appreciated.
EDIT: Made an empty map for testing, attached here:
Attachments
Last edited: