1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Join Texturing Contest #30 now in a legendary battle of mythological creatures!
    Dismiss Notice
  3. The Aftermath has been revealed for the 19th Terraining Contest! Be sure to check out the Results and see what came out of it.
    Dismiss Notice
  4. Melee Mapping Contest #3 - Results are out! Congratulate the winners and check plenty of new 4v4 melee maps designed for this competition!
    Dismiss Notice
  5. The winners of our cinematic soundtrack competition have been decided! Step by the Music Contest #11 - Results to check the entries and congratulate the winners!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice

Lich King Spellpack v1.03

Submitted by Maker
This bundle is marked as approved. It works and satisfies the submission rules.
Lich King spellpack v1.02 by Maker.

GUI/MUI/Leakless

The pack contains 6 abilities:

Frostmourne's Hunger
The Lich King charges to the targeted unit pushing all other enemies back isolating the victim. Units that are knocked back get frozen. With each consecutive hit on the target, the Lich King transfers more and more of the victim's attack speed and damage to increase his own. The ability auto levels and is capped by the hero's level, maximum level of 10. The ability charges with each blow, but the charge will quickly vanish after changing the target.

Triggers
Initialize
  • FH Init Hash
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set FH_Hash = (Last created hashtable)
      • -------- -------------------- --------
      • -------- -------------------- --------
      • -------- Charge speed, initial --------
      • -------- -------------------- --------
      • Set FH_Reals[0] = 8.00
      • -------- -------------------- --------
      • -------- Charge speed, max --------
      • -------- -------------------- --------
      • Set FH_Reals[1] = 22.00
      • -------- -------------------- --------
      • -------- Charge acceleration --------
      • -------- -------------------- --------
      • Set FH_Reals[2] = 1.10
      • -------- -------------------- --------
      • -------- Charge knockback radius --------
      • -------- -------------------- --------
      • Set FH_Reals[3] = 256.00
      • -------- -------------------- --------
      • -------- Charge final knockback radius --------
      • -------- -------------------- --------
      • Set FH_Reals[4] = 400.00
      • -------- -------------------- --------
      • -------- Angle of charge knockback --------
      • -------- -------------------- --------
      • Set FH_Reals[5] = 45.00
      • -------- -------------------- --------
      • -------- Freeze time --------
      • -------- -------------------- --------
      • Set FH_Reals[6] = 3.00
      • -------- -------------------- --------
      • -------- Lich King unit type --------
      • -------- -------------------- --------
      • Set FH_Unit_Type = Lich King
      • -------- -------------------- --------
      • Set Temp_Group_1 = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to FH_Unit_Type))
      • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
        • Loop - Actions
          • Unit - Set level of |c00FF00FFFrostmourne's Hunger|r for (Picked unit) to (Level of (Picked unit))
      • Custom script: call DestroyGroup(udg_Temp_Group_1)


Increase level
  • FH Increase Level
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to FH_Unit_Type
    • Actions
      • Unit - Set level of |c00FF00FFFrostmourne's Hunger|r for (Triggering unit) to (Level of (Triggering unit))


Frostmourne's Hunger
  • Frostmournes Hunger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to |c00FF00FFFrostmourne's Hunger|r
    • Actions
      • Set Temp_Unit_1 = (Triggering unit)
      • Set Temp_Unit_2 = (Target unit of ability being cast)
      • -------- ------------------------- --------
      • Special Effect - Create a special effect attached to the left foot of Temp_Unit_1 using Abilities\Weapons\ZigguratMissile\ZigguratMissile.mdl
      • Hashtable - Save Handle Of(Last created special effect) as (Key effect1) of (Key (Triggering unit)) in FH_Hash
      • Special Effect - Create a special effect attached to the left hand of Temp_Unit_1 using Abilities\Weapons\ZigguratMissile\ZigguratMissile.mdl
      • Hashtable - Save Handle Of(Last created special effect) as (Key effect2) of (Key (Triggering unit)) in FH_Hash
      • Special Effect - Create a special effect attached to the right foot of Temp_Unit_1 using Abilities\Weapons\ZigguratMissile\ZigguratMissile.mdl
      • Hashtable - Save Handle Of(Last created special effect) as (Key effect3) of (Key (Triggering unit)) in FH_Hash
      • Special Effect - Create a special effect attached to the right hand of Temp_Unit_1 using Abilities\Weapons\ZigguratMissile\ZigguratMissile.mdl
      • Hashtable - Save Handle Of(Last created special effect) as (Key effect4) of (Key (Triggering unit)) in FH_Hash
      • Special Effect - Create a special effect attached to the origin of Temp_Unit_1 using Abilities\Spells\Orc\Shockwave\ShockwaveMissile.mdl
      • Hashtable - Save Handle Of(Last created special effect) as (Key effect5) of (Key (Triggering unit)) in FH_Hash
      • -------- ------------------------- --------
      • -------- The target that gets pwned --------
      • -------- ------------------------- --------
      • Hashtable - Save FH_Reals[0] as (Key speed) of (Key (Triggering unit)) in FH_Hash
      • Hashtable - Save Handle OfTemp_Unit_2 as (Key target) of (Key (Triggering unit)) in FH_Hash
      • -------- ------------------------- --------
      • Unit Group - Add Temp_Unit_1 to FH_Charge_Group
      • -------- ------------------------- --------
      • Trigger - Turn on FH Loop <gen>
      • Trigger - Turn on FH Knockback <gen>


FH Loop
  • FH Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in FH_Charge_Group and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_1 = (Picked unit)
          • Set Temp_Unit_2 = (Load (Key target) of (Key (Picked unit)) in FH_Hash)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Temp_Unit_1 is alive) Equal to True
              • (Temp_Unit_2 is alive) Equal to True
              • (Load (Key boolean) of (Key (Picked unit)) from FH_Hash) Not equal to True
            • Then - Actions
              • Set Temp_Loc_1 = (Position of Temp_Unit_1)
              • Set Temp_Loc_2 = (Position of Temp_Unit_2)
              • -------- ------------------------- --------
              • Set Temp_Real_1 = (Distance between Temp_Loc_1 and Temp_Loc_2)
              • Set Temp_Real_2 = (Angle from Temp_Loc_1 to Temp_Loc_2)
              • Set Temp_Real_3 = (Load (Key speed) of (Key (Picked unit)) from FH_Hash)
              • Set Temp_Loc_3 = (Temp_Loc_1 offset by Temp_Real_3 towards Temp_Real_2 degrees)
              • -------- ------------------------- --------
              • -------- Set new speed --------
              • -------- ------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Temp_Real_3 Less than (FH_Reals[1] / FH_Reals[2])
                • Then - Actions
                  • Hashtable - Save (Temp_Real_3 x FH_Reals[2]) as (Key speed) of (Key (Picked unit)) in FH_Hash
                • Else - Actions
                  • Hashtable - Save FH_Reals[1] as (Key speed) of (Key (Picked unit)) in FH_Hash
              • -------- ------------------------- --------
              • -------- Have we not arrived at the target --------
              • -------- ------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Temp_Real_1 Greater than 192.00
                • Then - Actions
                  • Set Temp_Real_3 = (Facing of Temp_Unit_1)
                  • Set Temp_Group_1 = (Units within FH_Reals[3] of Temp_Loc_3)
                  • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
                    • Loop - Actions
                      • Set Temp_Unit_3 = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Temp_Unit_3 is alive) Equal to True
                          • Temp_Unit_3 Not equal to Temp_Unit_2
                          • (Temp_Unit_3 is A structure) Equal to False
                          • (Temp_Unit_3 is in FH_Loop_Group_2) Equal to False
                          • (Temp_Unit_3 is in FH_Knockback_Group) Equal to False
                          • (Temp_Unit_3 belongs to an enemy of (Owner of Temp_Unit_1)) Equal to True
                        • Then - Actions
                          • Set Temp_Loc_4 = (Position of Temp_Unit_3)
                          • -------- ------------------------- --------
                          • -------- Picks units that are on front left of the caster --------
                          • -------- ------------------------- --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Cos(((Temp_Real_3 + 45.00) - (Angle from Temp_Loc_3 to Temp_Loc_4)))) Greater than (Cos(45.00))
                            • Then - Actions
                              • Special Effect - Destroy (Load (Key eff1) of (Key (Picked unit)) in FH_Hash)
                              • Special Effect - Create a special effect attached to the origin of Temp_Unit_3 using Abilities\Spells\Other\Tornado\Tornado_Target.mdl
                              • -------- ------------------------- --------
                              • Hashtable - Save 0.00 as (Key loop) of (Key (Picked unit)) in FH_Hash
                              • Hashtable - Save 1000.00 as (Key offset) of (Key (Picked unit)) in FH_Hash
                              • Hashtable - Save (Temp_Real_2 + FH_Reals[5]) as (Key angle) of (Key (Picked unit)) in FH_Hash
                              • Hashtable - Save Handle Of(Last created special effect) as (Key eff1) of (Key (Picked unit)) in FH_Hash
                              • -------- ------------------------- --------
                              • Unit Group - Add Temp_Unit_3 to FH_Knockback_Group
                            • Else - Actions
                              • -------- ------------------------- --------
                              • -------- Picks units that are on front right of the caster --------
                              • -------- ------------------------- --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Cos(((Temp_Real_3 - 45.00) - (Angle from Temp_Loc_3 to Temp_Loc_4)))) Greater than (Cos(45.00))
                                • Then - Actions
                                  • Special Effect - Destroy (Load (Key eff1) of (Key (Picked unit)) in FH_Hash)
                                  • Special Effect - Create a special effect attached to the origin of Temp_Unit_3 using Abilities\Spells\Other\Tornado\Tornado_Target.mdl
                                  • -------- ------------------------- --------
                                  • Hashtable - Save 0.00 as (Key loop) of (Key (Picked unit)) in FH_Hash
                                  • Hashtable - Save 1000.00 as (Key offset) of (Key (Picked unit)) in FH_Hash
                                  • Hashtable - Save (Temp_Real_2 - FH_Reals[5]) as (Key angle) of (Key (Picked unit)) in FH_Hash
                                  • Hashtable - Save Handle Of(Last created special effect) as (Key eff1) of (Key (Picked unit)) in FH_Hash
                                  • -------- ------------------------- --------
                                  • Unit Group - Add Temp_Unit_3 to FH_Knockback_Group
                                • Else - Actions
                          • Custom script: call RemoveLocation(udg_Temp_Loc_4)
                        • Else - Actions
                  • -------- ------------------------- --------
                  • Trigger - Turn on FH Knockback <gen>
                  • -------- ------------------------- --------
                  • Custom script: call DestroyGroup(udg_Temp_Group_1)
                • Else - Actions
                  • Hashtable - Save True as (Key boolean) of (Key (Picked unit)) in FH_Hash
                  • -------- ------------------------- --------
                  • Set Temp_Group_1 = (Units within FH_Reals[4] of Temp_Loc_3)
                  • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
                    • Loop - Actions
                      • Set Temp_Unit_3 = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Temp_Unit_3 is alive) Equal to True
                          • Temp_Unit_3 Not equal to Temp_Unit_2
                          • (Temp_Unit_3 is A structure) Equal to False
                          • (Temp_Unit_3 belongs to an enemy of (Owner of Temp_Unit_1)) Equal to True
                        • Then - Actions
                          • Set Temp_Loc_4 = (Position of Temp_Unit_3)
                          • -------- ------------------------- --------
                          • Special Effect - Destroy (Load (Key eff1) of (Key (Picked unit)) in FH_Hash)
                          • Special Effect - Create a special effect attached to the origin of Temp_Unit_3 using Abilities\Spells\Other\Tornado\Tornado_Target.mdl
                          • -------- ------------------------- --------
                          • Hashtable - Save 0.00 as (Key loop) of (Key (Picked unit)) in FH_Hash
                          • Hashtable - Save 1000.00 as (Key offset) of (Key (Picked unit)) in FH_Hash
                          • Hashtable - Save (Angle from Temp_Loc_3 to Temp_Loc_4) as (Key angle) of (Key (Picked unit)) in FH_Hash
                          • Hashtable - Save Handle Of(Last created special effect) as (Key eff1) of (Key (Picked unit)) in FH_Hash
                          • -------- ------------------------- --------
                          • Unit Group - Add Temp_Unit_3 to FH_Knockback_Group
                          • -------- ------------------------- --------
                          • Custom script: call RemoveLocation(udg_Temp_Loc_4)
                        • Else - Actions
                  • Trigger - Turn on FH Knockback <gen>
                  • Custom script: call DestroyGroup(udg_Temp_Group_1)
              • -------- ------------------------- --------
              • Set Temp_Real_3 = (X of Temp_Loc_3)
              • Set Temp_Real_4 = (Y of Temp_Loc_3)
              • -------- ------------------------- --------
              • Custom script: call SetUnitX(udg_Temp_Unit_1, udg_Temp_Real_3)
              • Custom script: call SetUnitY(udg_Temp_Unit_1, udg_Temp_Real_4)
              • -------- ------------------------- --------
              • Custom script: call RemoveLocation(udg_Temp_Loc_1)
              • Custom script: call RemoveLocation(udg_Temp_Loc_2)
              • Custom script: call RemoveLocation(udg_Temp_Loc_3)
            • Else - Actions
              • Hashtable - Save False as (Key boolean) of (Key (Picked unit)) in FH_Hash
              • Hashtable - Save FH_Reals[0] as (Key speed) of (Key (Picked unit)) in FH_Hash
              • -------- ------------------------- --------
              • Special Effect - Destroy (Load (Key effect1) of (Key (Picked unit)) in FH_Hash)
              • Special Effect - Destroy (Load (Key effect2) of (Key (Picked unit)) in FH_Hash)
              • Special Effect - Destroy (Load (Key effect3) of (Key (Picked unit)) in FH_Hash)
              • Special Effect - Destroy (Load (Key effect4) of (Key (Picked unit)) in FH_Hash)
              • Special Effect - Destroy (Load (Key effect5) of (Key (Picked unit)) in FH_Hash)
              • -------- ------------------------- --------
              • Unit Group - Remove Temp_Unit_1 from FH_Charge_Group
              • Unit Group - Add Temp_Unit_1 to FH_Group
              • -------- ------------------------- --------
              • Trigger - Turn on FH Attack <gen>
              • -------- ------------------------- --------
              • Unit - Unpause Temp_Unit_1
              • Unit - Order Temp_Unit_1 to Attack Temp_Unit_2
              • -------- ------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (FH_Charge_Group is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions


Knockback
  • FH Knockback
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in FH_Knockback_Group and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_1 = (Picked unit)
          • Set Temp_Real_1 = (Load (Key loop) of (Key (Picked unit)) from FH_Hash)
          • Set Temp_Real_2 = (Load (Key angle) of (Key (Picked unit)) from FH_Hash)
          • Set Temp_Real_3 = (Load (Key offset) of (Key (Picked unit)) from FH_Hash)
          • -------- ------------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Temp_Unit_1 is alive) Equal to True
              • Temp_Real_3 Greater than or equal to 2.00
            • Then - Actions
              • Set Temp_Loc_1 = (Position of Temp_Unit_1)
              • Set Temp_Real_4 = (30.00 x (Power(0.90, Temp_Real_1)))
              • Set Temp_Loc_2 = (Temp_Loc_1 offset by Temp_Real_4 towards Temp_Real_2 degrees)
              • -------- ------------------------- --------
              • Hashtable - Save Temp_Real_4 as (Key offset) of (Key (Picked unit)) in FH_Hash
              • Hashtable - Save (Temp_Real_1 + 1.00) as (Key loop) of (Key (Picked unit)) in FH_Hash
              • -------- ------------------------- --------
              • -------- Pathability check --------
              • -------- ------------------------- --------
              • Item - Create Claws of Attack +15 at Temp_Loc_2
              • Set Temp_Loc_3 = (Position of (Last created item))
              • Set Temp_Real_1 = (X of Temp_Loc_2)
              • Set Temp_Real_2 = (Y of Temp_Loc_2)
              • Set Temp_Real_3 = (X of Temp_Loc_3)
              • Set Temp_Real_4 = (Y of Temp_Loc_3)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Abs((Temp_Real_1 - Temp_Real_3))) Less than 6.00
                  • (Abs((Temp_Real_2 - Temp_Real_4))) Less than 6.00
                • Then - Actions
                  • Custom script: call SetUnitX(udg_Temp_Unit_1, udg_Temp_Real_3)
                  • Custom script: call SetUnitY(udg_Temp_Unit_1, udg_Temp_Real_4)
                • Else - Actions
              • Item - Remove (Last created item)
              • -------- ------------------------- --------
              • Set Temp_Integer_1 = (Random integer number between 1 and 4)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Temp_Integer_1 Equal to 1
                • Then - Actions
                  • Unit - Make Temp_Unit_1 face ((Facing of Temp_Unit_1) - 180.00) over 0.00 seconds
                • Else - Actions
              • -------- ------------------------- --------
              • Custom script: call RemoveLocation(udg_Temp_Loc_1)
              • Custom script: call RemoveLocation(udg_Temp_Loc_2)
              • Custom script: call RemoveLocation(udg_Temp_Loc_3)
            • Else - Actions
              • Unit Group - Remove Temp_Unit_1 from FH_Knockback_Group
              • -------- ------------------------- --------
              • Special Effect - Destroy (Load (Key eff1) of (Key (Picked unit)) in FH_Hash)
              • -------- ------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Temp_Unit_1 is alive) Equal to True
                • Then - Actions
                  • Unit - Pause Temp_Unit_1
                  • Animation - Change Temp_Unit_1's animation speed to 0.00% of its original speed
                  • -------- ------------------------- --------
                  • Special Effect - Destroy (Load (Key ice) of (Key (Picked unit)) in FH_Hash)
                  • Special Effect - Create a special effect attached to the origin of Temp_Unit_1 using Abilities\Spells\Undead\FreezingBreath\FreezingBreathTargetArt.mdl
                  • -------- ------------------------- --------
                  • Hashtable - Save Handle Of(Last created special effect) as (Key ice) of (Key (Picked unit)) in FH_Hash
                  • Hashtable - Save FH_Reals[6] as (Key freeze_timer) of (Key (Picked unit)) in FH_Hash
                  • -------- ------------------------- --------
                  • Unit Group - Add Temp_Unit_1 to FH_Loop_Group_2
                  • -------- ------------------------- --------
                  • Trigger - Turn on FH Freeze <gen>
                • Else - Actions
                  • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in FH_Hash
              • -------- ------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (FH_Knockback_Group is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions


Freeze
  • FH Freeze
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in FH_Loop_Group_2 and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_1 = (Picked unit)
          • Set Temp_Real_1 = (Load (Key freeze_timer) of (Key (Picked unit)) from FH_Hash)
          • -------- -------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Real_1 Greater than 0.00
              • (Temp_Unit_1 is alive) Equal to True
            • Then - Actions
              • Hashtable - Save (Temp_Real_1 - 0.25) as (Key freeze_timer) of (Key (Picked unit)) in FH_Hash
            • Else - Actions
              • Unit Group - Remove Temp_Unit_1 from FH_Loop_Group_2
              • -------- -------------------- --------
              • Special Effect - Destroy (Load (Key ice) of (Key (Picked unit)) in FH_Hash)
              • -------- -------------------- --------
              • Unit - Unpause Temp_Unit_1
              • Animation - Change Temp_Unit_1's animation speed to 100.00% of its original speed
              • -------- -------------------- --------
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in FH_Hash
              • -------- -------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (FH_Loop_Group_2 is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions


Attack
  • FH Attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) is in FH_Group) Equal to True
    • Actions
      • Set Temp_Unit_1 = (Attacking unit)
      • -------- -------------------- --------
      • -------- Check if the attacked unit is the original spell target --------
      • -------- -------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Attacked unit) Equal to (Load (Key target) of (Key (Attacking unit)) in FH_Hash)
        • Then - Actions
          • Set Temp_Unit_2 = (Triggering unit)
          • Set Temp_Loc_1 = (Position of Temp_Unit_1)
          • -------- -------------------- --------
          • Set Temp_Integer_1 = (Load (Key buff_lvl) of (Key (Attacking unit)) from FH_Hash)
          • -------- -------------------- --------
          • -------- Check/increase spell level for caster --------
          • -------- -------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Integer_1 Less than 10
              • Temp_Integer_1 Less than (Level of Temp_Unit_1)
            • Then - Actions
              • Set Temp_Integer_1 = (Temp_Integer_1 + 1)
            • Else - Actions
          • Unit - Create 1 Dummy - (None) for Neutral Passive at Temp_Loc_1 facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Add FH Cripple - (boost) to (Last created unit)
          • Unit - Set level of FH Cripple - (boost) for (Last created unit) to Temp_Integer_1
          • Unit - Order (Last created unit) to Undead Necromancer - Cripple Temp_Unit_1
          • -------- -------------------- --------
          • Hashtable - Save 4 as (Key timer) of (Key (Attacking unit)) in FH_Hash
          • Hashtable - Save Temp_Integer_1 as (Key buff_lvl) of (Key (Attacking unit)) in FH_Hash
          • -------- -------------------- --------
          • Set Temp_Integer_1 = (Load (Key buff_lvl) of (Key (Triggering unit)) from FH_Hash)
          • -------- -------------------- --------
          • -------- Check/increase spell level for target --------
          • -------- -------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Integer_1 Less than 10
              • Temp_Integer_1 Less than (Level of Temp_Unit_1)
            • Then - Actions
              • Set Temp_Integer_1 = (Temp_Integer_1 + 1)
            • Else - Actions
          • Unit - Create 1 Dummy - (None) for Neutral Passive at Temp_Loc_1 facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Add FH Cripple - (nerf) to (Last created unit)
          • Unit - Set level of FH Cripple - (nerf) for (Last created unit) to Temp_Integer_1
          • Unit - Order (Last created unit) to Undead Necromancer - Cripple Temp_Unit_2
          • -------- -------------------- --------
          • Hashtable - Save 4 as (Key timer) of (Key (Triggering unit)) in FH_Hash
          • Hashtable - Save Temp_Integer_1 as (Key buff_lvl) of (Key (Triggering unit)) in FH_Hash
          • -------- -------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Temp_Unit_1 is in FH_Loop_Group_1) Equal to False
            • Then - Actions
              • Unit Group - Add Temp_Unit_1 to FH_Loop_Group_1
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Temp_Unit_2 is in FH_Loop_Group_1) Equal to False
            • Then - Actions
              • Unit Group - Add Temp_Unit_2 to FH_Loop_Group_1
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (FH Pick Units <gen> is on) Equal to False
            • Then - Actions
              • Trigger - Turn on FH Pick Units <gen>
            • Else - Actions
          • -------- -------------------- --------
          • Custom script: call RemoveLocation(udg_Temp_Loc_1)
        • Else - Actions
          • Unit Group - Remove Temp_Unit_1 from FH_Group
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (FH_Group is empty) Equal to True
            • Then - Actions
              • Trigger - Turn off (This trigger)
            • Else - Actions


Pick units
  • FH Pick Units
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in FH_Loop_Group_1 and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_1 = (Picked unit)
          • Set Temp_Integer_2 = (Load (Key timer) of (Key (Picked unit)) from FH_Hash)
          • -------- -------------------- --------
          • Set Temp_Integer_2 = (Temp_Integer_2 - 1)
          • -------- -------------------- --------
          • Hashtable - Save Temp_Integer_2 as (Key timer) of (Key (Picked unit)) in FH_Hash
          • -------- -------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Integer_2 Greater than 0
              • (Temp_Unit_1 is alive) Equal to True
            • Then - Actions
            • Else - Actions
              • Set Temp_Integer_1 = (Load (Key buff_lvl) of (Key (Picked unit)) from FH_Hash)
              • Set Temp_Integer_1 = (Temp_Integer_1 - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Temp_Integer_1 Greater than 0
                • Then - Actions
                  • Set Temp_Loc_1 = (Position of Temp_Unit_1)
                  • -------- -------------------- --------
                  • Unit - Create 1 Dummy - (None) for Neutral Passive at Temp_Loc_1 facing Default building facing degrees
                  • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                  • -------- -------------------- --------
                  • -------- Boost caster, nerf target --------
                  • -------- -------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • (Temp_Unit_1 has buff Cripple - (FH boost) ) Equal to True
                          • ((Key unit) is stored as a Handle of (Key (Picked unit)) in FH_Hash) Equal to True
                    • Then - Actions
                      • Unit - Add FH Cripple - (boost) to (Last created unit)
                      • Unit - Set level of FH Cripple - (boost) for (Last created unit) to Temp_Integer_1
                    • Else - Actions
                      • Unit - Add FH Cripple - (nerf) to (Last created unit)
                      • Unit - Set level of FH Cripple - (nerf) for (Last created unit) to Temp_Integer_1
                  • -------- -------------------- --------
                  • Unit - Order (Last created unit) to Undead Necromancer - Cripple (Picked unit)
                  • -------- -------------------- --------
                  • Hashtable - Save Temp_Integer_1 as (Key buff_lvl) of (Key (Picked unit)) in FH_Hash
                  • -------- -------------------- --------
                  • Custom script: call RemoveLocation(udg_Temp_Loc_1)
                • Else - Actions
                  • Unit Group - Remove Temp_Unit_1 from FH_Loop_Group_1
                  • -------- -------------------- --------
                  • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in FH_Hash
                  • -------- -------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (FH_Loop_Group_1 is empty) Equal to True
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                    • Else - Actions



Distortion Wave
Launches a wave of unholy magic in front of the Lich King causing horrible burn damage. Units under the effect of Distortion Wave have a chance to get confused due to the pain they suffer from being burned by the unholy magic of the wave. Confused units have a chance to attack allies once per second.

Triggers


Initialize
  • DW Initialize
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- -------------------- --------
      • Hashtable - Create a hashtable
      • Set DW_Hash = (Last created hashtable)
      • -------- -------------------- --------
      • -------- Range --------
      • Set DW_Reals[0] = 700.00
      • -------- -------------------- --------
      • -------- Base damage per second --------
      • Set DW_Reals[1] = 18.00
      • -------- -------------------- --------
      • -------- Ability level bonus damage per second --------
      • Set DW_Reals[2] = 12.00
      • -------- -------------------- --------
      • -------- Damage over time duration --------
      • Set DW_Reals[3] = 6.00
      • -------- -------------------- --------
      • -------- Angle of effects, the width of the cone is this times two in angles --------
      • Set DW_Reals[4] = 30.00
      • -------- -------------------- --------
      • -------- Damage intelligence modifier --------
      • -------- 1 means every point in int increases the damage by 1 %. --------
      • Set DW_Reals[5] = 1.00
      • -------- -------------------- --------
      • -------- Chance to confuse, base --------
      • Set DW_Reals[6] = 15.00
      • -------- -------------------- --------
      • -------- Chance to confuse, ability level bonus --------
      • Set DW_Reals[7] = 5.00
      • -------- -------------------- --------
      • -------- Don't change these --------
      • Set DW_Reals[1] = (DW_Reals[1] / 10.00)
      • Set DW_Reals[2] = (DW_Reals[2] / 10.00)


Distortion Wave
  • Distortion Wave
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to |c00FF00FFDistortion Wave|r
    • Actions
      • Set Temp_Unit_1 = (Triggering unit)
      • Set Temp_Loc_1 = (Position of Temp_Unit_1)
      • Set Temp_Loc_2 = (Target point of ability being cast)
      • Set Temp_Real_1 = (Angle from Temp_Loc_1 to Temp_Loc_2)
      • Set Temp_Integer_1 = (Level of |c00FF00FFDistortion Wave|r for Temp_Unit_1)
      • -------- -------------------- --------
      • -------- Calculate damage --------
      • Set Temp_Real_2 = ((DW_Reals[1] + ((Real(Temp_Integer_1)) x DW_Reals[2])) x (1.00 + ((Real((Intelligence of Temp_Unit_1 (Include bonuses)))) / (100.00 / DW_Reals[5]))))
      • -------- -------------------- --------
      • Set Temp_Group_1 = (Units within DW_Reals[0] of Temp_Loc_1 matching ((((Owner of (Matching unit)) is an enemy of (Owner of Temp_Unit_1)) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_2 = (Picked unit)
          • Set Temp_Loc_3 = (Position of Temp_Unit_2)
          • -------- -------------------- --------
          • -------- Check if the units are inside the cone --------
          • -------- -------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Cos((Temp_Real_1 - (Angle from Temp_Loc_1 to Temp_Loc_3)))) Greater than (Cos(DW_Reals[4]))
            • Then - Actions
              • -------- -------------------- --------
              • -------- Create dummy and order it to cast slow on picked units --------
              • -------- -------------------- --------
              • Unit - Create 1 Dummy - (None) for Neutral Passive at Temp_Loc_2 facing Default building facing degrees
              • Set Temp_Unit_3 = (Last created unit)
              • Unit - Add DW Cripple to Temp_Unit_3
              • Unit - Set level of DW Cripple for Temp_Unit_3 to Temp_Integer_1
              • Unit - Order Temp_Unit_3 to Undead Necromancer - Cripple Temp_Unit_2
              • Unit - Add a 1.00 second Generic expiration timer to Temp_Unit_3
              • -------- -------------------- --------
              • Hashtable - Save 0.00 as (Key time) of (Key (Picked unit)) in DW_Hash
              • Hashtable - Save DW_Reals[3] as (Key loops) of (Key (Picked unit)) in DW_Hash
              • Hashtable - Save Temp_Real_2 as (Key damage) of (Key (Picked unit)) in DW_Hash
              • Hashtable - Save Handle OfTemp_Unit_1 as (Key caster) of (Key (Picked unit)) in DW_Hash
              • -------- -------------------- --------
              • Unit Group - Add Temp_Unit_2 to DW_Group
            • Else - Actions
          • Custom script: call RemoveLocation(udg_Temp_Loc_3)
      • -------- -------------------- --------
      • -------- These are used to create the effects on ground --------
      • -------- -------------------- --------
      • Hashtable - Save 0.00 as (Key loop) of (Key (Triggering unit)) in DW_Hash
      • Hashtable - Save Temp_Real_1 as (Key angle) of (Key (Triggering unit)) in DW_Hash
      • -------- -------------------- --------
      • Unit Group - Pick every unit in DW_Group and do (Actions)
        • Loop - Actions
          • Custom script: set udg_Temp_Group_2 = CreateGroup()
          • Unit Group - Add all units of Temp_Group_1 to Temp_Group_2
          • Unit Group - Remove (Picked unit) from Temp_Group_2
          • Unit - Order (Picked unit) to Attack Once (Random unit from Temp_Group_2)
          • Custom script: call DestroyGroup(udg_Temp_Group_2)
      • -------- -------------------- --------
      • Unit Group - Add Temp_Unit_1 to DW_Effects
      • -------- -------------------- --------
      • Trigger - Turn on DW Ground Effects <gen>
      • -------- -------------------- --------
      • Custom script: call DestroyGroup(udg_Temp_Group_1)
      • Custom script: call RemoveLocation(udg_Temp_Loc_1)
      • Custom script: call RemoveLocation(udg_Temp_Loc_2)


Ground Effects
  • DW Ground Effects
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in DW_Effects and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_1 = (Picked unit)
          • Set Temp_Real_2 = (Load (Key loop) of (Key (Picked unit)) from DW_Hash)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Real_2 Less than 10.00
            • Then - Actions
              • Set Temp_Loc_1 = (Position of Temp_Unit_1)
              • -------- -------------------- --------
              • Set Temp_Real_1 = (Load (Key angle) of (Key (Picked unit)) from DW_Hash)
              • -------- -------------------- --------
              • Set Temp_Loc_2 = (Temp_Loc_1 offset by 128.00 towards Temp_Real_1 degrees)
              • -------- -------------------- --------
              • Hashtable - Save (Temp_Real_2 + 1.00) as (Key loop) of (Key (Picked unit)) in DW_Hash
              • -------- -------------------- --------
              • -------- Create effects --------
              • -------- -------------------- --------
              • For each (Integer A) from 0 to ((Integer(DW_Reals[4])) / 2), do (Actions)
                • Loop - Actions
                  • Set Temp_Loc_3 = (Temp_Loc_2 offset by (Temp_Real_2 x 70.00) towards ((Temp_Real_1 - DW_Reals[4]) + ((Real((Integer A))) x 4.00)) degrees)
                  • -------- -------------------- --------
                  • Special Effect - Create a special effect at Temp_Loc_3 using Abilities\Spells\Undead\DeathandDecay\DeathandDecayTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect at Temp_Loc_3 using Abilities\Spells\Undead\DeathandDecay\DeathandDecayDamage.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • -------- -------------------- --------
                  • Custom script: call RemoveLocation(udg_Temp_Loc_3)
              • Custom script: call RemoveLocation(udg_Temp_Loc_1)
              • Custom script: call RemoveLocation(udg_Temp_Loc_2)
            • Else - Actions
              • Unit Group - Remove Temp_Unit_1 from DW_Effects
              • -------- -------------------- --------
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in DW_Hash
              • -------- -------------------- --------
              • Trigger - Turn on DW Burn <gen>
              • -------- -------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in DW_Effects) Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions


Burn
  • DW Burn
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in DW_Group and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_1 = (Picked unit)
          • -------- -------------------- --------
          • Set Temp_Real_1 = (Load (Key loops) of (Key (Picked unit)) from DW_Hash)
          • -------- -------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Real_1 Greater than 0.00
            • Then - Actions
              • -------- -------------------- --------
              • Set Temp_Unit_2 = (Load (Key caster) of (Key (Picked unit)) in DW_Hash)
              • Set Temp_Real_2 = (Load (Key time) of (Key (Picked unit)) from DW_Hash)
              • -------- -------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Temp_Unit_2 is alive) Equal to True
                • Then - Actions
                  • Unit - Cause Temp_Unit_2 to damage Temp_Unit_1, dealing (Load (Key damage) of (Key (Picked unit)) from DW_Hash) damage of attack type Spells and damage type Cold
                • Else - Actions
                  • Unit - Cause Temp_Unit_1 to damage Temp_Unit_1, dealing (Load (Key damage) of (Key (Picked unit)) from DW_Hash) damage of attack type Spells and damage type Cold
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Temp_Real_2 Equal to 1.00
                • Then - Actions
                  • Set Temp_Real_2 = 0.00
                  • -------- -------------------- --------
                  • Hashtable - Save (Temp_Real_1 - 1.00) as (Key loops) of (Key (Picked unit)) in DW_Hash
                  • -------- -------------------- --------
                  • Special Effect - Create a special effect attached to the chest of Temp_Unit_1 using Abilities\Spells\Undead\DeathandDecay\DeathandDecayDamage.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect attached to the left hand of Temp_Unit_1 using Abilities\Spells\Undead\DeathandDecay\DeathandDecayDamage.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect attached to the right hand of Temp_Unit_1 using Abilities\Spells\Undead\DeathandDecay\DeathandDecayDamage.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • -------- -------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Random real number between 1.00 and 100.00) Less than or equal to (DW_Reals[6] + (DW_Reals[7] x (Real((Level of |c00FF00FFDistortion Wave|r for Temp_Unit_2)))))
                    • Then - Actions
                      • Custom script: set udg_Temp_Group_1 = CreateGroup()
                      • Unit Group - Add all units of DW_Group to Temp_Group_1
                      • Unit Group - Remove Temp_Unit_1 from Temp_Group_1
                      • Unit - Order Temp_Unit_1 to Attack Once (Random unit from Temp_Group_1)
                      • Custom script: call DestroyGroup(udg_Temp_Group_1)
                    • Else - Actions
                • Else - Actions
                  • Set Temp_Real_2 = (Temp_Real_2 + 0.10)
              • Hashtable - Save Temp_Real_2 as (Key time) of (Key (Picked unit)) in DW_Hash
            • Else - Actions
              • Unit Group - Remove Temp_Unit_1 from DW_Group
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in DW_Hash
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in DW_Group) Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions





Distort Reality

Using his immense mental powers, the Lich King is able to partially transfer his physical existence into another reality making him more difficult to be hit and able to pass through enemy units. Spirits from beyond get summoned to aid the Lich King. When transferring between different realities, lightnings are summoned, damaging all enemy units hit by them.

Triggers

Initialize
  • DR Initialize
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- -------------------- --------
      • Hashtable - Create a hashtable
      • Set DR_Hash = (Last created hashtable)
      • -------- -------------------- --------
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Player - Disable Spell Book - (DR) for (Player((Integer A)))
      • -------- -------------------- --------
      • -------- Number of lightning effects --------
      • -------- -------------------- --------
      • Set DR_Reals[0] = 8.00
      • -------- -------------------- --------
      • -------- Lightning initial offset --------
      • -------- -------------------- --------
      • Set DR_Reals[1] = 350.00
      • -------- -------------------- --------
      • -------- Lightning rotation speed --------
      • -------- -------------------- --------
      • Set DR_Reals[2] = 10.00
      • -------- -------------------- --------
      • -------- Lightning converging/diverging speed --------
      • -------- -------------------- --------
      • Set DR_Reals[3] = 10.50
      • -------- -------------------- --------
      • -------- Level 1 evasion chance --------
      • -------- -------------------- --------
      • Set DR_Reals[4] = 40.00
      • -------- -------------------- --------
      • -------- Lightning damage, base --------
      • -------- -------------------- --------
      • Set DR_Reals[5] = 5.00
      • -------- -------------------- --------
      • -------- Lightning damage, ability level bonus --------
      • -------- -------------------- --------
      • Set DR_Reals[6] = 5.00
      • -------- -------------------- --------
      • -------- Spell duration --------
      • -------- -------------------- --------
      • Set DR_Reals[7] = 10.00
      • -------- -------------------- --------
      • -------- Blinking speed --------
      • -------- -------------------- --------
      • Set DR_Reals[8] = 6.00
      • -------- -------------------- --------
      • -------- Lightning damage radius --------
      • -------- -------------------- --------
      • Set DR_Reals[9] = 48.00
      • -------- -------------------- --------
      • -------- Damage intelligence modifier; 1 means 1 point in int gives 1 % boost to spell damage --------
      • -------- -------------------- --------
      • Set DR_Reals[10] = 1.00
      • -------- -------------------- --------
      • -------- Lightning speed 2 --------
      • -------- -------------------- --------
      • Set DR_Reals[11] = 30.00
      • -------- -------------------- --------
      • -------- Spirit appearance interval, min --------
      • -------- -------------------- --------
      • Set DR_Reals[12] = 0.25
      • -------- -------------------- --------
      • -------- Spirit appearance interval, max --------
      • -------- -------------------- --------
      • Set DR_Reals[13] = 0.50
      • -------- -------------------- --------
      • -------- Turn unit collision off when spell is enabled --------
      • -------- This allows the unit to pass through anything --------
      • -------- 1 = collision is turned off, other values = collision stays on --------
      • -------- -------------------- --------
      • Set DR_Reals[14] = 1.00
      • -------- -------------------- --------
      • -------- Max values of the map --------
      • -------- -------------------- --------
      • Set DR_Reals[15] = (Min X of (Playable map area))
      • Set DR_Reals[16] = (Max X of (Playable map area))
      • Set DR_Reals[17] = (Min Y of (Playable map area))
      • Set DR_Reals[18] = (Max Y of (Playable map area))
      • -------- -------------------- --------
      • -------- Offset of moving the unit when out of map area --------
      • -------- -------------------- --------
      • Set DR_Reals[19] = 16.00
      • -------- -------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DR_Reals[13] Less than DR_Reals[12]
        • Then - Actions
          • Set DR_Reals[13] = DR_Reals[12]
        • Else - Actions


Distort Reality
  • Distort Reality
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to |c00FF00FFDistort Reality|r
    • Actions
      • Set Temp_Unit_1 = (Triggering unit)
      • Set Temp_Loc_1 = (Position of Temp_Unit_1)
      • Set Temp_Real_1 = (Real((Level of |c00FF00FFDistort Reality|r for Temp_Unit_1)))
      • -------- -------------------- --------
      • Set Temp_Real_2 = (Random angle)
      • -------- -------------------- --------
      • -------- Calculate damage --------
      • -------- -------------------- --------
      • Set Temp_Real_3 = ((DR_Reals[5] + ((Real((Level of |c00FF00FFDistort Reality|r for Temp_Unit_1))) x DR_Reals[6])) x (1.00 + ((Real((Intelligence of Temp_Unit_1 (Include bonuses)))) / (100.00 / DR_Reals[10]))))
      • -------- -------------------- --------
      • Hashtable - Save Temp_Real_2 as (Key orig_angle) of (Key (Triggering unit)) in DR_Hash
      • -------- -------------------- --------
      • -------- Create lightning effects --------
      • -------- -------------------- --------
      • For each (Integer A) from 1 to (Integer(DR_Reals[0])), do (Actions)
        • Loop - Actions
          • Set Temp_Loc_2 = (Temp_Loc_1 offset by DR_Reals[1] towards Temp_Real_2 degrees)
          • -------- -------------------- --------
          • Unit - Create 1 Dummy - (None) for Neutral Passive at Temp_Loc_2 facing Default building facing degrees
          • Set Temp_Unit_2 = (Last created unit)
          • Unit - Add a 2.00 second Generic expiration timer to Temp_Unit_2
          • -------- -------------------- --------
          • Special Effect - Create a special effect attached to the origin of Temp_Unit_2 using Abilities\Spells\Human\ManaFlare\ManaFlareBoltImpact.mdl
          • Hashtable - Save Handle Of(Last created special effect) as (Key (effect + (String((Integer A))))) of (Key (Triggering unit)) in DR_Hash
          • Special Effect - Create a special effect attached to the origin of Temp_Unit_2 using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
          • Hashtable - Save Handle Of(Last created special effect) as (Key (effect + (String(((Integer(DR_Reals[0])) + (Integer A)))))) of (Key (Triggering unit)) in DR_Hash
          • -------- -------------------- --------
          • Hashtable - Save Handle OfTemp_Unit_2 as (Key (dummy + (String((Integer A))))) of (Key (Triggering unit)) in DR_Hash
          • -------- -------------------- --------
          • Set Temp_Real_2 = (Temp_Real_2 + (360.00 / DR_Reals[0]))
          • -------- -------------------- --------
          • Custom script: call RemoveLocation(udg_Temp_Loc_2)
      • -------- -------------------- --------
      • Special Effect - Create a special effect attached to the origin of Temp_Unit_1 using Abilities\Spells\NightElf\Starfall\StarfallCaster.mdl
      • Hashtable - Save Handle Of(Last created special effect) as (Key starfall) of (Key (Triggering unit)) in DR_Hash
      • -------- -------------------- --------
      • Hashtable - Save 0.00 as (Key transparency) of (Key (Triggering unit)) in DR_Hash
      • Hashtable - Save DR_Reals[1] as (Key offset) of (Key (Triggering unit)) in DR_Hash
      • Hashtable - Save DR_Reals[7] as (Key timer) of (Key (Triggering unit)) in DR_Hash
      • Hashtable - Save DR_Reals[0] as (Key effects) of (Key (Triggering unit)) in DR_Hash
      • Hashtable - Save Temp_Real_3 as (Key damage) of (Key (Triggering unit)) in DR_Hash
      • Hashtable - Save (DR_Reals[4] / (DR_Reals[1] / DR_Reals[3])) as (Key trans_speed) of (Key (Triggering unit)) in DR_Hash
      • -------- -------------------- --------
      • Unit Group - Add Temp_Unit_1 to DR_Group
      • -------- -------------------- --------
      • Trigger - Turn on DR Loop <gen>
      • -------- -------------------- --------
      • Custom script: call RemoveLocation(udg_Temp_Loc_1)


Loop
  • DR Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- ------------------------- --------
      • -------- The caster loop --------
      • -------- ------------------------- --------
      • Unit Group - Pick every unit in DR_Group and do (Actions)
        • Loop - Actions
          • -------- ------------------------- --------
          • Set Temp_Unit_1 = (Picked unit)
          • Set Temp_Real_1 = (Load (Key offset) of (Key (Picked unit)) from DR_Hash)
          • Set Temp_Real_5 = (Load (Key timer) of (Key (Picked unit)) from DR_Hash)
          • -------- ------------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Real_1 Greater than 0.00
              • Temp_Real_5 Greater than 0.00
              • (Temp_Unit_1 is alive) Equal to True
            • Then - Actions
              • -------- ------------------------- --------
              • -------- Test for phase 1; lightnings converging --------
              • -------- ------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Temp_Real_1 Greater than 0.00
                  • Temp_Real_5 Greater than or equal to DR_Reals[7]
                • Then - Actions
                  • Set Temp_Loc_1 = (Position of Temp_Unit_1)
                  • Set Temp_Real_2 = (Load (Key orig_angle) of (Key (Picked unit)) from DR_Hash)
                  • Set Temp_Real_3 = Temp_Real_2
                  • Set Temp_Real_4 = (Load (Key transparency) of (Key (Picked unit)) from DR_Hash)
                  • Set Temp_Real_6 = (Load (Key damage) of (Key (Picked unit)) from DR_Hash)
                  • -------- ------------------------- --------
                  • -------- This makes the caster blink --------
                  • -------- ------------------------- --------
                  • Animation - Change Temp_Unit_1's vertex coloring to (100.00%, 100.00%, 100.00%) with Temp_Real_4% transparency
                  • -------- ------------------------- --------
                  • -------- Update lightning positions and damage targets --------
                  • -------- ------------------------- --------
                  • For each (Integer A) from 1 to (Integer(DR_Reals[0])), do (Actions)
                    • Loop - Actions
                      • Set Temp_Unit_2 = (Load (Key (dummy + (String((Integer A))))) of (Key (Picked unit)) in DR_Hash)
                      • -------- ------------------------- --------
                      • Set Temp_Loc_2 = (Temp_Loc_1 offset by Temp_Real_1 towards Temp_Real_2 degrees)
                      • -------- ------------------------- --------
                      • Unit - Move Temp_Unit_2 instantly to Temp_Loc_2
                      • -------- ------------------------- --------
                      • Set Temp_Group_1 = (Units within DR_Reals[9] of Temp_Loc_2)
                      • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
                        • Loop - Actions
                          • Set Temp_Unit_3 = (Picked unit)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Temp_Unit_3 is alive) Equal to True
                              • (Temp_Unit_3 belongs to an enemy of (Owner of Temp_Unit_1)) Equal to True
                            • Then - Actions
                              • Unit - Cause Temp_Unit_1 to damage Temp_Unit_3, dealing Temp_Real_6 damage of attack type Spells and damage type Cold
                              • Special Effect - Create a special effect attached to the chest of Temp_Unit_3 using Abilities\Spells\Undead\FrostArmor\FrostArmorDamage.mdl
                              • Special Effect - Destroy (Last created special effect)
                            • Else - Actions
                      • Custom script: call DestroyGroup(udg_Temp_Group_1)
                      • -------- ------------------------- --------
                      • Set Temp_Real_2 = (Temp_Real_2 + (360.00 / DR_Reals[0]))
                      • -------- ------------------------- --------
                      • Custom script: call RemoveLocation(udg_Temp_Loc_2)
                  • -------- ------------------------- --------
                  • -------- Checks whether we should progress to next phase or not --------
                  • -------- ------------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Temp_Real_1 - DR_Reals[3]) Greater than 0.00
                    • Then - Actions
                      • Hashtable - Save (Temp_Real_1 - DR_Reals[3]) as (Key offset) of (Key (Picked unit)) in DR_Hash
                      • Hashtable - Save (Temp_Real_3 + DR_Reals[2]) as (Key orig_angle) of (Key (Picked unit)) in DR_Hash
                      • Hashtable - Save (Temp_Real_4 + (Load (Key trans_speed) of (Key (Picked unit)) from DR_Hash)) as (Key transparency) of (Key (Picked unit)) in DR_Hash
                    • Else - Actions
                      • -------- ------------------------- --------
                      • -------- Add Evasion to caster --------
                      • -------- ------------------------- --------
                      • Unit - Add Spell Book - (DR) to Temp_Unit_1
                      • Unit - Set level of Evasion - (DR) for Temp_Unit_1 to (Level of |c00FF00FFDistort Reality|r for Temp_Unit_1)
                      • -------- ------------------------- --------
                      • For each (Integer A) from 1 to (Integer(DR_Reals[0])), do (Actions)
                        • Loop - Actions
                          • Special Effect - Destroy (Load (Key (effect + (String((Integer A))))) of (Key (Picked unit)) in DR_Hash)
                          • Special Effect - Destroy (Load (Key (effect + (String(((Integer(DR_Reals[0])) + (Integer A)))))) of (Key (Picked unit)) in DR_Hash)
                      • -------- ------------------------- --------
                      • Hashtable - Save (DR_Reals[7] - 0.01) as (Key timer) of (Key (Picked unit)) in DR_Hash
                      • -------- Convert current transparency percentage to radians so we can continue from there in the next phase --------
                      • Hashtable - Save ((Temp_Real_4 / 90.00) x 360.00) as (Key transparency) of (Key (Picked unit)) in DR_Hash
                      • Hashtable - Save (Random real number between DR_Reals[12] and DR_Reals[13]) as (Key dmg_timer) of (Key (Picked unit)) in DR_Hash
                      • Special Effect - Destroy (Load (Key starfall) of (Key (Picked unit)) in DR_Hash)
                      • -------- ------------------------- --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • DR_Reals[14] Equal to 1.00
                        • Then - Actions
                          • Unit - Turn collision for Temp_Unit_1 Off
                        • Else - Actions
                      • -------- ------------------------- --------
                      • Unit - Create 1 Dummy - (None) for Neutral Passive at Temp_Loc_1 facing Default building facing degrees
                      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                      • Unit - Add DR Buff to (Last created unit)
                      • Unit - Set level of DR Buff for (Last created unit) to (Level of |c00FF00FFDistort Reality|r for Temp_Unit_1)
                      • Unit - Order (Last created unit) to Human Priest - Inner Fire Temp_Unit_1
                  • Custom script: call RemoveLocation(udg_Temp_Loc_1)
                • Else - Actions
                  • -------- ------------------------- --------
                  • -------- Phase 2 --------
                  • -------- ------------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Temp_Real_5 - 0.03) Greater than 0.00
                    • Then - Actions
                      • Set Temp_Real_4 = (Load (Key transparency) of (Key (Picked unit)) from DR_Hash)
                      • -------- Calculate new transparency value --------
                      • Animation - Change Temp_Unit_1's vertex coloring to (100.00%, 100.00%, 100.00%) with (DR_Reals[4] + (((90.00 - DR_Reals[4]) x (1.00 + (Sin(Temp_Real_4)))) / 2.00))% transparency
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Temp_Real_4 - DR_Reals[8]) Less than 360.00
                        • Then - Actions
                          • Hashtable - Save (Temp_Real_4 + DR_Reals[8]) as (Key transparency) of (Key (Picked unit)) in DR_Hash
                        • Else - Actions
                          • Hashtable - Save 0.00 as (Key transparency) of (Key (Picked unit)) in DR_Hash
                      • Hashtable - Save (Temp_Real_5 - 0.03) as (Key timer) of (Key (Picked unit)) in DR_Hash
                      • -------- ------------------------- --------
                      • Set Temp_Real_5 = (Load (Key dmg_timer) of (Key (Picked unit)) from DR_Hash)
                      • -------- ------------------------- --------
                      • -------- Create spirit --------
                      • -------- ------------------------- --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Temp_Real_5 Less than or equal to 0.00
                        • Then - Actions
                          • Set Temp_Loc_1 = (Position of Temp_Unit_1)
                          • Set Temp_Loc_2 = (Temp_Loc_1 offset by (Random real number between 1024.00 and 1536.00) towards (Random angle) degrees)
                          • -------- ------------------------- --------
                          • Unit - Create 1 Dummy - (None) for Neutral Passive at Temp_Loc_2 facing Temp_Real_4 degrees
                          • Set Temp_Unit_2 = (Last created unit)
                          • -------- -------------------- --------
                          • Unit - Add Storm Crow Form to Temp_Unit_2
                          • Unit - Remove Storm Crow Form from Temp_Unit_2
                          • -------- -------------------- --------
                          • Animation - Change Temp_Unit_2 flying height to 2000.00 at 0.00
                          • -------- ------------------------- --------
                          • Set Temp_Group_1 = (Units within 600.00 of Temp_Loc_1)
                          • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
                            • Loop - Actions
                              • Set Temp_Unit_3 = (Picked unit)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Temp_Unit_3 is alive) Equal to True
                                  • (Temp_Unit_3 belongs to an enemy of (Owner of Temp_Unit_1)) Equal to True
                                • Then - Actions
                                • Else - Actions
                                  • Unit Group - Remove Temp_Unit_3 from Temp_Group_1
                          • -------- ------------------------- --------
                          • -------- Pick a random target for the wisp --------
                          • -------- ------------------------- --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Temp_Group_1 is empty) Equal to False
                            • Then - Actions
                              • Set Temp_Unit_3 = (Random unit from Temp_Group_1)
                              • -------- ------------------------- --------
                              • Set Temp_Loc_3 = (Position of Temp_Unit_3)
                              • Set Temp_Real_6 = (Load (Key damage) of (Key (Picked unit)) from DR_Hash)
                              • -------- ------------------------- --------
                              • Unit - Make (Last created unit) face (Angle from Temp_Loc_2 to Temp_Loc_3) over 0.00 seconds
                              • -------- ------------------------- --------
                              • Hashtable - Save (Random angle) as (Key angle) of (Key (Last created unit)) in DR_Hash
                              • Hashtable - Save Temp_Real_6 as (Key damage) of (Key (Last created unit)) in DR_Hash
                              • Hashtable - Save Handle OfTemp_Unit_3 as (Key target) of (Key (Last created unit)) in DR_Hash
                              • Hashtable - Save Handle OfTemp_Unit_1 as (Key caster) of (Key (Last created unit)) in DR_Hash
                              • Hashtable - Save (Distance between Temp_Loc_2 and Temp_Loc_3) as (Key distance) of (Key (Last created unit)) in DR_Hash
                              • -------- ------------------------- --------
                              • Custom script: call RemoveLocation(udg_Temp_Loc_3)
                            • Else - Actions
                          • Custom script: call DestroyGroup(udg_Temp_Group_1)
                          • -------- ------------------------- --------
                          • Special Effect - Create a special effect attached to the origin of Temp_Unit_2 using Abilities\Weapons\DragonHawkMissile\DragonHawkMissile.mdl
                          • Hashtable - Save Handle Of(Last created special effect) as (Key effect1) of (Key (Last created unit)) in DR_Hash
                          • Special Effect - Create a special effect attached to the origin of Temp_Unit_2 using Abilities\Weapons\ZigguratFrostMissile\ZigguratFrostMissile.mdl
                          • Hashtable - Save Handle Of(Last created special effect) as (Key effect2) of (Key (Last created unit)) in DR_Hash
                          • Special Effect - Create a special effect attached to the origin of Temp_Unit_2 using Abilities\Weapons\FaerieDragonMissile\FaerieDragonMissile.mdl
                          • Hashtable - Save Handle Of(Last created special effect) as (Key effect3) of (Key (Last created unit)) in DR_Hash
                          • -------- ------------------------- --------
                          • Unit Group - Add (Last created unit) to DR_Dummy_Group
                          • -------- ------------------------- --------
                          • Hashtable - Save (Random real number between 0.09 and 0.27) as (Key dmg_timer) of (Key (Picked unit)) in DR_Hash
                          • -------- ------------------------- --------
                          • Custom script: call RemoveLocation(udg_Temp_Loc_1)
                          • Custom script: call RemoveLocation(udg_Temp_Loc_2)
                        • Else - Actions
                          • Hashtable - Save (Temp_Real_5 - 0.03) as (Key dmg_timer) of (Key (Picked unit)) in DR_Hash
                    • Else - Actions
                      • -------- ------------------------- --------
                      • -------- Checks whether we should progres to phase 3 --------
                      • -------- ------------------------- --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Load (Key phase3) of (Key (Picked unit)) from DR_Hash) Equal to False
                        • Then - Actions
                          • Hashtable - Save True as (Key phase3) of (Key (Picked unit)) in DR_Hash
                          • Set Temp_Real_4 = (Load (Key transparency) of (Key (Picked unit)) from DR_Hash)
                          • Hashtable - Save 1.00 as (Key offset) of (Key (Picked unit)) in DR_Hash
                          • Hashtable - Save DR_Reals[0] as (Key effects) of (Key (Picked unit)) in DR_Hash
                          • Hashtable - Save ((Temp_Real_4 / 360.00) x 90.00) as (Key transparency) of (Key (Picked unit)) in DR_Hash
                          • Hashtable - Save ((Load (Key transparency) of (Key (Picked unit)) from DR_Hash) / (DR_Reals[1] / DR_Reals[3])) as (Key trans_speed) of (Key (Picked unit)) in DR_Hash
                          • -------- -------------------- --------
                          • Special Effect - Create a special effect attached to the origin of Temp_Unit_1 using Abilities\Spells\NightElf\Starfall\StarfallCaster.mdl
                          • Hashtable - Save Handle Of(Last created special effect) as (Key starfall) of (Key (Picked unit)) in DR_Hash
                          • -------- -------------------- --------
                          • Set Temp_Loc_1 = (Position of Temp_Unit_1)
                          • For each (Integer A) from 1 to (Integer(DR_Reals[0])), do (Actions)
                            • Loop - Actions
                              • Set Temp_Loc_2 = (Temp_Loc_1 offset by 0.00 towards Temp_Real_2 degrees)
                              • -------- -------------------- --------
                              • Unit - Create 1 Dummy - (None) for Neutral Passive at Temp_Loc_2 facing Default building facing degrees
                              • Set Temp_Unit_2 = (Last created unit)
                              • Unit - Add a 2.00 second Generic expiration timer to Temp_Unit_2
                              • -------- -------------------- --------
                              • Special Effect - Create a special effect attached to the origin of Temp_Unit_2 using Abilities\Spells\Human\ManaFlare\ManaFlareBoltImpact.mdl
                              • Hashtable - Save Handle Of(Last created special effect) as (Key (effect + (String((Integer A))))) of (Key (Picked unit)) in DR_Hash
                              • Special Effect - Create a special effect attached to the origin of Temp_Unit_2 using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
                              • Hashtable - Save Handle Of(Last created special effect) as (Key (effect + (String(((Integer(DR_Reals[0])) + (Integer A)))))) of (Key (Picked unit)) in DR_Hash
                              • -------- -------------------- --------
                              • Hashtable - Save Handle OfTemp_Unit_2 as (Key (dummy + (String((Integer A))))) of (Key (Picked unit)) in DR_Hash
                              • -------- -------------------- --------
                              • Set Temp_Real_2 = (Temp_Real_2 + (360.00 / DR_Reals[0]))
                              • -------- -------------------- --------
                              • Custom script: call RemoveLocation(udg_Temp_Loc_2)
                          • Custom script: call RemoveLocation(udg_Temp_Loc_1)
                        • Else - Actions
                          • Set Temp_Loc_1 = (Position of Temp_Unit_1)
                          • Set Temp_Real_2 = (Load (Key orig_angle) of (Key (Picked unit)) from DR_Hash)
                          • Set Temp_Real_3 = Temp_Real_2
                          • Set Temp_Real_4 = (Load (Key transparency) of (Key (Picked unit)) from DR_Hash)
                          • Set Temp_Real_6 = (Load (Key damage) of (Key (Picked unit)) from DR_Hash)
                          • Animation - Change Temp_Unit_1's vertex coloring to (100.00%, 100.00%, 100.00%) with Temp_Real_4% transparency
                          • For each (Integer A) from 1 to (Integer(DR_Reals[0])), do (Actions)
                            • Loop - Actions
                              • Set Temp_Unit_2 = (Load (Key (dummy + (String((Integer A))))) of (Key (Picked unit)) in DR_Hash)
                              • -------- ------------------------- --------
                              • Set Temp_Loc_2 = (Temp_Loc_1 offset by Temp_Real_1 towards Temp_Real_2 degrees)
                              • -------- ------------------------- --------
                              • Unit - Move Temp_Unit_2 instantly to Temp_Loc_2
                              • -------- ------------------------- --------
                              • Set Temp_Group_1 = (Units within DR_Reals[9] of Temp_Loc_2)
                              • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
                                • Loop - Actions
                                  • Set Temp_Unit_3 = (Picked unit)
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Temp_Unit_3 is alive) Equal to True
                                      • (Temp_Unit_3 belongs to an enemy of (Owner of Temp_Unit_1)) Equal to True
                                    • Then - Actions
                                      • Unit - Cause Temp_Unit_1 to damage Temp_Unit_3, dealing Temp_Real_6 damage of attack type Spells and damage type Cold
                                      • Special Effect - Create a special effect attached to the chest of Temp_Unit_3 using Abilities\Spells\Undead\FrostArmor\FrostArmorDamage.mdl
                                      • Special Effect - Destroy (Last created special effect)
                                    • Else - Actions
                              • Custom script: call DestroyGroup(udg_Temp_Group_1)
                              • -------- ------------------------- --------
                              • Set Temp_Real_2 = (Temp_Real_2 + (360.00 / DR_Reals[0]))
                              • -------- ------------------------- --------
                              • Custom script: call RemoveLocation(udg_Temp_Loc_2)
                          • -------- ------------------------- --------
                          • -------- Checks whether we should progress to ending the spell --------
                          • -------- ------------------------- --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Temp_Real_1 - DR_Reals[3]) Less than DR_Reals[1]
                            • Then - Actions
                              • Hashtable - Save (Temp_Real_1 + DR_Reals[3]) as (Key offset) of (Key (Picked unit)) in DR_Hash
                              • Hashtable - Save (Temp_Real_3 - DR_Reals[2]) as (Key orig_angle) of (Key (Picked unit)) in DR_Hash
                              • Hashtable - Save (Temp_Real_4 - (Load (Key trans_speed) of (Key (Picked unit)) from DR_Hash)) as (Key transparency) of (Key (Picked unit)) in DR_Hash
                            • Else - Actions
                              • Hashtable - Save -1.00 as (Key timer) of (Key (Picked unit)) in DR_Hash
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Playable map area) contains Temp_Unit_1) Equal to True
                    • Then - Actions
                    • Else - Actions
                      • Set Temp_Loc_1 = (Position of Temp_Unit_1)
                      • Set Temp_Real_1 = (X of Temp_Loc_1)
                      • Set Temp_Real_2 = (Y of Temp_Loc_1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Temp_Real_1 Less than DR_Reals[15]
                        • Then - Actions
                          • Custom script: call SetUnitX( udg_Temp_Unit_1 , udg_DR_Reals[15] + udg_DR_Reals[19] )
                          • Unit - Order Temp_Unit_1 to Stop
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Temp_Real_1 Greater than DR_Reals[16]
                        • Then - Actions
                          • Custom script: call SetUnitX( udg_Temp_Unit_1 , udg_DR_Reals[16] - udg_DR_Reals[19] )
                          • Unit - Order Temp_Unit_1 to Stop
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Temp_Real_2 Less than DR_Reals[17]
                        • Then - Actions
                          • Custom script: call SetUnitY( udg_Temp_Unit_1 , udg_DR_Reals[17] + udg_DR_Reals[19] )
                          • Unit - Order Temp_Unit_1 to Stop
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Temp_Real_2 Greater than DR_Reals[18]
                        • Then - Actions
                          • Custom script: call SetUnitY( udg_Temp_Unit_1 , udg_DR_Reals[18] - udg_DR_Reals[19] )
                          • Unit - Order Temp_Unit_1 to Stop
                        • Else - Actions
                      • Custom script: call RemoveLocation(udg_Temp_Loc_1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DR_Reals[14] Equal to 1.00
                • Then - Actions
                  • Unit - Turn collision for Temp_Unit_1 On
                • Else - Actions
              • Unit - Remove Spell Book - (DR) from Temp_Unit_1
              • -------- ------------------------- --------
              • Unit Group - Remove Temp_Unit_1 from DR_Group
              • -------- ------------------------- --------
              • Special Effect - Destroy (Load (Key starfall) of (Key (Picked unit)) in DR_Hash)
              • For each (Integer A) from 1 to (Integer(DR_Reals[0])), do (Actions)
                • Loop - Actions
                  • Special Effect - Destroy (Load (Key (effect + (String((Integer A))))) of (Key (Picked unit)) in DR_Hash)
                  • Special Effect - Destroy (Load (Key (effect + (String(((Integer(DR_Reals[0])) + (Integer A)))))) of (Key (Picked unit)) in DR_Hash)
              • -------- ------------------------- --------
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in DR_Hash
              • -------- ------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (DR_Group is empty) Equal to True
                  • (DR_Dummy_Group is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
      • -------- ------------------------- --------
      • -------- The dummy loop --------
      • -------- ------------------------- --------
      • Unit Group - Pick every unit in DR_Dummy_Group and do (Actions)
        • Loop - Actions
          • -------- ------------------------- --------
          • Set Temp_Unit_1 = (Picked unit)
          • Set Temp_Real_1 = (Load (Key distance) of (Key (Picked unit)) from DR_Hash)
          • Set Temp_Unit_2 = (Load (Key target) of (Key (Picked unit)) in DR_Hash)
          • -------- ------------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Real_1 Less than 2000.00
              • (Temp_Unit_2 is alive) Equal to True
            • Then - Actions
              • Set Temp_Loc_1 = (Position of Temp_Unit_1)
              • Set Temp_Loc_2 = (Position of Temp_Unit_2)
              • -------- ------------------------- --------
              • Set Temp_Real_2 = (Load (Key angle) of (Key (Picked unit)) from DR_Hash)
              • Set Temp_Loc_3 = (Temp_Loc_1 offset by DR_Reals[11] towards (Angle from Temp_Loc_1 to Temp_Loc_2) degrees)
              • -------- ------------------------- --------
              • Unit - Move Temp_Unit_1 instantly to Temp_Loc_3
              • -------- ------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current flying height of Temp_Unit_1) Greater than 50.00
                • Then - Actions
                  • Animation - Change Temp_Unit_1 flying height to ((Current flying height of Temp_Unit_1) x 0.90) at 0.00
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current flying height of Temp_Unit_1) Less than 50.00
                  • (Distance between Temp_Loc_2 and Temp_Loc_3) Less than or equal to 48.00
                • Then - Actions
                  • Set Temp_Unit_3 = (Load (Key caster) of (Key (Picked unit)) in DR_Hash)
                  • Set Temp_Real_3 = (Load (Key damage) of (Key (Picked unit)) from DR_Hash)
                  • -------- ------------------------- --------
                  • Unit - Cause Temp_Unit_3 to damage Temp_Unit_2, dealing Temp_Real_3 damage of attack type Spells and damage type Cold
                  • -------- This makes the unit to be removed from the group during the next loop --------
                  • Hashtable - Save 10000.00 as (Key distance) of (Key (Picked unit)) in DR_Hash
                • Else - Actions
                  • Hashtable - Save (Distance between Temp_Loc_2 and Temp_Loc_3) as (Key distance) of (Key (Picked unit)) in DR_Hash
              • Custom script: call RemoveLocation(udg_Temp_Loc_1)
              • Custom script: call RemoveLocation(udg_Temp_Loc_2)
              • Custom script: call RemoveLocation(udg_Temp_Loc_3)
            • Else - Actions
              • Unit Group - Remove Temp_Unit_1 from DR_Dummy_Group
              • -------- ------------------------- --------
              • Unit - Add a 1.00 second Generic expiration timer to Temp_Unit_1
              • -------- ------------------------- --------
              • Special Effect - Destroy (Load (Key effect1) of (Key (Picked unit)) in DR_Hash)
              • Special Effect - Destroy (Load (Key effect2) of (Key (Picked unit)) in DR_Hash)
              • Special Effect - Destroy (Load (Key effect3) of (Key (Picked unit)) in DR_Hash)
              • -------- ------------------------- --------
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in DR_Hash
              • -------- ------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (DR_Group is empty) Equal to True
                  • (DR_Dummy_Group is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions




Mens Imperium

Converts the target to serve the bidding of the Lich King. The Lich King will leech health from the target if he has less than maximum health points. If the target dies while the spell is active, skeleton(s) will be summoned. Reduced duration for heroes. Heroes can't be converted.

Triggers

Initialize
  • MI Initialize
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set MI_Hash = (Last created hashtable)
      • -------- -------------------- --------
      • -------- Base duration, hero --------
      • -------- -------------------- --------
      • Set MI_Reals[0] = 3.00
      • -------- -------------------- --------
      • -------- Ability level bonus duration, hero --------
      • -------- -------------------- --------
      • Set MI_Reals[1] = 3.00
      • -------- -------------------- --------
      • -------- Base duration, unit --------
      • -------- -------------------- --------
      • Set MI_Reals[2] = 5.00
      • -------- -------------------- --------
      • -------- Ability level bonus duration, unit --------
      • -------- -------------------- --------
      • Set MI_Reals[3] = 5.00
      • -------- -------------------- --------
      • -------- Base damage / heal per second --------
      • -------- -------------------- --------
      • Set MI_Reals[4] = 7.00
      • -------- -------------------- --------
      • -------- Ability level bonus damage / heal per second --------
      • -------- -------------------- --------
      • Set MI_Reals[5] = 3.00
      • -------- -------------------- --------
      • -------- Create units when target dies, 1 = yes, others = no --------
      • -------- -------------------- --------
      • Set MI_Reals[6] = 1.00
      • -------- -------------------- --------
      • -------- Max distance between target and caster --------
      • -------- -------------------- --------
      • Set MI_Reals[7] = 1000.00
      • -------- -------------------- --------
      • -------- Health/mana ratio, returns mana also. 0 = no mana returned --------
      • -------- -------------------- --------
      • Set MI_Reals[8] = 0.25
      • -------- -------------------- --------
      • -------- Lightning type --------
      • -------- -------------------- --------
      • Set MI_Lightning = DRAB
      • -------- -------------------- --------
      • -------- Unit type to create when target dies --------
      • -------- -------------------- --------
      • Set MI_Unit_Type = Skeleton Warrior
      • -------- -------------------- --------
      • -------- -------------------- --------
      • -------- Don't touch these --------
      • Set MI_Reals[4] = (MI_Reals[4] x 0.03)
      • Set MI_Reals[5] = (MI_Reals[5] x 0.03)


Mens Imperium
  • Mens Imperium
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to |c00FF00FFMens Imperium|r
    • Actions
      • Set Temp_Unit_1 = (Triggering unit)
      • Set Temp_Unit_2 = (Target unit of ability being cast)
      • -------- -------------------- --------
      • -------- Clear stuff from previuos cast --------
      • -------- Just a precaution if someone messes up with cooldowns --------
      • -------- -------------------- --------
      • Set Temp_Unit_3 = (Load (Key target) of (Key (Triggering unit)) in MI_Hash)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_Unit_3 Not equal to No unit
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Temp_Unit_3 is A Hero) Equal to False
            • Then - Actions
              • Unit - Change ownership of Temp_Unit_3 to (Player((Load (Key owner) of (Key (Triggering unit)) from MI_Hash))) and Change color
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MI_Reals[6] Equal to 1.00
              • (Temp_Unit_3 is alive) Equal to False
            • Then - Actions
              • Set Temp_Loc_2 = (Position of Temp_Unit_3)
              • For each (Integer A) from 1 to (Load (Key level) of (Key (Triggering unit)) from MI_Hash), do (Actions)
                • Loop - Actions
                  • Unit - Create 1 MI_Unit_Type for (Owner of Temp_Unit_1) at Temp_Loc_2 facing (Random angle) degrees
                  • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
                  • Unit - Add a 30.00 second Animate Dead expiration timer to (Last created unit)
                  • Unit - Order (Last created unit) to Right-Click Temp_Unit_1
              • Custom script: call RemoveLocation(udg_Temp_Loc_2)
            • Else - Actions
        • Else - Actions
      • Lightning - Destroy (Load (Key lightning) of (Key (Triggering unit)) in MI_Hash)
      • Special Effect - Destroy (Load (Key effect1) of (Key (Triggering unit)) in MI_Hash)
      • Special Effect - Destroy (Load (Key effect2) of (Key (Triggering unit)) in MI_Hash)
      • Special Effect - Destroy (Load (Key effect3) of (Key (Triggering unit)) in MI_Hash)
      • Special Effect - Destroy (Load (Key effect4) of (Key (Triggering unit)) in MI_Hash)
      • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in MI_Hash
      • Unit Group - Remove Temp_Unit_1 from MI_Group
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (MI_Group is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off MI Loop <gen>
        • Else - Actions
      • -------- ------------------------------------------------------------ --------
      • -------- ------------------------------------------------------------ --------
      • -------- THE REAL SPELL BEGINS HERE --------
      • -------- ------------------------------------------------------------ --------
      • -------- ------------------------------------------------------------ --------
      • -------- -------------------- --------
      • Set Temp_Loc_1 = (Position of Temp_Unit_1)
      • Set Temp_Loc_2 = (Position of Temp_Unit_2)
      • -------- -------------------- --------
      • Set Temp_Integer_1 = (Level of |c00FF00FFMens Imperium|r for Temp_Unit_1)
      • -------- -------------------- --------
      • Custom script: set udg_Temp_Lightning_1 = AddLightningEx( udg_MI_Lightning , true, GetLocationX(udg_Temp_Loc_1), GetLocationY(udg_Temp_Loc_1), GetLocationZ(udg_Temp_Loc_1) + 60, GetLocationX(udg_Temp_Loc_2), GetLocationY(udg_Temp_Loc_2), GetLocationZ(udg_Temp_Loc_2) + 60)
      • Lightning - Change color of Temp_Lightning_1 to (1.00 1.00 1.00) with 0.30 alpha
      • -------- -------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Temp_Unit_2 is A Hero) Equal to True
        • Then - Actions
          • Set Temp_Real_1 = (MI_Reals[0] + (MI_Reals[1] x (Real(Temp_Integer_1))))
        • Else - Actions
          • Set Temp_Real_1 = (MI_Reals[2] + (MI_Reals[3] x (Real(Temp_Integer_1))))
          • Hashtable - Save (Player number of (Owner of Temp_Unit_2)) as (Key owner) of (Key (Triggering unit)) in MI_Hash
          • Unit - Change ownership of Temp_Unit_2 to (Owner of Temp_Unit_1) and Change color
      • -------- -------------------- --------
      • Special Effect - Create a special effect attached to the chest of Temp_Unit_1 using Abilities\Spells\Orc\SpiritLink\SpiritLinkTarget.mdl
      • Hashtable - Save Handle Of(Last created special effect) as (Key effect1) of (Key (Triggering unit)) in MI_Hash
      • Special Effect - Create a special effect attached to the chest of Temp_Unit_2 using Abilities\Spells\Orc\SpiritLink\SpiritLinkTarget.mdl
      • Hashtable - Save Handle Of(Last created special effect) as (Key effect2) of (Key (Triggering unit)) in MI_Hash
      • Special Effect - Create a special effect attached to the chest of Temp_Unit_1 using Abilities\Spells\NightElf\Rejuvenation\RejuvenationTarget.mdl
      • Hashtable - Save Handle Of(Last created special effect) as (Key effect3) of (Key (Triggering unit)) in MI_Hash
      • Special Effect - Create a special effect attached to the chest of Temp_Unit_2 using Abilities\Spells\NightElf\Rejuvenation\RejuvenationTarget.mdl
      • Hashtable - Save Handle Of(Last created special effect) as (Key effect4) of (Key (Triggering unit)) in MI_Hash
      • -------- -------------------- --------
      • Hashtable - Save 0.30 as (Key alpha) of (Key (Triggering unit)) in MI_Hash
      • Hashtable - Save Temp_Real_1 as (Key timer) of (Key (Triggering unit)) in MI_Hash
      • Hashtable - Save 1.00 as (Key effect_timer) of (Key (Triggering unit)) in MI_Hash
      • Hashtable - Save Temp_Integer_1 as (Key level) of (Key (Triggering unit)) in MI_Hash
      • Hashtable - Save Handle OfTemp_Unit_2 as (Key target) of (Key (Triggering unit)) in MI_Hash
      • Hashtable - Save Handle OfTemp_Lightning_1 as (Key lightning) of (Key (Triggering unit)) in MI_Hash
      • Hashtable - Save (MI_Reals[4] + (MI_Reals[5] + (Real(Temp_Integer_1)))) as (Key damage) of (Key (Triggering unit)) in MI_Hash
      • -------- -------------------- --------
      • Custom script: call RemoveLocation(udg_Temp_Loc_1)
      • Custom script: call RemoveLocation(udg_Temp_Loc_2)
      • -------- -------------------- --------
      • Unit Group - Add Temp_Unit_1 to MI_Group
      • Trigger - Turn on MI Loop <gen>


Loop
  • MI Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in MI_Group and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_1 = (Picked unit)
          • Set Temp_Unit_2 = (Load (Key target) of (Key (Picked unit)) in MI_Hash)
          • Set Temp_Real_3 = (Load (Key timer) of (Key (Picked unit)) from MI_Hash)
          • -------- -------------------- --------
          • Set Temp_Lightning_1 = (Load (Key lightning) of (Key (Picked unit)) in MI_Hash)
          • -------- -------------------- --------
          • Set Temp_Loc_1 = (Position of Temp_Unit_1)
          • Set Temp_Loc_2 = (Position of Temp_Unit_2)
          • -------- -------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Real_3 Greater than 0.00
              • (Temp_Unit_1 is alive) Equal to True
              • (Temp_Unit_2 is alive) Equal to True
              • (Distance between Temp_Loc_1 and Temp_Loc_2) Less than MI_Reals[7]
            • Then - Actions
              • Set Temp_Real_1 = (Load (Key alpha) of (Key (Picked unit)) from MI_Hash)
              • -------- -------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Life of Temp_Unit_1) Less than (Max life of Temp_Unit_1)
                • Then - Actions
                  • Set Temp_Real_2 = (Load (Key damage) of (Key (Picked unit)) from MI_Hash)
                  • Set Temp_Real_4 = (Load (Key effect_timer) of (Key (Picked unit)) from MI_Hash)
                  • -------- -------------------- --------
                  • Unit - Set life of Temp_Unit_1 to ((Life of Temp_Unit_1) + Temp_Real_1)
                  • -------- -------------------- --------
                  • Unit - Cause Temp_Unit_1 to damage Temp_Unit_2, dealing Temp_Real_1 damage of attack type Magic and damage type Mind
                  • -------- -------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Temp_Unit_2) Greater than or equal to (Temp_Real_2 x MI_Reals[8])
                    • Then - Actions
                      • Unit - Set mana of Temp_Unit_1 to ((Mana of Temp_Unit_1) + (Temp_Real_2 x MI_Reals[8]))
                      • Unit - Set mana of Temp_Unit_2 to ((Mana of Temp_Unit_2) - (Temp_Real_2 x MI_Reals[8]))
                    • Else - Actions
                  • -------- -------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Temp_Real_1 Less than 0.99
                    • Then - Actions
                      • Set Temp_Real_1 = (Temp_Real_1 + 0.01)
                      • -------- -------------------- --------
                      • Lightning - Change color of Temp_Lightning_1 to (1.00 1.00 1.00) with Temp_Real_1 alpha
                      • -------- -------------------- --------
                      • Hashtable - Save Temp_Real_1 as (Key alpha) of (Key (Picked unit)) in MI_Hash
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Temp_Real_4 Greater than or equal to 1.50
                    • Then - Actions
                      • Unit - Create 1 Dummy - (None) for Neutral Passive at Temp_Loc_2 facing (Angle from Temp_Loc_2 to Temp_Loc_1) degrees
                      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                      • Custom script: call SetUnitAnimationByIndex(GetLastCreatedUnit(), 0)
                      • -------- -------------------- --------
                      • Special Effect - Create a special effect attached to the chest of (Last created unit) using Abilities\Spells\Items\AIil\AIilTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Create a special effect attached to the chest of (Last created unit) using Abilities\Spells\Items\AIre\AIreTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Create a special effect attached to the chest of (Last created unit) using Abilities\Spells\Items\AIma\AImaTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • -------- -------------------- --------
                      • Hashtable - Save 0.00 as (Key effect_timer) of (Key (Picked unit)) in MI_Hash
                    • Else - Actions
                      • Hashtable - Save (Temp_Real_4 + 0.03) as (Key effect_timer) of (Key (Picked unit)) in MI_Hash
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Temp_Real_1 Greater than 0.30
                    • Then - Actions
                      • Set Temp_Real_1 = (Temp_Real_1 - 0.01)
                      • Lightning - Change color of Temp_Lightning_1 to (1.00 1.00 1.00) with Temp_Real_1 alpha
                      • Hashtable - Save Temp_Real_1 as (Key alpha) of (Key (Picked unit)) in MI_Hash
                    • Else - Actions
              • Custom script: call MoveLightningEx(udg_Temp_Lightning_1 , true, GetLocationX(udg_Temp_Loc_1), GetLocationY(udg_Temp_Loc_1), GetLocationZ(udg_Temp_Loc_1) + 60, GetLocationX(udg_Temp_Loc_2), GetLocationY(udg_Temp_Loc_2), GetLocationZ(udg_Temp_Loc_2) + 60)
              • -------- -------------------- --------
              • Hashtable - Save (Temp_Real_3 - 0.03) as (Key timer) of (Key (Picked unit)) in MI_Hash
              • -------- -------------------- --------
              • Custom script: call RemoveLocation(udg_Temp_Loc_1)
              • Custom script: call RemoveLocation(udg_Temp_Loc_2)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Temp_Unit_2 is alive) Equal to True
                  • (Temp_Unit_2 is A Hero) Equal to False
                • Then - Actions
                  • Unit - Change ownership of Temp_Unit_2 to (Player((Load (Key owner) of (Key (Picked unit)) from MI_Hash))) and Change color
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MI_Reals[6] Equal to 1.00
                  • (Temp_Unit_2 is alive) Equal to False
                • Then - Actions
                  • For each (Integer A) from 1 to (Load (Key level) of (Key (Picked unit)) from MI_Hash), do (Actions)
                    • Loop - Actions
                      • Unit - Create 1 MI_Unit_Type for (Owner of Temp_Unit_1) at Temp_Loc_2 facing (Random angle) degrees
                      • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
                      • Unit - Add a 30.00 second Animate Dead expiration timer to (Last created unit)
                      • Unit - Order (Last created unit) to Right-Click Temp_Unit_1
                • Else - Actions
              • -------- -------------------- --------
              • Custom script: call RemoveLocation(udg_Temp_Loc_1)
              • Custom script: call RemoveLocation(udg_Temp_Loc_2)
              • -------- -------------------- --------
              • Lightning - Destroy Temp_Lightning_1
              • -------- -------------------- --------
              • Special Effect - Destroy (Load (Key effect1) of (Key (Picked unit)) in MI_Hash)
              • Special Effect - Destroy (Load (Key effect2) of (Key (Picked unit)) in MI_Hash)
              • Special Effect - Destroy (Load (Key effect3) of (Key (Picked unit)) in MI_Hash)
              • Special Effect - Destroy (Load (Key effect4) of (Key (Picked unit)) in MI_Hash)
              • -------- -------------------- --------
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in MI_Hash
              • -------- -------------------- --------
              • Unit Group - Remove Temp_Unit_1 from MI_Group
              • -------- -------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (MI_Group is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions




Contages Insanctus

An aura that damages units and slows down their attack speed. The Lich King's presence causes the ground he treads on to freeze.

Triggers

Initialize
  • Contages Insanctus Initialize
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- ------------------------- --------
      • Hashtable - Create a hashtable
      • Set CI_Hash = (Last created hashtable)
      • Hashtable - Create a hashtable
      • Set Terrain_Hash = (Last created hashtable)
      • -------- ------------------------- --------
      • -------- Define the terain types in ypur map here --------
      • -------- ------------------------- --------
      • Set CI_Terrain_Types[0] = Lordaeron Summer - Dirt
      • Set CI_Terrain_Types[1] = Lordaeron Summer - Rough Dirt
      • Set CI_Terrain_Types[2] = Lordaeron Summer - Grassy Dirt
      • Set CI_Terrain_Types[3] = Lordaeron Summer - Rock
      • Set CI_Terrain_Types[4] = Lordaeron Summer - Grass
      • Set CI_Terrain_Types[5] = Lordaeron Summer - Dark Grass
      • -------- ------------------------- --------
      • -------- Terrain Types (insert highest index) --------
      • -------- ------------------------- --------
      • Set CI_Reals[12] = 5.00
      • -------- ------------------------- --------
      • -------- Change terrain, 1 = yes, other values = no --------
      • -------- ------------------------- --------
      • Set CI_Reals[13] = 1.00
      • -------- -------------------------------------------------- --------
      • -------- -------------------------------------------------- --------
      • -------- ------------------------- --------
      • -------- Mana cost, base --------
      • -------- ------------------------- --------
      • Set CI_Reals[0] = 2.00
      • -------- ------------------------- --------
      • -------- Mana cost, bonus per level --------
      • -------- ------------------------- --------
      • Set CI_Reals[1] = 1.00
      • -------- ------------------------- --------
      • -------- AoE, base --------
      • -------- ------------------------- --------
      • Set CI_Reals[2] = 250.00
      • -------- ------------------------- --------
      • -------- AoE, bonus per level --------
      • -------- ------------------------- --------
      • Set CI_Reals[3] = 50.00
      • -------- ------------------------- --------
      • -------- Damage, base --------
      • -------- ------------------------- --------
      • Set CI_Reals[4] = 8.00
      • -------- ------------------------- --------
      • -------- Damage, bonus per level --------
      • -------- ------------------------- --------
      • Set CI_Reals[5] = 2.00
      • -------- ------------------------- --------
      • -------- Effect 1 spawn (yellow spirits), 1 = spawn, other values = no --------
      • -------- ------------------------- --------
      • Set CI_Reals[6] = 1.00
      • -------- ------------------------- --------
      • -------- Effect 2 spawn (white spirits), 1 = spawn, other values = no --------
      • -------- ------------------------- --------
      • Set CI_Reals[7] = 1.00
      • -------- ------------------------- --------
      • -------- Chance to freeze, base --------
      • -------- ------------------------- --------
      • Set CI_Reals[8] = 4.00
      • -------- ------------------------- --------
      • -------- Chance to freeze, ability level bonus --------
      • -------- ------------------------- --------
      • Set CI_Reals[9] = 1.00
      • -------- ------------------------- --------
      • -------- Freeze time --------
      • -------- ------------------------- --------
      • Set CI_Reals[10] = 2.00
      • -------- ------------------------- --------
      • -------- Move aura (0 = Don't move, other values = move) --------
      • -------- ------------------------- --------
      • Set CI_Reals[11] = 1.00
      • -------- ------------------------- --------


Activate
  • Contages Insanctus Activate
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(defend))
      • (Level of |c00FF00FFContages Insanctus|r for (Triggering unit)) Greater than 0
    • Actions
      • Set Temp_Unit_1 = (Triggering unit)
      • Set Temp_Loc_1 = (Position of Temp_Unit_1)
      • -------- ------------------------- --------
      • Unit - Create 1 Dummy - (None) for Neutral Passive at Temp_Loc_1 facing Default building facing degrees
      • Unit Group - Add (Last created unit) to CI_SFX_Group
      • Animation - Change (Last created unit)'s size to (133.00%, 133.00%, 133.00%) of its original size
      • -------- ------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CI_Reals[11] Not equal to 0.00
        • Then - Actions
          • Hashtable - Save Handle Of(Triggering unit) as (Key caster) of (Key (Last created unit)) in CI_Hash
          • Hashtable - Save Handle Of(Last created unit) as (Key dummy) of (Key (Triggering unit)) in CI_Hash
        • Else - Actions
      • Hashtable - Save 0.00 as (Key loop) of (Key (Triggering unit)) in CI_Hash
      • Hashtable - Save (CI_Reals[0] + ((Real((Level of |c00FF00FFContages Insanctus|r for Temp_Unit_1))) x CI_Reals[1])) as (Key mana_cost) of (Key (Triggering unit)) in CI_Hash
      • -------- ------------------------- --------
      • Unit Group - Add Temp_Unit_1 to CI_Group
      • -------- ------------------------- --------
      • Trigger - Turn on Contages Insanctus Pulse <gen>
      • Trigger - Turn on Contages Insanctus Dummy SFX Remove <gen>
      • -------- ------------------------- --------
      • Custom script: call RemoveLocation(udg_Temp_Loc_1)
      • -------- ------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CI_Reals[11] Not equal to 0.00
        • Then - Actions
          • Trigger - Turn on Contages Insanctus SFX Move <gen>
        • Else - Actions
      • Trigger - Turn on Contages Insanctus Deactivate <gen>
      • -------- ------------------------- --------
      • Unit - Order Temp_Unit_1 to Stop
      • -------- ------------------------- --------
      • Wait 0.00 seconds
      • -------- ------------------------- --------
      • Animation - Play (Triggering unit)'s spell animation


Deactivate
  • Contages Insanctus Deactivate
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(undefend))
      • (Level of |c00FF00FFContages Insanctus|r for (Triggering unit)) Greater than 0
    • Actions
      • Unit Group - Remove (Triggering unit) from CI_Group
      • Unit - Kill (Load (Key dummy) of (Key (Triggering unit)) in CI_Hash)
      • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in CI_Hash
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (CI_Group is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (CI_SFX_Group is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off Contages Insanctus SFX Move <gen>
        • Else - Actions


Pulse
  • Contages Insanctus Pulse
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in CI_Group and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_1 = (Picked unit)
          • Set Temp_Real_3 = (Load (Key mana_cost) of (Key (Picked unit)) from CI_Hash)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Temp_Unit_1 is alive) Equal to True
              • (Mana of Temp_Unit_1) Greater than Temp_Real_3
            • Then - Actions
              • Set Temp_Loc_1 = (Position of Temp_Unit_1)
              • Set Temp_Real_1 = (Real((Level of |c00FF00FFContages Insanctus|r for Temp_Unit_1)))
              • -------- ------------------------- --------
              • Set Temp_Real_2 = (Random angle)
              • -------- ------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Random integer number between 1 and 2) Equal to 1
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CI_Reals[6] Equal to 1.00
                    • Then - Actions
                      • For each (Integer A) from 1 to 2, do (Actions)
                        • Loop - Actions
                          • -------- ------------------------- --------
                          • -------- Create effect 1, yellow spirits --------
                          • -------- ------------------------- --------
                          • Set Temp_Real_3 = (Random real number between 32.00 and 96.00)
                          • Set Temp_Loc_2 = (Temp_Loc_1 offset by Temp_Real_3 towards Temp_Real_2 degrees)
                          • Unit - Create 1 Dummy - (None) for Neutral Passive at Temp_Loc_2 facing (Random angle) degrees
                          • Set Temp_Real_4 = (125.00 - (100.00 x (Temp_Real_3 / 256.00)))
                          • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Orc\EtherealForm\SpiritWalkerChange.mdl
                          • Hashtable - Save Handle Of(Last created special effect) as (Key effect) of (Key (Last created unit)) in CI_Hash
                          • Animation - Change (Last created unit)'s size to (Temp_Real_4%, Temp_Real_4%, Temp_Real_4%) of its original size
                          • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
                          • Custom script: call RemoveLocation(udg_Temp_Loc_2)
                          • Set Temp_Real_2 = (Temp_Real_2 + (Random real number between -160.00 and 160.00))
                    • Else - Actions
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CI_Reals[7] Equal to 1.00
                    • Then - Actions
                      • -------- ------------------------- --------
                      • -------- Create effect 2, yellow spirits --------
                      • -------- ------------------------- --------
                      • Set Temp_Real_3 = (Random real number between 0.00 and 48.00)
                      • Set Temp_Loc_2 = (Temp_Loc_1 offset by Temp_Real_3 towards Temp_Real_2 degrees)
                      • Unit - Create 1 Dummy - (None) for Neutral Passive at Temp_Loc_2 facing (Random angle) degrees
                      • Set Temp_Real_4 = (50.00 - (100.00 x (Temp_Real_3 / 256.00)))
                      • Special Effect - Create a special effect attached to the origin of (Last created unit) using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Animation - Change (Last created unit)'s size to (Temp_Real_4%, Temp_Real_4%, Temp_Real_4%) of its original size
                      • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
                      • Custom script: call RemoveLocation(udg_Temp_Loc_2)
                    • Else - Actions
              • -------- ------------------------- --------
              • Set Temp_Real_3 = (CI_Reals[0] + (CI_Reals[1] x Temp_Real_1))
              • Unit - Set mana of Temp_Unit_1 to ((Mana of Temp_Unit_1) - (Temp_Real_3 / 4.00))
              • -------- ------------------------- --------
              • Set Temp_Real_3 = (Load (Key loop) of (Key (Picked unit)) from CI_Hash)
              • -------- ------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Temp_Real_3 Equal to 2.00
                • Then - Actions
                  • -------- ------------------------- --------
                  • -------- Every two seconds, damage enemies in range --------
                  • -------- ------------------------- --------
                  • Special Effect - Create a special effect attached to the chest of (Load (Key dummy) of (Key (Picked unit)) in CI_Hash) using Abilities\Spells\Undead\FreezingBreath\FreezingBreathMissile.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • -------- ------------------------- --------
                  • Set Temp_Real_2 = (CI_Reals[4] + (CI_Reals[5] x Temp_Real_1))
                  • Set Temp_Group_1 = (Units within (CI_Reals[2] + (CI_Reals[3] x Temp_Real_1)) of Temp_Loc_1 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of Temp_Unit_1)) Equal to True) and (((Matching unit) is Magic Immune) Equal to F
                  • -------- ------------------------- --------
                  • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
                    • Loop - Actions
                      • Set Temp_Unit_2 = (Picked unit)
                      • Set Temp_Loc_2 = (Position of Temp_Unit_2)
                      • -------- ------------------------- --------
                      • Unit - Create 1 Dummy - (None) for Neutral Passive at Temp_Loc_2 facing Default building facing degrees
                      • Set Temp_Unit_3 = (Last created unit)
                      • Unit - Add a 1.00 second Generic expiration timer to Temp_Unit_3
                      • Unit - Add UA Cripple to Temp_Unit_3
                      • Unit - Set level of UA Cripple for Temp_Unit_3 to (Integer(Temp_Real_1))
                      • Unit - Order Temp_Unit_3 to Undead Necromancer - Cripple Temp_Unit_2
                      • Animation - Change Temp_Unit_3's size to (66.00%, 66.00%, 66.00%) of its original size
                      • -------- ------------------------- --------
                      • Unit - Set life of Temp_Unit_2 to ((Life of Temp_Unit_2) - (CI_Reals[4] + (CI_Reals[5] x Temp_Real_1)))
                      • -------- ------------------------- --------
                      • Special Effect - Create a special effect attached to the chest of Temp_Unit_3 using Abilities\Spells\Undead\OrbOfDeath\AnnihilationMissile.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • -------- ------------------------- --------
                      • Custom script: call RemoveLocation(udg_Temp_Loc_2)
                      • -------- ------------------------- --------
                      • Set Temp_Real_4 = (CI_Reals[8] + (CI_Reals[9] x (Real((Level of |c00FF00FFContages Insanctus|r for Temp_Unit_1)))))
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Temp_Unit_2 is in CI_Frozen) Equal to False
                          • (Random real number between 1.00 and 100.00) Less than or equal to Temp_Real_4
                        • Then - Actions
                          • -------- ------------------------- --------
                          • -------- Freeze picked unit --------
                          • -------- ------------------------- --------
                          • Unit - Pause Temp_Unit_2
                          • Animation - Change Temp_Unit_2's animation speed to 0.00% of its original speed
                          • -------- ------------------------- --------
                          • Special Effect - Create a special effect attached to the origin of Temp_Unit_2 using Abilities\Spells\Undead\FreezingBreath\FreezingBreathTargetArt.mdl
                          • -------- ------------------------- --------
                          • Hashtable - Save CI_Reals[10] as (Key freeze_timer) of (Key (Picked unit)) in CI_Hash
                          • Hashtable - Save Handle Of(Last created special effect) as (Key ice) of (Key (Picked unit)) in CI_Hash
                          • -------- ------------------------- --------
                          • Unit Group - Add Temp_Unit_2 to CI_Frozen
                          • -------- ------------------------- --------
                          • Trigger - Turn on Contages Insanctus Freeze <gen>
                        • Else - Actions
                      • -------- ------------------------- --------
                  • Custom script: call DestroyGroup(udg_Temp_Group_1)
                  • Hashtable - Save 0.00 as (Key loop) of (Key (Picked unit)) in CI_Hash
                • Else - Actions
                  • Hashtable - Save (Temp_Real_3 + 0.50) as (Key loop) of (Key (Picked unit)) in CI_Hash
              • -------- ------------------------- --------
              • -------- Terrain changing system --------
              • -------- ------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CI_Reals[13] Equal to 1.00
                • Then - Actions
                  • Set Temp_Loc_2 = (Temp_Loc_1 offset by (1.00 x (Square root((2.00 x (Power(128.00, 2.00)))))) towards 225.00 degrees)
                  • For each (Integer A) from 0 to 2, do (Actions)
                    • Loop - Actions
                      • Set Temp_Loc_3 = (Temp_Loc_2 offset by ((Real((Integer A))) x 128.00) towards 90.00 degrees)
                      • For each (Integer B) from 0 to 2, do (Actions)
                        • Loop - Actions
                          • Set Temp_Loc_4 = (Temp_Loc_3 offset by ((Real((Integer B))) x 128.00) towards 0.00 degrees)
                          • -------- ------------------------- --------
                          • -------- If terrain already changed, no changes --------
                          • -------- ------------------------- --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Terrain type at Temp_Loc_4) Not equal to Northrend - Ice
                              • (Terrain type at Temp_Loc_4) Not equal to Northrend - Snow
                              • (Terrain type at Temp_Loc_4) Not equal to Northrend - Rocky Snow
                            • Then - Actions
                              • Set Temp_Integer_1 = (Terrain variance at Temp_Loc_4)
                              • Unit - Create 1 Dummy - (None) for Neutral Passive at Temp_Loc_4 facing Default building facing degrees
                              • Unit Group - Add (Last created unit) to CI_Dummies
                              • Unit - Add a (Random real number between 3.00 and 7.00) second Generic expiration timer to (Last created unit)
                              • For each (Integer loopA) from 0 to (Integer(CI_Reals[12])), do (Actions)
                                • Loop - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Terrain type at Temp_Loc_4) Equal to CI_Terrain_Types[loopA]
                                    • Then - Actions
                                      • -------- ------------------------- --------
                                      • -------- Save original terrain type and variation --------
                                      • -------- ------------------------- --------
                                      • Hashtable - Save loopA as (Key terrain_type) of (Key (Last created unit)) in Terrain_Hash
                                      • Hashtable - Save Temp_Integer_1 as (Key terrain_variation) of (Key (Last created unit)) in Terrain_Hash
                                    • Else - Actions
                              • Set Temp_Integer_1 = (Random integer number between 1 and 3)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • Temp_Integer_1 Equal to 1
                                • Then - Actions
                                  • Environment - Change terrain type at Temp_Loc_4 to Northrend - Ice using variation -1 in an area of size 1 and shape Circle
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • Temp_Integer_1 Equal to 2
                                    • Then - Actions
                                      • Environment - Change terrain type at Temp_Loc_4 to Northrend - Snow using variation -1 in an area of size 1 and shape Circle
                                    • Else - Actions
                                      • Environment - Change terrain type at Temp_Loc_4 to Northrend - Rocky Snow using variation -1 in an area of size 1 and shape Circle
                              • Trigger - Turn on Contages insanctus Terrain Change <gen>
                            • Else - Actions
                          • Custom script: call RemoveLocation(udg_Temp_Loc_4)
                      • Custom script: call RemoveLocation(udg_Temp_Loc_3)
                  • Custom script: call RemoveLocation(udg_Temp_Loc_2)
                • Else - Actions
              • -------- ------------------------- --------
              • Custom script: call RemoveLocation(udg_Temp_Loc_1)
            • Else - Actions
              • Unit - Kill (Load (Key dummy) of (Key (Picked unit)) in CI_Hash)
              • Unit Group - Remove Temp_Unit_1 from CI_Group
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in CI_Hash
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Mana of Temp_Unit_1) Greater than Temp_Real_3
                • Then - Actions
                  • Unit - Order Temp_Unit_1 to Human Footman - Stop Defend
                • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (CI_Group is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (CI_SFX_Group is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off Contages Insanctus SFX Move <gen>
        • Else - Actions


Move effect
  • Contages Insanctus SFX Move
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in CI_SFX_Group and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_1 = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Temp_Unit_1) is alive) Equal to True
            • Then - Actions
              • Set Temp_Loc_1 = (Position of (Load (Key caster) of (Key (Picked unit)) in CI_Hash))
              • Custom script: call SetUnitX(udg_Temp_Unit_1, GetLocationX(udg_Temp_Loc_1))
              • Custom script: call SetUnitY(udg_Temp_Unit_1, GetLocationY(udg_Temp_Loc_1))
              • Custom script: call RemoveLocation(udg_Temp_Loc_1)
            • Else - Actions
              • Unit Group - Remove Temp_Unit_1 from CI_SFX_Group
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in CI_Hash
              • Unit - Add a 0.01 second Generic expiration timer to Temp_Unit_1


Remove dummy effects
  • Contages Insanctus Dummy SFX Remove
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Dummy - (None)
    • Actions
      • Special Effect - Destroy (Load (Key effect) of (Key (Triggering unit)) in CI_Hash)
      • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in CI_Hash
      • Set Temp_Group_1 = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Dummy - (None)) and (((Matching unit) is alive) Equal to True)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Temp_Group_1 is empty) Equal to True
          • (Contages Insanctus Pulse <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
      • Custom script: call DestroyGroup(udg_Temp_Group_1)


Freeze
  • Contages Insanctus Freeze
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in CI_Frozen and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_1 = (Picked unit)
          • Set Temp_Real_1 = (Load (Key freeze_timer) of (Key (Picked unit)) from CI_Hash)
          • -------- -------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Real_1 Greater than 0.00
              • (Temp_Unit_1 is alive) Equal to True
            • Then - Actions
              • Hashtable - Save (Temp_Real_1 - 0.25) as (Key freeze_timer) of (Key (Picked unit)) in CI_Hash
            • Else - Actions
              • Unit Group - Remove Temp_Unit_1 from CI_Frozen
              • -------- -------------------- --------
              • Special Effect - Destroy (Load (Key ice) of (Key (Picked unit)) in CI_Hash)
              • -------- -------------------- --------
              • Unit - Unpause Temp_Unit_1
              • Animation - Change Temp_Unit_1's animation speed to 100.00% of its original speed
              • -------- -------------------- --------
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in CI_Hash
              • -------- -------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (CI_Frozen is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions


Terrain change
  • Contages insanctus Terrain Change
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is in CI_Dummies) Equal to True
    • Actions
      • Set Temp_Unit_1 = (Triggering unit)
      • Set Temp_Loc_1 = (Position of Temp_Unit_1)
      • Set Temp_Group_1 = (Units within 400.00 of Temp_Loc_1 matching (((Matching unit) is in CI_Group) Equal to True))
      • -------- -------------------- --------
      • -------- Checks that there are no Lich Kings freezing the area --------
      • -------- -------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Temp_Group_1 is empty) Equal to True
        • Then - Actions
          • Environment - Change terrain type at Temp_Loc_1 to CI_Terrain_Types[(Load (Key terrain_type) of (Key (Triggering unit)) from Terrain_Hash)] using variation (Load (Key terrain_variation) of (Key (Triggering unit)) from Terrain_Hash) in an area of size 1 and shape Circle
        • Else - Actions
          • -------- -------------------- --------
          • -------- If there is a LIch KIng nearby, then renew the timer --------
          • -------- -------------------- --------
          • Unit - Create 1 Dummy - (None) for Neutral Passive at Temp_Loc_1 facing Default building facing degrees
          • Unit - Add a (Random real number between 3.00 and 7.00) second Generic expiration timer to (Last created unit)
          • -------- -------------------- --------
          • Unit Group - Add (Last created unit) to CI_Dummies
          • -------- -------------------- --------
          • Hashtable - Save (Load (Key terrain_type) of (Key (Triggering unit)) from Terrain_Hash) as (Key terrain_type) of (Key (Last created unit)) in Terrain_Hash
          • Hashtable - Save (Load (Key terrain_variation) of (Key (Triggering unit)) from Terrain_Hash) as (Key terrain_variation) of (Key (Last created unit)) in Terrain_Hash
      • Unit Group - Remove Temp_Unit_1 from CI_Dummies
      • -------- -------------------- --------
      • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in Terrain_Hash
      • -------- -------------------- --------
      • Custom script: call DestroyGroup(udg_Temp_Group_1)
      • Custom script: call RemoveLocation(udg_Temp_Loc_1)
      • -------- -------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (CI_Dummies is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions






Northrend's Wrath (Ultimate)

Calls forth the spirits of the Northrend. The spirits form a bond between them and the Lich King, any enemy intercepting this bond will get damaged. Half of the damage done by this spell will heal the caster. The spirits will pull units that get too close.

Triggers

Initialize
  • NW Initialize
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set NW_Hash = (Last created hashtable)
      • -------- -------------------- --------
      • -------- How often a new lightning is created --------
      • -------- -------------------- --------
      • Set NW_Reals[0] = 1.00
      • -------- -------------------- --------
      • -------- Duration of the ability --------
      • -------- -------------------- --------
      • Set NW_Reals[1] = 12.00
      • -------- -------------------- --------
      • -------- Min legtnh of lightning --------
      • -------- -------------------- --------
      • Set NW_Reals[2] = 192.00
      • -------- -------------------- --------
      • -------- Max length of lightning --------
      • -------- -------------------- --------
      • Set NW_Reals[3] = 512.00
      • -------- -------------------- --------
      • -------- Min speed of lightning --------
      • -------- -------------------- --------
      • Set NW_Reals[4] = 0.50
      • -------- -------------------- --------
      • -------- Max speed of lightning --------
      • -------- -------------------- --------
      • Set NW_Reals[5] = 2.00
      • -------- -------------------- --------
      • -------- Angle width from caster to target, lightning width --------
      • -------- -------------------- --------
      • Set NW_Reals[6] = 2.00
      • -------- -------------------- --------
      • -------- Base damage, lightning --------
      • -------- -------------------- --------
      • Set NW_Reals[7] = 4.00
      • -------- -------------------- --------
      • -------- Ability level bonus damage, lightning --------
      • -------- -------------------- --------
      • Set NW_Reals[8] = 1.00
      • -------- -------------------- --------
      • -------- Heal factor, percentage of damage done add to HP of the caster --------
      • -------- -------------------- --------
      • Set NW_Reals[9] = 0.50
      • -------- -------------------- --------
      • -------- Drags units, 1 = yes, others = no --------
      • -------- -------------------- --------
      • Set NW_Reals[10] = 1.00
      • -------- -------------------- --------
      • -------- Lightning disappears, 1 = yes, others = no --------
      • -------- -------------------- --------
      • Set NW_Reals[11] = 0.00
      • -------- -------------------- --------
      • -------- Base damage, cone --------
      • -------- -------------------- --------
      • Set NW_Reals[12] = 8.00
      • -------- -------------------- --------
      • -------- Ability level bonus damage, cone --------
      • -------- -------------------- --------
      • Set NW_Reals[13] = 2.00
      • -------- -------------------- --------
      • -------- Dragging speed --------
      • -------- -------------------- --------
      • Set NW_Reals[14] = 6.00
      • -------- -------------------- --------
      • -------- Lightning type --------
      • -------- -------------------- --------
      • Set NW_Lightning = AFOD
      • -------- -------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • NW_Reals[3] Less than NW_Reals[2]
        • Then - Actions
          • Set DW_Reals[3] = NW_Reals[2]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • NW_Reals[5] Less than NW_Reals[4]
        • Then - Actions
          • Set DW_Reals[5] = NW_Reals[4]
        • Else - Actions


Northrend's Wrath
  • Northrends Wrath
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to |c00FF00FFNothrend's Wrath|r
    • Actions
      • Set Temp_Unit_1 = (Triggering unit)
      • -------- -------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Key effect) is stored as a Handle of (Key (Triggering unit)) in NW_Hash) Equal to False
        • Then - Actions
          • Special Effect - Create a special effect attached to the origin of Temp_Unit_1 using Abilities\Spells\Orc\Voodoo\VoodooAura.mdl
          • Hashtable - Save Handle Of(Last created special effect) as (Key effect) of (Key (Triggering unit)) in NW_Hash
        • Else - Actions
      • -------- -------------------- --------
      • Hashtable - Save NW_Reals[0] as (Key interval) of (Key (Triggering unit)) in NW_Hash
      • Hashtable - Save NW_Reals[1] as (Key duration) of (Key (Triggering unit)) in NW_Hash
      • -------- -------------------- --------
      • Unit Group - Add Temp_Unit_1 to NW_Loop
      • -------- -------------------- --------
      • Trigger - Turn on NW Loop <gen>


Loop
  • NW Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- ------------------------- --------
      • -------- The caster loop --------
      • -------- ------------------------- --------
      • Unit Group - Pick every unit in NW_Loop and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_1 = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Temp_Unit_1 is alive) Equal to True
              • (Current order of Temp_Unit_1) Equal to (Order(chemicalrage))
            • Then - Actions
              • Set Temp_Real_2 = (Load (Key interval) of (Key (Picked unit)) from NW_Hash)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Temp_Real_2 Equal to NW_Reals[0]
                • Then - Actions
                  • -------- ------------------------- --------
                  • -------- Every once during interval, create an extra lightning --------
                  • -------- ------------------------- --------
                  • Set Temp_Loc_1 = (Position of Temp_Unit_1)
                  • Set Temp_Loc_2 = (Temp_Loc_1 offset by (Random real number between NW_Reals[2] and NW_Reals[3]) towards (Random angle) degrees)
                  • -------- -------------------- --------
                  • Special Effect - Create a special effect at Temp_Loc_1 using Abilities\Spells\Other\HowlOfTerror\HowlCaster.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect at Temp_Loc_2 using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • -------- -------------------- --------
                  • Unit - Create 1 Dummy - (None) for Neutral Passive at Temp_Loc_2 facing Default building facing degrees
                  • Set Temp_Unit_2 = (Last created unit)
                  • -------- -------------------- --------
                  • Unit - Add Storm Crow Form to Temp_Unit_2
                  • Unit - Remove Storm Crow Form from Temp_Unit_2
                  • -------- -------------------- --------
                  • Unit Group - Add Temp_Unit_2 to NW_Dummies
                  • -------- -------------------- --------
                  • Animation - Change Temp_Unit_2's size to (200.00%, 200.00%, 200.00%) of its original size
                  • Animation - Change Temp_Unit_2 flying height to 40.00 at 0.00
                  • -------- -------------------- --------
                  • Special Effect - Create a special effect attached to the origin of Temp_Unit_2 using Abilities\Weapons\ProcMissile\ProcMissile.mdl
                  • Hashtable - Save Handle Of(Last created special effect) as (Key effect1) of (Key (Last created unit)) in NW_Hash
                  • Special Effect - Create a special effect attached to the origin of Temp_Unit_2 using Abilities\Spells\Other\Drain\ManaDrainTarget.mdl
                  • Hashtable - Save Handle Of(Last created special effect) as (Key effect2) of (Key (Last created unit)) in NW_Hash
                  • -------- -------------------- --------
                  • Custom script: set udg_Temp_Group_1 = CreateGroup()
                  • Hashtable - Save Handle OfTemp_Group_1 as (Key group) of (Key (Last created unit)) in NW_Hash
                  • -------- -------------------- --------
                  • Custom script: set udg_Temp_Lightning_1 = AddLightningEx( udg_NW_Lightning , true, GetLocationX(udg_Temp_Loc_1), GetLocationY(udg_Temp_Loc_1), GetLocationZ(udg_Temp_Loc_1) + 100, GetLocationX(udg_Temp_Loc_2), GetLocationY(udg_Temp_Loc_2), GetLocationZ(udg_Temp_Loc_2) + 40)
                  • Lightning - Change color of Temp_Lightning_1 to (1.00 0.80 1.00) with 0.80 alpha
                  • Hashtable - Save Handle OfTemp_Lightning_1 as (Key lightning) of (Key (Last created unit)) in NW_Hash
                  • -------- -------------------- --------
                  • Hashtable - Save Handle OfTemp_Unit_1 as (Key caster) of (Key (Last created unit)) in NW_Hash
                  • Hashtable - Save Handle OfTemp_Loc_1 as (Key center) of (Key (Last created unit)) in NW_Hash
                  • Hashtable - Save (Angle from Temp_Loc_1 to Temp_Loc_2) as (Key angle) of (Key (Last created unit)) in NW_Hash
                  • Hashtable - Save (Distance between Temp_Loc_1 and Temp_Loc_2) as (Key radius) of (Key (Last created unit)) in NW_Hash
                  • Hashtable - Save (Random real number between NW_Reals[4] and NW_Reals[5]) as (Key speed) of (Key (Last created unit)) in NW_Hash
                  • Hashtable - Save (NW_Reals[7] + (NW_Reals[8] x (Real((Level of |c00FF00FFNothrend's Wrath|r for Temp_Unit_1))))) as (Key damage) of (Key (Last created unit)) in NW_Hash
                  • Hashtable - Save (NW_Reals[12] + (NW_Reals[13] x (Real((Level of |c00FF00FFNothrend's Wrath|r for Temp_Unit_1))))) as (Key cone_damage) of (Key (Last created unit)) in NW_Hash
                  • -------- -------------------- --------
                  • -------- Randomize rotaion direction (clockwise or counter-clockwise) --------
                  • -------- -------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Random integer number between 1 and 2) Equal to 1
                    • Then - Actions
                      • Hashtable - Save True as (Key direction) of (Key (Last created unit)) in NW_Hash
                    • Else - Actions
                  • Custom script: call RemoveLocation(udg_Temp_Loc_2)
                • Else - Actions
              • -------- ------------------------- --------
              • -------- Reduce interval time / reset interval --------
              • -------- ------------------------- --------
              • Set Temp_Real_2 = (Temp_Real_2 - 0.03)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Temp_Real_2 Less than or equal to 0.02
                • Then - Actions
                  • Set Temp_Real_2 = NW_Reals[0]
                • Else - Actions
              • Hashtable - Save Temp_Real_2 as (Key interval) of (Key (Picked unit)) in NW_Hash
            • Else - Actions
              • -------- ------------------------- --------
              • -------- Clear caster data --------
              • -------- ------------------------- --------
              • Unit Group - Remove Temp_Unit_1 from NW_Loop
              • -------- ------------------------- --------
              • Special Effect - Destroy (Load (Key effect) of (Key (Picked unit)) in NW_Hash)
              • -------- ------------------------- --------
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in NW_Hash
              • -------- ------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (NW_Loop is empty) Equal to True
                  • (NW_Dummies is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
      • -------- ------------------------- --------
      • -------- The projectile loop --------
      • -------- ------------------------- --------
      • Unit Group - Pick every unit in NW_Dummies and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_1 = (Picked unit)
          • Set Temp_Unit_2 = (Load (Key caster) of (Key (Picked unit)) in NW_Hash)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Temp_Unit_1 is alive) Equal to True
              • (Temp_Unit_2 is alive) Equal to True