DragonBlade
Member
- Reaction score
- 0
Hi,
I am trying to make a trigger that sets the damage of an unit based on Agility and Intelect. Something like this:
Current DMG: 5
Int: 10
Agi: 14
Adding DMG: (10+14)/2
New DMG: 17
I know how to add the damage, but I don't know how to stop the trigger from adding to much damage, or to little
And I need the damage to change when the stats are changing too.
Here is how I think it needs to be but i don't know at the loop from X to Y
PS: I tried to use [noparse][/noparse], but it didn't work
I am trying to make a trigger that sets the damage of an unit based on Agility and Intelect. Something like this:
Current DMG: 5
Int: 10
Agi: 14
Adding DMG: (10+14)/2
New DMG: 17
I know how to add the damage, but I don't know how to stop the trigger from adding to much damage, or to little
And I need the damage to change when the stats are changing too.
Here is how I think it needs to be but i don't know at the loop from X to Y
Code:
Events
Unit - A unit Gains a level
Conditions
Actions
Set DmgHeroes = (((Agility of (Triggering unit) (Include bonuses)) + (Intelligence of (Triggering unit) (Include bonuses))) / 2)
For each (Integer A) from ?? to ??, do (Actions)
Loop - Actions
Unit - Add +1 Dmg to (Triggering unit)
Unit - Increase level of +1 Dmg for (Triggering unit)
Unit - Remove +1 Dmg from (Triggering unit)