• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

DotA: Mirana Spells v1.04 [GUI][MUI]

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: Marsal
First spell(s) in hiveworkshop!

Spells to resemble Mirana's spells in DotA [Defense of the Ancients].

------------------------------------------------------------------------
NOTE: THERE MIGHT BE SOME INSIGNIFICANT BUGS/ERRORS!
------------------------------------------------------------------------

4 Abilities - Starfall, Elune's Arrow, Leap and Moonlight Shadow

------------------------------------------------------------------------
NOTE: TRIGGERS SHOWN HERE MIGHT BE SOMEWHAT OUTDATED!
------------------------------------------------------------------------



Ability Type: Active
Target Type: Instant

Calls down a wave of meteors to damage each nearby enemy. One random enemy unit within 175 aoe will get hit again for half the damage.


[trigger="StarfallCast"]
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Starfall_Ability
Actions
-------- //ONLY IF WHERE THERE ARE NO INSTANCES IT WILL START TRIGGER OF STARFALL [RANDOM UNIT] --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Starfall_MUI Equal to 0
Then - Actions
Trigger - Turn on StarfallTimer <gen>
Else - Actions
-------- ///////////////////////// --------
Set Starfall_MUI = (Starfall_MUI + 1)
Set Starfall_MUI_2 = (Starfall_MUI_2 + 1)
Set Starfall_Point[Starfall_MUI] = (Position of (Triggering unit))
Unit - Create 1 Starfall_Unit_Effect for Player 1 (Red) at Starfall_Point[Starfall_MUI] facing Default building facing degrees
Animation - Play (Last created unit)'s birth animation
Unit - Add a 0.75 second Generic expiration timer to (Last created unit)
Set Starfall_CastingUnit[Starfall_MUI] = (Triggering unit)
Set Starfall_Level[Starfall_MUI] = (Level of Starfall_Ability for (Triggering unit))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Starfall_Damage_Mechanicals Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Starfall_Damage_Structures Equal to True
Then - Actions
Set Starfall_Group[Starfall_MUI] = (Units within Starfall_AoE of Starfall_Point[Starfall_MUI] matching (((Matching unit) Not equal to (Triggering unit)) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Owner of (Triggering unit)) is an enem
Else - Actions
Set Starfall_Group[Starfall_MUI] = (Units within Starfall_AoE of Starfall_Point[Starfall_MUI] matching (((Matching unit) Not equal to (Triggering unit)) and ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Owner of (Triggering unit)) is
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Starfall_Damage_Structures Equal to True
Then - Actions
Set Starfall_Group[Starfall_MUI] = (Units within Starfall_AoE of Starfall_Point[Starfall_MUI] matching (((Matching unit) Not equal to (Triggering unit)) and ((((Matching unit) is Mechanical) Equal to False) and (((((Matching unit) is alive) Equal to True) and (((Matching unit) is Mechanical) E
Else - Actions
Set Starfall_Group[Starfall_MUI] = (Units within Starfall_AoE of Starfall_Point[Starfall_MUI] matching (((Matching unit) Not equal to (Triggering unit)) and ((((Matching unit) is A structure) Equal to False) and (((((Matching unit) is alive) Equal to True) and (((Matching unit) is Mechanical)
Hashtable - Save 0.00 as 1 of (Key (Triggering unit)) in Starfall_Hashtable
Unit Group - Add (Triggering unit) to Starfall_Damaging_Group
Unit Group - Pick every unit in Starfall_Group[Starfall_MUI] and do (Actions)
Loop - Actions
Unit - Cause Starfall_CastingUnit[Starfall_MUI] to damage (Picked unit), dealing Starfall_Damage[Starfall_Level[Starfall_MUI]] damage of attack type Magic and damage type Magic
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\NightElf\Starfall\StarfallTarget.mdl
Special Effect - Destroy (Last created special effect)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Starfall_Damage_Mechanicals Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Starfall_Damage_Structures Equal to True
Then - Actions
Set Starfall_Randomed_Group[Starfall_MUI] = (Units within Starfall_AoE_Randomed of Starfall_Point[Starfall_MUI] matching (((Matching unit) Not equal to (Triggering unit)) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Owner of (Triggering unit)) i
Else - Actions
Set Starfall_Randomed_Group[Starfall_MUI] = (Units within Starfall_AoE_Randomed of Starfall_Point[Starfall_MUI] matching (((Matching unit) Not equal to (Triggering unit)) and ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Owner of (Triggering u
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Starfall_Damage_Structures Equal to True
Then - Actions
Set Starfall_Randomed_Group[Starfall_MUI] = (Units within Starfall_AoE_Randomed of Starfall_Point[Starfall_MUI] matching (((Matching unit) Not equal to (Triggering unit)) and ((((Matching unit) is alive) Equal to True) and (((((Matching unit) is alive) Equal to True) and (((Matching unit) is Mechanical
Else - Actions
Set Starfall_Randomed_Group[Starfall_MUI] = (Units within Starfall_AoE_Randomed of Starfall_Point[Starfall_MUI] matching (((Matching unit) Not equal to (Triggering unit)) and ((((Matching unit) is A structure) Equal to False) and (((((Matching unit) is alive) Equal to True) and (((Matching unit) is Mechanical
[/trigger]

[trigger="StarfallTimer"]
Events
Time - Every 0.20 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in Starfall_Damaging_Group and do (Actions)
Loop - Actions
Hashtable - Save ((Load 1 of (Key (Picked unit)) from Starfall_Hashtable) + 0.20) as 1 of (Key (Picked unit)) in Starfall_Hashtable
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 1 of (Key (Picked unit)) from Starfall_Hashtable) Greater than or equal to 1.00
Then - Actions
For each (Integer A) from 1 to Starfall_MUI_2, do (Actions)
Loop - Actions
Set Starfall_Randomed_Unit[(Integer A)] = (Random unit from Starfall_Randomed_Group[(Integer A)])
Unit - Cause (Picked unit) to damage Starfall_Randomed_Unit[(Integer A)], dealing (Starfall_Damage[Starfall_Level[(Integer A)]] / 2.00) damage of attack type Magic and damage type Magic
Special Effect - Create a special effect attached to the origin of Starfall_Randomed_Unit[(Integer A)] using Abilities\Spells\NightElf\Starfall\StarfallTarget.mdl
Special Effect - Destroy (Last created special effect)
Unit Group - Remove (Picked unit) from Starfall_Damaging_Group
Set Starfall_MUI_2 = (Starfall_MUI_2 - 1)
Custom script: call RemoveLocation(udg_Starfall_Point[GetForLoopIndexA()])
Custom script: call DestroyGroup(udg_Starfall_Group[GetForLoopIndexA()])
Custom script: call DestroyGroup(udg_Starfall_Randomed_Group[GetForLoopIndexA()])
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Starfall_MUI_2 Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Set Starfall_MUI = 0
Else - Actions
[/trigger]




Ability Type: Active
Target Type: Point

Fires an arrow to a location with deadly precision, dealing large damage and stunning the first unit it strikes. Stun duration increases based on how far the target is, ranging from 0.5 to 5 seconds. Has 3000 range.


[trigger="ArrowCast"]
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Arrow_Ability
Actions
-------- //ONLY IF WHERE THERE ARE NO INSTANCES IT WILL START TRIGGER OF MOVING THE ARROW --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Arrow_MUI Equal to False
Then - Actions
Trigger - Turn on ArrowMove <gen>
Else - Actions
-------- ///////////////////////// --------
Set Arrow_MUI = True
Set Arrow_MUI_2 = (Arrow_MUI_2 + 1)
Set Arrow_CastingUnit[Arrow_MUI_2] = (Triggering unit)
Set Arrow_Default_Point[Arrow_MUI_2] = (Position of (Triggering unit))
Set Arrow_Point[Arrow_MUI_2] = (Position of (Triggering unit))
Set Arrow_Target_Point = (Target point of ability being cast)
Set Arrow_Angle[Arrow_MUI_2] = (Angle from Arrow_Default_Point[Arrow_MUI_2] to Arrow_Target_Point)
Set Arrow_Level[Arrow_MUI_2] = (Level of Arrow_Ability for (Triggering unit))
Unit - Create 1 Arrow_Unit_Projectile for Player 1 (Red) at Arrow_Default_Point[Arrow_MUI_2] facing Arrow_Angle[Arrow_MUI_2] degrees
Set Arrow[Arrow_MUI_2] = (Last created unit)
-------- REMOVING LEAKS --------
Custom script: call RemoveLocation(udg_Arrow_Target_Point)
[/trigger]

[trigger="ArrowMove"]
Events
Conditions
Actions
For each (Integer A) from 1 to Arrow_MUI_2, do (Actions)
Loop - Actions
Set Arrow_Point[(Integer A)] = (Arrow_Point[(Integer A)] offset by Arrow_Offset towards Arrow_Angle[(Integer A)] degrees)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Playable map area) contains Arrow_Point[(Integer A)]) Equal to True
Then - Actions
Unit - Move Arrow[(Integer A)] instantly to Arrow_Point[(Integer A)]
Else - Actions
Unit - Kill Arrow[(Integer A)]
Custom script: set udg_Arrow[GetForLoopIndexA()] = null
-------- //UNITS IN RANGE --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Arrow_Pass_Allies Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Arrow_Pass_Structures Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Arrow_Pass_Mechanicals Equal to True
Then - Actions
Set Arrow_Group[(Integer A)] = (Units within Arrow_AoE of Arrow_Point[(Integer A)] matching (((Unit-type of (Matching unit)) Not equal to Arrow_Unit_Projectile) and (((Matching unit) Not equal to Arrow_CastingUnit[(Integer A)]) and ((((Matching unit) is alive) Equal to True) and ((((Matchi
Else - Actions
Set Arrow_Group[(Integer A)] = (Units within Arrow_AoE of Arrow_Point[(Integer A)] matching (((Unit-type of (Matching unit)) Not equal to Arrow_Unit_Projectile) and (((Matching unit) Not equal to Arrow_CastingUnit[(Integer A)]) and ((((Matching unit) is alive) Equal to True) and ((((Matchi
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Arrow_Pass_Mechanicals Equal to True
Then - Actions
Set Arrow_Group[(Integer A)] = (Units within Arrow_AoE of Arrow_Point[(Integer A)] matching (((Unit-type of (Matching unit)) Not equal to Arrow_Unit_Projectile) and (((Matching unit) Not equal to Arrow_CastingUnit[(Integer A)]) and ((((Matching unit) is alive) Equal to True) and ((((Matchi
Else - Actions
Set Arrow_Group[(Integer A)] = (Units within Arrow_AoE of Arrow_Point[(Integer A)] matching (((Unit-type of (Matching unit)) Not equal to Arrow_Unit_Projectile) and (((Matching unit) Not equal to Arrow_CastingUnit[(Integer A)]) and ((((Matching unit) is alive) Equal to True) and (((Owner o
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Arrow_Pass_Structures Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Arrow_Pass_Mechanicals Equal to True
Then - Actions
Set Arrow_Group[(Integer A)] = (Units within Arrow_AoE of Arrow_Point[(Integer A)] matching (((Unit-type of (Matching unit)) Not equal to Arrow_Unit_Projectile) and (((Matching unit) Not equal to Arrow_CastingUnit[(Integer A)]) and ((((Matching unit) is alive) Equal to True) and ((((Matchi
Else - Actions
Set Arrow_Group[(Integer A)] = (Units within Arrow_AoE of Arrow_Point[(Integer A)] matching (((Unit-type of (Matching unit)) Not equal to Arrow_Unit_Projectile) and (((Matching unit) Not equal to Arrow_CastingUnit[(Integer A)]) and ((((Matching unit) is alive) Equal to True) and (((Matchin
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Arrow_Pass_Mechanicals Equal to True
Then - Actions
Set Arrow_Group[(Integer A)] = (Units within Arrow_AoE of Arrow_Point[(Integer A)] matching (((Unit-type of (Matching unit)) Not equal to Arrow_Unit_Projectile) and (((Matching unit) Not equal to Arrow_CastingUnit[(Integer A)]) and ((((Matching unit) is alive) Equal to True) and (((Matchin
Else - Actions
Set Arrow_Group[(Integer A)] = (Units within Arrow_AoE of Arrow_Point[(Integer A)] matching (((Unit-type of (Matching unit)) Not equal to Arrow_Unit_Projectile) and (((Matching unit) Not equal to Arrow_CastingUnit[(Integer A)]) and (((Matching unit) is alive) Equal to True))))
-------- /////////////////// --------
Set Arrow_Unit[(Integer A)] = (Random unit from Arrow_Group[(Integer A)])
Custom script: call DestroyGroup(udg_Arrow_Group[GetForLoopIndexA()])
Set Arrow_Distance[(Integer A)] = (Distance between Arrow_Default_Point[(Integer A)] and Arrow_Point[(Integer A)])
-------- //IF IT HITS A UNIT OR MAX RANGE --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Arrow_Distance[(Integer A)] Greater than or equal to Arrow_Maximum_Distance
Then - Actions
Unit - Kill Arrow[(Integer A)]
Custom script: set udg_Arrow[GetForLoopIndexA()] = null
Else - Actions
-------- //DAMAGE SYSTEM --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Arrow_Unit[(Integer A)] Not equal to No unit
Then - Actions
Unit - Create 1 Arrow_Unit_Dummy for Player 1 (Red) at Arrow_Point[(Integer A)] facing Arrow_Angle[(Integer A)] degrees
Set Arrow_Dummy_Unit[(Integer A)] = (Last created unit)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-------- //STUN DURATION --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Arrow_Distance[(Integer A)] Greater than (Arrow_Maximum_Distance / 2.00)
Then - Actions
Unit - Set level of Arrow_Ability_Stun for (Last created unit) to 10
Else - Actions
Unit - Set level of Arrow_Ability_Stun for (Last created unit) to (Integer((Arrow_Distance[(Integer A)] / 150.00)))
-------- /////////////////// --------
-------- //CHECK BOOLEAN FOR STRUCTURE AND MECHANICALS AND DAMAGE ACCORDINGLY --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of Arrow[(Integer A)]) is an enemy of (Owner of Arrow_Unit[(Integer A)])) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Arrow_Unit[(Integer A)] is A structure) Equal to True
Then - Actions
-------- //IF IT IS A STRUCTURE... --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Arrow_Damage_Structures Equal to True
Then - Actions
Unit - Order Arrow_Unit[(Integer A)] to Hold Position
Unit - Order Arrow_Dummy_Unit[(Integer A)] to Human Mountain King - Storm Bolt Arrow_Unit[(Integer A)]
Unit - Cause (Last created unit) to damage Arrow_Unit[(Integer A)], dealing Arrow_Damage[Arrow_Level[(Integer A)]] damage of attack type Magic and damage type Magic
Unit - Order Arrow_Unit[(Integer A)] to Stop
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Arrow_Unit[(Integer A)] is Mechanical) Equal to True
Then - Actions
-------- //IF IT IS MECHANICAL... --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Arrow_Damage_Mechanicals Equal to True
Then - Actions
Unit - Order Arrow_Unit[(Integer A)] to Hold Position
Unit - Order Arrow_Dummy_Unit[(Integer A)] to Human Mountain King - Storm Bolt Arrow_Unit[(Integer A)]
Unit - Cause (Last created unit) to damage Arrow_Unit[(Integer A)], dealing Arrow_Damage[Arrow_Level[(Integer A)]] damage of attack type Magic and damage type Magic
Unit - Order Arrow_Unit[(Integer A)] to Stop
Else - Actions
Else - Actions
-------- //ORGANIC UNITS --------
Unit - Order Arrow_Unit[(Integer A)] to Hold Position
Unit - Order Arrow_Dummy_Unit[(Integer A)] to Human Mountain King - Storm Bolt Arrow_Unit[(Integer A)]
Unit - Cause (Last created unit) to damage Arrow_Unit[(Integer A)], dealing Arrow_Damage[Arrow_Level[(Integer A)]] damage of attack type Magic and damage type Magic
Unit - Order Arrow_Unit[(Integer A)] to Stop
Else - Actions
-------- /////////////////// --------
Unit - Kill Arrow[(Integer A)]
Custom script: set udg_Arrow[GetForLoopIndexA()] = null
Custom script: set udg_Arrow_Unit[GetForLoopIndexA()] = null
Else - Actions
-------- /////////////////// --------
-------- /////////////////// --------
Set Temp_Group = (Units of type Arrow_Unit_Projectile)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in Temp_Group) Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Set Arrow_MUI = False
For each (Integer A) from 1 to Arrow_MUI_2, do (Actions)
Loop - Actions
Custom script: set udg_Arrow_CastingUnit[GetForLoopIndexA()] = null
Custom script: call RemoveLocation(udg_Arrow_Point[GetForLoopIndexA()])
Custom script: call RemoveLocation(udg_Arrow_Default_Point[GetForLoopIndexA()])
Set Arrow_MUI_2 = 0
Else - Actions
Custom script: call DestroyGroup(udg_Temp_Group)
[/trigger]




Ability Type: Active
Target Type: Instant

Mirana's wild Frostsaber leaps forward into battle, empowering allies with a ferocious roar upon landing. Speed bonus lasts 10 seconds.

QUADRATIC EQUATION USED:
y = -1/100 x^2 + 200



[trigger="LeapCast"]
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Leap_Ability
Actions
-------- //ONLY IF WHERE THERE ARE NO INSTANCES IT WILL START TRIGGER OF LEAPING --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Leap_MUI Equal to False
Then - Actions
Trigger - Turn on LeapMove <gen>
Else - Actions
-------- ///////////////////////// --------
Set Leap_MUI = True
Set Leap_MUI_2 = (Leap_MUI_2 + 1)
Set Leap_Factor[Leap_MUI_2] = -120
Set Leap_Unit[Leap_MUI_2] = (Triggering unit)
Set Leap_Point[Leap_MUI_2] = (Position of (Triggering unit))
Set Leap_CastPoint[Leap_MUI_2] = (Position of (Triggering unit))
Set Leap_Angle[Leap_MUI_2] = (Facing of (Triggering unit))
Set Temp_Point = (Center of (Playable map area))
Set Leap_Level[Leap_MUI_2] = (Level of Leap_Ability for (Triggering unit))
Unit - Create 1 Leap_Unit_Dummy for Player 1 (Red) at Temp_Point facing Default building facing degrees
Set Leap_Dummy_Unit[Leap_MUI_2] = (Last created unit)
Unit - Add Storm Crow Form to (Triggering unit)
Unit - Remove Storm Crow Form from (Triggering unit)
Custom script: call RemoveLocation(udg_Temp_Point)
Unit - Set level of Leap_Ability_Buff for Leap_Dummy_Unit[Leap_MUI_2] to Leap_Level[Leap_MUI_2]
Unit - Order Leap_Dummy_Unit[Leap_MUI_2] to Orc Shaman - Bloodlust Leap_Unit[Leap_MUI_2]
[/trigger]

[trigger="LeapMove"]
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to Leap_MUI_2, do (Actions)
Loop - Actions
Set Leap_Factor[(Integer A)] = (Leap_Factor[(Integer A)] + 24)
Set Leap_Point[(Integer A)] = (Leap_Point[(Integer A)] offset by (Leap_Maximum_Distance[Leap_Level[(Integer A)]] / 10.00) towards Leap_Angle[(Integer A)] degrees)
Set Leap_Distance[(Integer A)] = (Distance between Leap_Point[(Integer A)] and Leap_CastPoint[(Integer A)])
Animation - Change Leap_Unit[(Integer A)] flying height to ((-0.01 x (Power((Real(Leap_Factor[(Integer A)])), 2.00))) + 144.00) at 0.00
Unit - Move Leap_Unit[(Integer A)] instantly to Leap_Point[(Integer A)]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Leap_Distance[(Integer A)] Greater than or equal to Leap_Maximum_Distance[Leap_Level[(Integer A)]]
Then - Actions
Animation - Change Leap_Unit[(Integer A)] flying height to 0.00 at 0.00
Custom script: call RemoveLocation(udg_Leap_Point[GetForLoopIndexA()])
Custom script: call RemoveLocation(udg_Leap_CastPoint[GetForLoopIndexA()])
Custom script: set udg_Leap_Unit[GetForLoopIndexA()] = null
Unit - Remove Leap_Dummy_Unit[(Integer A)] from the game
Custom script: set udg_Leap_Dummy_Unit[GetForLoopIndexA()] = null
Else - Actions
Set Temp_Group = (Units of type Leap_Unit_Dummy)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in Temp_Group) Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Set Leap_MUI = False
Set Leap_MUI_2 = 0
Else - Actions
Custom script: call DestroyGroup(udg_Temp_Group)
[/trigger]




Ability Type: Active
Target Type: Instant

Turns Nightshade and all allied heroes invisible. If Invisibility is broken, it gets restored after the fade time during the shadow duration.


[trigger="MSCast"]
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to MS_Ability
Actions
-------- //ONLY IF WHERE THERE ARE NO INSTANCES IT WILL START TRIGGER OF COUNTDOWN --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MS_MUI Equal to 0
Then - Actions
Trigger - Turn on MSTimer <gen>
Else - Actions
-------- ///////////////////////// --------
Set MS_MUI = (MS_MUI + 1)
Set MS_MUI_2 = (MS_MUI_2 + 1)
Set MS_Group[MS_MUI] = (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Owner of (Triggering unit)) is an ally of (Owner of (Matching unit))) Equal to True)))
Hashtable - Save 0.00 as 1 of (Key (Triggering unit)) in MS_Hashtable
Unit Group - Add (Triggering unit) to MS_Casting_Group
Unit Group - Pick every unit in MS_Group[1] and do (Actions)
Loop - Actions
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\Invisibility\InvisibilityTarget.mdl
Special Effect - Destroy (Last created special effect)
Unit - Add MS_Ability_Buff to (Picked unit)
Unit - Set level of MS_Ability_Buff for (Triggering unit) to (Level of MS_Ability for (Triggering unit))
[/trigger]

[trigger="MSTimer"]
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in MS_Casting_Group and do (Actions)
Loop - Actions
Hashtable - Save ((Load 1 of (Key (Picked unit)) from (Last created hashtable)) + 1.00) as 1 of (Key (Picked unit)) in MS_Hashtable
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 1 of (Key (Picked unit)) from MS_Hashtable) Greater than MS_Duration
Then - Actions
For each (Integer A) from 1 to MS_MUI_2, do (Actions)
Loop - Actions
Unit Group - Remove (Picked unit) from MS_Casting_Group
Unit Group - Pick every unit in MS_Group[(Integer A)] and do (Actions)
Loop - Actions
Unit - Remove MS_Ability_Buff from (Picked unit)
Set MS_MUI_2 = (MS_MUI_2 - 1)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MS_MUI_2 Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Set MS_MUI = 0
Else - Actions
[/trigger]





[trigger="Variables"]
Events
Map initialization
Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------ --------
-------- ------------------------------------------------------------------------------------------------------------------------------------ --------
-------- ------------------------------------------------------------------------------------------------------------------------------------ --------
-------- !!! TAKE NOTE: !!! --------
-------- DO THE BELOW TO PREVENT BUGS --------
-------- //ONLY APPLIES TO STARFALL AND ELUNE'S ARROW\\ --------
-------- IN OBJECT EDITOR, REMOVE CLASSIFICATION 'MECHANICALS' FROM STRUCTURES IN YOUR MAP [E.G. TOWERS] --------
-------- IN OBJECT EDITOR, ADD CLASSIFICATION 'MECHANICALS' TO MECHANICALS IN YOUR MAP [E.G. SIEGE ENGINES] --------
-------- !!!////////////////////////////////////////////////////////!!! --------
-------- ------------------------------------------------------------------------------------------------------------------------------------ --------
-------- ------------------------------------------------------------------------------------------------------------------------------------ --------
-------- ------------------------------------------------------------------------------------------------------------------------------------ --------
-------- //////////////////////////////////////STARFALL\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --------
-------- //THE ABILITY ID --------
Set Starfall_Ability = Starfall
-------- ///////////////////////////////////// --------
-------- //THE UNIT ID --------
Set Starfall_Unit_Effect = Starfall_Effect
-------- ///////////////////////////////////// --------
-------- //THE DAMAGE OF STARFALL. THE INDEX CORRESPONDS TO THE LEVEL OF THE SKILL --------
Set Starfall_Damage[1] = 75.00
Set Starfall_Damage[2] = 150.00
Set Starfall_Damage[3] = 225.00
Set Starfall_Damage[4] = 300.00
-------- ///////////////////////////////////// --------
-------- //DOES STARFALL DAMAGE MECHANICALS --------
Set Starfall_Damage_Mechanicals = False
-------- ///////////////////////////////////// --------
-------- //DOES STARFALL DAMAGE STRUCTURES --------
Set Starfall_Damage_Structures = True
-------- ///////////////////////////////////// --------
-------- //THE AoE of the Starfall. --------
Set Starfall_AoE = 600.00
-------- ///////////////////////////////////// --------
-------- //THE AoE of the Starfall for the extra hit unit. --------
Set Starfall_AoE_Randomed = 200.00
-------- ///////////////////////////////////// --------
-------- ///////////Advanced --------
Hashtable - Create a hashtable
Set Starfall_Hashtable = (Last created hashtable)
-------- //////////////////////////////////////////////////////////////////////END OF STARFALL --------
-------- ------------------------------------------------------------------------------------------------------------------------------------ --------
-------- ------------------------------------------------------------------------------------------------------------------------------------ --------
-------- ------------------------------------------------------------------------------------------------------------------------------------ --------
-------- //////////////////////////////////////ELUNE'S ARROW\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --------
-------- //THE ABILITY ID --------
Set Arrow_Ability = Elune's Arrow
Set Arrow_Ability_Stun = Arrow_Stun
-------- ///////////////////////////////////// --------
-------- //THE UNIT ID --------
Set Arrow_Unit_Projectile = Arrow_Projectile
Set Arrow_Unit_Dummy = Arrow_Stun_Object
-------- ///////////////////////////////////// --------
-------- //THE DAMAGE OF THE ARROW. THE INDEX CORRESPONDS TO THE LEVEL OF THE SKILL --------
Set Arrow_Damage[1] = 90.00
Set Arrow_Damage[2] = 180.00
Set Arrow_Damage[3] = 270.00
Set Arrow_Damage[4] = 360.00
-------- ///////////////////////////////////// --------
-------- //THE MAXIMUM DISTANCE OF THE ARROW --------
Set Arrow_Maximum_Distance = 3000.00
-------- ///////////////////////////////////// --------
-------- //ARROW OFFSET --------
Set Arrow_Offset = 40.00
-------- ///////////////////////////////////// --------
-------- //ARROW SPEED --------
Set Arrow_Speed = 0.05
-------- ///////////////////////////////////// --------
-------- //ARROW Area of Effect --------
Set Arrow_AoE = 125.00
-------- ///////////////////////////////////// --------
-------- //CAN ARROW PASS THROUGH ALLIES --------
Set Arrow_Pass_Allies = True
-------- ///////////////////////////////////// --------
-------- //CAN ARROW PASS THROUGH STRUCTURES --------
Set Arrow_Pass_Structures = True
-------- ///////////////////////////////////// --------
-------- //CAN ARROW DAMAGE STRUCTURES --------
-------- [NOTE : udg_Arrow_Pass_Structures must be set to false] --------
Set Arrow_Damage_Structures = False
-------- ///////////////////////////////////// --------
-------- //CAN ARROW PASS THROUGH MECHANICALS --------
Set Arrow_Pass_Mechanicals = True
-------- ///////////////////////////////////// --------
-------- //CAN ARROW DAMAGE MECHANICALS --------
-------- [NOTE : udg_Arrow_Pass_Mechanicals must be set to false] --------
Set Arrow_Damage_Mechanicals = False
-------- ///////////////////////////////////// --------
-------- ///////////Advanced --------
Trigger - Add to ArrowMove <gen> the event (Time - Every Arrow_Speed seconds of game time)
Trigger - Turn off ArrowMove <gen>
-------- //////////////////////////////////////////////////////////////////////END OF ELUNE'S ARROW --------
-------- ------------------------------------------------------------------------------------------------------------------------------------ --------
-------- ------------------------------------------------------------------------------------------------------------------------------------ --------
-------- ------------------------------------------------------------------------------------------------------------------------------------ --------
-------- //////////////////////////////////////LEAP\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --------
-------- //THE ABILITY ID --------
Set Leap_Ability = Leap
Set Leap_Ability_Buff = Leap_Buff
-------- ///////////////////////////////////// --------
-------- //THE UNIT ID --------
Set Leap_Unit_Dummy = Leap_Dummy_Unit
-------- ///////////////////////////////////// --------
-------- //THE RANGE OF LEAP. THE INDEX CORRESPONDS TO THE LEVEL OF THE SKILL --------
Set Leap_Maximum_Distance[1] = 630.00
Set Leap_Maximum_Distance[2] = 690.00
Set Leap_Maximum_Distance[3] = 780.00
Set Leap_Maximum_Distance[4] = 840.00
-------- //////////////////////////////////////////////////////////////////////END OF LEAP --------
-------- ------------------------------------------------------------------------------------------------------------------------------------ --------
-------- ------------------------------------------------------------------------------------------------------------------------------------ --------
-------- ------------------------------------------------------------------------------------------------------------------------------------ --------
-------- //////////////////////////////////////MOONLIGHT SHADOW\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --------
-------- //THE ABILITY ID --------
Set MS_Ability = Moonlight Shadow
Set MS_Ability_Buff = MS_Invisibility
-------- ///////////////////////////////////// --------
-------- //THE DURATION OF INVISIBILITY --------
Set MS_Duration = 11.00
-------- ///////////////////////////////////// --------
-------- ///////////Advanced --------
Hashtable - Create a hashtable
Set MS_Hashtable = (Last created hashtable)
-------- //////////////////////////////////////////////////////////////////////END OF MOONLIGHT SHADOW --------
-------- ------------------------------------------------------------------------------------------------------------------------------------ --------
-------- ------------------------------------------------------------------------------------------------------------------------------------ --------
-------- ------------------------------------------------------------------------------------------------------------------------------------ --------
-------- DO NOT COPY: --------
Custom script: call DestroyTrigger(gg_trg_Variables)
[/trigger]

---------------------------------------------------------

v1.04
-Added an option for users to configure special effect for Starfall and Moonlight Shadow via trigger- Spell configurables
---
v1.03
-Fixed Shadow Problem (Caused by leap)
-Added ally units (not owned by you) to show moonlight shadow works.
-Made tooltip of skills better.
---
v1.02
-Fixed major bugs.
-Added one more hero to show that skills are MUI.
---
v1.01
-Arrow will be destroyed if it goes out of map bounds.
-Changed periodic timer of arrow from 0.05 to 0.03.
---
v1.00
-First Release

---------------------------------------------------------
-------------------------------------------------CREDITS:
Priest170234 : For Map
Raven0 : For he did a MUI Starfall for me (For reference).
Previous Elune's Arrow makers in Hive. [I referred a bit, made it myself, but did not copy and paste]
---------------------------------------------------------
NOTE:
I only referred to the source code of Elune's Arrow and Starfall ONLY.
---------------------------------------------------------
Report any bugs found to me.
Either PM me or email at [email protected]
---------------------------------------------------------
Rate, and if possible, vote for approval!:)
Credits not required, put if you wish:)

Keywords:
DotA, Defense of the Ancients, Potm, Priestess of the Moon, Mirana, Arrow, Elune's, Elune's Arrow, Leap, Starfall, Moonlight Shadow, Priest170234
Contents

DotA: Priestess of the Moon Spells (Map)

Reviews
12th Dec 2015 IcemanBo: For long time as NeedsFix. Rejected. Bribe: The damage applied by Starfall is not synchronized with when the effect lands on the unit. When the priestess is jumping through the air the movement looks a bit choppy and...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: For long time as NeedsFix. Rejected.

Bribe:

The damage applied by Starfall is not synchronized with when the effect lands on the unit.

When the priestess is jumping through the air the movement looks a bit choppy and unrealistic.

Also needs an in-game screenshot.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240

You create the dummy for P1.
  • Unit - Create 1 Starfall_Unit_Effect for Player 1 (Red) at Starfall_Point[Starfall_MUI] facing Default building facing degrees
You're loading the value (Load 1...) twice. You could store it into a variable. Niot a big deal though.
  • Hashtable - Save ((Load 1 of (Key (Picked unit)) from Starfall_Hashtable) + 0.20) as 1 of (Key (Picked unit)) in Starfall_Hashtable
  • (Load 1 of (Key (Picked unit)) from Starfall_Hashtable) Greater than or equal to 1.00
This:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Starfall_MUI_2 Equal to 0
    • Then - Actions
      • Trigger - Turn off (This trigger)
      • Set Starfall_MUI = 0
    • Else - Actions
should be after this:
  • Set Starfall_MUI_2 = (Starfall_MUI_2 - 1)
The variable can't become zero if it's not subtracted from. You're doing unnecessary checks.



Again creating for P1. P1 gets it's visibility.
  • Unit - Create 1 Arrow_Unit_Projectile for Player 1 (Red) at Arrow_Default_Point[Arrow_MUI_2] facing Arrow_Angle[Arrow_MUI_2] degrees
The arrow speed should be about 0.03, 0.05 looks jerky.

P1:
  • Unit - Create 1 Arrow_Unit_Dummy for Player 1 (Red) at Arrow_Point[(Integer A)] facing Arrow_Angle[(Integer A)] degrees
You could use a group you never destroy. Add rempve the arrows from it. Or use an integer to keep track on the number of arrows.
  • Set Temp_Group = (Units of type Arrow_Unit_Projectile)
Are you removing this?
  • Set Arrow_Point[(Integer A)] = (Arrow_Point[(Integer A)] offset by Arrow_Offset towards Arrow_Angle[(Integer A)] degrees)
Create a hill and put one hero on top of it, one on flat ground. Make them shoot each other. The arrow flies in very weird ways. You should adjust the flying height of the arrow in my opinion. You need to add Storm Crow form and set the height based on GetLocationZ and the possible height increase of the trajectory.

The tooltip coild be better, like Starfall's tooltip.



P1:
  • Unit - Create 1 Leap_Unit_Dummy for Player 1 (Red) at Temp_Point facing Default building facing degrees
Leaks:
  • Set Leap_Point[(Integer A)] = (Leap_Point[(Integer A)] offset by (Leap_Maximum_Distance[Leap_Level[(Integer A)]] / 10.00) towards Leap_Angle[(Integer A)] degrees)
Again, you could use a group you never destroy or an integer



Group[1]?
  • Unit Group - Pick every unit in MS_Group[1] and do (Actions)
This could be after the integer A loop:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • MS_MUI_2 Equal to 0
    • Then - Actions
      • Trigger - Turn off (This trigger)
      • Set MS_MUI = 0
    • Else - Actions
Improve tooltip, add duration at least.



And remember to add another hero to the map so one can test whether the spells are MUI or not :)
 
Level 8
Joined
Oct 31, 2010
Messages
238
  • Else - Actions
  • -------- //DAMAGE SYSTEM --------
  • Unit - Create 1 Arrow_Unit_Dummy for Player 1 (Red) at Arrow_Point[(Integer A)] facing Arrow_Angle[(Integer A)] degrees
If this is MUI, how does creating the unit for one player exactly work for everyone?..

Description at the start:
TRIGGERS MIGHT BE SOMEWHAT OUTDATED!

The improved fixed version of trigger is in the map.
 
Top