1. Are you planning to upload your awesome map to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  5. Dismiss Notice
  6. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  7. 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

World of Magic 1.24.w3x
Variables
Start
Starting cini
Setting Integers
Board
Setting MiniQuests TEK
Drawing
Drawing
Drawn Effect
Spell Cast
Spell casting
Cast Fire
Cast Death
Cast Blizzard
Cast Thunder
Cast Bio
Cast Slow
Cast Shell
Cast Protect
Cast Cure
Cast Fira
Cast Blizzara
Cast Blind
Cast Raise Dead
Cast Essence
Cast Cura
Cast Regen
Cast Thundara
Cast Firaga
Cast Firaga DC
Cast Blizzaga
Cast Blizzaga DC
Cast Thundaga
Cast Thundaga DC
Cast Curaga
Cast Curaga DC
Cast Holy
Cast Holy DC
Cast Protecta
Cast Flare
Cast Stop
Cast Quake
Cast Ultima
Cast Infection
Inventory
Wand
Light Celtic Wand Siren up
Light Celtic Wand Siren down
CSOS Summons up
CSOS Summons down
Autocast on
Turn autocast on
Turn autocast off
Buying Magic
Hero spells, healing
Use potion
Use mana potion
Pick up potion
Pick up Manapotion
Pick up Phoenix Down
Cast Free Protect
Cast Free Shell
Stop Robe Cast
Revive
Revive Final Battle
Improve Potion 1
Improve Potion 1 Yes
Improve Potion 2
Improve Potion 2 Yes
Game Triggers
Dumby unit kill
Dumby unit kill fix
Dumby unit 2 kill
Dumby unit BoF kill
Dumby unit summon kill
Dumby unit stop kil
Dumby unit quake kill
Dumby unit stop robe kill
Dumby unit siren summon
Dumby unit holy bolt kill
Skill points bonus
Item charge count up
Robes
Robe alert
Robe drop
Imbue Robe Check
Imbue Robe Trigger
Imbue Robe Imbue
Imbue Robe Imbue Qtrigger
Imbue Robe Make Robe
Summons
Summon Follow Ifrit
Summon Ifrit
Ifrit Fira Triggered
Ifrit Fira Effect
Ifrit Board
---------------------------
Summon Follow Shiva
Summon Shiva
Shiva Blizzara Triggered
Shiva Blizzara Effect
Shiva Board
---------------------------
Summon Follow Ramuh
Summon Ramuh
Ramuh Thundara Triggered
Ramuh Thundara Effect
Ramuh Board
---------------------------
Summon Siren
Siren Board
---------------------------
Summon Odin
Odin Remove
---------------------------
Summon Follow Slug
Summon Slug
Slug Board
---------------------------
Summon Follow Raq
Summon Skeleton
Raq Board
Classes
Replace unit Necromancer
Replace unit Summoner
Replace unit Priest
Replace unit Elementalist
---------------------------
Necro Healing
Necro Bomb
Army of the Death
Necr Draw
---------------------------
Elemental Power
Draw Bonus
Double cast Elementalist
Ultimate Power
---------------------------
Healing Power
Double cast Priest
Holy Up
Priest Income
---------------------------
Increas Summon
Increas Summon 2
OdinStrikesBack
Bahamut
Summon Follow Bahamut
Quest Story
Turn off Quest
Quest 1
Defeat the Mother Wolf
Killed wolf Back to HM
Imbue a robe
Finish Quest 1
Quest 2
Kill 20 Corrupted Treants
Kill Treants
Kill Tree of Corruption
Quest 3
Trial of The Ancients
Ice Test
Lightning Test
Finish Quest 3
Class choose
Choose class
Class choosen
Quest 4
Wizard Training
Kill Furbolg
Return to guard
Finish Quest 4
Quest 5
Trouble at the graveyard
Kill Death knight
Finish Quest 5
Quest 6
The Swamp
Kill Swamp Minions
Kill Swamp Monster
Quest 7
Become Sage
Teleport in Castle
Teleport out Castle
Reach Southern Forest
Reach Castle
Quest 8
The Evil Magicians
Find Time Mage
Time Mage Revive
Defeat Time Mage
Quest 9
The Kings Daughter
Go to Swamp
Go to Fortress
Fight Spirit Mage
Defeat Spirit Mage
Quest 10
The Missing Noble
Find Noble
Defeat Illusion
Fight Illusion Mage
Defeat Illusion Mage
Quest 11
Return to Castle
Spam skeletons
Stop Spam Skeletons
Reach Throne Room
Defeat Undead King
Skeleton INT down
Quest 12
The Final Battle
Enter Final Battle
Spam skeletons 2
Stop Spam Skeletons 2
Spam Guards
Guards INT down
Turn on Spam SATSK
Spam skeletons 3
Spamsatyr
Defeat Undead Mage
Quest Villages
Quest Villages turn off
Necromancer Village
Zombie Plague
Kill Zombies
The roots
Kill Graveyards
The Head Zombie
Kill Head Zombie
Protect the Skeletons
Kill 10 Priests
Evil versus Good
Kill Sage
Draculas in Town
Kill dracula
Priest Village
How to rezz a 1000 yos
Find amulets
How to rezz pt2
Kill Pestals
Free the Sage
Defeat Sage
Find Epichus staff
Find staff
A Test of Strenght
Defeat Ephicus
What is Divine
Defeat Divine Being
Summoner Village
Sirens whereabouts
Find flutes
Sirens Rage
Kill Siren Minion
Sirens Last Breath
Defeat Siren
Corrupted Ruins
Find Relics
Corrupted Ruins 2
Defeat Evil Spirit
Diablos
Defeat Diablos
Elementalist Village
Stones of Elements
Find stones
Elemental Training
Defeat Critters
The Infernal
Defeat Infernal
Corruption in the City
Find Leader
Taking back the City
Defeat Leader
Terror in the Sky
Defeat Bahameth
Quest City
Turn off Quests
Arrange Quests
Necro
NQ1 Abomination Leg
Teleport in graveyard
Teleport out graveyard
Kill Abonimation
NQ2 buy leg
Buy leg
Priest
PQ1 Skeleton Mages
Kill Skeleton mages
PQ2 Trade Cura
Exchange 50 Cura
Summoner
SQ1 Info Odin
Buy Info
SQ2 Slug
Kill Slug
Elementalist
EQ1 Buy Firaga
Buy Firaga
EQ2 Trade Blizzara
Exchange 100 Blizzara
Side Quests mini
Optional quest MI
q1
Find 5 magic Herb
Find Herbs
End Quest 5 magic herbs
Get 50 Thunder
Exchange 50 Thunder
q2
Spider Poison
Kill spider
Finish spider poison
q3
Odin
Defeat Odin
q4
Raq ul
Item Check Raqul
q5
Bounty Hunter
Kill assassin
Castle
Castle Effects
Traders
Trade Firaga Flare
Exchange 10 Firaga
Trade Thundaga Quake
Exchange 10 Thundaga
Trade Curaga Holy
Exchange 10 Curaga
Trade Blizzaga Ultima
Exchange 100 Blizzaga
Necro
Trade Ultima Kings Ashes
Exchange 1 Ultima
Info
Info Free Guard
Info Free Mage
Info 200g location Azura
Info 100g Time mage
Info 200g Spirit Mage
Info 400g Illusion Mage
Info 1000g Undead Mage
Info Buy
Buy Info Azura
Info bought Azura
Buy Info Time Mage
Info bought Time Mage
Buy Info Spirit Mage
Info bought Spirit Mage
Buy Info Illusion Mage
Info bought Illusion Mage
Buy Info Undead Mage
Info bought Undead Mage
Respawn
Respawn trigger
Dropping trigger
Effects map
Turn on Town Effects
Turn off Town Effects
Town Effect 1
Necro Town
Turn on Town Effects Necro
Turn off Town Effects Necro
Necro Town Effect
Elementalist town
Turn on Town Effects Elem
Turn off Town Effects Elem
Elem Town Effect
Hidden Items
Fire Staff
Go to Inventory
Go out Inventory
Go to Inventory R
Hosile Summons Spells
Ifrit Fira Effect Hostile
Fix Ifrit Return
Shiva Blizzara Effect Hostile
Fix Shiva Return
Ramuh Thundara Effect Hostile
Fix Ramuh Return
Camera Effect
Ifrit Camera
Shiva Camera
Ramuh Camera
Stop Camera
Summon Item drop
Portal
Portal Dialog
Portal Effect
Portal Reg1
Portal Reg2
Portal Reg3
Portal Reg4
Portal Reg5
Portal Reg6
Portal Reg7
Portal Reg8
Hostiles out of cities
Starting Town South
Starting Town East
Starting Town West
Trial Fire
Trial Ice
Trial Thunder
Village 1
Village 2
Village 3
Village 4
City East
City South
City North
End Boss Effects
Time Mage
Spirit Mage
Illusion Mage
Testing Triggers
Add Teleport
- - - - - - - - - - - - - - - - - - - - - - -
Terrain improvement by chilla_killa
- - - - - - - - - - - - - - - - - - - - - - -
Fog
SpiderFogInit
SpiderFogTurnOff
GraveyardFogInit
GraveyardFogTurnOff
CorruptedEntFogInit
CorruptedEntFogTurnOff
FireQuestFog
IceQuestFog
ThunderQuestFog
ElementalFogReset
CitadelFog
CitadelFogReset
Fixes
Illusion Mage Fix
Illusion Mage Fix 2
Move items inventory
Arrow up
Arrow down
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
AbonimationFlesh boolean No
AmountManaPot integer No
AmountPhoenixDown integer No
AmountPotions integer No
AmuletsOFTG integer No
Armyofthedeath boolean No
Autocast boolean No
Bahamut unit No
BahamutSummoned boolean No
BlindEffect effect No
Board multiboard No
BreathofFrostcaster unit Yes
Buydialog dialog Yes
Caster unit No
CasterSummon unit No
ChargesCountUp integer No
CinimaticSkipped boolean No
CityQuest quest No
Classcode boolean Yes
ClassDB button Yes
Classdialog dialog No
CorpsePoint location No
CTreantskilled integer No
DialogButtonBuyyes button No
DialogButtonPortal button Yes
DialogButtonRobe button Yes
DoublecastELE boolean No
DoubleCastPri boolean No
DrawAmount integer No
DrawChance integer No
DrawnType itemcode No
DrawnTypeItem item No
Drawup boolean No
DroppotTrigger integer No
DummyItemSpells unit No
ElementalPower boolean No
Elementalstones integer No
EmptySlot item Yes
Guards integer No
HealingPower boolean No
HeroStatsReplace integer Yes
HolyUp boolean No
IfritSummonable boolean No
IfritSummonchance integer No
ImbueRobeDialog dialog No
IncomeINT integer No
Incomeup boolean Yes
InfoEffectCastle effect Yes
Item50thunder item No
ItemDropped item Yes
Itemtyperobeimbue itemcode No
KingsAshes boolean No
LocationCaster location No
MagicHerbsFound integer No
NameofDrawnItem item No
NecroDraw boolean No
NumberofEmptySlots integer No
OdinChanceInteger integer No
OdinStrikesBack boolean No
OdinSummonable boolean No
OptionalMiniQuestUTT effect Yes
OptionalQuest quest Yes
Playername string No
PortalCastle boolean No
Portalcity boolean No
PortalClassLoc boolean No
PortalDarkFortress boolean No
PortalDialog dialog No
PotionDialog dialog Yes
PotionImprove boolean Yes
PotionImproveSFX effect Yes
Princess unit No
Quest1HTBAM quest No
Quest2CTF quest No
Quest3TOFTA quest No
Quest4WT quest No
Quest5TATG quest No
Quest6TS quest No
Quest7THU quest No
Quest8TEM quest No
Quest9TKD quest No
QuestA10TMN quest No
QuestA11US quest No
QuestA12TFB quest No
QuestReq1HTBAM questitem Yes
QuestReq2CTF questitem Yes
QuestReq3TOFTA questitem Yes
QuestReq4WT questitem Yes
QuestReq5TATG questitem Yes
QuestReq6TS questitem Yes
QuestReq7THU questitem Yes
QuestReq8TEM questitem Yes
QuestReq9TKD questitem Yes
QuestReqA10TMN questitem Yes
QuestReqA11US questitem Yes
QuestReqA12TFB questitem Yes
QuestReqSpider questitem Yes
QuestReqVillageClass questitem Yes
RamuhSummonable boolean No
RamuhSummonChance integer No
Random100 integer No
RaqSummonable boolean No
RaqSummonChance integer No
RegionCast location No
RegionCastSummon location No
ReqSpEffectUITROEPINGSTEKEN effect No
Robecarry boolean No
RobeItem item No
Sage boolean No
Satyr integer No
SEcityclass effect Yes
ShivaSummonable boolean No
ShivaSummonChance integer No
ShivaWings effect No
Sirenflutes integer No
SirenSummonable boolean No
SirenSummonChance integer No
SirenUnit unit No
Skeletoneffect unit Yes
SKeletonmages integer No
SkeletonMove unit No
Skeletons integer No
SlugSummonable boolean No
SlugSummonChance integer No
Sound sound No
StopchanceINT integer No
SummonInteger integer No
SwampMinionsKilled integer No
TargetUnitSpell unit No
TimeMageBattle boolean No
TradeDialog dialog Yes
UltimatePower boolean No
VMF boolean Yes
WandItem item No
ZombieLeg boolean No
Zombieskilled integer No
Starting cini
  Events
    Map initialization
  Conditions
  Actions
    Item - Set charges remaining in (Item carried by Magician 0024 <gen> in slot 2) to 20
    Special Effect - Create a special effect attached to the overhead (attachpoint) of Higher Mage 0025 <gen> using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
    Set VariableSet ReqSpEffectUITROEPINGSTEKEN = (Last created special effect)
    Set VariableSet Playername = (Name of Player 1 (Red))
    Set VariableSet Caster = Magician 0024 <gen>
    Cinematic - Turn cinematic mode On for (All players)
    Camera - .Apply. gg_cam_Camera_001 for Player 1 (Red) over 0 seconds
    Cinematic - Send transmission to (All players) from Magician 0024 <gen> named Playername: Play No sound and display They always told me I would never achieve anything. They never thought I would be of meaning to this world.. Modify duration: Add 4.00 seconds and Wait
    Wait 4.00 seconds
    Camera - .Apply. gg_cam_Camera_002 for Player 1 (Red) over 3.00 seconds
    Cinematic - Send transmission to (All players) from Magician 0024 <gen> named Playername: Play No sound and display I'll prove em wrong!. Modify duration: Add 0 seconds and Wait
    Cinematic - Turn cinematic mode Off for (All players)
    Camera - Reset camera for Player 1 (Red) to standard game-view over 0 seconds
    Quest - Create a Required quest titled How to become a mage with the description You're a rookie in a world filled with magic, it's time to learn how to use this power., using icon path ReplaceableTextures\CommandButtons\BTNWand.blp
    Set VariableSet Quest1HTBAM = (Last created quest)
    Quest - Create a quest requirement for Quest1HTBAM with the description Find the Higher Mage in the north side of town
    Set VariableSet QuestReq1HTBAM[1] = (Last created quest requirement)
    Quest - Display to (All players) the Quest Discovered message: |c0000ff00Quest:|rHow to become a mage-Find the Higher Mage at the north side of town
    Quest - Create a Optional quest titled Credit with the description Ifrit model - OniwagaShiva's wings, fire nova, time aura, dark lightning - JetFangInfernoChilla_killa for improving terrainThx to all testers for feedback and bugreports., using icon path ReplaceableTextures\CommandButtons\BTNSelectHeroOn.blp
    Quest - Create a Optional quest titled Tips and Help 1 with the description 1. What are those icons on the leaderboard?The icons represent the amount potions, mana potions and phoenix downs you have. When you buy these at a shop or find them on the map, the number decreases.2. What are phoenix downs?Phoenix down is an item that can revive you when you are defeated, when you die and have 0 of them you lose the game. But don't worry, you can buy them at the shops, but it's smarter just to use a lot of potions, because they are 100x cheaper.3. How do I cast and obtain magic?Magic can be drawn from any hostile creature, just use the 'Draw' ability on the creature and u will get 1-9 of the magic. Agility improves the amount you draw. To cast magic you just have to put the magic you want to cast in slot 2 of your hero's inventory and use your wand on the location you want the magic to be caster. It's best to turn on autocast, this is accurate and less boring then always having to press the wand. You can move your items by pressing the up or down arrow., using icon path ReplaceableTextures\CommandButtons\BTNSelectHeroOn.blp
    Quest - Create a Optional quest titled Tips and Help 2 with the description 4. What does 'Go to inventory' do?Go to inventory is the ability you use if you want to gather all the magic, wands, armor and potions you've received in the game. It will transport you to a closed room where u can arrange these and leave them behind. For magic, there are magic boxes so you have easy acces to them. Elsewise they rearrange every time you return to inventory. This ability also heals hostile creatures so you can't just flee, cure and attack again.5. Which is the best magic?All magic has his own advantages, in the beginning you'll mainly use fire, blizzard and thunder. These are destructive spells, they all do damage, but they differ in range, damage and effect. Fire is an average spell, small aoe, normal damage. Blizzard has a higer aoe, lower damage but the freeze effect, which decrease both attack and movement speed with 50%. Thunder does high damage, but only damages one target. Later on you'll have cure and effect magic, like slow, blind, etc...6. Tips on surviving the game.Potions is a must, without them you won't survive very long, especially against bosses. You can buy them at any town at the vendor, they are only 10 gold each. The potion ability has no cooldown and has hotkey Z. Turning on autocast is better for faster and accurate casting. You could easily leave it on the whole game. Balance your atrribute bonusses, it will be hard if u never put anything in strenght.If you haven't fully understood the quest, or the text messages, you can always press F12 to open the log where u can find all messages., using icon path ReplaceableTextures\CommandButtons\BTNSelectHeroOn.blp
Setting Integers
  Events
    Map initialization
  Conditions
  Actions
    Unit Group - Pick every unit in (Units owned by Player 2 (Blue).) and do (Make (Picked unit) Invulnerable)
    Set VariableSet AmountPotions = 3
    Set VariableSet AmountManaPot = 3
    Set VariableSet AmountPhoenixDown = 1
    Destructible - Make Gate 0001 <gen> Invulnerable
    Destructible - Make City Entrance 5562 <gen> Invulnerable
    Destructible - Make City Entrance 5563 <gen> Invulnerable
    Destructible - Make City Entrance 0855 <gen> Invulnerable
    Destructible - Make City Entrance 0000 <gen> Invulnerable
    Destructible - Make City Entrance 3424 <gen> Invulnerable
    Destructible - Make City Entrance 3425 <gen> Invulnerable
    Destructible - Make City Entrance 3116 <gen> Invulnerable
    Destructible - Make Demonic Gate 7241 <gen> Invulnerable
    Destructible - Make Demonic Gate 1847 <gen> Invulnerable
    Destructible - Make Demonic Gate 1848 <gen> Invulnerable
    Animation - Play Skeleton Summon 0109 <gen>'s Attack Spell - 1 (animationname) animation
    Animation - Play Villager 0105 <gen>'s Stand Channel (animationname) animation, using only Common animations
    Animation - Play Villager 0106 <gen>'s Stand Channel (animationname) animation, using only Common animations
    Animation - Play Villager 0107 <gen>'s Stand Channel (animationname) animation, using only Common animations
    Animation - Play Villager 0108 <gen>'s Stand Channel (animationname) animation, using only Common animations
    Animation - Play Villager 0119 <gen>'s Stand Victory (animationname) animation, using only Common animations
    Animation - Play Villager 0118 <gen>'s Stand Victory (animationname) animation, using only Common animations
    Animation - Play Villager 0117 <gen>'s Stand Victory (animationname) animation, using only Common animations
    Wait 0.50 seconds
    Animation - Change Skeleton Summon 0109 <gen>'s animation speed to 0.00% of its original speed
Board
  Events
    Time - Elapsed game time is 1.00 seconds
  Conditions
  Actions
    Multiboard - Create a multiboard with 1 columns and 8 rows, titled Inventory.
    Set VariableSet Board = (Last created multiboard)
    Multiboard - Set the icon for Board item in column 1, row 1 to ReplaceableTextures\CommandButtons\BTNPotionGreen.blp
    Multiboard - Set the icon for Board item in column 1, row 2 to ReplaceableTextures\CommandButtons\BTNPotionBlueBig.blp
    Multiboard - Set the icon for Board item in column 1, row 3 to ReplaceableTextures\CommandButtons\BTNStaffOfPreservation.blp
    Multiboard - Set the text for Board item in column 1, row 1 to (String(AmountPotions))
    Multiboard - Set the text for Board item in column 1, row 2 to (String(AmountManaPot))
    Multiboard - Set the text for Board item in column 1, row 3 to (String(AmountPhoenixDown))
    Multiboard - Show Board
Setting MiniQuests TEK
  Events
    Map initialization
  Conditions
  Actions
    Special Effect - Create a special effect attached to the overhead (attachpoint) of Villager 0028 <gen> using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
    Set VariableSet OptionalMiniQuestUTT[1] = (Last created special effect)
    Special Effect - Create a special effect attached to the overhead (attachpoint) of Villager 0003 <gen> using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
    Set VariableSet OptionalMiniQuestUTT[2] = (Last created special effect)
    Special Effect - Create a special effect attached to the overhead (attachpoint) of Head Necromancer 0150 <gen> using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
    Set VariableSet OptionalMiniQuestUTT[3] = (Last created special effect)
    Special Effect - Create a special effect attached to the overhead (attachpoint) of Bishop 0174 <gen> using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
    Set VariableSet OptionalMiniQuestUTT[4] = (Last created special effect)
    Special Effect - Create a special effect attached to the overhead (attachpoint) of High Summoner 0203 <gen> using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
    Set VariableSet OptionalMiniQuestUTT[5] = (Last created special effect)
    Special Effect - Create a special effect attached to the overhead (attachpoint) of Tribe Leader 0228 <gen> using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
    Set VariableSet OptionalMiniQuestUTT[6] = (Last created special effect)
    Special Effect - Create a special effect attached to the overhead (attachpoint) of Merchant 0274 <gen> using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
    Set VariableSet OptionalMiniQuestUTT[7] = (Last created special effect)
    Special Effect - Create a special effect attached to the overhead (attachpoint) of Potion Improver 0506 <gen> using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
    Set VariableSet PotionImproveSFX[1] = (Last created special effect)
    Special Effect - Create a special effect attached to the overhead (attachpoint) of Potion Improver 0507 <gen> using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
    Set VariableSet PotionImproveSFX[2] = (Last created special effect)
Drawing
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Draw
  Actions
    Set VariableSet Caster = (Casting unit)
    Set VariableSet DrawChance = (Random integer number between 1 and 100)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Item-type of (Item carried by Caster in slot 1)) Equal to |c000000ffLife Staff|r
      Then - Actions
        Item - Create Regen at (Position of Caster)
        Item - Set charges remaining in (Last created item) to 1
        Hero - Give (Last created item) to Caster
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        NecroDraw Equal to True
      Then - Actions
        Item - Create Raise Dead at (Position of Caster)
        Item - Set charges remaining in (Last created item) to 1
        Hero - Give (Last created item) to Caster
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Dire Wolf
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 4 and 9) + ((Agility of Caster (Include bonuses)) / 10))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Fire
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Fire Critter
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 4 and 9) + ((Agility of Caster (Include bonuses)) / 10))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Fire
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Frost Wolf
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 4 and 9) + ((Agility of Caster (Include bonuses)) / 10))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Blizzard
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Ice Troll
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 4 and 9) + ((Agility of Caster (Include bonuses)) / 10))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Blizzard
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Shadow Wolf
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 4 and 9) + ((Agility of Caster (Include bonuses)) / 10))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Thunder
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Thunder Caster
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 4 and 9) + ((Agility of Caster (Include bonuses)) / 10))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Thunder
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Mother Wolf
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 4 and 8) + ((Agility of Caster (Include bonuses)) / 10))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Cure
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Treant
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            DrawChance Less than or equal to 50
          Then - Actions
            Set VariableSet DrawAmount = ((Random integer number between 4 and 8) + ((Agility of Caster (Include bonuses)) / 10))
            If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
            Set VariableSet DrawnType = Cure
            Trigger - Run Drawn_Effect <gen> (checking conditions)
          Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Corrupted Treant
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            DrawChance Less than or equal to 50
          Then - Actions
            Set VariableSet DrawAmount = ((Random integer number between 3 and 8) + ((Agility of Caster (Include bonuses)) / 10))
            If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
            Set VariableSet DrawnType = Bio
            Trigger - Run Drawn_Effect <gen> (checking conditions)
          Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Tree of Corruption
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
          Then - Actions
            Set VariableSet DrawAmount = ((Random integer number between 3 and 8) + ((Agility of Caster (Include bonuses)) / 10))
            If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
            Set VariableSet DrawnType = Bio
            Trigger - Run Drawn_Effect <gen> (checking conditions)
          Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Giant Spider
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
          Then - Actions
            Set VariableSet DrawAmount = ((Random integer number between 3 and 8) + ((Agility of Caster (Include bonuses)) / 10))
            If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
            Set VariableSet DrawnType = Slow
            Trigger - Run Drawn_Effect <gen> (checking conditions)
          Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Ice Critter
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 3 and 8) + ((Agility of Caster (Include bonuses)) / 10))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Slow
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Corrupted Treant
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            DrawChance Greater than 50
          Then - Actions
            Set VariableSet DrawAmount = ((Random integer number between 3 and 8) + ((Agility of Caster (Include bonuses)) / 10))
            If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
            Set VariableSet DrawnType = Blind
            Trigger - Run Drawn_Effect <gen> (checking conditions)
          Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Treant
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            DrawChance Greater than 50
          Then - Actions
            Set VariableSet DrawAmount = ((Random integer number between 3 and 7) + ((Agility of Caster (Include bonuses)) / 10))
            If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
            Set VariableSet DrawnType = Protect
            Trigger - Run Drawn_Effect <gen> (checking conditions)
          Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Fire Minion
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 3 and 7) + ((Agility of Caster (Include bonuses)) / 10))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Shell
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Ifrit (Real)
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 7) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Fira
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Ruin Walker
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 7) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Fira
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Dungeon Critter
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 7) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Fira
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Red Spider
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 7) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Fira
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Infernal
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 7) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Fira
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Shiva (Real)
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 7) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Blizzara
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Ruin Walker
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 7) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Blizzara
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Dungeon Critter
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 7) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Blizzara
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Black Spider
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 7) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Blizzara
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Ghost
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 7) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Blizzara
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Ramuh (Real)
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 7) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Thundara
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Abomination
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 7) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Thundara
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Ruin Walker
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 7) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Thundara
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Swamp Minion
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 7) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Essence
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Dungeon Critter
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 7) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Thundara
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Purple Spider
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 7) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Thundara
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Corrupted Soul
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 6) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Cura
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Siren Spawn
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 6) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Cura
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Furbolg Shaman
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 2 and 6) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Cura
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Temple Guardian
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            DrawChance Less than or equal to 50
          Then - Actions
            Set VariableSet DrawAmount = ((Random integer number between 2 and 7) + ((Agility of Caster (Include bonuses)) / 15))
            If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
            Set VariableSet DrawnType = Thundara
            Trigger - Run Drawn_Effect <gen> (checking conditions)
          Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Temple Guardian
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            DrawChance Greater than 50
          Then - Actions
            Set VariableSet DrawAmount = ((Random integer number between 1 and 6) + ((Agility of Caster (Include bonuses)) / 15))
            If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
            Set VariableSet DrawnType = Regen
            Trigger - Run Drawn_Effect <gen> (checking conditions)
          Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Siren
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 1 and 6) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Regen
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Zombie
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 1 and 5) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Raise Dead
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Ghoul
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 1 and 5) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Raise Dead
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Head Zombie
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 1 and 5) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Death
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Death Knight
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 1 and 5) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Death
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Illusion Mage
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 1 and 5) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Death
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Skeleton Mage
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 1 and 5) + ((Agility of Caster (Include bonuses)) / 15))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Raise Dead
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Salamander
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 1 and 4) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Firaga
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Swamp Monster
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 1 and 4) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Firaga
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Priest
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 1 and 4) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Blizzaga
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Sea Elemental
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 1 and 4) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Blizzaga
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Temple Brute
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 1 and 4) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Thundaga
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Revenant
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 1 and 4) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Thundaga
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Tribe Leader
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 1 and 4) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Thundaga
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Sage
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 0 and 4) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Curaga
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Ogre
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 0 and 4) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Curaga
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Summon
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 1 and 3) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Stop
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Evil Spirit
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 1 and 3) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Stop
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Ephicus
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 1 and 4) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Protecta
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Assassin
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 1 and 4) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Protecta
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Vampire
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 0 and 2) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Quake
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Time Mage
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 0 and 2) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Quake
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Fortress Dweller
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 0 and 2) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Quake
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Diablos
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 0 and 2) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Quake
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Time Mage (Demon Form)
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 0 and 2) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Quake
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Divine Being
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 0 and 2) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Holy
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Fortress Dweller
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 0 and 2) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Holy
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Bahameth
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 0 and 2) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Flare
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Spirit Mage
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 0 and 2) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Flare
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Fortress Dweller
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 0 and 2) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Flare
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Skeleton
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 0 and 1) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Infection
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Satyr
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 0 and 1) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Ultima
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Illusion Mage
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 0 and 1) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Ultima
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Undead Mage
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 0 and 1) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Ultima
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Undead King
      Then - Actions
        Set VariableSet DrawAmount = ((Random integer number between 0 and 1) + ((Agility of Caster (Include bonuses)) / 20))
        If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
        Set VariableSet DrawnType = Ultima
        Trigger - Run Drawn_Effect <gen> (checking conditions)
      Else - Actions
Drawn Effect
  Events
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Drawup Equal to True
      Then - Actions
        Set VariableSet DrawAmount = (DrawAmount + 1)
      Else - Actions
    If (DrawAmount Greater than 9) then do (Set VariableSet DrawAmount = 9) else do (Do nothing)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Caster has an item of type DrawnType) Equal to True
      Then - Actions
        Set VariableSet DrawnTypeItem = (Item carried by Caster of type DrawnType)
        Game - Display to (All players) the text: ( |cffffcc00 + ((String(DrawAmount)) + ( + ((Name of DrawnTypeItem) + ( drawn. + |r)))))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (DrawAmount + (Charges remaining in DrawnTypeItem)) Greater than 100
          Then - Actions
            Item - Set charges remaining in DrawnTypeItem to 100
          Else - Actions
            Item - Set charges remaining in DrawnTypeItem to ((Charges remaining in DrawnTypeItem) + DrawAmount)
      Else - Actions
        Hero - Create DrawnType and give it to Caster
        Set VariableSet NameofDrawnItem = (Last created item)
        Item - Set charges remaining in (Last created item) to DrawAmount
        Game - Display to (All players) the text: ( |cffffcc00 + ((String(DrawAmount)) + ( + ((Name of NameofDrawnItem) + ( drawn. + |r)))))
Spell casting
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to SpellWand
  Actions
    Set VariableSet Caster = (Casting unit)
    Set VariableSet RegionCast = (Target point of ability being cast)
    Set VariableSet SummonInteger = (Random integer number between 1 and 100)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        SlugSummonable Equal to True
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            SummonInteger Less than or equal to SlugSummonChance
          Then - Actions
            Unit - Create 1.Slug for Player 1 (Red) at RegionCast facing (Facing of Caster) degrees
          Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Item-type of (Item carried by Caster in slot 1)) Equal to |c000000ffRod of Protection|r
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            SummonInteger Less than or equal to 50
          Then - Actions
            Trigger - Run Cast_Free_Protect <gen> (checking conditions)
          Else - Actions
            Trigger - Run Cast_Free_Shell <gen> (checking conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Item-type of (Item carried by Caster in slot 2)) Equal to Fire
      Then - Actions
        Trigger - Run Cast_Fire <gen> (checking conditions)
        If ((Item-type of (Item carried by Caster in slot 1)) Equal to |c000000ffFire Wand|r) then do (Run Cast_Fire <gen> (checking conditions)) else do (Do nothing)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            IfritSummonable Equal to True
          Then - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                SummonInteger Less than or equal to IfritSummonchance
              Then - Actions
                Unit - Create 1.Ifrit for Player 1 (Red) at RegionCast facing (Facing of Caster) degrees
              Else - Actions
          Else - Actions
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Item-type of (Item carried by Caster in slot 2)) Equal to Death
          Then - Actions
            Trigger - Run Cast_Death <gen> (checking conditions)
          Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Item-type of (Item carried by Caster in slot 2)) Equal to Blizzard
              Then - Actions
                Trigger - Run Cast_Blizzard <gen> (checking conditions)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    ShivaSummonable Equal to True
                  Then - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        SummonInteger Less than or equal to ShivaSummonChance
                      Then - Actions
                        Unit - Create 1.Shiva for Player 1 (Red) at RegionCast facing (Facing of Caster) degrees
                      Else - Actions
                  Else - Actions
              Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Item-type of (Item carried by Caster in slot 2)) Equal to Thunder
                  Then - Actions
                    Trigger - Run Cast_Thunder <gen> (checking conditions)
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        RamuhSummonable Equal to True
                      Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          If - Conditions
                            SummonInteger Less than or equal to RamuhSummonChance
                          Then - Actions
                            Unit - Create 1.Ramuh for Player 1 (Red) at RegionCast facing (Facing of Caster) degrees
                          Else - Actions
                      Else - Actions
                  Else - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (Item-type of (Item carried by Caster in slot 2)) Equal to Bio
                      Then - Actions
                        Trigger - Run Cast_Bio <gen> (checking conditions)
                      Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          If - Conditions
                            (Item-type of (Item carried by Caster in slot 2)) Equal to Slow
                          Then - Actions
                            Trigger - Run Cast_Slow <gen> (checking conditions)
                          Else - Actions
                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              If - Conditions
                                (Item-type of (Item carried by Caster in slot 2)) Equal to Shell
                              Then - Actions
                                Trigger - Run Cast_Shell <gen> (checking conditions)
                              Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  If - Conditions
                                    (Item-type of (Item carried by Caster in slot 2)) Equal to Protect
                                  Then - Actions
                                    Trigger - Run Cast_Protect <gen> (checking conditions)
                                  Else - Actions
                                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                      If - Conditions
                                        (Item-type of (Item carried by Caster in slot 2)) Equal to Cure
                                      Then - Actions
                                        Trigger - Run Cast_Cure <gen> (checking conditions)
                                        If ((Item-type of (Item carried by Caster in slot 1)) Equal to |c000000ffLight Wand|r) then do (Run Cast_Cure <gen> (checking conditions)) else do (Do nothing)
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                          If - Conditions
                                            SirenSummonable Equal to True
                                          Then - Actions
                                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                              If - Conditions
                                                SummonInteger Less than or equal to SirenSummonChance
                                              Then - Actions
                                                Unit - Create 1.Siren for Player 1 (Red) at RegionCast facing (Facing of Caster) degrees
                                              Else - Actions
                                          Else - Actions
                                      Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                          If - Conditions
                                            (Item-type of (Item carried by Caster in slot 2)) Equal to Fira
                                          Then - Actions
                                            Trigger - Run Cast_Fira <gen> (checking conditions)
                                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                              If - Conditions
                                                IfritSummonable Equal to True
                                              Then - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                  If - Conditions
                                                    SummonInteger Less than or equal to IfritSummonchance
                                                  Then - Actions
                                                    Unit - Create 1.Ifrit for Player 1 (Red) at RegionCast facing (Facing of Caster) degrees
                                                  Else - Actions
                                              Else - Actions
                                          Else - Actions
                                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                              If - Conditions
                                                (Item-type of (Item carried by Caster in slot 2)) Equal to Blizzara
                                              Then - Actions
                                                Trigger - Run Cast_Blizzara <gen> (checking conditions)
                                                If ((Item-type of (Item carried by Caster in slot 1)) Equal to |c000000ffIce Wand|r) then do (Run Cast_Blizzara <gen> (checking conditions)) else do (Do nothing)
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                  If - Conditions
                                                    ShivaSummonable Equal to True
                                                  Then - Actions
                                                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                      If - Conditions
                                                        SummonInteger Less than or equal to ShivaSummonChance
                                                      Then - Actions
                                                        Unit - Create 1.Shiva for Player 1 (Red) at RegionCast facing (Facing of Caster) degrees
                                                      Else - Actions
                                                  Else - Actions
                                              Else - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                  If - Conditions
                                                    (Item-type of (Item carried by Caster in slot 2)) Equal to Blind
                                                  Then - Actions
                                                    Trigger - Run Cast_Blind <gen> (checking conditions)
                                                  Else - Actions
                                                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                      If - Conditions
                                                        (Item-type of (Item carried by Caster in slot 2)) Equal to Raise Dead
                                                      Then - Actions
                                                        Trigger - Run Cast_Raise_Dead <gen> (checking conditions)
                                                      Else - Actions
                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                          If - Conditions
                                                            (Item-type of (Item carried by Caster in slot 2)) Equal to Cura
                                                          Then - Actions
                                                            Trigger - Run Cast_Cura <gen> (checking conditions)
                                                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                              If - Conditions
                                                                SirenSummonable Equal to True
                                                              Then - Actions
                                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                  If - Conditions
                                                                    SummonInteger Less than or equal to SirenSummonChance
                                                                  Then - Actions
                                                                    Unit - Create 1.Siren for Player 1 (Red) at RegionCast facing (Facing of Caster) degrees
                                                                  Else - Actions
                                                              Else - Actions
                                                          Else - Actions
                                                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                              If - Conditions
                                                                (Item-type of (Item carried by Caster in slot 2)) Equal to Thundara
                                                              Then - Actions
                                                                Trigger - Run Cast_Thundara <gen> (checking conditions)
                                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                  If - Conditions
                                                                    RamuhSummonable Equal to True
                                                                  Then - Actions
                                                                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                      If - Conditions
                                                                        SummonInteger Less than or equal to RamuhSummonChance
                                                                      Then - Actions
                                                                        Unit - Create 1.Ramuh for Player 1 (Red) at RegionCast facing (Facing of Caster) degrees
                                                                      Else - Actions
                                                                  Else - Actions
                                                              Else - Actions
                                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                  If - Conditions
                                                                    (Item-type of (Item carried by Caster in slot 2)) Equal to Regen
                                                                  Then - Actions
                                                                    Trigger - Run Cast_Regen <gen> (checking conditions)
                                                                  Else - Actions
                                                                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                      If - Conditions
                                                                        (Item-type of (Item carried by Caster in slot 2)) Equal to Firaga
                                                                      Then - Actions
                                                                        Trigger - Run Cast_Firaga <gen> (checking conditions)
                                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                          If - Conditions
                                                                            DoublecastELE Equal to True
                                                                          Then - Actions
                                                                            Wait 1.00 seconds
                                                                            Trigger - Run Cast_Firaga_DC <gen> (checking conditions)
                                                                          Else - Actions
                                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                          If - Conditions
                                                                            IfritSummonable Equal to True
                                                                          Then - Actions
                                                                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                              If - Conditions
                                                                                SummonInteger Less than or equal to IfritSummonchance
                                                                              Then - Actions
                                                                                Unit - Create 1.Ifrit for Player 1 (Red) at RegionCast facing (Facing of Caster) degrees
                                                                              Else - Actions
                                                                          Else - Actions
                                                                      Else - Actions
                                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                          If - Conditions
                                                                            (Item-type of (Item carried by Caster in slot 2)) Equal to Blizzaga
                                                                          Then - Actions
                                                                            Trigger - Run Cast_Blizzaga <gen> (checking conditions)
                                                                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                              If - Conditions
                                                                                DoublecastELE Equal to True
                                                                              Then - Actions
                                                                                Wait 1.00 seconds
                                                                                Trigger - Run Cast_Blizzaga_DC <gen> (checking conditions)
                                                                              Else - Actions
                                                                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                              If - Conditions
                                                                                ShivaSummonable Equal to True
                                                                              Then - Actions
                                                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                  If - Conditions
                                                                                    SummonInteger Less than or equal to ShivaSummonChance
                                                                                  Then - Actions
                                                                                    Unit - Create 1.Shiva for Player 1 (Red) at RegionCast facing (Facing of Caster) degrees
                                                                                  Else - Actions
                                                                              Else - Actions
                                                                          Else - Actions
                                                                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                              If - Conditions
                                                                                (Item-type of (Item carried by Caster in slot 2)) Equal to Thundaga
                                                                              Then - Actions
                                                                                Trigger - Run Cast_Thundaga <gen> (checking conditions)
                                                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                  If - Conditions
                                                                                    DoublecastELE Equal to True
                                                                                  Then - Actions
                                                                                    Wait 1.00 seconds
                                                                                    Trigger - Run Cast_Thundaga_DC <gen> (checking conditions)
                                                                                  Else - Actions
                                                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                  If - Conditions
                                                                                    RamuhSummonable Equal to True
                                                                                  Then - Actions
                                                                                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                      If - Conditions
                                                                                        SummonInteger Less than or equal to RamuhSummonChance
                                                                                      Then - Actions
                                                                                        Unit - Create 1.Ramuh for Player 1 (Red) at RegionCast facing (Facing of Caster) degrees
                                                                                      Else - Actions
                                                                                  Else - Actions
                                                                              Else - Actions