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

Westfall Apocalypse 1.15.w3x
Variables
Variables
Initialization
Melee Initialization
Init Game
Quests
Init Cinematic
Test
Test
Death
DeathHintCreeps
No Death Shopping
DeathGold
Init Death
Drop Items On Ritual
Sacrifice
Purchase Demon
Death Victory
Help Death
Farmers
FarmerHintCritter
FarmerHintCoinmint
No Farmer Shopping
Init Farmers
FarmHouseBuilt
FarmHouseRazed
Farmer Defeat
Farmer Victory Alt
Farmer Victory Default
FarmerWarning
Help Farmer
Creeps
Spawn Creeps
Spawn Sheep
Creeps Exp
Farming
Crops Drop
Crops Grow
Animals Reproduce
Harvest Animal
Coinsmith
Spells
DeathPact
Dark Focus
items
DarkFortification
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.

		
Name Type Is Array Initial Value
allowedFarmhands integer No
animalBounty integer No
ApocalypseTimerAmount real No
coinsmithGold integer No
critterLimit integer No
Crop_Reproduce_Chance integer No
cropsLimit integer No
darkFortificationEffects effect Yes
deathGoldDrip integer No
DeathSpawnTimer timer No
DeathSpawnTimerWindow timerdialog No
gameTimer timer No
VictoryTimer timer No
VictoryTimerWindow timerdialog No
VictoryWarningTimer timer No
x integer No
x_real real No
This is a Custom Map.

There are 8 Westfall Farmers and 2 Acolytes.

Westfall farmers must build a farm house. There are markets around the map.

Farmers all easily get 1 mechanical shredder and 1 farmhand. They must grow crops and secretly sell them at the markets. Can build towers and walls near markets.


Acolytes start off quite weak and just try to pick off weak units, grind neutrals. Eventually (level 3) they can sacrifice themselves to become powerful demons and try to destroy the farmers. (grace period)
They can choose from different demon heroes,

1) Lich that calls down infernal meteors
2) Dread lord that summons minions
3) Dark Archer
4) Death Knight





Melee Initialization
  Events
    Map initialization
  Conditions
  Actions
    Melee Game - Use melee time of day (for all players)
    Player Group - Pick every player in (All allies of Player 1 (Red).) and do (Actions)
      Loop - Actions
        Player - Turn Gives bounty On for (Picked player)
    Unit Group - Pick every unit in (Units of type Nether Tower (Custom)) and do (Actions)
      Loop - Actions
        Unit - Hide (Picked unit)
    Player - Set the current research level of R003 (techcode) to 0 for Player 11 (Dark Green)
Bugs:
Init Game
  Events
    Time - Elapsed game time is 1.00 seconds
  Conditions
  Actions
    Player - Turn Gives bounty On for Neutral Passive
    Player - Make Player 11 (Dark Green) treat Player 9 (Gray) as an Ally
    Player - Make Player 11 (Dark Green) treat Player 10 (Light Blue) as an Ally
    Countdown Timer - Start DeathSpawnTimer as a One-shot timer that will expire in 60.00 seconds
    Countdown Timer - Create a timer window for (Last started timer) with title Death Awakens
    Set VariableSet DeathSpawnTimerWindow = (Last created timer window)
    Countdown Timer - Show DeathSpawnTimerWindow
    For each (Integer A) from 1 to 10, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Player((Integer A))) slot status) Not equal to Is playing
          Then - Actions
            Unit Group - Pick every unit in (Units owned by (Player((Integer A))).) and do (Actions)
              Loop - Actions
                Unit - Remove (Picked unit) from the game
          Else - Actions
Quests
  Events
    Map initialization
  Conditions
  Actions
    Quest - Create a Required quest titled Death with the description The sweet small of death looms over Westfall. You have been chosen by the Dark Lords. Slaughter small animals and steal the farmers crops to increase your gold and experience. At Level 6, you may sacrifice yourself to assume the form of a powerful Demon. You must defend the sacrifical pits from the Farmers until the Apocalypse., using icon path ReplaceableTextures\CommandButtons\BTNAcolyte.blp
    Quest - Create a Required quest titled Farmers with the description A shadow has fallen over Westfall, death is in the air. |n|n Farmers must build a small farm and harvest lumber. Purchase crops at the local markets and place them on farmland so that they multiply. Use your farmhand to sell these crops for more gold. Scout for small critters and harvest them with a farmhand for more gold. You must build your defenses and an army quickly! Destroy the Sacrifial Pits before Death brings apocalypse upon the world., using icon path ReplaceableTextures\CommandButtons\BTNPeasant.blp
    Quest - Create a Optional quest titled Cultivation Tips with the description Periodically, crops will reproduce. This works more often if they are on appropriate terrain. Whenever a crop reproduces, it must be picked up and replanted before it will reproduce again. Make sure you are tending to your fields! , using icon path ReplaceableTextures\CommandButtons\BTNDryadDispelMagicOn.blp
    Quest - Create a Optional quest titled Animal Tips with the description There are critter dens scattered around the map. Avoid the murlocs and gnolls. However, your Farmhand can Tame wild rabbits and chickens. Once tamed, you can bring them back to your farm to protect them. The farmhand should harvest the animals for gold once they multiply., using icon path ReplaceableTextures\CommandButtons\BTNDryadDispelMagicOn.blp
Init Cinematic
  Events
    Time - Elapsed game time is 1.00 seconds
  Conditions
  Actions
    Game - Display to (All allies of Player 1 (Red).) the text: A dark evil approaches... Beware.
    Game - Display to (All allies of Player 11 (Dark Green).) the text: You feel awakened from a deep, dark slumber. Your energies are very weak, but you thirst for blood. When you awaken in 60 seconds, you must find souls to reap.
    Cinematic - Send transmission to (All players) from a Player 11 (Dark Green).Shade (Death) named ... at (Center of (Playable map area)): Play No sound and display A dark evil approaches... Prepare.. Modify duration: Add 3.00 seconds and Wait
    Wait 8.00 seconds
    Game - Display to (All players) the text: If this is your first time, type '-help'.
    Sound - Play Hint <gen>
    Unit - Remove Rally from Demonic Pit 0029 <gen>
    Unit - Remove Rally from Demonic Pit 0035 <gen>
Test
  Events
    Time - Elapsed game time is 1.00 seconds
  Conditions
  Actions
DeathHintCreeps
  Events
    Time - Elapsed game time is 90.00 seconds
  Conditions
  Actions
    Set VariableSet x_real = 7.00
    Game - Display to (All allies of Player 11 (Dark Green).) the text: Creeps have spawned on the map! Harvest their souls for more experience. Reach level 6 as quickly as possible...
    Sound - Play QuestLog <gen>
    Cinematic - Ping minimap for (All allies of Player 11 (Dark Green).) at (Center of creepspawn1 <gen>) for x_real seconds, using a Flashy ping of color (50.00%, 100.00%, 50.00%)
    Cinematic - Ping minimap for (All allies of Player 11 (Dark Green).) at (Center of creepspawn2 <gen>) for x_real seconds, using a Flashy ping of color (50.00%, 100.00%, 50.00%)
    Cinematic - Ping minimap for (All allies of Player 11 (Dark Green).) at (Center of creepspawn3 <gen>) for x_real seconds, using a Flashy ping of color (50.00%, 100.00%, 50.00%)
    Cinematic - Ping minimap for (All allies of Player 11 (Dark Green).) at (Center of creepspawn4 <gen>) for x_real seconds, using a Flashy ping of color (50.00%, 100.00%, 50.00%)
No Death Shopping
  Events
    Player - Player 9 (Gray) Selects a unit
    Player - Player 10 (Light Blue) Selects a unit
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Unit-type of (Triggering unit)) Equal to Market
        (Unit-type of (Triggering unit)) Equal to Hope's Frontier
  Actions
    Selection - Clear selection for (Triggering player).
DeathGold
  Events
    Time - Every 30.00 seconds of game time
  Conditions
  Actions
    Set VariableSet deathGoldDrip = 50
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Elapsed time for VictoryTimer) Greater than or equal to 600.00
      Then - Actions
        Set VariableSet deathGoldDrip = 100
      Else - Actions
    Player - Add deathGoldDrip to Player 9 (Gray).Current gold
    Player - Add deathGoldDrip to Player 10 (Light Blue).Current gold
tame animal hotkey

transmute other things




Init Death
  Events
    Time - DeathSpawnTimer expires
  Conditions
  Actions
    Player - Make Player 11 (Dark Green) treat Player 9 (Gray) as an Ally with shared vision
    Player - Make Player 11 (Dark Green) treat Player 10 (Light Blue) as an Ally with shared vision
    Set VariableSet ApocalypseTimerAmount = 1800.00
    Sound - Play HowlOfTerror <gen>
    Game - Display to (All allies of Player 1 (Red).) the text: The feeling of death is in the air...
    Game - Display to (All allies of Player 11 (Dark Green).) the text: You are awake my child... Go forth and kill. Reap the souls of every living being, pillage the fields of the farmers for gold, and when you are strong enough, your sacrifice will be repaid in kind.
    Countdown Timer - Destroy DeathSpawnTimerWindow
    Player Group - Pick every player in (All allies of Player 11 (Dark Green).) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Picked player) controller) Equal to User
          Then - Actions
            Unit - Create 1.Acolyte (Death) for (Picked player) at (Center of spawn <gen>) facing Default building facing degrees
          Else - Actions
    Player Group - Pick every player in (All allies of Player 11 (Dark Green).) and do (Make Player 11 (Dark Green) treat (Picked player) as an Ally with shared vision)
    Countdown Timer - Start VictoryWarningTimer as a One-shot timer that will expire in (ApocalypseTimerAmount - 300.00) seconds
    Countdown Timer - Start VictoryTimer as a One-shot timer that will expire in ApocalypseTimerAmount seconds
    Countdown Timer - Create a timer window for (Last started timer) with title Apocalypse
    Set VariableSet VictoryTimerWindow = (Last created timer window)
    Countdown Timer - Show (Last created timer window)
Drop Items On Ritual
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Summoning Ritual
  Actions
    For each (Integer A) from 1 to 6, do (Actions)
      Loop - Actions
        Hero - Drop the item from slot (Integer A) of (Casting unit).
Sacrifice
  Events
    Unit - A unit Finishes casting an ability
  Conditions
    (Ability being cast) Equal to Summoning Ritual
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of (Triggering unit)) Greater than or equal to 6
      Then - Actions
        Player - Set the current research level of R000 (techcode) to 1 for (Owner of (Triggering unit))
        Unit - Create 1.Shade (Death) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
        Unit - Remove (Triggering unit) from the game
        Game - Display to (All players) the text: The air grows cold and dark... Powerful evil approaches.
        Sound - Play MarkOfChaos <gen>
        Wait 7.00 seconds
        Game - Display to (All allies of Player 11 (Dark Green).) the text: Yes... The power. The life essence. We feel it now. Release forth your true soul! The prophesy must be fulfilled.
        Cinematic - Ping minimap for (All allies of Player 11 (Dark Green).) at (Center of demongate <gen>) for 9.00 seconds, using a Flashy ping of color (100%, 100%, 100%)
      Else - Actions
Purchase Demon
  Events
    Unit - A unit enters (Playable map area)
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Unit-type of (Triggering unit)) Equal to Warlock (Death)
        (Unit-type of (Triggering unit)) Equal to Dark Ranger (Death)
        (Unit-type of (Triggering unit)) Equal to Revenant (Death)
        (Unit-type of (Triggering unit)) Equal to Death Knight (Death)
        (Unit-type of (Triggering unit)) Equal to Lich (Death)
        (Unit-type of (Triggering unit)) Equal to Gluttony (Death)
  Actions
    Game - Display to (All players) the text: The time for reckoning is at hand.
    Sound - Play MonsoonLightningHit <gen>
    Sound - Play StampedeCaster1 <gen>
    Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit)) of type Shade (Death)) and do (Actions)
      Loop - Actions
        Unit - Remove (Picked unit) from the game
Death Victory
  Events
    Time - VictoryTimer expires
  Conditions
  Actions
    Player Group - Pick every player in (All allies of Player 1 (Red).) and do (Actions)
      Loop - Actions
        Unit Group - Pick every unit in (Units owned by (Picked player).) and do (Actions)
          Loop - Actions
            Unit - Explode (Picked unit).
    Sound - Play QuestFailed <gen>
    Game - Display to (All players) the text: It is too late! Westfall is doomed. The forces of evil have full awakened....
    Wait 2.00 seconds
    Cinematic - Send transmission to (All players) from a Player 1 (Red).Dark Ranger (Death) named Prince of Death at (Center of (Playable map area)): Play H06MalGanis32 <gen> and display You are too late- Death has prevailed! . Modify duration: Add 5.00 seconds and Wait
    Wait 8.00 seconds
    Player Group - Pick every player in (All allies of Player 1 (Red).) and do (Actions)
      Loop - Actions
        Game - Defeat (Picked player) with the message: Defeat!
    Player Group - Pick every player in (All allies of Player 11 (Dark Green).) and do (Actions)
      Loop - Actions
        Game - Victory (Picked player) (Show dialogs, Show scores)

Death: You are cunning and invisible. Pillage and murder the farmers. Be careful of their powerful Goblin Shredders and towers. At level 6, you may perform The Summoning Ritual and unleash the ultimate evil.
Help Death
  Events
    Player - Player 9 (Gray) types a chat message containing -help (stringnoformat) as An exact match
    Player - Player 10 (Light Blue) types a chat message containing -help (stringnoformat) as An exact match
  Conditions
  Actions
    Game - Display to (Player group((Triggering player))) for 20.00 seconds the text: You are cunning and invisible. Pillage and murder farms and creep camps. Be careful of powerful Goblin Shredders as they can spot you! At level 6 you may perform The Summoning Ritual to unleash the ultimate evil! Protect your Sacrifical Pits until the Apocalypse is upon us. Kill the farmers.
FarmerHintCritter
  Events
    Time - Elapsed game time is 90.00 seconds
  Conditions
  Actions
    Set VariableSet x_real = 7.00
    Game - Display to (All allies of Player 1 (Red).) the text: Critters have spawned on the map! Harvest them for vast amounts of gold.
    Sound - Play QuestLog <gen>
    Cinematic - Ping minimap for (All allies of Player 1 (Red).) at (Center of critterspawn1 <gen>) for x_real seconds, using a Flashy ping of color (50.00%, 50.00%, 100.00%)
    Cinematic - Ping minimap for (All allies of Player 1 (Red).) at (Center of critterspawn2 <gen>) for x_real seconds, using a Flashy ping of color (50.00%, 50.00%, 100.00%)
    Cinematic - Ping minimap for (All allies of Player 1 (Red).) at (Center of critterspawn3 <gen>) for x_real seconds, using a Flashy ping of color (50.00%, 50.00%, 100.00%)
    Cinematic - Ping minimap for (All allies of Player 1 (Red).) at (Center of critterspawn4 <gen>) for x_real seconds, using a Flashy ping of color (50.00%, 50.00%, 100.00%)
    Cinematic - Ping minimap for (All allies of Player 1 (Red).) at (Center of critterspawn5 <gen>) for x_real seconds, using a Flashy ping of color (50.00%, 50.00%, 100.00%)
    Cinematic - Ping minimap for (All allies of Player 1 (Red).) at (Center of critterspawn6 <gen>) for x_real seconds, using a Flashy ping of color (50.00%, 50.00%, 100.00%)
FarmerHintCoinmint
  Events
    Time - Elapsed game time is 150.00 seconds
  Conditions
  Actions
    Game - Display to (All allies of Player 1 (Red).) the text: Hint: Building |cffffcc00Coinsmiths|r will significantly boost your gold output.
    Sound - Play QuestLog <gen>
No Farmer Shopping
  Events
    Player - Player 1 (Red) Selects a unit
    Player - Player 2 (Blue) Selects a unit
    Player - Player 3 (Teal) Selects a unit
    Player - Player 4 (Purple) Selects a unit
    Player - Player 5 (Yellow) Selects a unit
    Player - Player 6 (Orange) Selects a unit
    Player - Player 7 (Green) Selects a unit
    Player - Player 8 (Pink) Selects a unit
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Unit-type of (Triggering unit)) Equal to Palace of Death
        (Unit-type of (Triggering unit)) Equal to Temple of the Damned
        (Unit-type of (Triggering unit)) Equal to Mind of the Dead
  Actions
    Selection - Clear selection for (Triggering player).
Init Farmers
  Events
    Time - Elapsed game time is 4.00 seconds
  Conditions
  Actions
    Player Group - Pick every player in (All allies of Player 1 (Red).) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Picked player) controller) Equal to User
          Then - Actions
            Player - Set (Picked player).Current gold to 250
            Player - Set (Picked player).Current lumber to 400
            Player - Limit training of Captain to 1 for (Picked player)
            Player - Limit training of Farmhand to 1 for (Picked player)
            Player - Limit training of Goblin Shredder to 1 for (Picked player)
            Unit - Create 1.Farmer for (Picked player) at (Center of spawn <gen>) facing Default building facing degrees
          Else - Actions
FarmHouseBuilt
  Events
    Unit - A unit Finishes construction
  Conditions
    (Unit-type of (Constructed structure)) Equal to Farm House (Westfall)
  Actions
    Set VariableSet allowedFarmhands = (Number of living Farm House (Westfall) units owned by (Owner of (Constructed structure)))
    Player - Limit training of Farmhand to allowedFarmhands for (Owner of (Constructed structure))
FarmHouseRazed
  Events
    Unit - A unit Dies
  Conditions
    (Unit-type of (Dying unit)) Equal to Farm House (Westfall)
  Actions
    Set VariableSet allowedFarmhands = (Number of living Farm House (Westfall) units owned by (Owner of (Constructed structure)))
    Player - Limit training of Farmhand to allowedFarmhands for (Owner of (Dying unit))
Farmer Defeat
  Events
    Unit - A unit Dies
  Conditions
    (Unit-type of (Dying unit)) Equal to Farmer
  Actions
    Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)).) and do (Actions)
      Loop - Actions
        Unit - Kill (Picked unit)
    Sound - Play QuestFailed <gen>
    Game - Display to (All players) the text: ((Name of (Owner of (Dying unit))) + has been defeated by the forces of evil...)
    Game - Defeat (Owner of (Dying unit)) with the message: Defeat!
Farmer Victory Alt
  Events
    Unit - A unit Dies
  Conditions
    (Unit-type of (Dying unit)) Equal to Demonic Pit (Altar)
  Actions
    Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)).) and do (Actions)
      Loop - Actions
        Unit - Kill (Picked unit)
    Sound - Play HolyBolt <gen>
    Game - Display to (All players) the text: ((Name of (Owner of (Dying unit))) + has been routed by the forces of the Light!)
    Wait 2 seconds
    Game - Defeat (Owner of (Dying unit)) with the message: Defeat!
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Number of living Demonic Pit (Altar) units owned by Player 9 (Gray)) Equal to 0
        (Number of living Demonic Pit (Altar) units owned by Player 10 (Light Blue)) Equal to 0
      Then - Actions
        Player Group - Pick every player in (All allies of Player 1 (Red).) and do (Actions)
          Loop - Actions
            Game - Victory (Picked player) (Show dialogs, Show scores)
      Else - Actions
Farmer Victory Default
  Events
    Player - Player 9 (Gray) leaves the game
    Player - Player 10 (Light Blue) leaves the game
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Player 9 (Gray) slot status) Not equal to Is playing
        (Player 10 (Light Blue) slot status) Not equal to Is playing
      Then - Actions
        Game - Display to (All players) the text: The forces of darkness have been expelled!
        Sound - Play HolyBolt <gen>
        Cinematic - Send transmission to (All players) from a Player 1 (Red).Paladin named Paladin at (Center of (Playable map area)): Play UtherPissed4 <gen> and display Begone foul demon, the Legion of Stormwind has arrived, your cause is lost!. Modify duration: Add 5.00 seconds and Wait
        Wait 4.00 seconds
        Player Group - Pick every player in (All enemies of Player 11 (Dark Green).) and do (Actions)
          Loop - Actions
            Game - Victory (Picked player) (Show dialogs, Show scores)
      Else - Actions
FarmerWarning
  Events
    Time - VictoryWarningTimer expires
  Conditions
  Actions
    Game - Display to (All players) the text: The apocalypse draws near! The demonic sacrificial pits must be destroyed soon or Westfall will be lost to the forces of Death!
    Sound - Play QuestLog <gen>
    Cinematic - Ping minimap for (All allies of Player 1 (Red).) at (Center of demongate <gen>) for 9.00 seconds, using a Flashy ping of color (100%, 50.00%, 50.00%)

Farmers: Build a farm to collect lumber. Grow crops and animals for gold. Protect your farm. Build your army against Death and destroy the Demonic Pits once and for all.
Help Farmer
  Events
    Player - Player 1 (Red) types a chat message containing -help (stringnoformat) as An exact match
    Player - Player 2 (Blue) types a chat message containing -help (stringnoformat) as An exact match
    Player - Player 3 (Teal) types a chat message containing -help (stringnoformat) as An exact match
    Player - Player 4 (Purple) types a chat message containing -help (stringnoformat) as An exact match
    Player - Player 5 (Yellow) types a chat message containing -help (stringnoformat) as An exact match
    Player - Player 6 (Orange) types a chat message containing -help (stringnoformat) as An exact match
    Player - Player 7 (Green) types a chat message containing -help (stringnoformat) as An exact match
    Player - Player 8 (Pink) types a chat message containing -help (stringnoformat) as An exact match
  Conditions
  Actions
    Game - Display to (Player group((Triggering player))) for 20.00 seconds the text: Build a farm and train a Shredder and Farmhand to collect lumber. Buy crops from the Markets and drop them on dirt to grow and sell. Tame critters with Farmhands, then harvest them for more gold. Your shredder can protect you. Build your army and destroy the Demonic Pits once and for all! You only have limited time.
Spawn Creeps
  Events
    Time - Every 60.00 seconds of game time
  Conditions
  Actions
    Set VariableSet critterLimit = 40
    Unit Group - Pick every unit in (Units of type Rabbit Burrow) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Number of units in (Units within 1000.00 of (Position of (Picked unit)) matching ((Unit-type of (Matching unit)) Equal to Rabbit (Custom)).)) Less than or equal to 2
            (Number of units in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Rabbit (Custom)))) Less than or equal to critterLimit
          Then - Actions
            Unit - Create 1.Rabbit (Custom) for Neutral Passive at ((Position of (Picked unit)) offset by ((Random real number between 100.00 and 300.00), (Random real number between 100.00 and 300.00))) facing Default building facing degrees
          Else - Actions
    Unit Group - Pick every unit in (Units of type Chicken Coop) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Number of units in (Units within 1000.00 of (Position of (Picked unit)) matching ((Unit-type of (Matching unit)) Equal to Chicken (Custom)).)) Less than or equal to 2
            (Number of units in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Chicken (Custom)))) Less than or equal to critterLimit
          Then - Actions
            Unit - Create 1.Chicken (Custom) for Neutral Passive at ((Position of (Picked unit)) offset by ((Random real number between 100.00 and 300.00), (Random real number between 100.00 and 300.00))) facing Default building facing degrees
          Else - Actions
    Unit Group - Pick every unit in (Units of type Gnoll Den) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Number of units in (Units within 1000.00 of (Position of (Picked unit)) matching ((Unit-type of (Matching unit)) Equal to Gnoll).)) Less than or equal to 2
          Then - Actions
            Unit - Create 1.Gnoll for Neutral Hostile at ((Position of (Picked unit)) offset by ((Random real number between 100.00 and 300.00), (Random real number between 100.00 and 300.00))) facing Default building facing degrees
          Else - Actions
    Unit Group - Pick every unit in (Units of type Murloc Hideout) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Number of units in (Units within 1000.00 of (Position of (Picked unit)) matching ((Unit-type of (Matching unit)) Equal to Mur'gul Tidewarrior).)) Less than or equal to 2
          Then - Actions
            Unit - Create 1.Mur'gul Tidewarrior for Neutral Hostile at ((Position of (Picked unit)) offset by ((Random real number between 100.00 and 300.00), (Random real number between 100.00 and 300.00))) facing Default building facing degrees
          Else - Actions
Spawn Sheep
  Events
    Time - Every 45.00 seconds of game time
  Conditions
  Actions
    Set VariableSet critterLimit = 40
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Number of units in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Sheep (Custom)))) Less than or equal to critterLimit
      Then - Actions
        Unit - Create 1.Sheep (Custom) for Neutral Passive at (Random point in (Playable map area)) facing Default building facing degrees
      Else - Actions
Creeps Exp
  Events
    Unit - A unit Dies
  Conditions
    ((Owner of (Killing unit)) is an ally of Player 11 (Dark Green).) Equal to True
    (Unit-type of (Killing unit)) Equal to Acolyte (Death)
  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 Chicken (Custom)
            (Unit-type of (Dying unit)) Equal to Rabbit (Custom)
            (Unit-type of (Dying unit)) Equal to Sheep (Custom)
      Then - Actions
        Hero - Add 45 experience to (Killing unit), Show level-up graphics
      Else - 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 Gnoll
            (Unit-type of (Dying unit)) Equal to Mur'gul Tidewarrior
      Then - Actions
        Hero - Add 60 experience to (Killing unit), Show level-up graphics
      Else - Actions
CV of 1 means its allowed to grow
Crops Drop
  Events
    Unit - A unit Loses an item
  Conditions
    ((Owner of (Triggering unit)) is an ally of Player 1 (Red).) Equal to True
    (Item-class of (Item being manipulated)) Equal to Campaign
  Actions
    Item - Set the custom value of (Item being manipulated) to 1
Crops are 'campaign' items and will reproduce
Crops Grow
  Events
    Time - Every 33.00 seconds of game time
  Conditions
  Actions
    Set VariableSet cropsLimit = 200
    Item - Pick every item 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
                (Item-class of (Picked item)) Equal to Campaign
          Then - Actions
            Set VariableSet Crop_Reproduce_Chance = 9
            If (((Item-type of (Picked item)) Equal to Wheat) and ((Terrain type at (Position of (Picked item))) Equal to Village Fall - Crops)) then do (Set VariableSet Crop_Reproduce_Chance = 22) else do (Do nothing)
            If (((Item-type of (Picked item)) Equal to Shimmerweed) and ((Terrain type at (Position of (Picked item))) Equal to Village Fall - Crops)) then do (Set VariableSet Crop_Reproduce_Chance = 22) else do (Do nothing)
            If ((Item-type of (Picked item)) Equal to Daisies) then do (Set VariableSet Crop_Reproduce_Chance = 55) else do (Do nothing)
            If (((Item-type of (Picked item)) Equal to Roses) and ((Terrain type at (Position of (Picked item))) Equal to Village Fall - Thick Grass)) then do (Set VariableSet Crop_Reproduce_Chance = 33) else do (Do nothing)
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Random integer number between 1 and 100) Less than or equal to Crop_Reproduce_Chance
                (Custom value of (Picked item)) Equal to 1
              Then - Actions
                Item - Set the custom value of (Picked item) to 0
                Item - Create (Item-type of (Picked item)) at ((Position of (Picked item)) offset by (Random angle) towards (Random angle) degrees.)
                Item - Set the custom value of (Last created item) to 1
              Else - Actions
          Else - Actions
Animals Reproduce
  Events
    Time - Every 24.00 seconds of game time
  Conditions
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area) matching ((Level of (Matching unit)) Equal to 0)) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Owner of (Picked unit)) is an ally of Player 1 (Red).) Equal to True
            ((Picked unit) is A structure) Equal to False
          Then - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Random integer number between 1 and 100) Less than or equal to 22
                (Custom value of (Picked unit)) Equal to 0
              Then - Actions
                Unit - Set the custom value of (Picked unit) to 1
                Unit - Create 1.(Unit-type of (Picked unit)) for (Owner of (Picked unit)) at ((Position of (Picked unit)) offset by (Random angle) towards (Random angle) degrees.) facing Default building facing degrees
              Else - Actions
          Else - Actions
Harvest Animal
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Harvest Animal (Custom)
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Or - Any (Conditions) are true
          Conditions
            (Owner of (Target unit of ability being cast)) Equal to (Owner of (Casting unit))
            (Owner of (Target unit of ability being cast)) Equal to Neutral Passive
        Or - Any (Conditions) are true
          Conditions
            (Unit-type of (Target unit of ability being cast)) Equal to Chicken (Custom)
            (Unit-type of (Target unit of ability being cast)) Equal to Rabbit (Custom)
            (Unit-type of (Target unit of ability being cast)) Equal to Sheep (Custom)
      Then - Actions
        Sound - Play AlchemistTransmuteDeath1 <gen> at 100% volume, attached to (Target unit of ability being cast)
        Set VariableSet animalBounty = (Random integer number between 20 and 40)
        Floating Text - Create floating text that reads (+ + (String(animalBounty))) above (Target unit of ability being cast) with Z offset 0.10, using font size 8.00, color (100%, 100%, 0.00%), and 0% transparency
        Floating Text - Hide (Last created floating text) for (All enemies of (Owner of (Casting unit)).)
        Floating Text - Set the velocity of (Last created floating text) to 64 towards 90 degrees
        Floating Text - Change (Last created floating text): Disable permanence
        Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
        Floating Text - Change the fading age of (Last created floating text) to 0.20 seconds
        Unit - Kill (Target unit of ability being cast)
        Player - Add animalBounty to (Owner of (Casting unit)).Current gold
      Else - Actions
Coinsmith
  Events
    Time - Every 30.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
            (Unit-type of (Picked unit)) Equal to Coinsmith
          Then - Actions
            Set VariableSet coinsmithGold = 30
            Player - Add coinsmithGold to (Owner of (Picked unit)).Current gold
            Floating Text - Create floating text that reads (+ + (String(coinsmithGold))) above (Picked unit) with Z offset 0.10, using font size 8.00, color (100%, 100%, 0.00%), and 0% transparency
            Floating Text - Hide (Last created floating text) for (All enemies of (Owner of (Picked unit)).)
            Floating Text - Set the velocity of (Last created floating text) to 64 towards 90 degrees
            Floating Text - Change (Last created floating text): Disable permanence
            Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
            Floating Text - Change the fading age of (Last created floating text) to 0.20 seconds
          Else - Actions
DeathPact
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Death Pact ( Custom)
  Actions
    Set VariableSet x_real = (Percentage life of (Casting unit))
    Unit - Set life of (Casting unit) to (x_real x 0.75)%
Dark Focus
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Dark Focus
  Actions
DarkFortification
  Events
    Unit - A unit Acquires an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Towers of Dark Fortification
  Actions
    Player - Set the current research level of R003 (techcode) to 1 for Player 11 (Dark Green)
    Set VariableSet x = 0
    Unit Group - Pick every unit in (Units of type Nether Tower (Custom)) and do (Actions)
      Loop - Actions
        Unit - Unhide (Picked unit)
    Wait 0.10 seconds
    Unit Group - Pick every unit in (Units of type Nether Tower (Custom)) and do (Actions)
      Loop - Actions
        Special Effect - Create a special effect attached to the origin (attachpoint) of (Picked unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
        Set VariableSet darkFortificationEffects[x] = (Last created special effect)
        Set VariableSet x = (x + 1)
    Wait 2 seconds
    For each (Integer A) from 0 to (Number of units in (Units of type Nether Tower (Custom))), do (Actions)
      Loop - Actions
        Special Effect - Destroy darkFortificationEffects[(Integer A)]