1. Are you planning to upload your awesome map to Hive? Please review the rules here.
    Dismiss Notice
  2. Seek unity between the elements in the 22nd Terraining Contest Poll.
    Dismiss Notice
  3. Seize the moment! The 18th Mini Mapping Contest has commenced.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger Viewer

Ghoul Defence 2.1.w3x
Variables
Variables
main
init
start
spawnGhouls
spawnNeutralGhouls
setCountdown
endRound
startRound
preRound
playerWin
playerDraw
paladinDeath
ghoulDeath
moveGhoul
startUberRound
stopUberRound
tickUberRound
playerLeaves
removeUnits
woodUpgrade
leaderboard
revive
sacrificeGhoul
items
spawnTome
randomItem
bootsOfTheMonkey
clawsOfTheVampire
stoneOfFlames
ringOfFaith
bracersOfTheRebel
maskOfTheSage
axeOfMurderousWoodcutting
stoneOfLuck
stoneOfTheVoid
bootsOfTime
hoodOfTheRogue
blessedStaff
powerGloves
tomeOfMana
startingItems
shieldOfValor
turtlersShield
heartOfLife
theFrog
luckyCheese
theLumberjack
theChicken
swordOfSorrow
swordOfChaos
balbogsGambit
nondescriptStick
urnOfTheUnderdead
deathStick
doomStick
luckyCheeseIncome
urnOfTheUnderdeadAbility
frogUpgrade
itemAbilities
bookOfLearningAdd
bookOfLearningRemove
maskOfTheSageAbility
blessedStaffOfTheWhiteWizard
powerGlovesMark2
shadowedHoodOfTheRogue
tomeOfStupidity
axeOfMurderousWoodcuttingAbility
stoneOfLuckAbility
bootsOfTimeAdd
bootsOfTimeRemove
ghoulUpgrades
stopBuyoutR10
stopBuyout
roundBuyout
upgradeGhoulItem
buyWood
forceUpgradeGhouls
viciousGhoul
hellishGhoul
vampiricGhoul
toxicGhouls
bloodthirstGouls
flamingGhouls
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
armorIncrease integer No
boughtOut boolean No
boughtOutPlayer player No
centerPoint location No
damageIncrease integer No
expRate integer No
flameStrikeUnits group No
ghouls group No
ghoulType unitcode Yes u000
healthIncrease integer No
heros group No
kills integer Yes
leaderboardPos integer Yes
lives integer No
manaIncrease integer No
maxUnits integer No
paladinGroup group No
paladins unit Yes
players force No
playerUnits integer Yes 0
roundNumber integer No 1
roundTimer timer No
sheepRound boolean No
shop unit No UnitNull
startingAgi integer No
startingIncomeArr integer Yes
startingInt integer No
startingStr integer No
tempBool boolean No
tempGhoulType unitcode No
tempGroup group No
tempInt integer No
tempPlayer player No
tempPlayer2 player No
tempPlayers force No
tempPoint location No
tempPoint2 location No
tempReal real No
tempUnit unit No
unitCount integer No
upgraderPoint location No
upgraders unit Yes
visibility fogmodifier Yes
waitTime real No
init
  Events
    Map initialization
  Conditions
  Actions
    Set VariableSet expRate = 50
    Cinematic - Fade out over 0.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Cinematic - Turn cinematic mode On for (All players)
start
  Events
    Time - Elapsed game time is 1.00 seconds
  Conditions
  Actions
    Set VariableSet shop = Paladin Shop 0001 <gen>
    Set VariableSet upgraderPoint = (Position of shop)
    Set VariableSet centerPoint = (Center of fightArea <gen>)
    Trigger - Turn on setCountdown <gen>
    Game - Set time of day speed to 0.00% of the default speed
    Set VariableSet players = (All players matching (((Matching player) slot status) Equal to Is playing).)
    Player Group - Remove Player 24 (Peanut) from players.
    Set VariableSet maxUnits = ((Number of players in players) x 30)
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        Set VariableSet tempPlayer = (Picked player)
        Player Group - Pick every player in players and do (Actions)
          Loop - Actions
            Set VariableSet tempPlayer2 = (Picked player)
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                tempPlayer Not equal to tempPlayer2
              Then - Actions
                Player - Make tempPlayer treat tempPlayer2 as an Enemy with shared vision
              Else - Actions
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        Set VariableSet tempInt = (Player number of (Picked player))
        Player - Set (Picked player).Current lumber to 1
        Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across (Entire map)
        Player - Turn Gives bounty On for (Picked player)
        Set VariableSet tempPoint = (Random point in heroSpawn <gen>)
        Unit - Create 1.Paladin for (Picked player) at tempPoint facing Default building facing degrees
        Custom script: call RemoveLocation(udg_tempPoint)
        Camera - Pan camera for (Picked player) to (Position of (Last created unit)) over 0 seconds
        Selection - Select (Last created unit) for (Picked player)
        Unit Group - Add (Last created unit) to paladinGroup
        Set VariableSet paladins[tempInt] = (Last created unit)
        Hero - Make (Picked player) Heroes gain (Real(expRate))% experience from future kills
        Hero - Set paladins[(Player number of (Picked player))] Hero-level to 5, Hide level-up graphics
        Hero - Learn skill for paladins[tempInt]: Charge Up
        Hero - Learn skill for paladins[tempInt]: Cleaving Attack
        Hero - Learn skill for paladins[tempInt]: Plasmatic Shield
        Hero - Learn skill for paladins[tempInt]: Power Orb
        Hero - Learn skill for paladins[tempInt]: Shatter Charge
        Unit - Add Time Jump to paladins[tempInt]
        Hero - Create Potion of Healing and give it to paladins[tempInt]
        Hero - Create Potion of Mana and give it to paladins[tempInt]
        Camera - Set (Picked player)'s camera Distance to target to 1950.00 over 0 seconds
        Unit - Create 1.Ghoul Upgrader for (Picked player) at upgraderPoint facing Default building facing degrees
        Set VariableSet upgraders[(Player number of (Picked player))] = (Last created unit)
    Wait 1.00 seconds
    Cinematic - Fade in over 0.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Sound - Play MarkOfChaos <gen>
    Cinematic - Turn cinematic mode Off for (All players)
    Countdown Timer - Start roundTimer as a One-shot timer that will expire in 60.00 seconds
    Wait 5.00 seconds
    Game - Display to players the text: |cff7777aaPALADINS!|r Select your weapon and FIGHT!
    Sound - Play MuradinYesAttack3 <gen>
    Special Effect - Create a special effect attached to the overhead (attachpoint) of shop using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
    Animation - Play shop's spell (animationname) animation
    Wait 15.00 seconds
    Game - Display to players the text: When the paladin shop closes, upgrade your ghouls at the ghoul merchant to conquer your enemies!
    Sound - Play PhoenixBirth <gen>
    Animation - Play shop's spell (animationname) animation
    Wait 20.00 seconds
    Game - Display to players the text: The paladin shop is closing soon, choose your item or face humiliation!
    Sound - Play BlacksmithWhat1 <gen>
    Animation - Play shop's spell (animationname) animation
    Wait 12.00 seconds
    Game - Display to players the text: |cff7777aaPALADINS!|r Be the last man standing in this bloody battlefield where |cffff0000DEATH IS PERMANENT!|r
    Sound - Play HeroPaladinPissed6 <gen>
    Animation - Play shop's spell (animationname) animation
    Wait 6.00 seconds
    Trigger - Turn on spawnGhouls <gen>
    Trigger - Turn on moveGhoul <gen>
    Wait 2.00 seconds
    Trigger - Run spawnGhouls <gen> (checking conditions)
    For each (Integer A) from 1 to 10, do (Actions)
      Loop - Actions
        Set VariableSet tempPoint = (upgraderPoint offset by ((Random real number between -600.00 and 600.00), (Random real number between -600.00 and 600.00)))
        Special Effect - Create a special effect at tempPoint using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
        Custom script: call RemoveLocation(udg_tempPoint)
        Set VariableSet tempPoint = (upgraderPoint offset by ((Random real number between -600.00 and 600.00), (Random real number between -600.00 and 600.00)))
        Special Effect - Create a special effect at tempPoint using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
        Custom script: call RemoveLocation(udg_tempPoint)
        Wait 0.10 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Integer A) Equal to 5
          Then - Actions
            Unit - Replace shop with a Ghoul Merchant using The old unit's relative life and mana
            Set VariableSet shop = (Last replaced unit)
          Else - Actions
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Picked player) Current lumber) Greater than 0
          Then - Actions
            Hero - Create Tome of Stupidity and give it to paladins[(Player number of (Picked player))]
            Player - Set (Picked player).Current lumber to 0
          Else - Actions
    Sound - Play CreepAggroWhat1 <gen>
    Game - Display to players for 5.00 seconds the text: The Ghouls have Arrived! Prepare for battle!
    Countdown Timer - Start roundTimer as a One-shot timer that will expire in 50.00 seconds
    Trigger - Turn on spawnTome <gen>
    Trigger - Turn on endRound <gen>
spawnGhouls
  Events
    Time - Every 10.00 seconds of game time
  Conditions
    unitCount Less than maxUnits
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        boughtOut Equal to True
      Then - Actions
        Set VariableSet tempInt = 5
        Set VariableSet maxUnits = 40
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            sheepRound Equal to True
          Then - Actions
            Set VariableSet tempGhoulType = Ghoulish Sheep
          Else - Actions
            Set VariableSet tempGhoulType = ghoulType[(Player number of boughtOutPlayer)]
        Set VariableSet tempGroup = (Units in fightArea <gen> matching (((Unit-type of (Matching unit)) Equal to Paladin) and ((Owner of (Matching unit)) Not equal to boughtOutPlayer)))
        Set VariableSet tempPoint = (Center of ghoulSpawn1 <gen>)
        Unit - Create tempInt tempGhoulType for boughtOutPlayer at tempPoint facing centerPoint
        Unit Group - Add all units of (Last created unit group) to ghouls
        Custom script: call RemoveLocation(udg_tempPoint)
        Unit Group - Order (Last created unit group) to Attack.(Random unit from tempGroup)
        Set VariableSet tempPoint = (Center of ghoulSpawn2 <gen>)
        Unit - Create tempInt tempGhoulType for boughtOutPlayer at tempPoint facing centerPoint
        Unit Group - Add all units of (Last created unit group) to ghouls
        Custom script: call RemoveLocation(udg_tempPoint)
        Unit Group - Order (Last created unit group) to Attack.(Random unit from tempGroup)
        Set VariableSet tempPoint = (Center of ghoulSpawn3 <gen>)
        Unit - Create tempInt tempGhoulType for boughtOutPlayer at tempPoint facing centerPoint
        Unit Group - Add all units of (Last created unit group) to ghouls
        Custom script: call RemoveLocation(udg_tempPoint)
        Unit Group - Order (Last created unit group) to Attack.(Random unit from tempGroup)
        Set VariableSet tempPoint = (Center of ghoulSpawn4 <gen>)
        Unit - Create tempInt tempGhoulType for boughtOutPlayer at tempPoint facing centerPoint
        Unit Group - Add all units of (Last created unit group) to ghouls
        Custom script: call RemoveLocation(udg_tempPoint)
        Unit Group - Order (Last created unit group) to Attack.(Random unit from tempGroup)
        Custom script: call DestroyGroup(udg_tempGroup)
        Set VariableSet playerUnits[(Player number of boughtOutPlayer)] = (playerUnits[(Player number of boughtOutPlayer)] + (tempInt x 4))
        Set VariableSet unitCount = (unitCount + (tempInt x 4))
      Else - Actions
        Set VariableSet tempInt = (Min(roundNumber, 5))
        Set VariableSet maxUnits = ((Number of players in players) x 40)
        Player Group - Pick every player in players and do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                playerUnits[(Player number of (Picked player))] Less than (40 - (tempInt x 4))
              Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    sheepRound Equal to True
                  Then - Actions
                    Set VariableSet tempGhoulType = Ghoulish Sheep
                  Else - Actions
                    Set VariableSet tempGhoulType = ghoulType[(Player number of (Picked player))]
                Set VariableSet tempGroup = (Units in fightArea <gen> matching (((Unit-type of (Matching unit)) Equal to Paladin) and ((Owner of (Matching unit)) Not equal to (Picked player))))
                Set VariableSet tempPoint = (Random point in ghoulSpawn1 <gen>)
                Unit - Create tempInt tempGhoulType for (Picked player) at tempPoint facing centerPoint
                Unit Group - Add all units of (Last created unit group) to ghouls
                Custom script: call RemoveLocation(udg_tempPoint)
                Unit Group - Order (Last created unit group) to Attack.(Random unit from tempGroup)
                Set VariableSet tempPoint = (Random point in ghoulSpawn2 <gen>)
                Unit - Create tempInt tempGhoulType for (Picked player) at tempPoint facing centerPoint
                Unit Group - Add all units of (Last created unit group) to ghouls
                Custom script: call RemoveLocation(udg_tempPoint)
                Unit Group - Order (Last created unit group) to Attack.(Random unit from tempGroup)
                Set VariableSet tempPoint = (Random point in ghoulSpawn3 <gen>)
                Unit - Create tempInt tempGhoulType for (Picked player) at tempPoint facing centerPoint
                Unit Group - Add all units of (Last created unit group) to ghouls
                Custom script: call RemoveLocation(udg_tempPoint)
                Unit Group - Order (Last created unit group) to Attack.(Random unit from tempGroup)
                Set VariableSet tempPoint = (Random point in ghoulSpawn4 <gen>)
                Unit - Create tempInt tempGhoulType for (Picked player) at tempPoint facing centerPoint
                Unit Group - Add all units of (Last created unit group) to ghouls
                Custom script: call RemoveLocation(udg_tempPoint)
                Unit Group - Order (Last created unit group) to Attack.(Random unit from tempGroup)
                Custom script: call DestroyGroup(udg_tempGroup)
                Set VariableSet playerUnits[(Player number of (Picked player))] = (playerUnits[(Player number of (Picked player))] + (tempInt x 4))
                Set VariableSet unitCount = (unitCount + (tempInt x 4))
              Else - Actions
spawnNeutralGhouls
  Events
  Conditions
  Actions
    For each (Integer A) from 1 to 5, do (Actions)
      Loop - Actions
        Set VariableSet tempPoint = (Position of shop)
        Unit - Create 20.Foul Ghoul for Neutral Hostile at tempPoint facing Default building facing degrees
        Custom script: call RemoveLocation(udg_tempPoint)
        Wait 2.50 seconds
setCountdown
  Events
    Time - Every 1.00 seconds of game time
  Conditions
  Actions
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        Player - Set (Picked player).Food used to (Integer((Remaining time for roundTimer)))
        Player - Set (Picked player).Food max to (Integer((Initial time for roundTimer)))
        Player - Set (Picked player).Food cap to (Integer((Initial time for roundTimer)))
endRound
  Events
    Time - roundTimer expires
  Conditions
  Actions
    Trigger - Turn off spawnGhouls <gen>
    Trigger - Turn off (This trigger)
    Set VariableSet boughtOut = False
    Set VariableSet sheepRound = False
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        Player - Set (Picked player) handicap to 100.00%
        Camera - Set (Picked player)'s camera Distance to target to 1950.00 over 0 seconds
        Player - Add ((Current research level of R000 (techcode) for (Picked player)) + startingIncomeArr[(Player number of (Picked player))]) to (Picked player).Current lumber
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (roundNumber mod 10) Equal to 0
      Then - Actions
        Trigger - Run stopUberRound <gen> (checking conditions)
        Trigger - Run frogUpgrade <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        roundNumber Greater than 10
      Then - Actions
        Trigger - Run deathStick <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        roundNumber Greater than 20
      Then - Actions
        Trigger - Run doomStick <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
      Then - Actions
        Trigger - Run luckyCheeseIncome <gen> (checking conditions)
      Else - Actions
    Wait (5.00 + (Real((roundNumber / 2)))) seconds
    Set VariableSet tempInt = (Number of units in paladinGroup)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        tempInt Equal to 0
      Then - Actions
        Trigger - Run playerDraw <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        tempInt Equal to 1
      Then - Actions
        Trigger - Run playerWin <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        tempInt Greater than 1
      Then - Actions
        Trigger - Run preRound <gen> (checking conditions)
      Else - Actions
startRound
  Events
  Conditions
  Actions
    Game - Display to players for 5.00 seconds the text: The Ghouls have Arrived! Prepare for battle!
    Sound - Play CreepAggroWhat1 <gen>
    Trigger - Turn on spawnGhouls <gen>
    Trigger - Run spawnGhouls <gen> (checking conditions)
    Trigger - Turn on endRound <gen>
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (roundNumber mod 10) Equal to 0
      Then - Actions
        Trigger - Run startUberRound <gen> (checking conditions)
        Countdown Timer - Start roundTimer as a One-shot timer that will expire in (120.00 + ((Real(roundNumber)) x 2.00)) seconds
      Else - Actions
        Countdown Timer - Start roundTimer as a One-shot timer that will expire in 40.00 seconds
preRound
  Events
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (roundNumber mod 10) Equal to 0
      Then - Actions
        Set VariableSet waitTime = 45.00
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (roundNumber mod 5) Equal to 0
          Then - Actions
            Set VariableSet waitTime = 35.00
          Else - Actions
            Set VariableSet waitTime = 20.00
    Countdown Timer - Start roundTimer as a One-shot timer that will expire in waitTime seconds
    Game - Display to players for 5.00 seconds the text: (End of Round: + (String(roundNumber)))
    Trigger - Run forceUpgradeGhouls <gen> (checking conditions)
    Set VariableSet roundNumber = (roundNumber + 1)
    Wait 10.00 seconds
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        roundNumber Equal to 12
      Then - Actions
        Game - Display to players for 5.00 seconds the text: The Ghoul Merchant has new Wares!
        Unit - Replace shop with a Greater Ghoul Merchant using The old unit's relative life and mana
        Set VariableSet shop = (Last replaced unit)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        roundNumber Equal to 22
      Then - Actions
        Game - Display to players for 5.00 seconds the text: The Ghoul Merchant has new Wares!
        Unit - Replace shop with a Ultimate Ghoul Merchant using The old unit's relative life and mana
        Set VariableSet shop = (Last replaced unit)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Or - Any (Conditions) are true
          Conditions
            roundNumber Equal to 2
            roundNumber Equal to 6
      Then - Actions
        Game - Display to players for 5.00 seconds the text: Upgrade your ghouls at the ghoul merchant to annihilate the other paladins!
        Sound - Play AxeMissile1 <gen>
        Set VariableSet tempPoint = (Position of shop)
        Cinematic - Ping minimap for (All players) at tempPoint for 5.00 seconds
        Custom script: call RemoveLocation(udg_tempPoint)
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Or - Any (Conditions) are true
              Conditions
                roundNumber Equal to 4
                roundNumber Equal to 8
                roundNumber Equal to 12
                roundNumber Equal to 18
                roundNumber Equal to 22
                roundNumber Equal to 28
                roundNumber Equal to 34
                roundNumber Equal to 38
          Then - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Random integer number between 1 and 2) Equal to 1
              Then - Actions
                Game - Display to players for 5.00 seconds the text: If you like the map, rehost it!
              Else - Actions
                Game - Display to players for 5.00 seconds the text: Support the map by rehosting it!
            Sound - Play AxeMissile1 <gen>
          Else - Actions
    Wait (waitTime - 10.00) seconds
    Trigger - Run startRound <gen> (checking conditions)
playerWin
  Events
  Conditions
  Actions
    Cinematic - Turn on letterbox mode (hide interface) for (All players): fade out over 2 seconds
    Sound - Play Credits <gen>
    Unit Group - Pick every unit in paladinGroup and do (Actions)
      Loop - Actions
        Set VariableSet tempUnit = (Picked unit)
        Set VariableSet tempPlayer = (Owner of tempUnit)
    Game - Display to players for 30 seconds the text: ((Name of tempPlayer) + is the Champion!)
    Unit - Make tempUnit Invulnerable
    Unit - Order tempUnit to Stop.
    Wait 1.00 seconds
    Animation - Play tempUnit's spell (animationname) animation
    Unit Group - Pick every unit in ghouls and do (Actions)
      Loop - Actions
        Unit - Explode (Picked unit).
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        Camera - Pan camera for (Picked player) to (Position of tempUnit) over 5.00 seconds
        Camera - Set (Picked player)'s camera Distance to target to 900.00 over 20.00 seconds
        Camera - Set (Picked player)'s camera Rotation to 900.00 over 60.00 seconds
    For each (Integer A) from 1 to 12, do (Actions)
      Loop - Actions
        Animation - Queue tempUnit's spell (animationname) animation
        Special Effect - Create a special effect at ((Position of tempUnit) offset by ((Random real number between -300.00 and 300.00), (Random real number between -300.00 and 300.00))) using Abilities\Weapons\Bolt\BoltImpact.mdl
        Set VariableSet tempReal = (Random real number between 0.50 and 2.50)
        Wait tempReal seconds
        Unit - Make tempUnit face (Random real number between 0 and 360.00) over tempReal seconds
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Number of living Paladin units owned by (Picked player)) Equal to 1
          Then - Actions
            Game - Victory (Picked player) (Show dialogs, Show scores)
          Else - Actions
            Game - Defeat (Picked player) with the message: Defeat!
    Cinematic - Turn off letterbox mode (show interface) for (All players): fade in over 2 seconds
playerDraw
  Events
  Conditions
  Actions
    Cinematic - Turn on letterbox mode (hide interface) for (All players): fade out over 2 seconds
    Game - Display to players for 30 seconds the text: All paladins have been defeated! No champion was found today!
    Wait 10.00 seconds
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        Game - Defeat (Picked player) with the message: Draw!
    Cinematic - Turn off letterbox mode (show interface) for (All players): fade in over 2 seconds
paladinDeath
  Events
    Unit - A unit Dies
  Conditions
    (Unit-type of (Dying unit)) Equal to Paladin
  Actions
    Set VariableSet tempInt = ((Player number of (Owner of (Dying unit))) + 1)
    Multiboard - Set the text for (Last created multiboard) item in column 1, row leaderboardPos[(Player number of (Owner of (Dying unit)))] to ((Name of (Owner of (Dying unit))) + (dead))
    Unit Group - Remove (Dying unit) from paladinGroup.
    Set VariableSet tempInt = (Player number of (Owner of (Dying unit)))
    Game - Display to players for 10.00 seconds the text: ((Name of (Owner of (Dying unit))) + ( Has been Defeated by + ((Name of (Owner of (Killing unit))) + 's Ghouls!)))
    Player - Add ((Current research level of R000 (techcode) for (Owner of (Dying unit))) + 1) to (Owner of (Dying unit)).Current lumber
    Player - Set (Owner of (Dying unit)).Current gold to (((Owner of (Dying unit)) Current gold) / 5)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        roundNumber Greater than 5
      Then - Actions
        Player - Add ((Current research level of R000 (techcode) for (Owner of (Dying unit))) + 1) to (Owner of (Dying unit)).Current lumber
        Player - Add ((Current research level of R000 (techcode) for (Owner of (Killing unit))) + 1) to (Owner of (Killing unit)).Current lumber
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        roundNumber Greater than 15
      Then - Actions
        Player - Add ((Current research level of R000 (techcode) for (Owner of (Dying unit))) + 1) to (Owner of (Dying unit)).Current lumber
        Player - Add ((Current research level of R000 (techcode) for (Owner of (Killing unit))) + 1) to (Owner of (Killing unit)).Current lumber
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        roundNumber Greater than 25
      Then - Actions
        Player - Add ((Current research level of R000 (techcode) for (Owner of (Dying unit))) + 1) to (Owner of (Dying unit)).Current lumber
        Player - Add ((Current research level of R000 (techcode) for (Owner of (Killing unit))) + 1) to (Owner of (Killing unit)).Current lumber
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        roundNumber Greater than 35
      Then - Actions
        Player - Add ((Current research level of R000 (techcode) for (Owner of (Dying unit))) + 1) to (Owner of (Dying unit)).Current lumber
        Player - Add ((Current research level of R000 (techcode) for (Owner of (Killing unit))) + 1) to (Owner of (Killing unit)).Current lumber
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        roundNumber Greater than 45
      Then - Actions
        Player - Add ((Current research level of R000 (techcode) for (Owner of (Dying unit))) + 1) to (Owner of (Dying unit)).Current lumber
        Player - Add ((Current research level of R000 (techcode) for (Owner of (Killing unit))) + 1) to (Owner of (Killing unit)).Current lumber
        Player - Add ((Current research level of R000 (techcode) for (Owner of (Dying unit))) + 1) to (Owner of (Dying unit)).Current lumber
        Player - Add ((Current research level of R000 (techcode) for (Owner of (Killing unit))) + 1) to (Owner of (Killing unit)).Current lumber
        Player - Add ((Current research level of R000 (techcode) for (Owner of (Dying unit))) + 1) to (Owner of (Dying unit)).Current lumber
        Player - Add ((Current research level of R000 (techcode) for (Owner of (Killing unit))) + 1) to (Owner of (Killing unit)).Current lumber
      Else - Actions
    Sound - Play MuradinPissed7 <gen>
    Hero - Set paladins[(Player number of (Owner of (Killing unit)))] Hero-level to ((Hero level of paladins[(Player number of (Owner of (Killing unit)))]) + 2), Hide level-up graphics
    Unit - Create 1.Spirit for (Owner of (Dying unit)) at (Position of (Dying unit)) facing Default building facing degrees
    Selection - Select (Last created unit) for (Owner of (Last created unit))
    Wait 5.00 seconds
    Game - Display to (Player group((Owner of (Dying unit)))) for 10.00 seconds the text: You have revived as a spirit and blessed with bonus wood. Upgrade your ghouls to kill those filthy paladins!
ghoulDeath
  Events
    Unit - A unit Dies
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Unit-type of (Dying unit)) Equal to Ghoul
        (Unit-type of (Dying unit)) Equal to Vicious Ghoul
        (Unit-type of (Dying unit)) Equal to Hellsh Ghoul
        (Unit-type of (Dying unit)) Equal to Vampiric Ghoul
        (Unit-type of (Dying unit)) Equal to Toxic Ghoul
        (Unit-type of (Dying unit)) Equal to Bloodthirsty Ghoul
        (Unit-type of (Dying unit)) Equal to Flaming Ghoul
        (Unit-type of (Dying unit)) Equal to Atrocious Ghoul
        (Unit-type of (Dying unit)) Equal to Defiled Ghoul
        (Unit-type of (Dying unit)) Equal to Foul Ghoul
        (Unit-type of (Dying unit)) Equal to Ghoulish Sheep
  Actions
    Set VariableSet unitCount = (unitCount - 1)
    Set VariableSet playerUnits[(Player number of (Owner of (Dying unit)))] = (playerUnits[(Player number of (Owner of (Dying unit)))] - 1)
    Set VariableSet kills[(Player number of (Owner of (Killing unit)))] = (kills[(Player number of (Owner of (Killing unit)))] + 1)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Player number of (Owner of (Killing unit))) Less than 25
      Then - Actions
        Multiboard - Set the text for (Last created multiboard) item in column 2, row leaderboardPos[(Player number of (Owner of (Killing unit)))] to (String(kills[(Player number of (Owner of (Killing unit)))]))
      Else - Actions
moveGhoul
  Events
    Time - Every 20.00 seconds of game time
  Conditions
    unitCount Greater than 0
  Actions
    Set VariableSet tempPoint = (Center of ghoulPatrolPoint <gen>)
    Unit Group - Order ghouls to Patrol To.tempPoint
    Custom script: call RemoveLocation(udg_tempPoint)
startUberRound
  Events
  Conditions
  Actions
    Unit - Change ownership of shop to Neutral Hostile and Change color
    Set VariableSet tempPoint = (Center of ghoulPatrolPoint <gen>)
    Unit - Create 20.Dummy for Neutral Hostile at tempPoint facing Default building facing degrees
    Custom script: call RemoveLocation(udg_tempPoint)
    Unit Group - Add all units of (Last created unit group) to flameStrikeUnits
    Unit Group - Pick every unit in flameStrikeUnits and do (Actions)
      Loop - Actions
        Unit - Add Flame Strike (dummy) to (Picked unit)
        Unit - Set Base Damage of shop to (150 + (roundNumber x 40)) for weapon index: 1
        Unit - Set level of Flame Strike (dummy) for (Picked unit) to (roundNumber / 10)
    Sound - Play PH1 <gen>
    Trigger - Turn on tickUberRound <gen>
stopUberRound
  Events
  Conditions
  Actions
    Unit - Change ownership of shop to Neutral Passive and Change color
    Trigger - Turn off tickUberRound <gen>
    Sound - Play Music
    Unit Group - Pick every unit in flameStrikeUnits and do (Actions)
      Loop - Actions
        Unit - Remove (Picked unit) from the game
        Unit Group - Remove (Picked unit) from flameStrikeUnits.
tickUberRound
  Events
    Time - Every 5.00 seconds of game time
  Conditions
  Actions
    Unit Group - Pick every unit in flameStrikeUnits and do (Actions)
      Loop - Actions
        Set VariableSet tempPoint = (Random point in fightArea <gen>)
        Unit - Order (Picked unit) to Human Blood Mage - Flame Strike.tempPoint
        Custom script: call RemoveLocation(udg_tempPoint)
function Trig_playerLeaves_Actions takes nothing returns nothing
    call ForceRemovePlayerSimple( GetTriggerPlayer(), udg_players )
    call ConditionalTriggerExecute( gg_trg_removeUnits )
    call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, udg_leaderboardPos[GetConvertedPlayerId(GetTriggerPlayer())], ( GetPlayerName(GetTriggerPlayer()) + " (left)" ) )
endfunction

//===========================================================================
function InitTrig_playerLeaves takes nothing returns nothing
    set gg_trg_playerLeaves = CreateTrigger(  )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(1) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(2) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(3) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(4) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(5) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(6) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(7) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(8) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(9) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(10) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(11) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(12) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(13) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(14) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(15) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(16) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(17) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(18) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(19) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(20) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(21) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(22) )
    call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(23) )
    //call TriggerRegisterPlayerEventLeave( gg_trg_playerLeaves, ConvertedPlayer(24) )
    call TriggerAddAction( gg_trg_playerLeaves, function Trig_playerLeaves_Actions )
endfunction

 
removeUnits
  Events
  Conditions
  Actions
    Set VariableSet tempGroup = (Units owned by (Triggering player).)
    Unit Group - Pick every unit in tempGroup and do (Actions)
      Loop - Actions
        Unit - Remove (Picked unit) from the game
    Custom script: call DestroyGroup(udg_tempGroup)
woodUpgrade
  Events
    Unit - A unit Finishes research
  Conditions
    (Researched tech-type) Equal to R000 (techcode)
  Actions
    Multiboard - Set the text for (Last created multiboard) item in column 3, row leaderboardPos[(Player number of (Owner of (Researching unit)))] to (String((startingIncomeArr[(Player number of (Owner of (Researching unit)))] + (Current research level of R000 (techcode) for (Owner of (Researching unit))))))
leaderboard
  Events
    Time - Elapsed game time is 10.00 seconds
  Conditions
  Actions
    Set VariableSet tempInt = 1
    Multiboard - Create a multiboard with 3 columns and ((Number of players in players) + 1) rows, titled Player Score.
    Multiboard - Set the width for (Last created multiboard) item in column 1, row tempInt to 12.00% of the total screen width
    Multiboard - Set the width for (Last created multiboard) item in column 2, row tempInt to 5.00% of the total screen width
    Multiboard - Set the width for (Last created multiboard) item in column 3, row tempInt to 5.00% of the total screen width
    Multiboard - Set the display style for (Last created multiboard) item in column 1, row tempInt to Show text and Hide icons
    Multiboard - Set the display style for (Last created multiboard) item in column 2, row tempInt to Show text and Hide icons
    Multiboard - Set the display style for (Last created multiboard) item in column 3, row tempInt to Show text and Hide icons
    Multiboard - Set the text for (Last created multiboard) item in column 1, row tempInt to Player
    Multiboard - Set the text for (Last created multiboard) item in column 2, row tempInt to Kills
    Multiboard - Set the text for (Last created multiboard) item in column 3, row tempInt to Income
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        Set VariableSet tempInt = (tempInt + 1)
        Set VariableSet leaderboardPos[(Player number of (Picked player))] = tempInt
        Multiboard - Set the display style for (Last created multiboard) item in column 1, row tempInt to Show text and Hide icons
        Multiboard - Set the display style for (Last created multiboard) item in column 2, row tempInt to Show text and Show icons
        Multiboard - Set the display style for (Last created multiboard) item in column 3, row tempInt to Show text and Show icons
        Multiboard - Set the width for (Last created multiboard) item in column 1, row tempInt to 12.00% of the total screen width
        Multiboard - Set the width for (Last created multiboard) item in column 2, row tempInt to 5.00% of the total screen width
        Multiboard - Set the width for (Last created multiboard) item in column 3, row tempInt to 5.00% of the total screen width
        Multiboard - Set the icon for (Last created multiboard) item in column 2, row tempInt to ReplaceableTextures\CommandButtons\BTNSacrifice.blp
        Multiboard - Set the icon for (Last created multiboard) item in column 3, row tempInt to ReplaceableTextures\CommandButtons\BTNHumanLumberUpgrade1.blp
        Multiboard - Set the text for (Last created multiboard) item in column 1, row tempInt to (Name of (Picked player))
        Multiboard - Set the text for (Last created multiboard) item in column 2, row tempInt to (String(kills[(Player number of (Picked player))]))
        Multiboard - Set the text for (Last created multiboard) item in column 3, row tempInt to (String((startingIncomeArr[(Player number of (Picked player))] + (Current research level of R000 (techcode) for (Picked player)))))
    Multiboard - Show (Last created multiboard)
revive
  Events
    Unit - A unit Finishes reviving
  Conditions
    (Unit-type of (Reviving Hero)) Equal to Paladin
  Actions
    Set VariableSet paladins[(Player number of (Owner of (Reviving Hero)))] = (Reviving Hero)
    Camera - Pan camera for (Owner of (Reviving Hero)) to (Position of (Reviving Hero)) over 0 seconds
    Selection - Select (Reviving Hero) for (Owner of (Reviving Hero))
    Unit Group - Add (Reviving Hero) to paladinGroup
    Set VariableSet tempGroup = (Units owned by (Owner of (Reviving Hero)) of type Spirit)
    Unit Group - Pick every unit in tempGroup and do (Actions)
      Loop - Actions
        Unit - Remove (Picked unit) from the game
    Custom script: call DestroyGroup(udg_tempGroup)
    Multiboard - Set the text for (Last created multiboard) item in column 1, row leaderboardPos[(Player number of (Owner of (Reviving Hero)))] to ((Name of (Owner of (Reviving Hero))) + )
    Game - Display to players for 5.00 seconds the text: ((Name of (Owner of (Reviving Hero))) + has revived his paladin champion! FIGHT ON!)
sacrificeGhoul
  Events
    Unit - A unit Finishes casting an ability
  Conditions
    (Ability being cast) Equal to Sacrifical Pawn (wisp)
  Actions
    Player - Add 50 to (Owner of (Casting unit)).Current gold
spawnTome
  Events
    Time - Every 2.50 seconds of game time
  Conditions
  Actions
    Set VariableSet tempInt = (Number of players in players)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (roundNumber mod 10) Equal to 0
      Then - Actions
        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
                (Random integer number between tempInt and 35) Equal to 34
              Then - Actions
                Set VariableSet tempPoint = (Random point in fightArea <gen>)
                Item - Create Rune of Restoration at tempPoint
                Custom script: call RemoveLocation(udg_tempPoint)
              Else - Actions
      Else - Actions
        For each (Integer A) from 1 to 2, do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Random integer number between tempInt and 35) Equal to 34
              Then - Actions
                Set VariableSet tempPoint = (Random point in fightArea <gen>)
                Item - Create Rune of Restoration at tempPoint
                Custom script: call RemoveLocation(udg_tempPoint)
              Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Random integer number between tempInt and 80) Equal to 79
      Then - Actions
        Set VariableSet tempPoint = (Random point in fightArea <gen>)
        Item - Create Manual of Health +100 at tempPoint
        Custom script: call RemoveLocation(udg_tempPoint)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Random integer number between tempInt and 80) Equal to 79
      Then - Actions
        Set VariableSet tempPoint = (Random point in fightArea <gen>)
        Item - Create Tome of Damage +5 at tempPoint
        Custom script: call RemoveLocation(udg_tempPoint)
      Else - Actions
randomItem
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to ???
  Actions
    Set VariableSet tempPlayers = (Player group((Owner of (Buying unit))))
    Set VariableSet tempInt = (Random integer number between 0 and 15)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        tempInt Equal to 0
      Then - Actions
        Game - Display to players for 5.00 seconds the text: (The greed of + ((Name of (Owner of (Buying unit))) + has made the enemy stronger! Lumber for all but him!))
        Player Group - Pick every player in players and do (Actions)
          Loop - Actions
            Player - Set (Picked player).Current lumber to (((Picked player) Current lumber) + 3)
        Player - Set (Owner of (Buying unit)).Current lumber to (((Owner of (Buying unit)) Current lumber) - 3)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        tempInt Equal to 1
      Then - Actions
        Player - Set (Owner of (Buying unit)).Current gold to (((Owner of (Buying unit)) Current gold) + 750)
        Game - Display to tempPlayers for 5.00 seconds the text: You have gained +750 Gold!
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        tempInt Equal to 2
      Then - Actions
        Player - Set (Owner of (Buying unit)).Current gold to (((Owner of (Buying unit)) Current gold) + 1000)
        Game - Display to tempPlayers for 5.00 seconds the text: You have gained +1000 Gold!
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        tempInt Equal to 3
      Then - Actions
        Player - Set (Owner of (Buying unit)).Current lumber to (((Owner of (Buying unit)) Current lumber) + 4)
        Game - Display to tempPlayers for 5.00 seconds the text: You have gained +4 Lumber!
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        tempInt Equal to 4
      Then - Actions
        Player - Set (Owner of (Buying unit)).Current lumber to (((Owner of (Buying unit)) Current lumber) + 8)
        Game - Display to tempPlayers for 5.00 seconds the text: You have gained +8 Lumber!
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        tempInt Equal to 5
      Then - Actions
        Set VariableSet tempPoint = (Random point in heroSpawn <gen>)
        Unit - Create 5.Archer for (Owner of (Buying unit)) at tempPoint facing Default building facing degrees
        Custom script: call RemoveLocation(udg_tempPoint)
        Game - Display to tempPlayers for 5.00 seconds the text: You have gained +5 Archers!
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        tempInt Equal to 6
      Then - Actions
        Set VariableSet tempPoint = (Random point in heroSpawn <gen>)
        Unit - Create 5.Footman for (Owner of (Buying unit)) at tempPoint facing Default building facing degrees
        Custom script: call RemoveLocation(udg_tempPoint)
        Game - Display to tempPlayers for 5.00 seconds the text: You have gained +5 Footmen!
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        tempInt Equal to 7
      Then - Actions
        Hero - Create Blood Heart and give it to (Buying unit)
        Game - Display to tempPlayers for 5.00 seconds the text: You have an ahnk of reincarnation!
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        tempInt Equal to 8
      Then - Actions
        Hero - Create Tome of Stupidity and give it to (Buying unit)
        Game - Display to tempPlayers for 5.00 seconds the text: You have gained a Level!
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        tempInt Equal to 9
      Then - Actions
        Hero - Create Scroll of Chaos and give it to (Buying unit)
        Game - Display to tempPlayers for 5.00 seconds the text: You have gained a scroll of chaos!
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        tempInt Equal to 10
      Then - Actions
        Hero - Create Rod of Necromancy and give it to (Buying unit)
        Game - Display to tempPlayers for 5.00 seconds the text: You have gained a wand of necromancy! Summon Skeletons at will!
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        tempInt Equal to 11
      Then - Actions
        Game - Display to players for 5.00 seconds the text: |cffffcc00~~~~~|r|cff995500DROP PARTY!!!!!!!!|r|cffffcc00~~~~~|r
        Sound - Play SecretFound <gen>
        For each (Integer A) from 1 to 10, do (Actions)
          Loop - Actions
            Set VariableSet tempPoint = (Random point in fightArea <gen>)
            Item - Create Gold Coins at tempPoint
            Custom script: call RemoveLocation(udg_tempPoint)
        For each (Integer A) from 1 to 5, do (Actions)
          Loop - Actions
            Set VariableSet tempPoint = (Random point in fightArea <gen>)
            Item - Create Bundle of Lumber at tempPoint
            Custom script: call RemoveLocation(udg_tempPoint)
        For each (Integer A) from 1 to 2, do (Actions)
          Loop - Actions
            Set VariableSet tempPoint = (Random point in fightArea <gen>)
            Item - Create Tome of Damage +5 at tempPoint
            Custom script: call RemoveLocation(udg_tempPoint)
        For each (Integer A) from 1 to 2, do (Actions)
          Loop - Actions
            Set VariableSet tempPoint = (Random point in fightArea <gen>)
            Item - Create Manual of Health +100 at tempPoint
            Custom script: call RemoveLocation(udg_tempPoint)
        For each (Integer A) from 1 to 3, do (Actions)
          Loop - Actions
            Set VariableSet tempPoint = (Random point in fightArea <gen>)
            Item - Create Potion of Healing at tempPoint
            Custom script: call RemoveLocation(udg_tempPoint)
        For each (Integer A) from 1 to 2, do (Actions)
          Loop - Actions
            Set VariableSet tempPoint = (Random point in fightArea <gen>)
            Item - Create Potion of Mana at tempPoint
            Custom script: call RemoveLocation(udg_tempPoint)
        For each (Integer A) from 1 to 5, do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Random integer number between 1 and 20) Equal to 1
              Then - Actions
                Set VariableSet tempPoint = (Random point in fightArea <gen>)
                Item - Create Mask of Death at tempPoint
                Custom script: call RemoveLocation(udg_tempPoint)
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Random integer number between 1 and 15) Equal to 1
              Then - Actions
                Set VariableSet tempPoint = (Random point in fightArea <gen>)
                Item - Create Axe of Damage at tempPoint
                Custom script: call RemoveLocation(udg_tempPoint)
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Random integer number between 1 and 18) Equal to 1
              Then - Actions
                Set VariableSet tempPoint = (Random point in fightArea <gen>)
                Item - Create Cloak of Flames at tempPoint
                Custom script: call RemoveLocation(udg_tempPoint)
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Random integer number between 1 and 14) Equal to 1
              Then - Actions
                Item - Create Gloves of Haste at tempPoint
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Random integer number between 1 and 10) Equal to 1
              Then - Actions
                Set VariableSet tempPoint = (Random point in fightArea <gen>)
                Item - Create Gem of Life at tempPoint
                Custom script: call RemoveLocation(udg_tempPoint)
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Random integer number between 1 and 8) Equal to 1
              Then - Actions
                Set VariableSet tempPoint = (Random point in fightArea <gen>)
                Item - Create Ring of Protection at tempPoint
                Custom script: call RemoveLocation(udg_tempPoint)
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Random integer number between 1 and 5) Equal to 1
              Then - Actions
                Set VariableSet tempPoint = (Random point in fightArea <gen>)
                Item - Create Boots of Speed at tempPoint
                Custom script: call RemoveLocation(udg_tempPoint)
              Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        tempInt Equal to 12
      Then - Actions
        Hero - Create Potion of Restoration and give it to (Buying unit)
        Game - Display to tempPlayers for 5.00 seconds the text: You have gained a potion of restoration!
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        tempInt Equal to 13
      Then - Actions
        Hero - Create Potion of Invulnerability and give it to (Buying unit)
        Game - Display to tempPlayers for 5.00 seconds the text: You have gained a potion of invulnerability!
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (roundNumber mod 10) Not equal to 0
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            tempInt Equal to 14
          Then - Actions
            Game - Display to players for 5.00 seconds the text: (The greed of + ((Name of (Owner of (Buying unit))) + has summoned the ghouls! HAHAHAHA!))
            Trigger - Run spawnNeutralGhouls <gen> (ignoring conditions)
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            tempInt Equal to 15
          Then - Actions
            Game - Display to players for 5.00 seconds the text: ( + ((Name of (Owner of (Buying unit))) + has summoned the sheep...))
            Set VariableSet sheepRound = True
          Else - Actions
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Or - Any (Conditions) are true
              Conditions
                tempInt Equal to 14
                tempInt Equal to 15
          Then - Actions
            Hero - Create Potion of Invulnerability and give it to (Buying unit)
            Game - Display to tempPlayers for 5.00 seconds the text: You have gained a potion of invulnerability!
          Else - Actions
    Custom script: call DestroyForce(udg_tempPlayers)
bootsOfTheMonkey
  Events
    Unit - A unit Acquires an item
  Conditions
    Or - Any (Conditions) are true
      Conditions
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Boots of Speed
            ((Hero manipulating item) has an item of type Gloves of Haste) Equal to True
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Gloves of Haste
            ((Hero manipulating item) has an item of type Boots of Speed) Equal to True
  Actions
    Item - Remove (Item carried by (Hero manipulating item) of type Boots of Speed)
    Item - Remove (Item carried by (Hero manipulating item) of type Gloves of Haste)
    Hero - Create Boots of the Monkey and give it to (Hero manipulating item)
    Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: Your items have combined to create |c0096FF96Boots of the Monkey|r
clawsOfTheVampire
  Events
    Unit - A unit Acquires an item
  Conditions
    Or - Any (Conditions) are true
      Conditions
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Axe of Damage
            ((Hero manipulating item) has an item of type Mask of Death) Equal to True
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Mask of Death
            ((Hero manipulating item) has an item of type Axe of Damage) Equal to True
  Actions
    Item - Remove (Item carried by (Hero manipulating item) of type Mask of Death)
    Item - Remove (Item carried by (Hero manipulating item) of type Axe of Damage)
    Hero - Create Claws of the Vampire and give it to (Hero manipulating item)
    Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: Your items have combined to create |c00640000Claws of the Vampire!|r
stoneOfFlames
  Events
    Unit - A unit Acquires an item
  Conditions
    Or - Any (Conditions) are true
      Conditions
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Gem of Life
            ((Hero manipulating item) has an item of type Cloak of Flames) Equal to True
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Cloak of Flames
            ((Hero manipulating item) has an item of type Gem of Life) Equal to True
  Actions
    Item - Remove (Item carried by (Hero manipulating item) of type Gem of Life)
    Item - Remove (Item carried by (Hero manipulating item) of type Cloak of Flames)
    Hero - Create Stone of Flames and give it to (Hero manipulating item)
    Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: Your items have combined to create a |cffff0000Stone of Flames!|r
ringOfFaith
  Events
    Unit - A unit Acquires an item
  Conditions
    Or - Any (Conditions) are true
      Conditions
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Ring of Protection
            ((Hero manipulating item) has an item of type Potion of Restoration) Equal to True
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Potion of Restoration
            ((Hero manipulating item) has an item of type Ring of Protection) Equal to True
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Ring of Protection
            ((Hero manipulating item) has an item of type Potion of Invulnerability) Equal to True
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Potion of Invulnerability
            ((Hero manipulating item) has an item of type Ring of Protection) Equal to True
  Actions
    Item - Remove (Item carried by (Hero manipulating item) of type Ring of Protection)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Hero manipulating item) has an item of type Potion of Invulnerability) Equal to True
      Then - Actions
        Item - Remove (Item carried by (Hero manipulating item) of type Potion of Invulnerability)
      Else - Actions
        Item - Remove (Item carried by (Hero manipulating item) of type Potion of Restoration)
    Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: Your items have combined to create a |c00ffffffStone of Faith!|r
    Hero - Create Ring of Faith and give it to (Hero manipulating item)
bracersOfTheRebel
  Events
    Unit - A unit Acquires an item
  Conditions
    Or - Any (Conditions) are true
      Conditions
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Ring of Protection
            ((Hero manipulating item) has an item of type Boots of the Monkey) Equal to True
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Boots of the Monkey
            ((Hero manipulating item) has an item of type Ring of Protection) Equal to True
  Actions
    Item - Remove (Item carried by (Hero manipulating item) of type Boots of the Monkey)
    Item - Remove (Item carried by (Hero manipulating item) of type Ring of Protection)
    Hero - Create Bracers of the Rebel and give it to (Hero manipulating item)
    Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: Your items have combined to create a |c00FF7F00Bracers of the Rebel!|r
maskOfTheSage
  Events
    Unit - A unit Acquires an item
  Conditions
    Or - Any (Conditions) are true
      Conditions
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Gem of Life
            ((Hero manipulating item) has an item of type Book of Learning) Equal to True
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Book of Learning
            ((Hero manipulating item) has an item of type Gem of Life) Equal to True
  Actions
    Item - Remove (Item carried by (Hero manipulating item) of type Gem of Life)
    Item - Remove (Item carried by (Hero manipulating item) of type Book of Learning)
    Hero - Create Mask of the Sage and give it to (Hero manipulating item)
    Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: Your items have combined to create a |c006060F0Mask of the Sage!|r
axeOfMurderousWoodcutting
  Events
    Unit - A unit Acquires an item
  Conditions
    Or - Any (Conditions) are true
      Conditions
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Axe of Damage
            ((Hero manipulating item) has an item of type Book of Learning) Equal to True
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Book of Learning
            ((Hero manipulating item) has an item of type Axe of Damage) Equal to True
  Actions
    Item - Remove (Item carried by (Hero manipulating item) of type Axe of Damage)
    Item - Remove (Item carried by (Hero manipulating item) of type Book of Learning)
    Hero - Create Axe of Murderous Woodcutting and give it to (Hero manipulating item)
    Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: Your items have combined to create a |c00FF0000Axe of Murderous|r|c00006400Woodcutting!|r
stoneOfLuck
  Events
    Unit - A unit Acquires an item
  Conditions
    Or - Any (Conditions) are true
      Conditions
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Ring of Protection
            ((Hero manipulating item) has an item of type Book of Learning) Equal to True
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Book of Learning
            ((Hero manipulating item) has an item of type Ring of Protection) Equal to True
  Actions
    Item - Remove (Item carried by (Hero manipulating item) of type Ring of Protection)
    Item - Remove (Item carried by (Hero manipulating item) of type Book of Learning)
    Hero - Create Stone of Luck and give it to (Hero manipulating item)
    Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: Your items have combined to create a |c00FFFF00Stone of Luck!|r
stoneOfTheVoid
  Events
    Unit - A unit Acquires an item
  Conditions
    Or - Any (Conditions) are true
      Conditions
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Stone of Flames
            ((Hero manipulating item) has an item of type Stone of Luck) Equal to True
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Stone of Luck
            ((Hero manipulating item) has an item of type Stone of Flames) Equal to True
  Actions
    Item - Remove (Item carried by (Hero manipulating item) of type Stone of Flames)
    Item - Remove (Item carried by (Hero manipulating item) of type Stone of Luck)
    Hero - Create Stone of the Void and give it to (Hero manipulating item)
    Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: Your items have combined to create a |c00AA00AAStone of the Void!|r
bootsOfTime
  Events
    Unit - A unit Acquires an item
  Conditions
    Or - Any (Conditions) are true
      Conditions
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Boots of Speed
            ((Hero manipulating item) has an item of type Book of Learning) Equal to True
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Book of Learning
            ((Hero manipulating item) has an item of type Boots of Speed) Equal to True
  Actions
    Item - Remove (Item carried by (Hero manipulating item) of type Boots of Speed)
    Item - Remove (Item carried by (Hero manipulating item) of type Book of Learning)
    Hero - Create Boots of Time and give it to (Hero manipulating item)
    Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: Your items have combined to create a |c00A5A5A5Boots of Time!|r
hoodOfTheRogue
  Events
    Unit - A unit Acquires an item
  Conditions
    Or - Any (Conditions) are true
      Conditions
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Hood of the Rogue
            ((Hero manipulating item) has an item of type Book of Learning) Equal to True
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Book of Learning
            ((Hero manipulating item) has an item of type Hood of the Rogue) Equal to True
  Actions
    Item - Remove (Item carried by (Hero manipulating item) of type Hood of the Rogue)
    Item - Remove (Item carried by (Hero manipulating item) of type Book of Learning)
    Hero - Create Shadowed Hood of the Rogue and give it to (Hero manipulating item)
    Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: Your items have combined to create a |c00555555Shadowed Hood of The Rogue!|r
blessedStaff
  Events
    Unit - A unit Acquires an item
  Conditions
    Or - Any (Conditions) are true
      Conditions
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Blessed Staff
            ((Hero manipulating item) has an item of type Book of Learning) Equal to True
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Book of Learning
            ((Hero manipulating item) has an item of type Blessed Staff) Equal to True
  Actions
    Item - Remove (Item carried by (Hero manipulating item) of type Blessed Staff)
    Item - Remove (Item carried by (Hero manipulating item) of type Book of Learning)
    Hero - Create Blessed Staff of the White Wizard and give it to (Hero manipulating item)
    Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: Your items have combined to create a |c00FFFF00Blessed Staff of the White Wizard!|r
powerGloves
  Events
    Unit - A unit Acquires an item
  Conditions
    Or - Any (Conditions) are true
      Conditions
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Power Gloves
            ((Hero manipulating item) has an item of type Book of Learning) Equal to True
        And - All (Conditions) are true
          Conditions
            (Item-type of (Item being manipulated)) Equal to Book of Learning
            ((Hero manipulating item) has an item of type Power Gloves) Equal to True
  Actions
    Item - Remove (Item carried by (Hero manipulating item) of type Power Gloves)
    Item - Remove (Item carried by (Hero manipulating item) of type Book of Learning)
    Hero - Create Power Gloves Mark II and give it to (Hero manipulating item)
    Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: Your items have combined to create a |c00FAAF87Power Gloves Mark II!|r
tomeOfMana
  Events
    Unit - A unit Acquires an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Power Orb Level +1
  Actions
    Unit - Increase level of Power Orb for (Hero manipulating item)
shieldOfValor
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Shield of Valor
  Actions
    Set VariableSet startingIncomeArr[(Player number of (Owner of (Buying unit)))] = 1
    Multiboard - Set the text for (Last created multiboard) item in column 3, row leaderboardPos[(Player number of (Owner of (Buying unit)))] to (String((startingIncomeArr[(Player number of (Owner of (Buying unit)))] + (Current research level of R000 (techcode) for (Owner of (Buying unit))))))
turtlersShield
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Turtlers Shield
  Actions
    Set VariableSet startingIncomeArr[(Player number of (Owner of (Buying unit)))] = 1
    Multiboard - Set the text for (Last created multiboard) item in column 3, row leaderboardPos[(Player number of (Owner of (Buying unit)))] to (String((startingIncomeArr[(Player number of (Owner of (Buying unit)))] + (Current research level of R000 (techcode) for (Owner of (Buying unit))))))
    Player - Set the current research level of Rucr (techcode) to 3 for (Owner of (Buying unit))
heartOfLife
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Heart of Life
  Actions
    Set VariableSet startingIncomeArr[(Player number of (Owner of (Buying unit)))] = 0
    Multiboard - Set the text for (Last created multiboard) item in column 3, row leaderboardPos[(Player number of (Owner of (Buying unit)))] to (String((startingIncomeArr[(Player number of (Owner of (Buying unit)))] + (Current research level of R000 (techcode) for (Owner of (Buying unit))))))
    Player - Set the current research level of Ruar (techcode) to 3 for (Owner of (Buying unit))
theFrog
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to The Frog
  Actions
    Set VariableSet startingIncomeArr[(Player number of (Owner of (Buying unit)))] = 1
    Multiboard - Set the text for (Last created multiboard) item in column 3, row leaderboardPos[(Player number of (Owner of (Buying unit)))] to (String((startingIncomeArr[(Player number of (Owner of (Buying unit)))] + (Current research level of R000 (techcode) for (Owner of (Buying unit))))))
    Player - Set the current research level of R008 (techcode) to 1 for (Owner of (Buying unit))
luckyCheese
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Lucky Cheese
  Actions
    Set VariableSet startingIncomeArr[(Player number of (Owner of (Buying unit)))] = 1
    Multiboard - Set the text for (Last created multiboard) item in column 3, row leaderboardPos[(Player number of (Owner of (Buying unit)))] to (String((startingIncomeArr[(Player number of (Owner of (Buying unit)))] + (Current research level of R000 (techcode) for (Owner of (Buying unit))))))
    Player - Add 250 to (Owner of (Buying unit)).Current gold
theLumberjack
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to The Lumberjack
  Actions
    Set VariableSet startingIncomeArr[(Player number of (Owner of (Buying unit)))] = 5
    Unit - Set Max HP of (Buying unit) to ((Max HP of (Buying unit)) / 2)
    Multiboard - Set the text for (Last created multiboard) item in column 3, row leaderboardPos[(Player number of (Owner of (Buying unit)))] to (String((startingIncomeArr[(Player number of (Owner of (Buying unit)))] + (Current research level of R000 (techcode) for (Owner of (Buying unit))))))
theChicken
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to The Chicken
  Actions
    Set VariableSet startingIncomeArr[(Player number of (Owner of (Buying unit)))] = 1
    Unit - Set Max HP of (Buying unit) to ((Max HP of (Buying unit)) / 7)
    Multiboard - Set the text for (Last created multiboard) item in column 3, row leaderboardPos[(Player number of (Owner of (Buying unit)))] to (String((startingIncomeArr[(Player number of (Owner of (Buying unit)))] + (Current research level of R000 (techcode) for (Owner of (Buying unit))))))
swordOfSorrow
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Sword of Sorrow
  Actions
    Set VariableSet startingIncomeArr[(Player number of (Owner of (Buying unit)))] = 2
    Multiboard - Set the text for (Last created multiboard) item in column 3, row leaderboardPos[(Player number of (Owner of (Buying unit)))] to (String((startingIncomeArr[(Player number of (Owner of (Buying unit)))] + (Current research level of R000 (techcode) for (Owner of (Buying unit))))))
swordOfChaos
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Sword of Chaos
  Actions
    Set VariableSet startingIncomeArr[(Player number of (Owner of (Buying unit)))] = 3
    Multiboard - Set the text for (Last created multiboard) item in column 3, row leaderboardPos[(Player number of (Owner of (Buying unit)))] to (String((startingIncomeArr[(Player number of (Owner of (Buying unit)))] + (Current research level of R000 (techcode) for (Owner of (Buying unit))))))
balbogsGambit
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Balbogs Gambit
  Actions
    Set VariableSet startingIncomeArr[(Player number of (Owner of (Buying unit)))] = (Random integer number between 1 and 4)
    Multiboard - Set the text for (Last created multiboard) item in column 3, row leaderboardPos[(Player number of (Owner of (Buying unit)))] to (String((startingIncomeArr[(Player number of (Owner of (Buying unit)))] + (Current research level of R000 (techcode) for (Owner of (Buying unit))))))
nondescriptStick
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Nondescript Stick
  Actions
    Set VariableSet startingIncomeArr[(Player number of (Owner of (Buying unit)))] = 1
    Multiboard - Set the text for (Last created multiboard) item in column 3, row leaderboardPos[(Player number of (Owner of (Buying unit)))] to (String((startingIncomeArr[(Player number of (Owner of (Buying unit)))] + (Current research level of R000 (techcode) for (Owner of (Buying unit))))))
urnOfTheUnderdead
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Urn of the Underdead
  Actions
    Set VariableSet startingIncomeArr[(Player number of (Owner of (Buying unit)))] = 1
    Multiboard - Set the text for (Last created multiboard) item in column 3, row leaderboardPos[(Player number of (Owner of (Buying unit)))] to (String((startingIncomeArr[(Player number of (Owner of (Buying unit)))] + (Current research level of R000 (techcode) for (Owner of (Buying unit))))))
deathStick
  Events
  Conditions
  Actions
    Unit Group - Pick every unit in paladinGroup and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Item carried by (Picked unit) of type Nondescript Stick) is owned) Equal to True
          Then - Actions
            Item - Remove (Item carried by (Picked unit) of type Nondescript Stick)
            Hero - Create Death Stick and give it to (Picked unit)
          Else - Actions
doomStick
  Events
  Conditions
  Actions
    Unit Group - Pick every unit in paladinGroup and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Item carried by (Picked unit) of type Death Stick) is owned) Equal to True
          Then - Actions
            Item - Remove (Item carried by (Picked unit) of type Death Stick)
            Hero - Create Ultimate Doom Stick and give it to (Picked unit)
          Else - Actions
luckyCheeseIncome
  Events
  Conditions
  Actions
    Unit Group - Pick every unit in paladinGroup and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Item carried by (Picked unit) of type Lucky Cheese) is owned) Equal to True
          Then - Actions
            Hero - Create Income and give it to (Picked unit)
          Else - Actions
urnOfTheUnderdeadAbility
  Events
    Unit - A unit Dies
  Conditions
    ((Item carried by (Killing unit) of type Urn of the Underdead) is owned) Equal to True
  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 5
      Then - Actions
        Set VariableSet tempUnit = (Dying unit)
        Set VariableSet tempPoint = (Position of tempUnit)
        Set VariableSet tempPoint2 = (tempPoint offset by ((Random real number between -25.00 and 25.00), (Random real number between -25.00 and 25.00)))
        Unit - Create 1.Skeleton Warrior (urn) for (Owner of (Killing unit)) at tempPoint2 facing Default building facing degrees
        Custom script: call RemoveLocation(udg_tempPoint2)
        Custom script: call RemoveLocation (udg_tempPoint)
      Else - Actions
frogUpgrade
  Events
  Conditions
  Actions
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (paladins[(Player number of (Picked player))] has an item of type The Frog) Equal to True
          Then - Actions
            Player - Set the current research level of R008 (techcode) to ((Current research level of R008 (techcode) for (Picked player)) + 1) for (Picked player)
          Else - Actions
bookOfLearningAdd
  Events
    Unit - A unit Acquires an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Book of Learning
  Actions
    Hero - Make (Owner of (Hero manipulating item)) Heroes gain (((Owner of (Hero manipulating item)) experience rate) + 20.00)% experience from future kills
bookOfLearningRemove
  Events
    Unit - A unit Loses an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Book of Learning
  Actions
    Hero - Make (Owner of (Hero manipulating item)) Heroes gain (((Owner of (Hero manipulating item)) experience rate) - 20.00)% experience from future kills
maskOfTheSageAbility
  Events
    Unit - A unit Gains a level
  Conditions
    ((Item carried by (Leveling Hero) of type Mask of the Sage) is owned) Equal to True
  Actions
    Hero - Modify Agility of (Leveling Hero): Add 1.
    Hero - Modify Intelligence of (Leveling Hero): Add 1.
blessedStaffOfTheWhiteWizard
  Events
    Unit - A unit Gains a level
  Conditions
    ((Item carried by (Leveling Hero) of type Blessed Staff of the White Wizard) is owned) Equal to True
  Actions
    Hero - Modify Intelligence of (Leveling Hero): Add 1.
powerGlovesMark2
  Events
    Unit - A unit Gains a level
  Conditions
    ((Item carried by (Leveling Hero) of type Power Gloves Mark II) is owned) Equal to True
  Actions
    Hero - Modify Strength of (Leveling Hero): Add 1.
shadowedHoodOfTheRogue
  Events
    Unit - A unit Gains a level
  Conditions
    ((Item carried by (Leveling Hero) of type Shadowed Hood of the Rogue) is owned) Equal to True
  Actions
    Hero - Modify Agility of (Leveling Hero): Add 1.
tomeOfStupidity
  Events
    Unit - A unit Gains a level
  Conditions
    ((Item carried by (Leveling Hero) of type Tome of Stupidity) is owned) Equal to True
  Actions
    Hero - Modify Intelligence of (Leveling Hero): Subtract 1.
    Hero - Modify Strength of (Leveling Hero): Add 3.
axeOfMurderousWoodcuttingAbility
  Events
    Unit - A unit Dies
  Conditions
    ((Item carried by (Killing unit) of type Axe of Murderous Woodcutting) is owned) Equal to True
  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 5
      Then - Actions
        Set VariableSet tempUnit = (Dying unit)
        Set VariableSet tempPoint = (Position of tempUnit)
        Set VariableSet tempPoint2 = (tempPoint offset by ((Random real number between -25.00 and 25.00), (Random real number between -25.00 and 25.00)))
        Item - Create Bundle of Lumber at tempPoint2
        Custom script: call RemoveLocation(udg_tempPoint2)
        Custom script: call RemoveLocation (udg_tempPoint)
      Else - Actions
stoneOfLuckAbility
  Events
    Unit - A unit Dies
  Conditions
    ((Item carried by (Killing unit) of type Stone of Luck) is owned) Equal to True
  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 5
      Then - Actions
        Set VariableSet tempUnit = (Dying unit)
        Set VariableSet tempPoint = (Position of tempUnit)
        Set VariableSet tempPoint2 = (tempPoint offset by ((Random real number between -25.00 and 25.00), (Random real number between -25.00 and 25.00)))
        Item - Create Gold Coins at tempPoint2
        Custom script: call RemoveLocation(udg_tempPoint2)
        Custom script: call RemoveLocation (udg_tempPoint)
      Else - Actions
bootsOfTimeAdd
  Events
    Unit - A unit Acquires an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Boots of Time
  Actions
    Unit - Remove Time Jump from (Hero manipulating item)
    Unit - Add Greater Timer Jump to (Hero manipulating item)
bootsOfTimeRemove
  Events
    Unit - A unit Loses an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Boots of Time
  Actions
    Unit - Remove Greater Timer Jump from (Hero manipulating item)
    Unit - Add Time Jump to (Hero manipulating item)
stopBuyoutR10
  Events
    Unit - A unit Begins research
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (roundNumber mod 10) Equal to 0
        ((roundNumber + 1) mod 10) Equal to 0
        ((roundNumber - 1) mod 10) Equal to 0
    (Researched tech-type) Equal to R002 (techcode)
  Actions
    Set VariableSet tempPlayers = (Player group((Owner of (Researching unit))))
    Set VariableSet tempUnit = (Researching unit)
    Custom script: call IssueImmediateOrderById (udg_tempUnit, 851976)
    Game - Display to tempPlayers for 5.00 seconds the text: You cannot buyout the 9th, 10th or 11th round.
    Custom script: call DestroyForce(udg_tempPlayers)
stopBuyout
  Events
    Unit - A unit Begins research
  Conditions
    (Researched tech-type) Equal to R002 (techcode)
    boughtOut Equal to True
  Actions
    Set VariableSet tempPlayers = (Player group((Owner of (Researching unit))))
    Set VariableSet tempUnit = (Researching unit)
    Custom script: call IssueImmediateOrderById (udg_tempUnit, 851976)
    Game - Display to tempPlayers for 5.00 seconds the text: The round has already been bought out.
    Custom script: call DestroyForce(udg_tempPlayers)
roundBuyout
  Events
    Unit - A unit Finishes research
  Conditions
    (Researched tech-type) Equal to R002 (techcode)
    boughtOut Equal to False
  Actions
    Game - Display to players for 5.00 seconds the text: (The round has been bought out buy + ((Name of (Owner of (Researching unit))) + only his ghouls will spawn this round!))
    Set VariableSet boughtOut = True
    Set VariableSet boughtOutPlayer = (Owner of (Researching unit))
    Player - Set boughtOutPlayer handicap to (100.00 + (100.00 x (((Real((Number of players in players))) - 1) x 1.00)))%
upgradeGhoulItem
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Upgrade Ghouls
  Actions
    Selection - Select upgraders[(Player number of (Owner of (Buying unit)))] for (Owner of (Buying unit))
buyWood
  Events
    Unit - A unit Finishes research
  Conditions
    (Researched tech-type) Equal to R001 (techcode)
  Actions
    Player - Add 1 to (Owner of (Researching unit)).Current lumber
forceUpgradeGhouls
  Events
  Conditions
  Actions
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            roundNumber Equal to 10
            ghoulType[(Player number of (Picked player))] Equal to Ghoul
          Then - Actions
            Set VariableSet ghoulType[(Player number of (Picked player))] = Foul Ghoul
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            roundNumber Equal to 20
            ghoulType[(Player number of (Picked player))] Equal to Foul Ghoul
          Then - Actions
            Set VariableSet ghoulType[(Player number of (Picked player))] = Defiled Ghoul
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            roundNumber Equal to 20
            ghoulType[(Player number of (Picked player))] Equal to Vicious Ghoul
          Then - Actions
            Set VariableSet ghoulType[(Player number of (Picked player))] = Atrocious Ghoul
          Else - Actions
viciousGhoul
  Events
    Unit - A unit Finishes research
  Conditions
    (Researched tech-type) Equal to R004 (techcode)
    (Current research level of R004 (techcode) for (Owner of (Researching unit))) Equal to 1
  Actions
    Set VariableSet ghoulType[(Player number of (Owner of (Researching unit)))] = Vicious Ghoul
    Game - Display to players the text: ((Name of (Owner of (Researching unit))) + has evolved his ghouls to |c007d7d7dVicious Ghouls|r)
    Sound - Play Warning <gen>
hellishGhoul
  Events
    Unit - A unit Finishes research
  Conditions
    (Researched tech-type) Equal to R004 (techcode)
    (Current research level of R004 (techcode) for (Owner of (Researching unit))) Equal to 2
  Actions
    Set VariableSet ghoulType[(Player number of (Owner of (Researching unit)))] = Hellsh Ghoul
    Game - Display to players the text: ((Name of (Owner of (Researching unit))) + has evolved his ghouls to |c00FF0000Hellish Ghouls|r)
    Sound - Play Warning <gen>
vampiricGhoul
  Events
    Unit - A unit Finishes research
  Conditions
    (Researched tech-type) Equal to R003 (techcode)
  Actions
    Set VariableSet ghoulType[(Player number of (Owner of (Researching unit)))] = Vampiric Ghoul
    Game - Display to players the text: ((Name of (Owner of (Researching unit))) + has evolved his ghouls to |c00640000Vampiric Ghouls|r)
    Sound - Play Warning <gen>
    Unit - Replace (Researching unit) with a Ghoul Upgrader (final) using The old unit's relative life and mana
    Set VariableSet upgraders[(Player number of (Owner of (Researching unit)))] = (Last replaced unit)
toxicGhouls
  Events
    Unit - A unit Finishes research
  Conditions
    (Researched tech-type) Equal to R005 (techcode)
  Actions
    Set VariableSet ghoulType[(Player number of (Owner of (Researching unit)))] = Toxic Ghoul
    Game - Display to players the text: ((Name of (Owner of (Researching unit))) + has evolved his ghouls to |c0096FF96Toxic Ghouls|r)
    Sound - Play Warning <gen>
    Unit - Replace (Researching unit) with a Ghoul Upgrader (final) using The old unit's relative life and mana
    Set VariableSet upgraders[(Player number of (Owner of (Researching unit)))] = (Last replaced unit)
bloodthirstGouls
  Events
    Unit - A unit Finishes research
  Conditions
    (Researched tech-type) Equal to R006 (techcode)
  Actions
    Set VariableSet ghoulType[(Player number of (Owner of (Researching unit)))] = Bloodthirsty Ghoul
    Game - Display to players the text: ((Name of (Owner of (Researching unit))) + has evolved his ghouls to |c00FF0000Bloodthirsty Ghouls|r)
    Sound - Play Warning <gen>
    Unit - Replace (Researching unit) with a Ghoul Upgrader (final) using The old unit's relative life and mana
    Set VariableSet upgraders[(Player number of (Owner of (Researching unit)))] = (Last replaced unit)
flamingGhouls
  Events
    Unit - A unit Finishes research
  Conditions
    (Researched tech-type) Equal to R007 (techcode)
  Actions
    Set VariableSet ghoulType[(Player number of (Owner of (Researching unit)))] = Flaming Ghoul
    Game - Display to players the text: ((Name of (Owner of (Researching unit))) + has evolved his ghouls to |c00FF0000Flaming Ghouls|r)
    Sound - Play Warning <gen>
    Unit - Replace (Researching unit) with a Ghoul Upgrader (final) using The old unit's relative life and mana
    Set VariableSet upgraders[(Player number of (Owner of (Researching unit)))] = (Last replaced unit)