Started using custom script so I can reference global variables in Hashtables, and tested on this ability called Challenge.
It works like a Taunt-type ability and lasts 10 seconds. The taunted unit does 50% reduced damage except against the unit that taunted them, and the buff is supposed to be removed early if the taunted unit deals 50 damage or more to the taunting unit.
So here it is, it has very few lines but I think it should work
It works like a Taunt-type ability and lasts 10 seconds. The taunted unit does 50% reduced damage except against the unit that taunted them, and the buff is supposed to be removed early if the taunted unit deals 50 damage or more to the taunting unit.
So here it is, it has very few lines but I think it should work
-
Untitled Trigger 001
-
Events
-
Game - GDD_Event becomes Equal to 0.00
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(GDD_DamageSource has buff 0_BRS-3 Challenge ) Equal to True
-
-
Then - Actions
-
Custom script: set udg_temp_unit = LoadUnitHandle(udg_H_BRS_Challenge, GetHandleId(udg_GDD_DamageSource), StringHash("caster"))
-
Custom script: set udg_temp_real = LoadReal(udg_H_BRS_Challenge, GetHandleId(udg_GDD_DamageSource), StringHash("damage"))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
GDD_DamagedUnit Not equal to temp_unit
-
(GDD_DamagedUnit has buff 0_PAL-3 Sanctified Bond ) Equal to False
-
-
Then - Actions
-
Unit - Set life of GDD_DamagedUnit to ((Life of GDD_DamagedUnit) + (0.50 x GDD_Damage))
-
Game - Display to (All players) the text: ((Name of GDD_DamagedUnit) + ( blocked + ((String((Integer((0.50 x GDD_Damage))))) + due to Challenge.)))
-
-
Else - Actions
-
Custom script: call SaveReal(udg_H_BRS_Challenge, GetHandleId(udg_GDD_DamageSource), StringHash("damage"), (udg_temp_real + udg_GDD_Damage))
-
Game - Display to (All players) the text: ((Name of GDD_DamageSource) + ( dealt + ((String((Integer(GDD_Damage)))) + damage to the taunting Berserker.)))
-
-
-
-
Else - Actions
-
-
-