- Joined
- May 29, 2013
- Messages
- 1,566
I'm trying to make a passive ability that increases the unit's attack rate by 75% and movement speed by 50% for 12 seconds whenever its hit points fall below 25% of its maximum HP. This effect can only occur once every 120 seconds.
I want the ability to have a visible cooldown, so I based it on Exhume Corpses, since it's the only passive ability (that is not attack-based) which can have a visible cooldown that can be triggered at any time.
The ability should NOT activate while it's on cooldown. The speed boost should NOT be dispellable and should NOT disappear if the unit is healed above 25% HP during its duration.
Most of the triggers below were copied from somewhere in an attempt to make this MUI, but they're presumably completely nonsensical since I don't really understand the logic behind it; I just know that it doesn't work properly.
P.S. I know I should probably use a damage detection system in the second trigger, but in this case the "A unit is attacked" event is good enough as a placeholder, until I decide which DDS to use.
I want the ability to have a visible cooldown, so I based it on Exhume Corpses, since it's the only passive ability (that is not attack-based) which can have a visible cooldown that can be triggered at any time.
The ability should NOT activate while it's on cooldown. The speed boost should NOT be dispellable and should NOT disappear if the unit is healed above 25% HP during its duration.
Most of the triggers below were copied from somewhere in an attempt to make this MUI, but they're presumably completely nonsensical since I don't really understand the logic behind it; I just know that it doesn't work properly.
P.S. I know I should probably use a damage detection system in the second trigger, but in this case the "A unit is attacked" event is good enough as a placeholder, until I decide which DDS to use.
-
AR Add Bonuses
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Adrenaline Rush (Exhume Corpses)
-
-
Actions
-
Unit - Add Attack Speed Bonus (Gloves of Haste) to (Casting unit)
-
Unit - Add Movement Speed Bonus (Tornado Slow Aura) to (Casting unit)
-
Set AR_Index = (AR_Index + 1)
-
Set AR_Caster[AR_Index] = (Triggering unit)
-
Set AR_Counter[AR_Index] = 0.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AR_Index Equal to 1
-
-
Then - Actions
-
Trigger - Turn on AR Loop <gen>
-
-
Else - Actions
-
-
-
-
AR Cast
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
((Attacking unit) belongs to an enemy of (Owner of (Attacked unit))) Equal to True
-
(Level of Adrenaline Rush (Exhume Corpses) for (Triggering unit)) Greater than 0
-
(Life of (Attacked unit)) Less than ((Max life of (Attacked unit)) / 4.00)
-
(Level of Movement Speed Bonus (Tornado Slow Aura) for (Triggering unit)) Equal to 0
-
(Ability Cooldown Remaining of (Triggering unit) for ability Adrenaline Rush (Exhume Corpses)) Equal to 0.00
-
-
Actions
-
Custom script: call IssueImmediateOrderById( GetTriggerUnit(), 852537)
-
-------- 852537 is the order ID of Exhume Corpses --------
-
-
-
AR Loop
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer AR_Loop_Integer) from 1 to AR_Index, do (Actions)
-
Loop - Actions
-
Set AR_Counter[AR_Loop_Integer] = (AR_Counter[AR_Loop_Integer] + 1.00)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AR_Counter[AR_Loop_Integer] Greater than or equal to 12.00
-
-
Then - Actions
-
Set AR_Caster[AR_Loop_Integer] = AR_Caster[AR_Index]
-
Set AR_Counter[AR_Loop_Integer] = AR_Counter[AR_Index]
-
Set AR_Index = (AR_Index - 1)
-
Set AR_Loop_Integer = (AR_Loop_Integer - 1)
-
Unit - Remove Movement Speed Bonus (Tornado Slow Aura) from AR_Caster[AR_Loop_Integer]
-
Unit - Remove Attack Speed Bonus (Gloves of Haste) from AR_Caster[AR_Loop_Integer]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AR_Index Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-