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!
The Assasin throws two Shuriken in the targeted direction. There is also a chance to create two shadow shuriken, which fly in the shadows of the first ones. When the shuriken return to the caster the heal him for an amount of the dealt damage. If the distance between Shuriken and caster to much they will disappear when they are heading back.
---- TRIGGERS ----
Shadow Shuriken Base
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Shadow Shuriken
Actions
-------- -------------------------If there is currently no running instance of the spell we switch the spell on------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ShSh_IndexSize Equal to 0
Then - Actions
Trigger - Turn on Shadow Shuriken loop <gen>
Else - Actions
-------- Dynamic Index --------
Set ShSh_IndexSize = (ShSh_IndexSize + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Set ShSh_Damage[(ShSh_TempInt x 2)] = (0.10 x ((Real(ShSh_Level[ShSh_TempInt])) x (Real((Intelligence of ShSh_caster[ShSh_TempInt] (Include bonuses))))))
-------- Damage the shadow shuriken deal. --------
Set ShSh_Damage[((ShSh_TempInt x 2) + 1)] = (0.05 x ((Real(ShSh_Level[ShSh_TempInt])) x (Real((Intelligence of ShSh_caster[ShSh_TempInt] (Include bonuses))))))
-------- The location where the shadow shuriken are spawnend. To avoid bugs the offset value should be the same as the value with thich the moved distance got reduced ealier. --------
-------- Here in both cases 150 --------
Set ShSh_Loc[8] = (ShSh_Loc[6] offset by 150.00 towards (ShSh_Angle[(ShSh_TempInt x 2)] + 180.00) degrees)
For each (Integer ShSh_loop_int) from 1 to ShSh_IndexSize, do (Actions)
Loop - Actions
Set ShSh_TempInt = ShSh_Index[ShSh_loop_int]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ShSh_Move_Offset[(ShSh_TempInt x 6)] Less than ShSh_Distance[ShSh_TempInt]
Then - Actions
Set ShSh_Move_Offset[(ShSh_TempInt x 6)] = (ShSh_Move_Offset[(ShSh_TempInt x 6)] + ShSh_Movespeed)
Set ShSh_SwingOffset = (((Sin(ShSh_Move_Offset[(ShSh_TempInt x 6)])) x ShSh_Sinefactor) x ShSh_Area[1])
Set ShSh_Loc[3] = (Position of ShSh_Dummy[(ShSh_TempInt x 6)])
Set ShSh_Loc[4] = (ShSh_Loc[3] offset by ShSh_Movespeed towards ShSh_Angle[(ShSh_TempInt x 2)] degrees)
Unit - Move ShSh_Dummy[(ShSh_TempInt x 6)] instantly to ShSh_Loc[4]
Set ShSh_Loc[1] = (ShSh_Loc[4] offset by ShSh_SwingOffset towards (ShSh_Angle[(ShSh_TempInt x 2)] - 90.00) degrees)
Set ShSh_Loc[2] = (ShSh_Loc[4] offset by ShSh_SwingOffset towards (ShSh_Angle[(ShSh_TempInt x 2)] + 90.00) degrees)
For each (Integer ShSh_int) from 1 to 2, do (Actions)
Loop - Actions
Unit - Move ShSh_Dummy[((ShSh_TempInt x 6) + ShSh_int)] instantly to ShSh_Loc[ShSh_int]
Set ShSh_TempGroup = (Units within ShSh_Area[1] of ShSh_Loc[ShSh_int] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) has buff Unverwundbar) Equal to False)) and (((((Matching unit) belongs to an ally of (Owner of ShSh_caster[ShSh_TempInt])) Equal to F
Unit Group - Pick every unit in ShSh_TempGroup and do (Actions)
Loop - Actions
Unit - Cause ShSh_caster[ShSh_TempInt] to damage (Picked unit), dealing ShSh_Damage[(ShSh_TempInt x 2)] damage of attack type Chaos and damage type Normal
Special Effect - Create a special effect attached to the chest of (Picked unit) using ShSh_Effects[5]
Special Effect - Destroy (Last created special effect)
Set ShSh_LifeAbsorb[(ShSh_TempInt x 2)] = (ShSh_LifeAbsorb[(ShSh_TempInt x 2)] + ShSh_Damage[(ShSh_TempInt x 2)])
Set ShSh_SwingOffset = (((Sin(ShSh_Move_Offset[((ShSh_TempInt x 6) + 1)])) x ShSh_Sinefactor) x ShSh_Area[1])
Set ShSh_Loc[4] = (ShSh_Loc[3] offset by ShSh_Movespeed towards ShSh_Angle[((ShSh_TempInt x 2) + 1)] degrees)
Unit - Move ShSh_Dummy[(ShSh_TempInt x 6)] instantly to ShSh_Loc[4]
Set ShSh_Loc[1] = (ShSh_Loc[4] offset by ShSh_SwingOffset towards (ShSh_Angle[((ShSh_TempInt x 2) + 1)] - 90.00) degrees)
Set ShSh_Loc[2] = (ShSh_Loc[4] offset by ShSh_SwingOffset towards (ShSh_Angle[((ShSh_TempInt x 2) + 1)] + 90.00) degrees)
For each (Integer ShSh_int) from 1 to 2, do (Actions)
Loop - Actions
Unit - Move ShSh_Dummy[((ShSh_TempInt x 6) + ShSh_int)] instantly to ShSh_Loc[ShSh_int]
Set ShSh_TempGroup = (Units within ShSh_Area[1] of ShSh_Loc[ShSh_int] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) has buff Unverwundbar) Equal to False)) and (((((Matching unit) belongs to an ally of (Owner of ShSh_caster[ShSh_TempInt])) Equal to F
Unit Group - Pick every unit in ShSh_TempGroup and do (Actions)
Loop - Actions
Unit - Cause ShSh_caster[ShSh_TempInt] to damage (Picked unit), dealing ShSh_Damage[(ShSh_TempInt x 2)] damage of attack type Chaos and damage type Normal
Special Effect - Create a special effect attached to the chest of (Picked unit) using ShSh_Effects[5]
Special Effect - Destroy (Last created special effect)
Set ShSh_LifeAbsorb[(ShSh_TempInt x 2)] = (ShSh_LifeAbsorb[(ShSh_TempInt x 2)] + ShSh_Damage[(ShSh_TempInt x 2)])
Unit - Remove ShSh_Dummy[(ShSh_TempInt x 6)] from the game
For each (Integer ShSh_int) from 1 to 2, do (Actions)
Loop - Actions
Special Effect - Destroy ShSh_ShurikenEffect[((ShSh_TempInt x 8) + (ShSh_int - 1))]
Special Effect - Destroy ShSh_ShurikenEffect[((ShSh_TempInt x 8) + (ShSh_int + 1))]
Unit - Remove ShSh_Dummy[((ShSh_TempInt x 6) + ShSh_int)] from the game
Set ShSh_Endboolean[(ShSh_TempInt x 2)] = True
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ShSh_ShadowingBoolean[ShSh_TempInt] Equal to True
ShSh_Move_Offset[((ShSh_TempInt x 6) + 3)] Less than ShSh_Distance[ShSh_TempInt]
Then - Actions
Set ShSh_Move_Offset[((ShSh_TempInt x 6) + 3)] = (ShSh_Move_Offset[((ShSh_TempInt x 6) + 3)] + ShSh_Movespeed)
Set ShSh_SwingOffset = (((Sin(ShSh_Move_Offset[((ShSh_TempInt x 6) + 3)])) x ShSh_Sinefactor) x ShSh_Area[1])
Set ShSh_Loc[1] = (Position of ShSh_Dummy[((ShSh_TempInt x 6) + 3)])
Set ShSh_Loc[2] = (ShSh_Loc[1] offset by ShSh_Movespeed towards ShSh_Angle[(ShSh_TempInt x 2)] degrees)
Unit - Move ShSh_Dummy[((ShSh_TempInt x 6) + 3)] instantly to ShSh_Loc[2]
Set ShSh_Loc[4] = (ShSh_Loc[2] offset by ShSh_SwingOffset towards (ShSh_Angle[(ShSh_TempInt x 2)] - 90.00) degrees)
Set ShSh_Loc[5] = (ShSh_Loc[2] offset by ShSh_SwingOffset towards (ShSh_Angle[(ShSh_TempInt x 2)] + 90.00) degrees)
For each (Integer ShSh_int) from 4 to 5, do (Actions)
Loop - Actions
Unit - Move ShSh_Dummy[((ShSh_TempInt x 6) + ShSh_int)] instantly to ShSh_Loc[ShSh_int]
Set ShSh_TempGroup = (Units within ShSh_Area[1] of ShSh_Loc[ShSh_int] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) has buff Unverwundbar) Equal to False)) and (((((Matching unit) belongs to an ally of (Owner of ShSh_caster[ShSh_TempInt])) Equal to F
Unit Group - Pick every unit in ShSh_TempGroup and do (Actions)
Loop - Actions
Unit - Cause ShSh_caster[ShSh_TempInt] to damage (Picked unit), dealing ShSh_Damage[((ShSh_TempInt x 2) + 1)] damage of attack type Chaos and damage type Normal
Special Effect - Create a special effect attached to the chest of (Picked unit) using ShSh_Effects[5]
Special Effect - Destroy (Last created special effect)
Set ShSh_LifeAbsorb[((ShSh_TempInt x 2) + 1)] = (ShSh_LifeAbsorb[((ShSh_TempInt x 2) + 1)] + ShSh_Damage[((ShSh_TempInt x 2) + 1)])
Set ShSh_SwingOffset = (((Sin(ShSh_Move_Offset[((ShSh_TempInt x 6) + 4)])) x ShSh_Sinefactor) x ShSh_Area[1])
Set ShSh_Loc[2] = (ShSh_Loc[1] offset by ShSh_Movespeed towards ShSh_Angle[((ShSh_TempInt x 2) + 1)] degrees)
Unit - Move ShSh_Dummy[((ShSh_TempInt x 6) + 3)] instantly to ShSh_Loc[2]
Set ShSh_Loc[4] = (ShSh_Loc[2] offset by ShSh_SwingOffset towards (ShSh_Angle[((ShSh_TempInt x 2) + 1)] - 90.00) degrees)
Set ShSh_Loc[5] = (ShSh_Loc[2] offset by ShSh_SwingOffset towards (ShSh_Angle[((ShSh_TempInt x 2) + 1)] + 90.00) degrees)
For each (Integer ShSh_int) from 4 to 5, do (Actions)
Loop - Actions
Unit - Move ShSh_Dummy[((ShSh_TempInt x 6) + ShSh_int)] instantly to ShSh_Loc[ShSh_int]
Set ShSh_TempGroup = (Units within ShSh_Area[1] of ShSh_Loc[ShSh_int] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) has buff Unverwundbar) Equal to False)) and (((((Matching unit) belongs to an ally of (Owner of ShSh_caster[ShSh_TempInt])) Equal to F
Unit Group - Pick every unit in ShSh_TempGroup and do (Actions)
Loop - Actions
Unit - Cause ShSh_caster[ShSh_TempInt] to damage (Picked unit), dealing ShSh_Damage[((ShSh_TempInt x 2) + 1)] damage of attack type Chaos and damage type Normal
Special Effect - Create a special effect attached to the chest of (Picked unit) using ShSh_Effects[5]
Special Effect - Destroy (Last created special effect)
Set ShSh_LifeAbsorb[((ShSh_TempInt x 2) + 1)] = (ShSh_LifeAbsorb[((ShSh_TempInt x 2) + 1)] + ShSh_Damage[((ShSh_TempInt x 2) + 1)])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ShSh_caster[ShSh_TempInt] Not equal to No unit
ShSh_Move_Offset[((ShSh_TempInt x 6) + 5)] Less than 30.00
(ShSh_caster[ShSh_TempInt] is alive) Equal to True
ShSh_LifeAbsorb[((ShSh_TempInt x 2) + 1)] Greater than 0.00
ShSh_AspectBoolean[2] Equal to True
Then - Actions
Unit - Set life of ShSh_caster[ShSh_TempInt] to ((Life of ShSh_caster[ShSh_TempInt]) + (ShSh_LifeAbsorb[((ShSh_TempInt x 2) + 1)] / ShSh_SomeValues[2]))
Special Effect - Create a special effect attached to the origin of ShSh_caster[ShSh_TempInt] using ShSh_Effects[6]
Special Effect - Destroy (Last created special effect)
For each (Integer ShSh_int) from 1 to 2, do (Actions)
Loop - Actions
Unit - Move ShSh_Dummy[((ShSh_TempInt x 6) + ShSh_int)] instantly to ShSh_Loc[ShSh_int]
-------- Units around the missiles. --------
Set ShSh_TempGroup = (Units within ShSh_Area[1] of ShSh_Loc[ShSh_int] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) has buff Unverwundbar) Equal to False)) and (((((Matching unit) belongs to an ally of (Owner of ShSh_caster[ShSh_TempInt])) Equal to F
Unit Group - Pick every unit in ShSh_TempGroup and do (Actions)
Loop - Actions
Unit - Cause ShSh_caster[ShSh_TempInt] to damage (Picked unit), dealing ShSh_Damage[(ShSh_TempInt x 2)] damage of attack type Chaos and damage type Normal
Special Effect - Create a special effect attached to the chest of (Picked unit) using ShSh_Effects[5]
Special Effect - Destroy (Last created special effect)
-------- Here we transfer the moved distance in to an other variable because if we later reduce the first one it will bug. --------
Set ShSh_Move_Offset[((ShSh_TempInt x 6) + 1)] = ShSh_Move_Offset[(ShSh_TempInt x 6)]
Else - Actions
-------- Now the shu are on their way back to the caster, if the endboolean is still false they had´nt reached him until now. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ShSh_Endboolean[(ShSh_TempInt x 2)] Equal to False
Then - Actions
-------- Using the location of the caster and the dummy to check the distance between them. If its to high the spell will end, if its to low, too but on purpose. --------
Set ShSh_Loc[3] = (Position of ShSh_Dummy[(ShSh_TempInt x 6)])
Set ShSh_Loc[4] = (Position of ShSh_caster[ShSh_TempInt])
Set ShSh_Move_Offset[((ShSh_TempInt x 6) + 2)] = (Distance between ShSh_Loc[3] and ShSh_Loc[4])
-------- Additional if the caster had died or is removed from the game the spell will also end. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ShSh_Move_Offset[((ShSh_TempInt x 6) + 2)] Greater than or equal to 30.00
ShSh_Move_Offset[((ShSh_TempInt x 6) + 2)] Less than or equal to 5000.00
ShSh_Dummy[(ShSh_TempInt x 6)] Not equal to No unit
ShSh_caster[ShSh_TempInt] Not equal to No unit
(ShSh_caster[ShSh_TempInt] is alive) Equal to True
Then - Actions
-------- Angle from shu.. location dummy to caster. --------
Set ShSh_Angle[((ShSh_TempInt x 2) + 1)] = (Angle from ShSh_Loc[3] to ShSh_Loc[4])
-------- We use this offset value to let the shu.. move allways in the defined way. If we use the distance between caster and location dummy and the caster runs away the movement will be stretched, --------
Set ShSh_Move_Offset[((ShSh_TempInt x 6) + 1)] = (ShSh_Move_Offset[((ShSh_TempInt x 6) + 1)] - ShSh_Movespeed)
For each (Integer ShSh_int) from 1 to 2, do (Actions)
Loop - Actions
Unit - Move ShSh_Dummy[((ShSh_TempInt x 6) + ShSh_int)] instantly to ShSh_Loc[ShSh_int]
Set ShSh_TempGroup = (Units within ShSh_Area[1] of ShSh_Loc[ShSh_int] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) has buff Unverwundbar) Equal to False)) and (((((Matching unit) belongs to an ally of (Owner of ShSh_caster[ShSh_TempInt])) Equal to F
Unit Group - Pick every unit in ShSh_TempGroup and do (Actions)
Loop - Actions
Unit - Cause ShSh_caster[ShSh_TempInt] to damage (Picked unit), dealing ShSh_Damage[(ShSh_TempInt x 2)] damage of attack type Chaos and damage type Normal
Special Effect - Create a special effect attached to the chest of (Picked unit) using ShSh_Effects[5]
Special Effect - Destroy (Last created special effect)
-------- We loop through both shadow shuriken. --------
For each (Integer ShSh_int) from 4 to 5, do (Actions)
Loop - Actions
Unit - Move ShSh_Dummy[((ShSh_TempInt x 6) + ShSh_int)] instantly to ShSh_Loc[ShSh_int]
Set ShSh_TempGroup = (Units within ShSh_Area[1] of ShSh_Loc[ShSh_int] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) has buff Unverwundbar) Equal to False)) and (((((Matching unit) belongs to an ally of (Owner of ShSh_caster[ShSh_TempInt])) Equal to F
Unit Group - Pick every unit in ShSh_TempGroup and do (Actions)
Loop - Actions
Unit - Cause ShSh_caster[ShSh_TempInt] to damage (Picked unit), dealing ShSh_Damage[((ShSh_TempInt x 2) + 1)] damage of attack type Chaos and damage type Normal
Special Effect - Create a special effect attached to the chest of (Picked unit) using ShSh_Effects[5]
Special Effect - Destroy (Last created special effect)
-------- Here we transfer the moved distance in to an other variable because if we later reduce the first one it will bug. --------
Set ShSh_Move_Offset[((ShSh_TempInt x 6) + 4)] = ShSh_Move_Offset[((ShSh_TempInt x 6) + 3)]
Else - Actions
-------- Now the FAKE shu are on their way back to the caster, if the endboolean is still false they had´nt reached him until now. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ShSh_ShadowingBoolean[ShSh_TempInt] Equal to True
ShSh_Endboolean[((ShSh_TempInt x 2) + 1)] Equal to False
Then - Actions
-------- Using the location of the caster and the dummy to check the distance between them. If its to high the spell will end, if its to low, too but on purpose. --------
Set ShSh_Loc[1] = (Position of ShSh_Dummy[((ShSh_TempInt x 6) + 3)])
Set ShSh_Loc[2] = (Position of ShSh_caster[ShSh_TempInt])
Set ShSh_Move_Offset[((ShSh_TempInt x 6) + 5)] = (Distance between ShSh_Loc[1] and ShSh_Loc[2])
-------- If Blink spells are used or the caster otherwise changes his position to a place behind the shuriken on their return we switch the position of the shadow shuriken to leave them behind the real ones. --------
-------- We use this offset value to let the shu.. move allways in the defined way. If we use the distance between caster and location dummy and the caster runs away the movement will be stretched, --------
Set ShSh_Move_Offset[((ShSh_TempInt x 6) + 4)] = (ShSh_Move_Offset[((ShSh_TempInt x 6) + 4)] - ShSh_Movespeed)
-------- We loop through both shadow shuriken. --------
For each (Integer ShSh_int) from 4 to 5, do (Actions)
Loop - Actions
Unit - Move ShSh_Dummy[((ShSh_TempInt x 6) + ShSh_int)] instantly to ShSh_Loc[ShSh_int]
Set ShSh_TempGroup = (Units within ShSh_Area[1] of ShSh_Loc[ShSh_int] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) has buff Unverwundbar) Equal to False)) and (((((Matching unit) belongs to an ally of (Owner of ShSh_caster[ShSh_TempInt])) Equal to F
Unit Group - Pick every unit in ShSh_TempGroup and do (Actions)
Loop - Actions
Unit - Cause ShSh_caster[ShSh_TempInt] to damage (Picked unit), dealing ShSh_Damage[((ShSh_TempInt x 2) + 1)] damage of attack type Chaos and damage type Normal
Special Effect - Create a special effect attached to the chest of (Picked unit) using ShSh_Effects[5]
Special Effect - Destroy (Last created special effect)
-------- If the real shu.. had returned or are to far away or the caster is dead... and the shadow shuriken if they had existed we reduce the index. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ShSh_IndexSize Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Else - Actions
Credits goes to Hanky for the Dynamic Index system and to the creator of the dummy.mdx model.
And finally to me, BlackHawk or S.O.A.D_RoXXX.
I made this spell to practise 2D-arrays, so if I did something wrong please tell me.
Update v1.05: Fixed the bug, kola mentioned [thanks for that ], that occurs when your hero moves behind the shuriken when they are on their return, so that the shadow shuriken takes the lead.
Update v1.06: Switched the IF/THEN/ELSE condition where the trigger get turned off to the place where the index gets reduced
i was planing of making a Night Stalker... and if i do one... u can be sure i'll use this.. its awesome.. (i didnt check the triggers so i'll see what others are saying )
only rly minor glitch i found is that when u blink on the other side of where ur hero was, the shadow is ''taking the lead'' of the shurikens.
i'll give this hero a blink or something like this just cuz its super mega cool combo with this spell lol
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ShSh_IndexSize Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
be right after this:
Set ShSh_IndexSize = (ShSh_IndexSize - 1)
Now the IF/THEN/ELSE gets checked every time the trigger runs. If it's after index - 1, it only gets checked when index size is reduced, which makes sense to me.
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.