Hi, i'm trying to make an ability that inreases X% per stack, a stack is gained through kills and every 5 seconds you lose 1 stack. I'm having problems to decrease the AD to its former number. Thanks in advance.
NOTE: My x 1.05 and / 1.05 is for when the ability is level 5. Just a temporary number.
NOTE: My x 1.05 and / 1.05 is for when the ability is level 5. Just a temporary number.
-
Enrage Kill
-

Events
-


Unit - A unit Dies
-
-

Conditions
-


(Unit-type of (Killing unit)) Equal to Khan
-


(Level of Enrage for (Killing unit)) Greater than 0
-
-

Actions
-


Set VariableSet Enrage_Count = (Enrage_Count + 1)
-


Set VariableSet Enrage_Caster = (Killing unit)
-


Set VariableSet Enrage_Level = ((Real((Level of Enrage for Enrage_Caster))) x 0.01)
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




Enrage_Count Equal to 1
-
-



Then - Actions
-




Trigger - Turn on Enrage Loop <gen>
-




Set VariableSet Enrage_CurrentAD = (Base Damage of Enrage_Caster for weapon index 0)
-
-



Else - Actions
-
-


-------- --------
-


Set VariableSet Enrage_DmgInrease = (((Real(Enrage_CurrentAD)) x Enrage_Level) x 1.05)
-


Set VariableSet Enrage_DmgLoss = (((Real(Enrage_CurrentAD)) x Enrage_Level) / 1.05)
-


-------- --------
-


Unit - Set Base Damage of Enrage_Caster to (Integer(((Real(Enrage_CurrentAD)) + Enrage_DmgInrease))) for weapon index: 0
-


-------- --------
-
-
-
Enrage Loop
-

Events
-


Time - Every 5.00 seconds of game time
-
-

Conditions
-

Actions
-


Set VariableSet Enrage_Count = (Enrage_Count - 1)
-


Unit - Set Base Damage of Enrage_Caster to (Integer(((Real(Enrage_CurrentAD)) - Enrage_DmgLoss))) for weapon index: 0
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




Enrage_Count Equal to 0
-
-



Then - Actions
-




Trigger - Turn off (This trigger)
-
-



Else - Actions
-
-
-

