Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Set WE_Effect_Move = Abilities\Spells\Items\AIma\AImaTarget.mdl
Set WE_Effect_Hit = Abilities\Spells\Items\SpellShieldAmulet\SpellShieldCaster.mdl
Set WE_Effect_Explode = <Empty String>
-------- ----------------------------- --------
-------- Holy Energy --------
-------- ----------------------------- --------
Set WH_Spell = Holy Energy
-------- ----------------------------- --------
Set WH_Chance[1] = 10.00
Set WH_Chance[2] = 15.00
Set WH_Chance[3] = 20.00
-------- ----------------------------- --------
Set WH_Heal[1] = 50.00
Set WH_Heal[2] = 100.00
Set WH_Heal[3] = 150.00
-------- ----------------------------- --------
Set WH_AoE[1] = 100.00
Set WH_AoE[2] = 150.00
Set WH_AoE[3] = 200.00
-------- ----------------------------- --------
Set WH_Show_Heal = True
Set WH_Heal_Color = |cff32cd32
-------- ----------------------------- --------
Set WH_Effect_Place = overhead
Set WH_Effect_Place_Friend = overhead
Set WH_Effect_Self = Abilities\Spells\Undead\ReplenishMana\ReplenishManaCasterOverhead.mdl
Set WH_Effect_Friend = Abilities\Spells\Undead\ReplenishMana\ReplenishManaCasterOverhead.mdl
-------- ----------------------------- --------
Energy Bolt
Creates a bolt made from pure energy, The energy bolt travels to the targeted location and explodes and stuns all nearby enemies for a few seconds. Has a chance to also deal bonus damage to nearby enemies.
Hashtable - Save Handle OfWE_Cast as (Key Cast) of (Key WE_Handle) in WE_Hashtable
Hashtable - Save Handle OfWE_Caster as (Key Caster) of (Key WE_Handle) in WE_Hashtable
Hashtable - Save Handle OfWE_Target as (Key Target) of (Key WE_Handle) in WE_Hashtable
Hashtable - Save Handle OfWE_Rect as (Key Rect) of (Key WE_Handle) in WE_Hashtable
Hashtable - Save WE_Angle as (Key Angle) of (Key WE_Handle) in WE_Hashtable
Unit Group - Add (Last created unit) to WE_Dummy
Trigger - Turn on Energy Bolt Loop <gen>
Set WE_Caster = No unit
Custom script: call RemoveLocation(udg_WE_Cast)
Custom script: call RemoveLocation(udg_WE_Target)
Custom script: call RemoveLocation(udg_WE_Create)
Else - Actions
Energy Bolt Loop
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in WE_Dummy and do (Actions)
Loop - Actions
Set WE_Handle = (Picked unit)
Set WE_DummyPick = (Picked unit)
Set WE_Caster = (Load (Key Caster) of (Key WE_Handle) in WE_Hashtable)
Set WE_Cast = (Load (Key Cast) of (Key WE_Handle) in WE_Hashtable)
Set WE_Target = (Load (Key Target) of (Key WE_Handle) in WE_Hashtable)
Set WE_Angle = (Load (Key Angle) of (Key WE_Handle) from WE_Hashtable)
Set WE_Rect = (Load (Key Rect) of (Key WE_Handle) in WE_Hashtable)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is alive) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(WE_Rect contains WE_DummyPick) Equal to False
Then - Actions
Set WE_Picked = (Position of WE_DummyPick)
Set WE_Move = (WE_Picked offset by WE_Speed towards WE_Angle degrees)
Unit - Move WE_DummyPick instantly to WE_Move
Special Effect - Create a special effect at (Position of WE_DummyPick) using WE_Effect_Move
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_WE_Picked)
Custom script: call RemoveLocation(udg_WE_Move)
Else - Actions
Unit - Kill WE_DummyPick
Special Effect - Create a special effect at (Position of WE_DummyPick) using WE_Effect_Explode
Special Effect - Destroy (Last created special effect)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WE_All Equal to True
Then - Actions
Set WE_Loc = (Position of WE_DummyPick)
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within 100.00 of WE_Loc matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of WE_DummyPick)) Equal to True))) and do (Actions)
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
Unit - Add WE_Dummy_Spell to (Last created unit)
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
Set WE_Int = (Random real number between 1.00 and 100.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WE_Int Less than or equal to WE_Bonus_Chance[(Level of WE_Spell for WE_Caster)]
Then - Actions
Unit - Cause (Last created unit) to damage (Picked unit), dealing (WE_Damage[(Level of WE_Spell for WE_Caster)] + WE_Bonus_Damage[(Level of WE_Spell for WE_Caster)]) damage of attack type Spells and damage type Normal
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WE_Show_Damage Equal to True
Then - Actions
Set WE_Damage_Unit = (Last created unit)
Set WE_Damage_Text = ((Integer(WE_Damage[(Level of WE_Spell for WE_Caster)])) + (Integer(WE_Bonus_Damage[(Level of WE_Spell for WE_Caster)])))
Floating Text - Create floating text that reads (WE_Damage_Color + ((String(WE_Damage_Text)) + |r)) above WE_Damage_Unit with Z offset 0.00, using font size 7.50, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
Set WE_Damage_Unit = No unit
Else - Actions
Else - Actions
Unit - Cause (Last created unit) to damage (Picked unit), dealing WE_Damage[(Level of WE_Spell for WE_Caster)] damage of attack type Spells and damage type Normal
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WE_Show_Damage Equal to True
Then - Actions
Set WE_Damage_Unit = (Last created unit)
Set WE_Damage_Text = (Integer(WE_Damage[(Level of WE_Spell for WE_Caster)]))
Floating Text - Create floating text that reads (WE_Damage_Color + ((String(WE_Damage_Text)) + |r)) above WE_Damage_Unit with Z offset 0.00, using font size 7.50, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
Set WE_Damage_Unit = No unit
Else - Actions
Special Effect - Create a special effect at WE_Loc2 using WE_Effect_Hit
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_WE_Loc2)
Custom script: call RemoveLocation(udg_WE_Loc)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WE_Heros Equal to True
Then - Actions
Set WE_Loc = (Position of WE_DummyPick)
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within 100.00 of WE_Loc matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of WE_DummyPick)) Equal to True)))) and do (Actions)
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
Unit - Add WE_Dummy_Spell to (Last created unit)
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WE_Int Less than or equal to WE_Bonus_Chance[(Level of WE_Spell for WE_Caster)]
Then - Actions
Unit - Cause (Last created unit) to damage (Picked unit), dealing (WE_Damage[(Level of WE_Spell for WE_Caster)] + WE_Bonus_Damage[(Level of WE_Spell for WE_Caster)]) damage of attack type Spells and damage type Normal
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WE_Show_Damage Equal to True
Then - Actions
Set WE_Damage_Unit = (Last created unit)
Set WE_Damage_Text = ((Integer(WE_Damage[(Level of WE_Spell for WE_Caster)])) + (Integer(WE_Bonus_Damage[(Level of WE_Spell for WE_Caster)])))
Floating Text - Create floating text that reads (WE_Damage_Color + ((String(WE_Damage_Text)) + |r)) above WE_Damage_Unit with Z offset 0.00, using font size 7.50, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
Set WE_Damage_Unit = No unit
Else - Actions
Else - Actions
Unit - Cause (Last created unit) to damage (Picked unit), dealing WE_Damage[(Level of WE_Spell for WE_Caster)] damage of attack type Spells and damage type Normal
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WE_Show_Damage Equal to True
Then - Actions
Set WE_Damage_Unit = (Last created unit)
Set WE_Damage_Text = (Integer(WE_Damage[(Level of WE_Spell for WE_Caster)]))
Floating Text - Create floating text that reads (WE_Damage_Color + ((String(WE_Damage_Text)) + |r)) above WE_Damage_Unit with Z offset 0.00, using font size 7.50, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
Set WE_Damage_Unit = No unit
Else - Actions
Special Effect - Create a special effect at WE_Loc2 using WE_Effect_Hit
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_WE_Loc2)
Custom script: call RemoveLocation(udg_WE_Loc)
Else - Actions
Else - Actions
Hashtable - Clear all child hashtables of child (Key WE_Handle) in WE_Hashtable
Set WE_DummyPick = No unit
Custom script: call RemoveLocation(udg_WE_Target)
Custom script: call RemoveLocation(udg_WE_Cast)
Custom script: call RemoveLocation(udg_WE_Create)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(WE_Dummy is empty) Equal to True
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Holy Energy
Has a chance to change energy to holy energy which heals all nearby friendly units. Everytime a spell is cast.
(Level of WH_Spell for (Triggering unit)) Greater than 0
Actions
Set WH_Caster = (Triggering unit)
Set WH_Int = (Random real number between 1.00 and 100.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WH_Int Less than or equal to WH_Chance[(Level of WH_Spell for (Triggering unit))]
Then - Actions
Special Effect - Create a special effect attached to the WH_Effect_Place of WH_Caster using WH_Effect_Self
Special Effect - Destroy (Last created special effect)
Unit - Set life of WE_Caster to ((Life of WE_Caster) + WH_Heal[(Level of WH_Spell for WE_Caster)])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WH_Show_Heal Equal to True
Then - Actions
Set WH_Heal_Unit = WH_Caster
Set WH_Heal_Text = (Integer(WH_Heal[(Level of WH_Spell for WH_Caster)]))
Floating Text - Create floating text that reads (WH_Heal_Color + ((String(WH_Heal_Text)) + |r)) above WH_Heal_Unit with Z offset 0.00, using font size 7.50, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
Set WH_Heal_Unit = No unit
Else - Actions
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within WH_AoE[(Level of WH_Spell for WH_Caster)] of (Position of WH_Caster) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an ally of (Owner of WH_Caster)) Equal to True))) and do (Actions)
Loop - Actions
Special Effect - Create a special effect attached to the WH_Effect_Friend of (Picked unit) using WH_Effect_Friend
Special Effect - Destroy (Last created special effect)
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + WH_Heal[(Level of WH_Spell for WE_Caster)])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WH_Show_Heal Equal to True
Then - Actions
Set WH_Heal_Unit = (Picked unit)
Set WH_Heal_Text = (Integer(WH_Heal[(Level of WH_Spell for WH_Caster)]))
Floating Text - Create floating text that reads (WH_Heal_Color + ((String(WH_Heal_Text)) + |r)) above WH_Heal_Unit with Z offset 0.00, using font size 7.50, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
12th Dec 2015
IcemanBo: For long time as NeedsFix. Rejected.
11:33, 3rd Jun 2011
Maker:
The handle should be an integer.
You don't have to null globals, like you set WE_caster = null.
Store the ability level inot the hashtable, and load the...
12th Dec 2015
IcemanBo: For long time as NeedsFix. Rejected.
11:33, 3rd Jun 2011
Maker:
The handle should be an integer.
You don't have to null globals, like you set WE_caster = null.
Store the ability level inot the hashtable, and load the value and use it here:
Set WE_Damage_Text = ((Integer(WE_Damage[(Level of WE_Spell for WE_Caster)]))...
Leak:
Special Effect - Create a special effect at (Position of WE_DummyPick) using WE_Effect_Move
The dummies do not need invulnerability ability, they have locust.
Looks nice, gonna test...
First edit: i think it's not needed to null the unit...
Second edit: (Level of WH_Spell for (Triggering unit)) Greater than 0, is this necessary? think not.
So you're gonna two spells to this? Hehe i love it! 5/5
Looks nice, gonna test...
First edit: i think it's not needed to null the unit...
Second edit: (Level of WH_Spell for (Triggering unit)) Greater than 0, is this necessary? think not.
So you're gonna two spells to this? Hehe i love it! 5/5
That has two syntax errors. JASS is case-sensitive, so it must be "set" not "Set" and there is no "key" function (unless someone defines it, but that's not going to happen in most maps), the function is GetHandleId.
Custom script: set udg_WE_HandleInt = GetHandleId(udg_WE_DummyPick)
The custom script doesn't change much of the efficiency as it saves one function call: GetHandleId vs GetHandleIdBJ (which is a wrapper function for GetHandleId). I don't advise doing such custom script in a GUI map because at that point you might as well be coding the whole thing in JASS.
This is why I have much higher standards from JASS scripts than I do GUI triggers, because you just can't get the same results out of GUI as you can by editing the script directly.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.