1. Are you planning to upload your awesome map to Hive? Please review the rules here.
    Dismiss Notice
  2. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  4. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger Viewer

Forsaken v1.11.w3x
Variables
Initialization
Variables
Quest
Heros
Player 1
Player 2
Player 3
Player 4
Player 5
Player 6
Player 7
Player 8
Player 9
Player 10
Player 11
Player 12
DoDialog
Melee Initialization
Melee Initialization 2
Move Base
Victory and Defeat Copy
Abilities
Black Garden DisAbilities
Dark Lady: Mastery
Researched Dark Lady
Canceled Dark Lady
Finished Dark Lady
Dark Lady Death Ability
Super Plague: Mastery
Researched Super Plague
Canceled Super Plague
Finished Super Plague
Cult of the Forgotten: Mastery
Researched Cult of the Forgotten
Canceled CotFS
Finished CotFS
---------------------------------------
Fumes
Fumes Off
Fumes Off 2
Fueled Rage
Shadows Call
Fueled Rage Off
Fade
Fade Off
Unholy Bind
Phase Strike
Blight Spread
Remaining Spirit
Dark Rogue Blight Grow
-----Heroes-----
Black Hunter:
Reaping
Remorseless
Remorseless Off
Black Strike
Umbra
Scourage:
Blight Aura
Grave Blow
Deathstalker:
Punish
Contract Kill
Defeat
Victory and Defeat

		
Name Type Is Array Initial Value
AllPlayers player Yes
Aversion unit Yes
Backstabbed unit No
BlackHunter unit No
BlackStrike unit Yes
Choice dialog Yes
Conflux unit No
DarkLadyGuideVengence integer No
Darkness unit Yes
Deadly unit No
Deathstalker unit No
DemonHunter unit No
DeployShield unit No
Exterminator unit No
Firelord unit No
FireTrap unit No
Forsaken button Yes
FueledRage effect No
Generator unit No
GraveBlowStun unit No
HellSpawn unit No
Impenetrable integer No
ManaSear unit Yes
Other button No
PickedHall unit No
PickedMine unit No
PickedPhantom unit No
PickedWorker unit No
PlayerColour player Yes
PlayerNum integer Yes
PlayerStructure boolean Yes
Reaping integer No
RogueStab unit No
Scourage unit No
Shade unit No
Shadowburn unit No
ShadowEnemy unit No
ShadowFusion unit No
Silence unit No
SoulStrip unit No
TechDeploy unit No
TempLoc15 location No
TempLoc7 location No
UmbraUnit unit No
UnitArcaneTowers group No
UnitGroupKirin group No
UnitGroupsSoldier group No
UnitVarCaster3 unit No
UnitVarPicked unit No
WarlordU unit No
Variables
  Events
    Unit - A unit enters (Playable map area)
  Conditions
  Actions
    If ((Unit-type of (Entering unit)) Equal to Scourge) then do (Pick every unit in (Units of type Scourge) and do (Set VariableSet Scourage = (Entering unit))) else do (Do nothing)
    If ((Unit-type of (Entering unit)) Equal to Black Hunter) then do (Pick every unit in (Units of type Black Hunter) and do (Set VariableSet BlackHunter = (Entering unit))) else do (Do nothing)
    If ((Unit-type of (Entering unit)) Equal to Deathstalker) then do (Pick every unit in (Units of type Deathstalker) and do (Set VariableSet Deathstalker = (Entering unit))) else do (Do nothing)
    If ((Unit-type of (Entering unit)) Equal to Exterminator) then do (Pick every unit in (Units of type Exterminator) and do (Set VariableSet Exterminator = (Entering unit))) else do (Do nothing)
Quest
  Events
    Time - Elapsed game time is 0.01 seconds
  Conditions
  Actions
    Quest - Create a Required quest titled Forsaken with the description The Forsaken are legions of undead warriors and innocent that have been freed from the Lich King's mind control. Saved and gathered by the Banshee Queen, the Forsaken fightwith great vigor in order to ensure their own survival in the world of Azeroth, and to gain vengeance on the Undead Scourge., using icon path BTNAlternateSylvanas.blp
    Quest - Create a Required quest titled Credits: with the description Models:Blizzard EntertainmentAmpharos_222Ujimasa Hojoinfrenus-GrendelUncle FesterEdge45KitabatakeThrikodiusSin'dorei300XelthyrThe Grim ReaperAmpharos_222AlastorWILL THE ALMIGHTYAfronight_76wingednoseringPROXYTarrasqueD.eeIcons:donut3.5sigelangGooSCloudWolfSin'dorei300Dan van OhllusAmpharos_222bigapple90NFWar-GrendelMarcos DABD.ee(If I missed any just tell me, please), using icon path ReplaceableTextures\CommandButtons\BTNGhostKey.blp
Heros
  Events
    Map initialization
  Conditions
  Actions
    Player Group - Pick every player in (All players) and do (Limit training of Scourge to 1 for (Picked player))
    Player Group - Pick every player in (All players) and do (Limit training of Black Hunter to 1 for (Picked player))
    Player Group - Pick every player in (All players) and do (Limit training of Deathstalker to 1 for (Picked player))
    Player Group - Pick every player in (All players) and do (Limit training of Exterminator to 1 for (Picked player))
One second into the game, the "Choose a Hero" dialog pops up
Player 1
  Events
    Time - Elapsed game time is 0.50 seconds
  Conditions
    (Player 1 (Red) controller) Equal to User
    (Race of Player 1 (Red)) Equal to Undead
  Actions
    Dialog - Clear Choice[1]
    Dialog - Change the title of Choice[1] to Play as the Forsaken?
    Dialog - Create a dialog button for Choice[1] labelled Yes
    Set VariableSet Forsaken[1] = (Last created dialog Button)
    Dialog - Create a dialog button for Choice[1] labelled No
    Set VariableSet Other = (Last created dialog Button)
    Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
      Loop - Actions
        Dialog - Show Choice[1] for Player 1 (Red)
One second into the game, the "Choose a Hero" dialog pops up
Player 2
  Events
    Time - Elapsed game time is 0.50 seconds
  Conditions
    (Player 2 (Blue) controller) Equal to User
    (Race of Player 2 (Blue)) Equal to Undead
  Actions
    Dialog - Clear Choice[2]
    Dialog - Change the title of Choice[2] to Play as the Forsaken?
    Dialog - Create a dialog button for Choice[2] labelled Yes
    Set VariableSet Forsaken[2] = (Last created dialog Button)
    Dialog - Create a dialog button for Choice[2] labelled No
    Set VariableSet Other = (Last created dialog Button)
    Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
      Loop - Actions
        Dialog - Show Choice[2] for Player 2 (Blue)
One second into the game, the "Choose a Hero" dialog pops up
Player 3
  Events
    Time - Elapsed game time is 0.50 seconds
  Conditions
    (Player 3 (Teal) controller) Equal to User
    (Race of Player 3 (Teal)) Equal to Undead
  Actions
    Dialog - Clear Choice[3]
    Dialog - Change the title of Choice[3] to Play as the Forsaken?
    Dialog - Create a dialog button for Choice[3] labelled Yes
    Set VariableSet Forsaken[3] = (Last created dialog Button)
    Dialog - Create a dialog button for Choice[3] labelled No
    Set VariableSet Other = (Last created dialog Button)
    Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
      Loop - Actions
        Dialog - Show Choice[3] for Player 3 (Teal)
One second into the game, the "Choose a Hero" dialog pops up
Player 4
  Events
    Time - Elapsed game time is 0.50 seconds
  Conditions
    (Player 4 (Purple) controller) Equal to User
    (Race of Player 4 (Purple)) Equal to Undead
  Actions
    Dialog - Clear Choice[4]
    Dialog - Change the title of Choice[4] to Play as the Forsaken?
    Dialog - Create a dialog button for Choice[4] labelled Yes
    Set VariableSet Forsaken[4] = (Last created dialog Button)
    Dialog - Create a dialog button for Choice[4] labelled No
    Set VariableSet Other = (Last created dialog Button)
    Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
      Loop - Actions
        Dialog - Show Choice[4] for Player 4 (Purple)
One second into the game, the "Choose a Hero" dialog pops up
Player 5
  Events
    Time - Elapsed game time is 0.50 seconds
  Conditions
    (Player 5 (Yellow) controller) Equal to User
    (Race of Player 5 (Yellow)) Equal to Undead
  Actions
    Dialog - Clear Choice[5]
    Dialog - Change the title of Choice[5] to Play as the Forsaken?
    Dialog - Create a dialog button for Choice[5] labelled Yes
    Set VariableSet Forsaken[5] = (Last created dialog Button)
    Dialog - Create a dialog button for Choice[5] labelled No
    Set VariableSet Other = (Last created dialog Button)
    Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
      Loop - Actions
        Dialog - Show Choice[5] for Player 5 (Yellow)
One second into the game, the "Choose a Hero" dialog pops up
Player 6
  Events
    Time - Elapsed game time is 0.50 seconds
  Conditions
    (Player 6 (Orange) controller) Equal to User
    (Race of Player 6 (Orange)) Equal to Undead
  Actions
    Dialog - Clear Choice[6]
    Dialog - Change the title of Choice[6] to Play as the Forsaken?
    Dialog - Create a dialog button for Choice[6] labelled Yes
    Set VariableSet Forsaken[6] = (Last created dialog Button)
    Dialog - Create a dialog button for Choice[6] labelled No
    Set VariableSet Other = (Last created dialog Button)
    Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
      Loop - Actions
        Dialog - Show Choice[6] for Player 6 (Orange)
One second into the game, the "Choose a Hero" dialog pops up
Player 7
  Events
    Time - Elapsed game time is 0.50 seconds
  Conditions
    (Player 7 (Green) controller) Equal to User
    (Race of Player 7 (Green)) Equal to Undead
  Actions
    Dialog - Clear Choice[7]
    Dialog - Change the title of Choice[7] to Play as the Forsaken?
    Dialog - Create a dialog button for Choice[7] labelled Yes
    Set VariableSet Forsaken[7] = (Last created dialog Button)
    Dialog - Create a dialog button for Choice[7] labelled No
    Set VariableSet Other = (Last created dialog Button)
    Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
      Loop - Actions
        Dialog - Show Choice[7] for Player 7 (Green)
One second into the game, the "Choose a Hero" dialog pops up
Player 8
  Events
    Time - Elapsed game time is 0.50 seconds
  Conditions
    (Player 8 (Pink) controller) Equal to User
    (Race of Player 8 (Pink)) Equal to Undead
  Actions
    Dialog - Clear Choice[8]
    Dialog - Change the title of Choice[8] to Play as the Forsaken?
    Dialog - Create a dialog button for Choice[8] labelled Yes
    Set VariableSet Forsaken[8] = (Last created dialog Button)
    Dialog - Create a dialog button for Choice[8] labelled No
    Set VariableSet Other = (Last created dialog Button)
    Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
      Loop - Actions
        Dialog - Show Choice[8] for Player 8 (Pink)
One second into the game, the "Choose a Hero" dialog pops up
Player 9
  Events
    Time - Elapsed game time is 0.50 seconds
  Conditions
    (Player 9 (Gray) controller) Equal to User
    (Race of Player 9 (Gray)) Equal to Undead
  Actions
    Dialog - Clear Choice[9]
    Dialog - Change the title of Choice[9] to Play as the Forsaken?
    Dialog - Create a dialog button for Choice[9] labelled Yes
    Set VariableSet Forsaken[9] = (Last created dialog Button)
    Dialog - Create a dialog button for Choice[9] labelled No
    Set VariableSet Other = (Last created dialog Button)
    Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
      Loop - Actions
        Dialog - Show Choice[9] for Player 9 (Gray)
One second into the game, the "Choose a Hero" dialog pops up
Player 10
  Events
    Time - Elapsed game time is 0.50 seconds
  Conditions
    (Player 10 (Light Blue) controller) Equal to User
    (Race of Player 10 (Light Blue)) Equal to Undead
  Actions
    Dialog - Clear Choice[10]
    Dialog - Change the title of Choice[10] to Play as the Forsaken?
    Dialog - Create a dialog button for Choice[10] labelled Yes
    Set VariableSet Forsaken[10] = (Last created dialog Button)
    Dialog - Create a dialog button for Choice[10] labelled No
    Set VariableSet Other = (Last created dialog Button)
    Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
      Loop - Actions
        Dialog - Show Choice[10] for Player 10 (Light Blue)
One second into the game, the "Choose a Hero" dialog pops up
Player 11
  Events
    Time - Elapsed game time is 0.50 seconds
  Conditions
    (Player 11 (Dark Green) controller) Equal to User
    (Race of Player 11 (Dark Green)) Equal to Undead
  Actions
    Dialog - Clear Choice[11]
    Dialog - Change the title of Choice[11] to Play as the Forsaken?
    Dialog - Create a dialog button for Choice[11] labelled Yes
    Set VariableSet Forsaken[11] = (Last created dialog Button)
    Dialog - Create a dialog button for Choice[11] labelled No
    Set VariableSet Other = (Last created dialog Button)
    Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
      Loop - Actions
        Dialog - Show Choice[11] for Player 11 (Dark Green)
One second into the game, the "Choose a Hero" dialog pops up
Player 12
  Events
    Time - Elapsed game time is 0.50 seconds
  Conditions
    (Player 12 (Brown) controller) Equal to User
    (Race of Player 12 (Brown)) Equal to Undead
  Actions
    Dialog - Clear Choice[12]
    Dialog - Change the title of Choice[12] to Play as the Forsaken?
    Dialog - Create a dialog button for Choice[12] labelled Yes
    Set VariableSet Forsaken[12] = (Last created dialog Button)
    Dialog - Create a dialog button for Choice[12] labelled No
    Set VariableSet Other = (Last created dialog Button)
    Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
      Loop - Actions
        Dialog - Show Choice[12] for Player 12 (Brown)
DoDialog
  Events
    Dialog - A dialog button is clicked for Choice[1]
    Dialog - A dialog button is clicked for Choice[2]
    Dialog - A dialog button is clicked for Choice[3]
    Dialog - A dialog button is clicked for Choice[4]
    Dialog - A dialog button is clicked for Choice[5]
    Dialog - A dialog button is clicked for Choice[6]
    Dialog - A dialog button is clicked for Choice[7]
    Dialog - A dialog button is clicked for Choice[8]
    Dialog - A dialog button is clicked for Choice[9]
    Dialog - A dialog button is clicked for Choice[10]
    Dialog - A dialog button is clicked for Choice[11]
    Dialog - A dialog button is clicked for Choice[12]
  Conditions
  Actions
    For each (Integer A) from 1 to 19, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Clicked dialog button) Equal to Forsaken[(Integer A)]
          Then - Actions
            Unit Group - Pick every unit in (Units owned by (Triggering player).) and do (Actions)
              Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Unit-type of (Picked unit)) Equal to Haunted Gold Mine
                  Then - Actions
                    Set VariableSet PickedMine = (Picked unit)
                    Unit - Remove PickedMine from the game
                  Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Unit-type of (Picked unit)) Equal to Ghoul
                  Then - Actions
                    Set VariableSet PickedPhantom = (Picked unit)
                    Unit - Replace PickedPhantom with a Phantom using The old unit's relative life and mana
                    Unit - Replace PickedPhantom with a Phantom using The old unit's relative life and mana
                  Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Unit-type of (Picked unit)) Equal to Acolyte
                  Then - Actions
                    Set VariableSet PickedWorker = (Picked unit)
                    Unit - Replace PickedWorker with a Servant using The old unit's relative life and mana
                  Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Unit-type of (Picked unit)) Equal to Necropolis
                  Then - Actions
                    Set VariableSet PickedHall = (Picked unit)
                    Unit - Remove (Picked unit) from the game
                    Unit - Create 1.Monastery for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Default building facing degrees
                  Else - Actions
          Else - Actions
            Player - Limit training of Heroes to 3 for (Picked player)
Melee Initialization
  Events
    Map initialization
  Conditions
  Actions
    Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
    Melee Game - Create starting units (for all players)
    Melee Game - Set starting resources (for all players)
    Melee Game - Run melee AI scripts (for computer players)
    Melee Game - Use melee time of day (for all players)
    Melee Game - Limit Heroes to 1 per Hero-type (for all players)
    Melee Game - Remove creeps and critters from used start locations (for all players)
Melee Initialization 2
  Events
    Map initialization
  Conditions
  Actions
    Set VariableSet PlayerColour[0] = Player 1 (Red)
    Set VariableSet PlayerColour[1] = Player 2 (Blue)
    Set VariableSet PlayerColour[2] = Player 3 (Teal)
    Set VariableSet PlayerColour[3] = Player 4 (Purple)
    Set VariableSet PlayerColour[4] = Player 5 (Yellow)
    Set VariableSet PlayerColour[5] = Player 6 (Orange)
    Set VariableSet PlayerColour[6] = Player 7 (Green)
    Set VariableSet PlayerColour[7] = Player 8 (Pink)
    Set VariableSet PlayerColour[8] = Player 9 (Gray)
    Set VariableSet PlayerColour[9] = Player 10 (Light Blue)
    Set VariableSet PlayerColour[10] = Player 11 (Dark Green)
    Set VariableSet PlayerColour[11] = Player 12 (Brown)
Default melee game initialization for all players
Move Base
  Events
    Time - Elapsed game time is 0.10 seconds
  Conditions
  Actions
    Player Group - Pick every player in (All players) and do (Actions)
      Loop - Actions
        Unit Group - Pick every unit in (Units owned by (Picked player).) and do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                Or - Any (Conditions) are true
                  Conditions
                    (Unit-type of (Picked unit)) Equal to Town Hall
                    (Unit-type of (Picked unit)) Equal to Great Hall
                    (Unit-type of (Picked unit)) Equal to Necropolis
                    (Unit-type of (Picked unit)) Equal to Tree of Life
                    (Unit-type of (Picked unit)) Equal to Monastery
              Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (RedLarge <gen> contains (Picked unit)) Equal to True
                  Then - Actions
                    Unit - Move (Picked unit) instantly to (Center of RedSmall <gen>)
                  Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (BlueLarge <gen> contains (Picked unit)) Equal to True
                  Then - Actions
                    Unit - Move (Picked unit) instantly to (Center of BlueSmall <gen>)
                  Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (TealLarge <gen> contains (Picked unit)) Equal to True
                  Then - Actions
                    Unit - Move (Picked unit) instantly to (Center of TealSmall <gen>)
                  Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (PurpLarge <gen> contains (Picked unit)) Equal to True
                  Then - Actions
                    Unit - Move (Picked unit) instantly to (Center of PurpSmall <gen>)
                  Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (YellowLarge <gen> contains (Picked unit)) Equal to True
                  Then - Actions
                    Unit - Move (Picked unit) instantly to (Center of YellowSmall <gen>)
                  Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (OJLarge <gen> contains (Picked unit)) Equal to True
                  Then - Actions
                    Unit - Move (Picked unit) instantly to (Center of OJSmall <gen>)
                  Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (GreenLarge <gen> contains (Picked unit)) Equal to True
                  Then - Actions
                    Unit - Move (Picked unit) instantly to (Center of GreenSmall <gen>)
                  Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (PinkLarge <gen> contains (Picked unit)) Equal to True
                  Then - Actions
                    Unit - Move (Picked unit) instantly to (Center of PinkSmall <gen>)
                  Else - Actions
              Else - Actions
Victory and Defeat Copy
  Events
    Unit - A unit Dies
  Conditions
    ((Dying unit) is A structure) Equal to True
  Actions
    Set VariableSet PlayerNum[0] = 0
    For each (Integer PlayerNum[0]) from 0 to 8, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (PlayerColour[PlayerNum[0]] slot status) Equal to Is playing
          Then - Actions
            Set VariableSet PlayerNum[1] = 0
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
              Then - Actions
                For each (Integer PlayerNum[1]) from 0 to 12, do (Actions)
                  Loop - Actions
                    Set VariableSet PlayerStructure[0] = True
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (PlayerColour[PlayerNum[1]] slot status) Equal to Is playing
                        (PlayerColour[PlayerNum[1]] is an ally of PlayerColour[PlayerNum[0]].) Equal to False
                      Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          If - Conditions
                            PlayerStructure[0] Equal to True
                          Then - Actions
                            Set VariableSet PlayerNum[2] = 0
                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              If - Conditions
                                (PlayerColour[PlayerNum[2]] slot status) Equal to Is playing
                              Then - Actions
                                Set VariableSet PlayerStructure[0] = True
                                For each (Integer PlayerNum[2]) from 0 to 12, do (Actions)
                                  Loop - Actions
                                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                      If - Conditions
                                        (PlayerColour[PlayerNum[2]] is an enemy of PlayerColour[PlayerNum[0]].) Equal to True
                                      Then - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                          If - Conditions
                                            PlayerStructure[0] Equal to True
                                            (Count structures controlled by PlayerColour[PlayerNum[2]] (Include incomplete structures)) Equal to 0
                                          Then - Actions
                                            Do nothing
                                            Set VariableSet PlayerStructure[0] = True
                                          Else - Actions
                                            Set VariableSet PlayerStructure[0] = False
                                      Else - Actions
                                        Do nothing
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  If - Conditions
                                    (Count structures controlled by PlayerColour[PlayerNum[0]] (Include incomplete structures)) Equal to 0
                                  Then - Actions
                                    Game - Defeat PlayerColour[PlayerNum[0]] with the message: Defeat!
                                  Else - Actions
                                    Do nothing
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  If - Conditions
                                    PlayerStructure[0] Equal to True
                                  Then - Actions
                                    Game - Victory PlayerColour[PlayerNum[0]] (Show dialogs, Show scores)
                                  Else - Actions
                                    Do nothing
                              Else - Actions
                                Do nothing
                            If (PlayerStructure[0] Equal to True) then do (Victory PlayerColour[PlayerNum[3]] (Show dialogs, Show scores)) else do (Do nothing)
                          Else - Actions
                      Else - Actions
                        Do nothing
              Else - Actions
                Do nothing
          Else - Actions
            Do nothing
Black Garden DisAbilities
  Events
    Time - Elapsed game time is 1.00 seconds
  Conditions
  Actions
    Player Group - Pick every player in (All players) and do (Actions)
      Loop - Actions
        Player - Disable Black Volley for (Picked player)
        Player - Disable Super Plague Reconsitution: Mastery for (Picked player)
        Player - Disable Dark Summoning Art for (Picked player)
        Player - Disable Create Corpse (Forsaken) for (Picked player)
        Player - Disable Dark Lady's Vengeance for (Picked player)
        Player - Disable New Plague for (Picked player)
        Player - Disable Cult of Forgotten Shadow for (Picked player)
Researched Dark Lady
  Events
    Unit - A unit Begins research
  Conditions
    (Researched tech-type) Equal to R00I (techcode)
  Actions
    Player - Set the max research level of R00J (techcode) to 0 for (Owner of (Researching unit))
    Player - Set the max research level of R00K (techcode) to 0 for (Owner of (Researching unit))
Canceled Dark Lady
  Events
    Unit - A unit Cancels research
  Conditions
    (Researched tech-type) Equal to R00I (techcode)
  Actions
    Player - Set the max research level of R00J (techcode) to 1 for (Owner of (Researching unit))
    Player - Set the max research level of R00K (techcode) to 1 for (Owner of (Researching unit))
Finished Dark Lady
  Events
    Unit - A unit Finishes research
  Conditions
    (Researched tech-type) Equal to R00I (techcode)
  Actions
    Player - Enable Black Volley for (Owner of (Researching unit))
    Player - Enable Dark Lady's Vengeance for (Owner of (Researching unit))
Dark Lady Death Ability
  Events
    Unit - A unit Dies
  Conditions
    (Current research level of R00I (techcode) for (Owner of (Dying unit))) Equal to 1
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Or - Any (Conditions) are true
          Conditions
            (Unit-type of (Dying unit)) Equal to Dark Rogue
            (Unit-type of (Dying unit)) Equal to Empusa
            (Unit-type of (Dying unit)) Equal to Apothecary
            (Unit-type of (Dying unit)) Equal to Servant
      Then - Actions
        Set VariableSet DarkLadyGuideVengence = (Random integer number between 1 and 100)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            DarkLadyGuideVengence Less than or equal to 45
          Then - Actions
            Unit - Create 1.Wailing Banshee for (Owner of (Dying unit)) at (Position of (Dying unit)) facing Default building facing degrees
            Unit - Add a 60 second Generic expiration timer to (Last created unit)
            Unit - Cause (Dying unit) to damage (Killing unit), dealing 50.00 damage of attack type Spells and damage type Normal
            Special Effect - Create a special effect attached to the feet (attachpoint) of (Killing unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
          Else - Actions
      Else - Actions
Researched Super Plague
  Events
    Unit - A unit Begins research
  Conditions
    (Researched tech-type) Equal to R00J (techcode)
  Actions
    Player - Set the max research level of R00I (techcode) to 0 for (Owner of (Researching unit))
    Player - Set the max research level of R00K (techcode) to 0 for (Owner of (Researching unit))
Canceled Super Plague
  Events
    Unit - A unit Cancels research
  Conditions
    (Researched tech-type) Equal to R00J (techcode)
  Actions
    Player - Set the max research level of R00I (techcode) to 1 for (Owner of (Researching unit))
    Player - Set the max research level of R00K (techcode) to 1 for (Owner of (Researching unit))
Finished Super Plague
  Events
    Unit - A unit Finishes research
  Conditions
    (Researched tech-type) Equal to R00J (techcode)
  Actions
    Player - Enable Super Plague Reconsitution: Mastery for (Owner of (Researching unit))
    Player - Enable New Plague for (Owner of (Researching unit))
Researched Cult of the Forgotten
  Events
    Unit - A unit Begins research
  Conditions
    (Researched tech-type) Equal to R00K (techcode)
  Actions
    Player - Set the max research level of R00I (techcode) to 0 for (Owner of (Researching unit))
    Player - Set the max research level of R00J (techcode) to 0 for (Owner of (Researching unit))
Canceled CotFS
  Events
    Unit - A unit Cancels research
  Conditions
    (Researched tech-type) Equal to R00K (techcode)
  Actions
    Player - Set the max research level of R00I (techcode) to 1 for (Owner of (Researching unit))
    Player - Set the max research level of R00J (techcode) to 1 for (Owner of (Researching unit))
Finished CotFS
  Events
    Unit - A unit Finishes research
  Conditions
    (Researched tech-type) Equal to R00K (techcode)
  Actions
    Player - Enable Dark Summoning Art for (Owner of (Researching unit))
    Player - Enable Create Corpse (Forsaken) for (Owner of (Researching unit))
    Player - Set the current research level of R00S (techcode) to 1 for (Owner of (Researching unit))
    Player - Enable Cult of Forgotten Shadow for (Owner of (Researching unit))
Fumes
  Events
    Unit - A unit Begins training a unit
  Conditions
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Or - Any (Conditions) are true
              Conditions
                (Unit-type of (Researching unit)) Equal to Monastery
                (Unit-type of (Researching unit)) Equal to Mausoleum
                (Unit-type of (Researching unit)) Equal to City of the Dead
                (Unit-type of (Researching unit)) Equal to Altar of Torment
                (Unit-type of (Researching unit)) Equal to Sepulcher
                (Unit-type of (Researching unit)) Equal to Catacombs
                (Unit-type of (Researching unit)) Equal to Plagueatorium
                (Unit-type of (Researching unit)) Equal to Cemetery
          Then - Actions
            Game - Display to (All players) the text: work
            Unit - Add Fumes Book to (Researching unit)
            Player - Disable Fumes Book for (Owner of (Researching unit))
          Else - Actions
Fumes Off
  Events
    Unit - A unit Finishes training a unit
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Unit-type of (Researching unit)) Equal to Monastery
        (Unit-type of (Researching unit)) Equal to Mausoleum
        (Unit-type of (Researching unit)) Equal to City of the Dead
        (Unit-type of (Researching unit)) Equal to Altar of Torment
        (Unit-type of (Researching unit)) Equal to Sepulcher
        (Unit-type of (Researching unit)) Equal to Catacombs
        (Unit-type of (Researching unit)) Equal to Plagueatorium
        (Unit-type of (Researching unit)) Equal to Cemetery
  Actions
    Unit - Remove Fumes Book from (Researching unit)
    Unit - Add Fumes Book to (Researching unit)
Fumes Off 2
  Events
    Unit - A unit Cancels training a unit
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Unit-type of (Researching unit)) Equal to Monastery
        (Unit-type of (Researching unit)) Equal to Mausoleum
        (Unit-type of (Researching unit)) Equal to City of the Dead
        (Unit-type of (Researching unit)) Equal to Altar of Torment
        (Unit-type of (Researching unit)) Equal to Sepulcher
        (Unit-type of (Researching unit)) Equal to Catacombs
        (Unit-type of (Researching unit)) Equal to Plagueatorium
        (Unit-type of (Researching unit)) Equal to Cemetery
  Actions
    Unit - Remove Fumes Book from (Researching unit)
    Unit - Add Fumes Book to (Researching unit)
Fueled Rage
  Events
    Time - Every 2 seconds of game time
  Conditions
  Actions
    Unit Group - Pick every unit in (Units of type Bone Walker) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Percentage life of (Picked unit)) Less than or equal to 60.00
          Then - Actions
            Unit - Add Fueled Rage (Book) to (Picked unit)
            Player - Disable Fueled Rage (Book) for (Owner of (Picked unit))
          Else - Actions
Shadows Call
  Events
    Time - Every 2 seconds of game time
  Conditions
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Picked unit) has buff Shadow's Call) Equal to True
          Then - Actions
            Unit - Add Life Bonus 150 to (Picked unit)
          Else - Actions
            Unit - Remove Life Bonus 150 from (Picked unit)
Fueled Rage Off
  Events
    Time - Every 2 seconds of game time
  Conditions
  Actions
    Unit Group - Pick every unit in (Units of type Bone Walker) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Percentage life of (Picked unit)) Greater than 40.00
          Then - Actions
            Unit - Remove Fueled Rage (Book) from (Picked unit)
          Else - Actions
Fade
  Events
    Time - Every 2 seconds of game time
  Conditions
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Picked unit) has buff Fade) Equal to True
          Then - Actions
            Animation - Change (Picked unit)'s vertex coloring to (100%, 100%, 100%) with 50.00% transparency
            Unit - Add Fade (Book) to (Picked unit)
            Player - Disable Fade (Book) for (Owner of (Picked unit))
          Else - Actions
Fade Off
  Events
    Time - Every 2 seconds of game time
  Conditions
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Picked unit) has buff Fade) Equal to False
          Then - Actions
            Animation - Change (Picked unit)'s vertex coloring to (100%, 100%, 100%) with 0.00% transparency
            Unit - Remove Fade (Book) from (Picked unit)
          Else - Actions
Unholy Bind
  Events
    Unit - A unit Finishes casting an ability
  Conditions
    (Ability being cast) Equal to Salubrious
  Actions
    Unit - Kill (Casting unit)
Phase Strike
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Phase Strike
  Actions
    Unit - Create 1.Phase Strike for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
    Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
    Unit - Order (Last created unit) to Human Priest - Inner Fire.(Casting unit)
Blight Spread
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Blight Spit
  Actions
    Environment - Create Blight for (Owner of (Casting unit)) from (Position of (Casting unit)) to a radius of 325.00.
Remaining Spirit
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Remaining Spirit (2)
  Actions
    Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + 150.00)
Dark Rogue Blight Grow
  Events
    Unit - A unit Dies
  Conditions
    (Unit-type of (Dying unit)) Equal to Dark Rogue
  Actions
    Environment - Create Blight for (Owner of (Dying unit)) from (Position of (Dying unit)) to a radius of 200.00.
Each attack gives a 15% chance to increase the unit's attack rate by 25%.

Gives a chance to heal the hero whenever they attack
Reaping
  Events
    Unit - A unit Is attacked
  Conditions
    (Unit-type of (Attacking unit)) Equal to (Unit-type of BlackHunter)
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Reaping for BlackHunter) Equal to 1
      Then - Actions
        Set VariableSet Reaping = (Random integer number between 1 and 100)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Reaping Less than or equal to 12
          Then - Actions
            Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + 15.00)
            Unit - Cause (Attacking unit) to damage (Attacked unit), dealing 7.50 damage of attack type Hero and damage type Normal
            Special Effect - Create a special effect attached to the head (attachpoint) of (Attacking unit) using Abilities\Spells\Undead\DeathandDecay\DeathandDecayDamage.mdl
            Wait 0.80 seconds
            Special Effect - Destroy (Last created special effect)
          Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Reaping for BlackHunter) Equal to 2
      Then - Actions
        Set VariableSet Reaping = (Random integer number between 1 and 100)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Reaping Less than or equal to 16
          Then - Actions
            Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + 20.00)
            Unit - Cause (Attacking unit) to damage (Attacked unit), dealing 10.00 damage of attack type Hero and damage type Normal
            Special Effect - Create a special effect attached to the head (attachpoint) of (Attacking unit) using Abilities\Spells\Undead\DeathandDecay\DeathandDecayDamage.mdl
            Wait 0.80 seconds
            Special Effect - Destroy (Last created special effect)
          Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Reaping for BlackHunter) Equal to 3
      Then - Actions
        Set VariableSet Reaping = (Random integer number between 1 and 100)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Reaping Less than or equal to 20
          Then - Actions
            Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + 25.00)
            Unit - Cause (Attacking unit) to damage (Attacked unit), dealing 12.50 damage of attack type Hero and damage type Normal
            Special Effect - Create a special effect attached to the head (attachpoint) of (Attacking unit) using Abilities\Spells\Undead\DeathandDecay\DeathandDecayDamage.mdl
            Wait 0.80 seconds
            Special Effect - Destroy (Last created special effect)
          Else - Actions
      Else - Actions
Remorseless
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Remorseless
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Remorseless for BlackHunter) Equal to 1
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
          Then - Actions
            Unit - Add Remoreless (Book 1) to (Casting unit)
            Player - Disable Remoreless (Book 1) for (Owner of (Casting unit))
          Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Remorseless for BlackHunter) Equal to 2
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
          Then - Actions
            Unit - Add Remoreless (Book 2) to (Casting unit)
            Player - Disable Remoreless (Book 2) for (Owner of (Casting unit))
          Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Remorseless for BlackHunter) Equal to 3
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
          Then - Actions
            Unit - Add Remoreless (Book 3) to (Casting unit)
            Player - Disable Remoreless (Book 3) for (Owner of (Casting unit))
          Else - Actions
      Else - Actions
Remorseless Off
  Events
    Time - Every 2.00 seconds of game time
  Conditions
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Picked unit) has buff Remorseless) Equal to False
          Then - Actions
            Unit - Remove Remoreless (Book 1) from (Picked unit)
            Unit - Remove Remoreless (Book 2) from (Picked unit)
            Unit - Remove Remoreless (Book 3) from (Picked unit)
          Else - Actions
Black Strike
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Fateful Strike
  Actions
    Wait 0.40 seconds
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Fateful Strike for BlackHunter) Equal to 1
      Then - Actions
        Unit - Create 1.Black Strike for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
        Set VariableSet BlackStrike[1] = (Last created unit)
        Unit - Turn collision for BlackStrike[1] Off.
        Unit - Add a 1.00 second Generic expiration timer to BlackStrike[1]
        Unit - Order BlackStrike[1] to Human Mountain King - Thunder Clap.
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Fateful Strike for BlackHunter) Equal to 2
      Then - Actions
        Unit - Create 1.Black Strike for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
        Set VariableSet BlackStrike[2] = (Last created unit)
        Unit - Increase level of Black Strike (Dummy) for BlackStrike[2]
        Unit - Turn collision for BlackStrike[2] Off.
        Unit - Add a 1.00 second Generic expiration timer to BlackStrike[2]
        Unit - Order BlackStrike[2] to Human Mountain King - Thunder Clap.
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Fateful Strike for BlackHunter) Equal to 3
      Then - Actions
        Unit - Create 1.Black Strike for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
        Set VariableSet BlackStrike[3] = (Last created unit)
        Unit - Increase level of Black Strike (Dummy) for BlackStrike[3]
        Unit - Increase level of Black Strike (Dummy) for BlackStrike[3]
        Unit - Turn collision for BlackStrike[3] Off.
        Unit - Add a 1.00 second Generic expiration timer to BlackStrike[3]
        Unit - Order BlackStrike[3] to Human Mountain King - Thunder Clap.
      Else - Actions
Umbra
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Umbra
  Actions
    Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Items\AItb\AItbTarget.mdl
    Unit - Create 1.Umbra for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
    Set VariableSet UmbraUnit = (Last created unit)
    Unit - Add a 45.00 second Generic expiration timer to UmbraUnit
    Unit - Order UmbraUnit to Human Archmage - Blizzard.(Target point of ability being cast)
Blight Aura
  Events
    Time - Every 10.00 seconds of game time
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Blight Aura for Scourage) Equal to 1
      Then - Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                ((Picked unit) has buff Blight Aura) Equal to True
              Then - Actions
                Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Undead\CarrionSwarm\CarrionSwarmDamage.mdl
                Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 12.00)
              Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Blight Aura for Scourage) Equal to 2
      Then - Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                ((Picked unit) has buff Blight Aura) Equal to True
              Then - Actions
                Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Undead\CarrionSwarm\CarrionSwarmDamage.mdl
                Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 18.00)
              Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Blight Aura for Scourage) Equal to 3
      Then - Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                ((Picked unit) has buff Blight Aura) Equal to True
              Then - Actions
                Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Undead\CarrionSwarm\CarrionSwarmDamage.mdl
                Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 24.00)
              Else - Actions
      Else - Actions
Grave Blow
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Grave Blow
  Actions
    Wait 0.50 seconds
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Grave Blow for (Casting unit)) Equal to 1
      Then - Actions
        Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 80.00 damage of attack type Spells and damage type Normal
        Unit - Create 1.Stun (Grave Blow) for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
        Set VariableSet GraveBlowStun = (Last created unit)
        Unit - Add a 2.00 second Generic expiration timer to GraveBlowStun
        Unit - Order GraveBlowStun to Human Mountain King - Storm Bolt.(Target unit of ability being cast)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Grave Blow for (Casting unit)) Equal to 2
      Then - Actions
        Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 100.00 damage of attack type Spells and damage type Normal
        Unit - Create 1.Stun (Grave Blow) for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
        Set VariableSet GraveBlowStun = (Last created unit)
        Unit - Add a 2.00 second Generic expiration timer to GraveBlowStun
        Unit - Order GraveBlowStun to Human Mountain King - Storm Bolt.(Target unit of ability being cast)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Grave Blow for (Casting unit)) Equal to 3
      Then - Actions
        Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 145.00 damage of attack type Spells and damage type Normal
        Unit - Create 1.Stun (Grave Blow) for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
        Set VariableSet GraveBlowStun = (Last created unit)
        Unit - Add a 2.00 second Generic expiration timer to GraveBlowStun
        Unit - Order GraveBlowStun to Human Mountain King - Storm Bolt.(Target unit of ability being cast)
      Else - Actions
Ult: Every kill reestores some mana
Ability 2: Instantly restores the Heroe's
I did not make this ability.
Punish
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Punish
  Actions
    Set VariableSet UnitVarCaster3 = (Triggering unit)
    Set VariableSet UnitVarPicked = (Target unit of ability being cast)
    Unit - Make UnitVarCaster3 Invulnerable
    Unit - Pause UnitVarCaster3
    Animation - Play UnitVarCaster3's stand, ready (animationname) animation
    For each (Integer A) from 1 to (3 x (Level of Punish for UnitVarCaster3)), do (Actions)
      Loop - Actions
        Wait 0.27 game-time seconds
        Animation - Play UnitVarCaster3's slam (animationname) animation
        Animation - Change UnitVarCaster3 flying height to 50.00 at 0.00
        Set VariableSet TempLoc15 = (Position of UnitVarPicked)
        Set VariableSet TempLoc7 = (Random point in (Region centered at TempLoc15 with size (80.00, 80.00)))
        Unit - Move UnitVarCaster3 instantly to TempLoc7, facing TempLoc15
        Special Effect - Create a special effect attached to the chest (attachpoint) of UnitVarCaster3 using Abilities\Weapons\MurgulMagicMissile\MurgulMagicMissile.mdl
        Special Effect - Destroy (Last created special effect)
        Unit - Make UnitVarCaster3 face UnitVarPicked over 0 seconds
        Special Effect - Create a special effect attached to the chest (attachpoint) of UnitVarPicked using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
        Special Effect - Destroy (Last created special effect)
        Animation - Play UnitVarCaster3's attack (animationname) animation
        Unit - Cause UnitVarCaster3 to damage UnitVarPicked, dealing 45.00 damage of attack type Spells and damage type Normal
        Custom script: call RemoveLocation(udg_TempLoc7)
        Custom script: call RemoveLocation(udg_TempLoc15)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Life of UnitVarPicked) Less than 25.00
          Then - Actions
            Animation - Change UnitVarCaster3 flying height to 0.00 at 50.00
            Special Effect - Create a special effect attached to the origin (attachpoint) of UnitVarPicked using Abilities\Spells\Undead\Possession\PossessionMissile.mdl
            Special Effect - Destroy (Last created special effect)
            Unit - Cause UnitVarCaster3 to damage UnitVarPicked, dealing 500.00 damage of attack type Spells and damage type Normal
            Unit - Unpause UnitVarCaster3
            Unit - Make UnitVarCaster3 Vulnerable
            Animation - Reset UnitVarCaster3's animation
            Custom script: call RemoveLocation(udg_TempLoc7)
            Custom script: call RemoveLocation(udg_TempLoc15)
            Custom script: set udg_UnitVarPicked = null
            Custom script: set udg_UnitVarCaster3 = null
            Skip remaining actions
          Else - Actions
    Animation - Change UnitVarCaster3 flying height to 0.00 at 50.00
    Unit - Unpause UnitVarCaster3
    Unit - Make UnitVarCaster3 Vulnerable
    Animation - Reset UnitVarCaster3's animation
    Custom script: call RemoveLocation(udg_TempLoc7)
    Custom script: call RemoveLocation(udg_TempLoc15)
    Custom script: set udg_UnitVarPicked = null
    Custom script: set udg_UnitVarCaster3 = null
Contract Kill
  Events
    Unit - A unit Dies
  Conditions
    (Unit-type of (Killing unit)) Equal to Deathstalker
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Contract Kill for (Killing unit)) Equal to 1
      Then - Actions
        Unit - Set life of (Killing unit) to ((Life of (Killing unit)) + ((Max life of (Killing unit)) x 0.08))
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Contract Kill for (Killing unit)) Equal to 2
      Then - Actions
        Unit - Set life of (Killing unit) to ((Life of (Killing unit)) + ((Max life of (Killing unit)) x 0.12))
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Contract Kill for (Killing unit)) Equal to 3
      Then - Actions
        Unit - Set life of (Killing unit) to ((Life of (Killing unit)) + ((Max life of (Killing unit)) x 0.16))
      Else - Actions
Victory and Defeat
  Events
    Unit - A unit Dies
  Conditions
    ((Dying unit) is A structure) Equal to True
  Actions
    Set VariableSet PlayerNum[0] = 0
    For each (Integer PlayerNum[0]) from 0 to 8, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (PlayerColour[PlayerNum[0]] slot status) Equal to Is playing
          Then - Actions
            Set VariableSet PlayerNum[1] = 0
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
              Then - Actions
                For each (Integer PlayerNum[1]) from 0 to 12, do (Actions)
                  Loop - Actions
                    Set VariableSet PlayerStructure[0] = True
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (PlayerColour[PlayerNum[1]] slot status) Equal to Is playing
                        (PlayerColour[PlayerNum[1]] is an ally of PlayerColour[PlayerNum[0]].) Equal to False
                      Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          If - Conditions
                            PlayerStructure[0] Equal to True
                          Then - Actions
                            Set VariableSet PlayerNum[2] = 0
                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              If - Conditions
                                (PlayerColour[PlayerNum[2]] slot status) Equal to Is playing
                              Then - Actions
                                Set VariableSet PlayerStructure[0] = True
                                For each (Integer PlayerNum[2]) from 0 to 12, do (Actions)
                                  Loop - Actions
                                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                      If - Conditions
                                        (PlayerColour[PlayerNum[2]] is an enemy of PlayerColour[PlayerNum[0]].) Equal to True
                                      Then - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                          If - Conditions
                                            PlayerStructure[0] Equal to True
                                            (Count structures controlled by PlayerColour[PlayerNum[2]] (Include incomplete structures)) Equal to 0
                                          Then - Actions
                                            Do nothing
                                            Set VariableSet PlayerStructure[0] = True
                                          Else - Actions
                                            Set VariableSet PlayerStructure[0] = False
                                      Else - Actions
                                        Do nothing
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  If - Conditions
                                    (Count structures controlled by PlayerColour[PlayerNum[0]] (Include incomplete structures)) Equal to 0
                                  Then - Actions
                                    Game - Defeat PlayerColour[PlayerNum[0]] with the message: Defeat!
                                  Else - Actions
                                    Do nothing
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  If - Conditions
                                    PlayerStructure[0] Equal to True
                                  Then - Actions
                                    Game - Victory PlayerColour[PlayerNum[0]] (Show dialogs, Show scores)
                                  Else - Actions
                                    Do nothing
                              Else - Actions
                                Do nothing
                            If (PlayerStructure[0] Equal to True) then do (Victory PlayerColour[PlayerNum[3]] (Show dialogs, Show scores)) else do (Do nothing)
                          Else - Actions
                      Else - Actions
                        Do nothing
              Else - Actions
                Do nothing
          Else - Actions
            Do nothing