Finishing up all the abilities on my Berserker hero. Have a pretty simple spell here, but I am wondering if I could be making it more efficient, like somehow to not have a 0.03s periodic trigger for this.
It's based on an ability from Guild Wars that caps an enemy's max HP, preventing healing.
PS the effect of the blood effect every 0.03 is so cool though...
It's based on an ability from Guild Wars that caps an enemy's max HP, preventing healing.
-
Mortal Wound 01
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to BRS-5 Mortal Wound
-
-
Actions
-
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (0.25 x (Life of (Target unit of ability being cast))) damage of attack type Hero and damage type Normal
-
Special Effect - Create a special effect attached to the weapon, left of (Triggering unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
-
Special Effect - Destroy (Last created special effect)
-
Special Effect - Create a special effect attached to the weapon, right of (Triggering unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
-
Special Effect - Destroy (Last created special effect)
-
Special Effect - Create a special effect attached to the chest of (Target unit of ability being cast) using Objects\Spawnmodels\Orc\Orcblood\OrdBloodWyvernRider.mdl
-
Special Effect - Destroy (Last created special effect)
-
Set temp_point = (Position of (Target unit of ability being cast))
-
Unit - Create 1 D.BRS-5 Mortal Wound for (Owner of (Triggering unit)) at temp_point facing Default building facing degrees
-
Custom script: call RemoveLocation(udg_temp_point)
-
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
Unit - Order (Last created unit) to Undead Banshee - Curse (Target unit of ability being cast)
-
Hashtable - Save 10.00 as (Key duration) of (Key (Target unit of ability being cast)) in H_MortalWound
-
Hashtable - Save 75.00 as (Key hpmax) of (Key (Target unit of ability being cast)) in H_MortalWound
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Target unit of ability being cast) is in G_MortalWound) Equal to False
-
-
Then - Actions
-
Unit Group - Add (Target unit of ability being cast) to G_MortalWound
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Mortal Wound 02 <gen> is on) Equal to False
-
-
Then - Actions
-
Trigger - Turn on Mortal Wound 02 <gen>
-
-
Else - Actions
-
-
-
-
Mortal Wound 02
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in G_MortalWound) Greater than 0
-
-
Then - Actions
-
Unit Group - Pick every unit in G_MortalWound and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Load (Key duration) of (Key (Picked unit)) from H_MortalWound) Greater than 0.00
-
-
Then - Actions
-
Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
-
Special Effect - Destroy (Last created special effect)
-
Hashtable - Save ((Load (Key duration) of (Key (Picked unit)) from H_MortalWound) - R_FRAME_PROJECTILES) as (Key duration) of (Key (Picked unit)) in H_MortalWound
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Percentage life of (Picked unit)) Greater than (Load (Key hpmax) of (Key (Picked unit)) from H_MortalWound)
-
-
Then - Actions
-
Unit - Set life of (Picked unit) to (Load (Key hpmax) of (Key (Picked unit)) from H_MortalWound)%
-
-
Else - Actions
-
-
-
Else - Actions
-
Unit - Remove ~BRS-5 Mortal Wound (Berserker) buff from (Picked unit)
-
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in H_MortalWound
-
Unit Group - Remove (Picked unit) from G_MortalWound
-
-
-
-
-
-
Else - Actions
-
Trigger - Turn off (This trigger)
-
-
-
-