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LLLLLLLWLLLMMMMMMLLLLLLLLLL
LLLLLLLLLELLEWLLLMMMMMMMLLLLLLLL
LLLLLLLLLLLLLLWLLMMMMMMMMLLLLLLLL
#===MAPEND===

#       
CONSTANTS
WaterObelisk_I:5
WaterObelisk_J:4
AirObelisk_I:26
AirObelisk_J:6 
FireObelisk_I:7
FireObelisk_J:23
GroundObelisk_I:24
GroundObelisk_J:26
StepSetupMonster:1
StepWave1:7
StepWave2:14
StepWave3:22
StepWave4:30
XC:15
YC:15

OBJECTS
Neutral:Code=obelisk,"Name= ",i=@WaterObelisk_I@,j=@WaterObelisk_J@,targeted=true
Neutral:Code=obelisk,"Name= ",i=@AirObelisk_I@,j=@AirObelisk_J@,targeted=true
Neutral:Code=obelisk,"Name= ",i=@GroundObelisk_I@,j=@GroundObelisk_J@,targeted=true
Neutral:Code=obelisk,"Name= ",i=@FireObelisk_I@,j=@FireObelisk_J@,targeted=true
Food:i=8,j=29,size=medium
Food:i=10,j=29,size=min
Food:i=12,j=29,size=medium
Food:i=10,j=31,size=max
Food:i=8,j=31,size=min
Food:i=12,j=31,size=max

Pony:i=16,j=2,"name= ",code=twily
Pony:i=18,j=2,"name= ",code=rainbow

INITIAL
Stone:0
Food:150
Task:    
Permits:action=deny,code=all
Permits:action=deny,code=all
Permits:action=allow,code=BuildFarmFood
Permits:action=allow,code=Harvest
Permits:action=allow,code=AttackNear
Permits:action=allow,code=AttackLong
Permits:action=allow,code=FreezeEnemy
Permits:action=allow,code=Teleport
Permits:action=allow,code=SonicRainbow
Permits:action=allow,code=Repair
Permits:action=allow,code=MagicRepair

SCRIPT      
Event:Step=0
Action:Type=SetFocus,i=17,j=2,immediate=true
Action:Type=Message,icon=rainbow_ico,"text= . ?"
Action:Type=Message,icon=twily_ico,"text=,     ==>
 .  ,    ."
Action:Type=Message,icon=rainbow_ico,"text=    ,    ."
Action:Type=Message,icon=twily_ico,"text=, .    "
Action:Type=SetFocus,i=@WaterObelisk_I@,j=@WaterObelisk_J@
Action:Type=Sleep,ms=1000
Action:Type=SetFocus,i=@AirObelisk_I@,j=@AirObelisk_J@
Action:Type=Sleep,ms=1000
Action:Type=SetFocus,i=@GroundObelisk_I@,j=@GroundObelisk_J@
Action:Type=Sleep,ms=1000
Action:Type=SetFocus,i=@FireObelisk_I@,j=@FireObelisk_J@
Action:Type=Sleep,ms=1000
Action:Type=SetFocus,i=17,j=2
Action:Type=SetBattleTask,code=taskwater,"Task=    "
Action:Type=SetBattleTask,code=taskground,"Task=    "
Action:Type=SetBattleTask,code=taskfire,"Task=    "
Action:Type=ShowBattleTask


# =====    =====

SCRIPT      
Event:Step=@StepSetupMonster@
Action:Type=NewObjectGroup,autofocus=true,Object=Monster,Code=ameba,"Name=",i=@WaterObelisk_I@,j=@WaterObelisk_J@,count=2,radius=2,holdground=true
Action:Type=NewObjectGroup,autofocus=true,Object=Monster,Code=ameba,"Name=",i=@AirObelisk_I@,j=@AirObelisk_J@,count=3,radius=2,holdground=true
Action:Type=NewObjectGroup,autofocus=true,Object=Monster,Code=ameba,"Name=",i=@GroundObelisk_I@,j=@GroundObelisk_J@,count=4,radius=2,holdground=true
Action:Type=NewObjectGroup,autofocus=true,Object=Monster,Code=ameba,"Name=",i=@FireObelisk_I@,j=@FireObelisk_J@,count=7,radius=3,holdground=true
Action:Type=Message,icon=twily_ico,"text=,      ?"
Action:Type=Message,icon=rainbow_ico,"text=,     !"
Action:Type=Message,icon=twily_ico,"text=,       ==>
,     ,     ? ==>
  ,   ."
Action:Type=Message,icon=help_ico,"text= -  ,    ==>
   6 .  - ,    - ==>
   ."

# ====   

SCRIPT      
Event:Step=@StepWave1@
Action:Type=NewObjectGroup,autofocus=true,Object=Monster,Code=bat,"Name=",i=@XC@,j=@YC@,count=2,radius=2
Action:Type=Message,icon=twily_ico,"text=,  .    ==>
   ."

SCRIPT      
Event:Step=@StepWave2@
Action:Type=NewObjectGroup,autofocus=true,Object=Monster,Code=bat,"Name=",i=@XC@,j=@YC@,count=3,radius=2

SCRIPT      
Event:Step=@StepWave3@
Action:Type=NewObjectGroup,autofocus=true,Object=Monster,Code=bat,"Name=",i=@XC@,j=@YC@,count=5,radius=2

SCRIPT      
Event:Step=@StepWave4@
Action:Type=NewObjectGroup,autofocus=true,Object=Monster,Code=bat,"Name=",i=@XC@,j=@YC@,count=8,radius=2

# =====   

SCRIPT
Event:ObjectPos=True,i=@WaterObelisk_I@,j=@WaterObelisk_J@,IncludeLinked=true,Object=twily
Action:Type=Message,icon=twily_ico,"text=,  .    ==>
    .   :    , ==>
  e   ."
Action:Type=CompBattleTask,code=taskwater
Action:Type=ClearTarget,i=@WaterObelisk_I@,j=@WaterObelisk_J@

SCRIPT
Event:ObjectPos=True,i=@AirObelisk_I@,j=@AirObelisk_J@,IncludeLinked=true,Object=twily
Action:Type=Message,icon=twily_ico,"text=    .     -... ==>
 ,         ?"
Action:Type=Message,icon=rainbow_ico,"text= ."
Action:Type=CompBattleTask,code=initial
Action:Type=ClearTarget,i=@AirObelisk_I@,j=@AirObelisk_J@

SCRIPT
Event:ObjectPos=True,i=@FireObelisk_I@,j=@FireObelisk_J@,IncludeLinked=true,Object=twily
Action:Type=Message,icon=twily_ico,"text= .   ,   ==>
    .     ... ==>
,    !"
Action:Type=CompBattleTask,code=taskfire
Action:Type=ClearTarget,i=@FireObelisk_I@,j=@FireObelisk_J@

SCRIPT
Event:ObjectPos=True,i=@GroundObelisk_I@,j=@GroundObelisk_J@,IncludeLinked=true,Object=twily
Action:Type=Message,icon=twily_ico,"text=     ? ==>
 ,  ... ? ?  ..."
Action:Type=Message,icon=rainbow_ico,"text= , ?   ==>
-,       ?"
Action:Type=Message,icon=twily_ico,"text=  ,  ! ==>
     .   , ,==>
     !"
Action:Type=CompBattleTask,code=taskground
Action:Type=ClearTarget,i=@GroundObelisk_I@,j=@GroundObelisk_J@

SCRIPT
Event:Victory=True
Action:Type=Message,icon=twily_ico,"text=      . ==>
   ,    ."

VICTORY
ByNoTargetLeft:null
