-
Might2
-

Events
-


Game - PDD_damageEventTrigger becomes Equal to 0.00
-
-

Conditions
-


(Level of Might (Completed) for PDD_target) Greater than 0
-


(PDD_target belongs to an enemy of (Owner of PDD_source).) Equal to True
-


(Random integer number between 1 and 100) Less than or equal to 33
-
-

Actions
-


-------- >>>Locals<<< --------
-


Custom script: local integer udg_XMightStacks = 0
-


Custom script: local unit udg_XMightTarget = GetTriggerUnit()
-


Custom script: local real udg_XMightTime
-


Custom script: local integer udg_XMightStacksMax
-


-------- Increse stacks --------
-


Custom script: set udg_XMightStacks = udg_XMightStacks + 1
-


-------- Get Max Stacks --------
-


Custom script: set udg_XMightStacksMax = ( GetUnitAbilityLevelSwapped('A007', udg_XMightTarget) * 5 )
-


-------- Checking stacks --------
-


Custom script: if (udg_XMightStacks) < (udg_XMightStacksMax) then
-


Custom script: call ModifyHeroStat( bj_HEROSTAT_STR, udg_XMightTarget, bj_MODIFYMETHOD_ADD, 4 )
-


Custom script: endif
-


-------- Setting Timer --------
-


Custom script: set udg_XMightTime = 15
-


Custom script: call TriggerSleepAction( udg_XMightTime )
-


-------- End of Timer --------
-


Custom script: call ModifyHeroStat( bj_HEROSTAT_STR, udg_XMightTarget, bj_MODIFYMETHOD_SUB, 4 )
-


-------- Reduce Stacks --------
-


Custom script: set udg_XMightStacks = udg_XMightStacks - 1
-
-
At the moment the XMightstacks return to 0, then get increased to 1
Then it loops back to 0 then back to 1
---And so on---
While I want XMightStacks to reach 5
This trigger runs correctly otherwise. I tested it with 24 units taking damage and they all increased strength and then reduced it after 15 seconds.
