;---------------------------------------------------------------------------
[Statedef -2]
;---------------------------------------------------------------------------
[State ]
Type=DisplayToClipboard
trigger1=!ishelper&&alive
Text="stateno:%d,animtime:%d,anim:%d,target:%d"
Params=Var(10),Var(11),Var(27),numtarget
IgnoreHitPause=1

[State -2];reversaldef僿儖僷乕
type=Helper
triggerall=!IsHelper
trigger1=!NumHelper(1009)
name="reversaldef"
ID=1009
stateno=60000
Helpertype=player
ignorehitpause=1
supermovetime=2147483647
pausemovetime=2147483647

[State ];崿慄僿儖僷乕
type=Helper
triggerall=!IsHelper
trigger1=!numhelper(5555)
stateno=5555
id=5555
name="konsen"
Pos =0,9999
postype=P1
helpertype=player
keyctrl=0
ownpal=1
ignorehitpause=1
supermovetime=2147483647
pausemovetime=2147483647

[State ];摉偨傝敾掕僿儖僷乕
type=helper
triggerall=!IsHelper
trigger1=!NumHelper(1007)
name="armor"
id=1007
stateno=450000
Helpertype=player
persistent=1
Pos =0,0
postype=p1
ownpal=1
ignorehitpause=1
supermovetime=2147483647
pausemovetime=2147483647

[State ];hitdef僿儖僷乕
type=Helper
triggerall=!IsHelper
trigger1=!NumHelper(1011)
name="hitdef"
ID=1011
stateno=61011
Helpertype=player
ignorehitpause=1

[State -2]
Type=HitOverRide
Trigger1=!IsHelper
trigger2=IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
StateNo=var(26)
Attr=SCA,AA,AT,AP
Time=-1
slot=0
IgnoreHitPause=1

[State -2;nothit]
type=NotHitBy
trigger1=!IsHelper
trigger2=IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
value=SCA
ignorehitpause=1

[State -2,life]
type=lifeset
triggerall=!IsHelper&&alive
triggerall=NumHelper(1008)
triggerall=roundstate!=2
trigger1=life!=lifemax-5
value=lifemax-5

[State -2];儔僀僼娗棟妎惲屻
type=lifeadd
triggerAll=NumHelper(1008)
triggerall=roundstate=2&&alive&&!ishelper
trigger1=var(10)>0
trigger1=playerID(var(10)),var(52)-life>0
value=playerID(var(10)),var(52)-life
ignorehitpause=1

[State -2];僟儊乕僕愝掕
type=LifeAdd
triggerAll=NumHelper(1007)
triggerAll=NumHelper(1008)=0
triggerall=alive&&roundstate=2&&!ishelper
trigger1=var(11)>0
trigger1=playerID(var(11)),gethitvar(damage)>0
value=-Ceil(ifelse((playerID(var(11)),GetHitVar(Damage)>lifemax*0.03),lifemax*0.008,(playerID(var(11)),GetHitVar(Damage)/(3/2))))
ignorehitpause=1
kill=1
absolute=0

[State -2];僟儊乕僕愝掕妎惲屻
type=LifeAdd
triggerAll=NumHelper(1007)
triggerAll=NumHelper(1008)>0
triggerall=alive&&roundstate=2&&!ishelper
trigger1=var(10)>0&&var(11)>0
trigger1=playerID(var(11)),gethitvar(damage)>0
trigger1=ifelse(life<=700,ifelse(life<500,ifelse(life<300,ifelse(life<100,random%15=0,random%12=0),random%8=0),random%4=0),1)
value=-Ceil(ifelse((playerID(var(11)),GetHitVar(Damage)>lifemax*0.03),lifemax*0.005,(playerID(var(11)),GetHitVar(Damage)/2)))
ignorehitpause=1
kill=1
absolute=0

[State -2];僇儊儔偑捛傢側偄
type=ScreenBound
trigger1=ishelper
value=0
movecamera=0
ignorehitpause=1

[State 2558]
type=posset
triggerall=!ishelper||IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
trigger1=Pos Y>0
y=0

[State -2,kakusei];妎惲僗僀僢僠
type=varset
triggerall=palno!=[1,6]
triggerall=!ishelper
trigger1=Lose
trigger1=palno=[7,10]
trigger2=palno=[11,12]
trigger3=NumHelper(1008)
trigger3=helper(1008),var(15)=1
var(50)=1

[State -2];峌寕椡曗惓
Type=Varset
trigger1=!ishelper||IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
V=32
value=ceil(enemynear,Const(data.life)*enemynear,Const(data.defence)*0.01)
ignorehitpause=1
;-------------------------------
;暘恎僿儖僷乕
;-------------------------------
[State -2,Vegeta1]
type=Helper
triggerall=!IsHelper
trigger1=RoundState=2
trigger1=NumHelper(1001)=0
name="Vegeta1"
id=1001
Pos =40,-270
postype=left
stateno=9999
Helpertype=player
keyctrl=1
ownpal=1
ignorehitpause=1

[State -2,Vegeta2]
type=Helper
triggerall=!IsHelper
trigger1=RoundState=2
trigger1=NumHelper(1002)=0
name="Vegeta2"
id=1002
Pos =120,-270
postype=left
stateno=9999
Helpertype=player
keyctrl=1
ownpal=1
ignorehitpause=1

[State -2,Vegeta3]
type=Helper
triggerall=!IsHelper
trigger1=RoundState=2
trigger1=NumHelper(1003)=0
name="Vegeta3"
id=1003
Pos =200,-270
postype=left
stateno=9999
Helpertype=player
keyctrl=1
ownpal=1
ignorehitpause=1

[State -2,Vegeta4]
type=Helper
triggerall=!IsHelper
trigger1=RoundState=2
trigger1=NumHelper(1004)=0
name="Vegeta4"
id=1004
Pos =280,-270
postype=left
stateno=9999
Helpertype=player
keyctrl=1
ownpal=1
ignorehitpause=1

[State ];儔僀僼曐懚梡僿儖僷乕
type=helper
triggerall=!IsHelper
triggerAll=NumHelper(1008)=0
trigger1=var(50)=1
name="life"
id=1008
stateno=450100
Helpertype=player
persistent=1
Pos =0,0
postype=p1
ownpal=1
ignorehitpause=1
supermovetime=2147483647
pausemovetime=2147483647

[State -2];othk摉偨傝僿儖僷乕
type=Helper
triggerall=!ishelper
trigger1=!NumHelper(1010)
name="othk"
ID=1010
persistent=1
pos=0,9999
postype=p1
stateno=61010
postype=back
helpertype=player
keyctrl=0
ownpal=1
ignorehitpause=1
supermovetime=2147483647
pausemovetime=2147483647
;-------------------------------------------------------------------------
;墘弌梡
[State -2]
type=Envcolor
triggerall=!ishelper||IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
triggerall=RoundState=2
triggerall=fvar(14)=[-40,40]
triggerall=fvar(13)<=100
triggerall=random<999
trigger1=numhelper(1008)
trigger1=var(10)>0
trigger1=playerID(var(10)),var(30)=1
persistent=0
Time=(gametime%4=0)*70+(gametime%4!=0)*200
value=0,0,0
under=1
supermove=1
ignorehitpause=1

[State -2]
type=PlaySnd
triggerall=!ishelper||IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
triggerall=RoundState=2
triggerall=fvar(14)=[-40,40]
triggerall=fvar(13)<=100
triggerall=random<800
triggerall=var(25)=0
trigger1=ctrl=1
value=749,0
ignorehitpause=1

[State -2]
type=AssertSpecial
triggerall=!ishelper
triggerall=RoundState<3
trigger1=alive
flag=nokosnd
ignorehitpause=1

[State 450100];animtime娗棟
type=varset
triggerall=!ishelper||IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
trigger1=gametime%1=0
var(25)=var(25)+1
ignorehitpause=1
;-------------------------------------------------------------------------
[State -2];僗僥乕僩敳偗
type=varset
triggerall=!ishelper
trigger1=1
v=31
value=0
ignorehitpause=1

[State -2]
type=varset
triggerall=!ishelper
trigger1=stateno=170||stateno=181||(stateno=[190,191])||stateno=3005||stateno=3007||stateno=1400||stateno=2102||stateno=2558||stateno=2055
trigger2=stateno=890||(stateno=[4435,4436])||stateno=4558||stateno=897||stateno=265||(stateno=[275,276])||(stateno=[2435,2436])||stateno=6436
trigger3=stateno=230||stateno=240||stateno=250||stateno=400||stateno=410||stateno=430||stateno=440||(stateno=[1999,2000])
trigger4=stateno=600||stateno=610||stateno=630||stateno=640||stateno=4046||stateno=800||stateno=810||(stateno=[820,821])
trigger5=(stateno=[3047,3048])||stateno=3075||stateno=3079||stateno=2075||stateno=1000||stateno=2079||stateno=1010||stateno=4075||stateno=44304
trigger6=stateno=4079||stateno=1016||stateno=1113||stateno=280||stateno=2050||(stateno=[2702,2703])||stateno=730||stateno=735
trigger7=(stateno=[1025,1028])||stateno=406||stateno=4000||(stateno=[4121,4122])||stateno=310||stateno=9741||stateno=9743
trigger8=stateno=9999||stateno=0||(stateno=[10,12])||stateno=20||stateno=40||stateno=45||stateno=50||stateno=52||stateno=100||(stateno=[105,106])
trigger9=stateno=110||stateno=115||stateno=120||(stateno=[130,132])||stateno=140||(stateno=[150,155])||stateno=175||stateno=5500||stateno=5900
v=31
value=1
ignorehitpause=1

[State -2]
type=SelfState
triggerall=!ishelper&&alive
triggerall=RoundState=2
triggerall=var(50)=1||palno=12
Trigger1=Var(29)!=GameTime+GameTime
Trigger2=Var(31)!=1||MoveReversed=1
trigger3=(anim=[5000,5150])||(stateno=[5000,5150])
value=var(26)
ignorehitpause=1

[State -2]
type=SelfState
triggerall=!ishelper
Triggerall=!alive
Trigger1=stateno!=5150
value=5150
ignorehitpause=1
;-----------------------------------------------------------------------
[State -2];僿儖僷乕梡僗僥敳偗
type=varset
triggerall=IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
trigger1=1
v=31
value=0
ignorehitpause=1

[State -2]
type=varset
triggerall=IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
trigger1=stateno=100000||stateno=100005||(stateno=[100010,100012])||stateno=100020||stateno=100052||stateno=100100||stateno=4000||(stateno=[4121,4122])
trigger2=stateno=3005||stateno=3007||stateno=1400||stateno=2102||stateno=2558||stateno=2055
trigger3=stateno=890||(stateno=[4435,4436])||stateno=260||stateno=265||stateno=275||(stateno=[2435,2436])||stateno=6436
trigger4=stateno=230||stateno=240||stateno=250||stateno=400||stateno=410||stateno=430||stateno=440||(stateno=[1999,2000])
trigger5=stateno=600||stateno=610||stateno=630||stateno=640||stateno=4046||stateno=800||stateno=810
trigger6=stateno=3048||stateno=2075||stateno=1000||stateno=2079||stateno=1010
trigger7=stateno=1113||stateno=280||stateno=2050||stateno=730||stateno=735||(stateno=[740,741])
trigger8=stateno=9999||stateno=0||(stateno=[10,12])||stateno=20||stateno=40||stateno=45||stateno=50||stateno=52||stateno=100||(stateno=[105,106])
trigger9=stateno=110||stateno=115||stateno=120||(stateno=[130,132])||stateno=140||(stateno=[150,155])||stateno=175
v=31
value=1
ignorehitpause=1

[State -2]
type=SelfState
triggerall=IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
triggerall=RoundState=2
Trigger1=Var(59)!=gametime+1000
Trigger2=Var(31)!=1||MoveReversed=1
trigger3=(anim=[5000,5150])||(stateno=[5000,5150])
value=var(26)
ignorehitpause=1

[State -2]
type=SelfState
triggerall=IsHelper(1007)
Trigger1=Var(39)!=gametime+1000
Trigger2=stateno!=450000||MoveReversed=1
value=450000
ignorehitpause=1

[State -2]
type=SelfState
triggerall=ishelper(80000)||ishelper(80001)
trigger1=var(59)!=gametime+1000
value=0
ignorehitpause=1
[State -2]
type=SelfState
triggerall=ishelper(80000)||ishelper(80001)
trigger1=stateno!=80000
value=80000
ignorehitpause=1

[State -2]
type=SelfState
trigger1=ishelper(5555)
value=5555
ignorehitpause=1

[State -2]
type=SelfState
triggerall=IsHelper(1008)
Trigger1=Var(59)!=gametime+1000
Trigger2=stateno!=450100||MoveReversed=1
value=450100
ignorehitpause=1

[State -2]
type=SelfState
triggerall=Ishelper(1009)
Trigger1=Var(59)!=gametime+1000
Trigger2=stateno!=60000||MoveReversed=1
value=60000
ignorehitpause=1

[State -2]
type=SelfState
triggerall=ishelper(1010)
trigger1=stateno!=61010||MoveReversed=1
trigger2=Var(59)!=gametime+1000
value=61010
ignorehitpause=1

[State -2]
type=SelfState
triggerall=Ishelper(1011)
trigger1=numhelper(1008)
Trigger1=Var(59)!=gametime+1000||stateno!=61011
Trigger2=numhelper(1008)=0
Trigger2=Var(59)=gametime+1000
trigger2=stateno!=61011
value=61011
ignorehitpause=1

[State -2]
type=SelfState
triggerall=Ishelper(9741)
Trigger1=Var(59)!=gametime+1000
Trigger2=stateno!=69741||MoveReversed=1
value=69741
ignorehitpause=1

[State -2]
type=SelfState
triggerall=ishelper(10000)
Trigger1=Var(59)!=gametime+1000
Trigger2=stateno!=10000
value=10000
ignorehitpause=1

[State -2]
type=SelfState
triggerall=ishelper(10001)
triggerall=numhelper(1001)&&numhelper(1002)&&numhelper(1003)&&numhelper(1004)
Trigger1=Var(59)!=gametime+1000
Trigger2=stateno!=10000
value=10000
ignorehitpause=1

[State -2]
type=destroyself
trigger1=IsHelper(1007)||IsHelper(1008)||IsHelper(1009)
trigger1=!root,alive
ignorehitpause=1
;--------------------------------------------------------------------------------------
[State ]
type=PalFX
triggerall=IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
trigger1=1
time=-1
color=100

[State ]
type=ScreenBound
trigger1=!ishelper||IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
trigger1=!(stateno=100052||stateno=9999)
value=1
movecamera=0
ignorehitpause=1

[State ]
type=poweradd
trigger1=time>=0
value=50

[State ]
type=PlaySnd
triggerall=IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
trigger1=var(9)=0&&Var(5)!=1
trigger1=GetHitVar(fall)=1
trigger1=GetHitVar(hitcount)=1
trigger1=time=0
trigger1=alive
value=301,0

[State ]
type=PlaySnd
triggerall=IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
triggerall=Time=1
trigger1=stateno=52
trigger2=stateno=106
value=40,0

[State ]
type=changeanim
triggerall=IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
triggerall=!alive
triggerall=Matchover=1
triggerall=LoseKo=1
trigger1=stateno=5150
value=1278
;------------------------------------------------------------------------------------------------------
[State ]
type=null
trigger1=!ishelper&&var(30)>0
trigger1=var(30)>0
trigger1=var(30):=59
trigger2=IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
trigger2=RoundState=2
trigger2=(var(9):=0)&&(var(30):=59)
IgnoreHitPause=1

[State ]
type=null
triggerall=RoundState!=2||!Alive
trigger1=!ishelper&&var(30)>0
trigger1=var(30):=-2
trigger2=IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
trigger2=RoundState>3
trigger2=var(9):=1
IgnoreHitPause=1
;====================================================================================================
[Statedef -3]

[State ]
type=VarSet
triggerAll=NumHelper(1008)
trigger1=!ishelper
v=29
value=GameTime+GameTime
IgnoreHitPause=1

[State ]
type=VarSet
trigger1=IsHelper
v=59
value=GameTime+1000
IgnoreHitPause=1

[State ]
type=LifeAdd
triggerall=alive&&roundstate=2&&!ishelper
trigger1=random%10=0
trigger1=StateNo!=[120,155]
trigger1=life<=50
value=2
kill=0
persistent=30

[State ];嫍棧X幉1
type=null
triggerall=!ishelper||IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
triggerall=numenemy=1||numenemy=2&&enemynear(0),alive
trigger1=fvar(13):=0||1
trigger1=statetype!=a&&enemynear,statetype!=a&&(Pos X<enemynear,Pos X&&enemynear,facing=-1||enemynear,Pos X<Pos X&&enemynear,facing=1)&&facing=1
trigger2=statetype!=a&&enemynear,statetype!=a&&(Pos X<enemynear,Pos X&&enemynear,facing=-1||enemynear,Pos X<Pos X&&enemynear,facing=1)&&!fvar(13)
trigger3=statetype!=a&&enemynear,statetype!=a&&(Pos X<enemynear,Pos X&&enemynear,facing=1||enemynear,Pos X<Pos X&&enemynear,facing=-1)&&facing=1
trigger4=statetype!=a&&enemynear,statetype!=a&&(Pos X<enemynear,Pos X&&enemynear,facing=1||enemynear,Pos X<Pos X&&enemynear,facing=-1)&&!fvar(13)
trigger5=statetype=a&&enemynear,statetype!=a&&(Pos X<enemynear,Pos X&&enemynear,facing=-1||enemynear,Pos X<Pos X&&enemynear,facing=1)&&facing=1
trigger6=statetype=a&&enemynear,statetype!=a&&(Pos X<enemynear,Pos X&&enemynear,facing=-1||enemynear,Pos X<Pos X&&enemynear,facing=1)&&!fvar(13)
trigger7=statetype=a&&enemynear,statetype!=a&&(Pos X<enemynear,Pos X&&enemynear,facing!=-1||enemynear,Pos X<Pos X&&enemynear,facing!=1)&&facing=1
trigger8=statetype=a&&enemynear,statetype!=a&&(Pos X<enemynear,Pos X&&enemynear,facing!=-1||enemynear,Pos X<Pos X&&enemynear,facing!=1)&&!fvar(13)
trigger9=statetype!=a&&enemynear,statetype=a&&(Pos X<enemynear,Pos X&&enemynear,facing=-1||enemynear,Pos X<Pos X&&enemynear,facing=1)&&facing=1
trigger10=statetype!=a&&enemynear,statetype=a&&(Pos X<enemynear,Pos X&&enemynear,facing=-1||enemynear,Pos X<Pos X&&enemynear,facing=1)&&!fvar(13)
trigger11=statetype!=a&&enemynear,statetype=a&&(Pos X<enemynear,Pos X&&enemynear,facing!=-1||enemynear,Pos X<Pos X&&enemynear,facing!=1)&&facing=1
trigger12=statetype!=a&&enemynear,statetype=a&&(Pos X<enemynear,Pos X&&enemynear,facing!=-1||enemynear,Pos X<Pos X&&enemynear,facing!=1)&&!fvar(13)
trigger13=statetype=a&&enemynear,statetype=a&&(Pos X<enemynear,Pos X&&enemynear,facing=-1||enemynear,Pos X<Pos X&&enemynear,facing=1)&&facing=1
trigger14=statetype=a&&enemynear,statetype=a&&(Pos X<enemynear,Pos X&&enemynear,facing=-1||enemynear,Pos X<Pos X&&enemynear,facing=1)&&!fvar(13)
trigger15=statetype=a&&enemynear,statetype=a&&(Pos X<enemynear,Pos X&&enemynear,facing!=-1||enemynear,Pos X<Pos X&&enemynear,facing!=1)&&facing=1
trigger16=statetype=a&&enemynear,statetype=a&&(Pos X<enemynear,Pos X&&enemynear,facing!=-1||enemynear,Pos X<Pos X&&enemynear,facing!=1)&&!fvar(13)
trigger1=fvar(13):=ifelse(Pos X<enemynear,Pos X,-1,1)*enemynear,const(size.ground.front)+enemynear,Pos X-(Pos X+const(size.ground.front))||1
trigger2=fvar(13):=Pos X-const(size.ground.front)-(ifelse(Pos X<enemynear,Pos X,-1,1)*enemynear,const(size.ground.front)+enemynear,Pos X)||1
trigger3=fvar(13):=ifelse(Pos X<enemynear,Pos X,-1,1)*enemynear,const(size.ground.back)+enemynear,Pos X-(Pos X+const(size.ground.front))||1
trigger4=fvar(13):=Pos X-const(size.ground.front)-(ifelse(Pos X<enemynear,Pos X,-1,1)*enemynear,const(size.ground.back)+enemynear,Pos X)||1
trigger5=fvar(13):=ifelse(Pos X<enemynear,Pos X,-1,1)*enemynear,const(size.ground.front)+enemynear,Pos X-(Pos X+const(size.air.front))||1
trigger6=fvar(13):=Pos X-const(size.air.front)-(ifelse(Pos X<enemynear,Pos X,-1,1)*enemynear,const(size.ground.front)+enemynear,Pos X)||1
trigger7=fvar(13):=ifelse(Pos X<enemynear,Pos X,-1,1)*enemynear,const(size.ground.back)+enemynear,Pos X-(Pos X+const(size.air.front))||1
trigger8=fvar(13):=Pos X-const(size.air.front)-(ifelse(Pos X<enemynear,Pos X,-1,1)*enemynear,const(size.ground.back)+enemynear,Pos X)||1
trigger9=fvar(13):=ifelse(Pos X<enemynear,Pos X,-1,1)*enemynear,const(size.air.front)+enemynear,Pos X-(Pos X+const(size.ground.front))||1
trigger10=fvar(13):=Pos X-const(size.ground.front)-(ifelse(Pos X<enemynear,Pos X,-1,1)*enemynear,const(size.air.front)+enemynear,Pos X)||1
trigger11=fvar(13):=ifelse(Pos X<enemynear,Pos X,-1,1)*enemynear,const(size.air.back)+enemynear,Pos X-(Pos X+const(size.ground.front))||1
trigger12=fvar(13):=Pos X-const(size.ground.front)-(ifelse(Pos X<enemynear,Pos X,-1,1)*enemynear,const(size.air.back)+enemynear,Pos X)||1
trigger13=fvar(13):=ifelse(Pos X<enemynear,Pos X,-1,1)*enemynear,const(size.air.front)+enemynear,Pos X-(Pos X+const(size.air.front))||1
trigger14=fvar(13):=Pos X-const(size.air.front)-(ifelse(Pos X<enemynear,Pos X,-1,1)*enemynear,const(size.air.front)+enemynear,Pos X)||1
trigger15=fvar(13):=ifelse(Pos X<enemynear,Pos X,-1,1)*enemynear,const(size.air.back)+enemynear,Pos X-(Pos X+const(size.air.front))||1
trigger16=fvar(13):=Pos X-const(size.air.front)-(ifelse(Pos X<enemynear,Pos X,-1,1)*enemynear,const(size.air.back)+enemynear,Pos X)||1
ignorehitpause=1
[State ];嫍棧X幉2
type=null
triggerall=!ishelper||IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
triggerall=numenemy=2&&!enemynear(0),alive
trigger1=fvar(13):=0||1
trigger1=statetype!=a&&enemynear(1),statetype!=a&&(Pos X<enemynear(1),Pos X&&enemynear(1),facing=-1||enemynear(1),Pos X<Pos X&&enemynear(1),facing=1)&&facing=1
trigger2=statetype!=a&&enemynear(1),statetype!=a&&(Pos X<enemynear(1),Pos X&&enemynear(1),facing=-1||enemynear(1),Pos X<Pos X&&enemynear(1),facing=1)&&!fvar(13)
trigger3=statetype!=a&&enemynear(1),statetype!=a&&(Pos X<enemynear(1),Pos X&&enemynear(1),facing=1||enemynear(1),Pos X<Pos X&&enemynear(1),facing=-1)&&facing=1
trigger4=statetype!=a&&enemynear(1),statetype!=a&&(Pos X<enemynear(1),Pos X&&enemynear(1),facing=1||enemynear(1),Pos X<Pos X&&enemynear(1),facing=-1)&&!fvar(13)
trigger5=statetype=a&&enemynear(1),statetype!=a&&(Pos X<enemynear(1),Pos X&&enemynear(1),facing=-1||enemynear(1),Pos X<Pos X&&enemynear(1),facing=1)&&facing=1
trigger6=statetype=a&&enemynear(1),statetype!=a&&(Pos X<enemynear(1),Pos X&&enemynear(1),facing=-1||enemynear(1),Pos X<Pos X&&enemynear(1),facing=1)&&!fvar(13)
trigger7=statetype=a&&enemynear(1),statetype!=a&&(Pos X<enemynear(1),Pos X&&enemynear(1),facing!=-1||enemynear(1),Pos X<Pos X&&enemynear(1),facing!=1)&&facing=1
trigger8=statetype=a&&enemynear(1),statetype!=a&&(Pos X<enemynear(1),Pos X&&enemynear(1),facing!=-1||enemynear(1),Pos X<Pos X&&enemynear(1),facing!=1)&&!fvar(13)
trigger9=statetype!=a&&enemynear(1),statetype=a&&(Pos X<enemynear(1),Pos X&&enemynear(1),facing=-1||enemynear(1),Pos X<Pos X&&enemynear(1),facing=1)&&facing=1
trigger10=statetype!=a&&enemynear(1),statetype=a&&(Pos X<enemynear(1),Pos X&&enemynear(1),facing=-1||enemynear(1),Pos X<Pos X&&enemynear(1),facing=1)&&!fvar(13)
trigger11=statetype!=a&&enemynear(1),statetype=a&&(Pos X<enemynear(1),Pos X&&enemynear(1),facing!=-1||enemynear(1),Pos X<Pos X&&enemynear(1),facing!=1)&&facing=1
trigger12=statetype!=a&&enemynear(1),statetype=a&&(Pos X<enemynear(1),Pos X&&enemynear(1),facing!=-1||enemynear(1),Pos X<Pos X&&enemynear(1),facing!=1)&&!fvar(13)
trigger13=statetype=a&&enemynear(1),statetype=a&&(Pos X<enemynear(1),Pos X&&enemynear(1),facing=-1||enemynear(1),Pos X<Pos X&&enemynear(1),facing=1)&&facing=1
trigger14=statetype=a&&enemynear(1),statetype=a&&(Pos X<enemynear(1),Pos X&&enemynear(1),facing=-1||enemynear(1),Pos X<Pos X&&enemynear(1),facing=1)&&!fvar(13)
trigger15=statetype=a&&enemynear(1),statetype=a&&(Pos X<enemynear(1),Pos X&&enemynear(1),facing!=-1||enemynear(1),Pos X<Pos X&&enemynear(1),facing!=1)&&facing=1
trigger16=statetype=a&&enemynear(1),statetype=a&&(Pos X<enemynear(1),Pos X&&enemynear(1),facing!=-1||enemynear(1),Pos X<Pos X&&enemynear(1),facing!=1)&&!fvar(13)
trigger1=fvar(13):=ifelse(Pos X<enemynear(1),Pos X,-1,1)*enemynear(1),const(size.ground.front)+enemynear(1),Pos X-(Pos X+const(size.ground.front))||1
trigger2=fvar(13):=Pos X-const(size.ground.front)-(ifelse(Pos X<enemynear(1),Pos X,-1,1)*enemynear(1),const(size.ground.front)+enemynear(1),Pos X)||1
trigger3=fvar(13):=ifelse(Pos X<enemynear(1),Pos X,-1,1)*enemynear(1),const(size.ground.back)+enemynear(1),Pos X-(Pos X+const(size.ground.front))||1
trigger4=fvar(13):=Pos X-const(size.ground.front)-(ifelse(Pos X<enemynear(1),Pos X,-1,1)*enemynear(1),const(size.ground.back)+enemynear(1),Pos X)||1
trigger5=fvar(13):=ifelse(Pos X<enemynear(1),Pos X,-1,1)*enemynear(1),const(size.ground.front)+enemynear(1),Pos X-(Pos X+const(size.air.front))||1
trigger6=fvar(13):=Pos X-const(size.air.front)-(ifelse(Pos X<enemynear(1),Pos X,-1,1)*enemynear(1),const(size.ground.front)+enemynear(1),Pos X)||1
trigger7=fvar(13):=ifelse(Pos X<enemynear(1),Pos X,-1,1)*enemynear(1),const(size.ground.back)+enemynear(1),Pos X-(Pos X+const(size.air.front))||1
trigger8=fvar(13):=Pos X-const(size.air.front)-(ifelse(Pos X<enemynear(1),Pos X,-1,1)*enemynear(1),const(size.ground.back)+enemynear(1),Pos X)||1
trigger9=fvar(13):=ifelse(Pos X<enemynear(1),Pos X,-1,1)*enemynear(1),const(size.air.front)+enemynear(1),Pos X-(Pos X+const(size.ground.front))||1
trigger10=fvar(13):=Pos X-const(size.ground.front)-(ifelse(Pos X<enemynear(1),Pos X,-1,1)*enemynear(1),const(size.air.front)+enemynear(1),Pos X)||1
trigger11=fvar(13):=ifelse(Pos X<enemynear(1),Pos X,-1,1)*enemynear(1),const(size.air.back)+enemynear(1),Pos X-(Pos X+const(size.ground.front))||1
trigger12=fvar(13):=Pos X-const(size.ground.front)-(ifelse(Pos X<enemynear(1),Pos X,-1,1)*enemynear(1),const(size.air.back)+enemynear(1),Pos X)||1
trigger13=fvar(13):=ifelse(Pos X<enemynear(1),Pos X,-1,1)*enemynear(1),const(size.air.front)+enemynear(1),Pos X-(Pos X+const(size.air.front))||1
trigger14=fvar(13):=Pos X-const(size.air.front)-(ifelse(Pos X<enemynear(1),Pos X,-1,1)*enemynear(1),const(size.air.front)+enemynear(1),Pos X)||1
trigger15=fvar(13):=ifelse(Pos X<enemynear(1),Pos X,-1,1)*enemynear(1),const(size.air.back)+enemynear(1),Pos X-(Pos X+const(size.air.front))||1
trigger16=fvar(13):=Pos X-const(size.air.front)-(ifelse(Pos X<enemynear(1),Pos X,-1,1)*enemynear(1),const(size.air.back)+enemynear(1),Pos X)||1
ignorehitpause=1

[State ];嫍棧Y幉1
type=varset
triggerall=!ishelper||IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
trigger1=numenemy=1
trigger2=numenemy=2
trigger2=enemynear(0),alive
fvar(14)=(enemynear,Pos y)-Pos y
ignorehitpause=1

[State ];嫍棧Y幉2
type=varset
triggerall=!ishelper||IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
trigger1=numenemy=2
trigger1=!enemynear(0),alive
fvar(14)=(enemynear(1),Pos y)-Pos y
ignorehitpause=1
;-------------------------------------------------------------------------
;僿儖僷乕AI
;-------------------------------------------------------------------------
[State ]
type=VarSet
triggerall=!IsHelper
triggerall=var(30)!=1
trigger1=Command="AI0"
trigger2=Command="AI1"
trigger3=Command="AI2"
trigger4=Command="AI3"
trigger5=Command="AI4"
trigger6=Command="AI5"
trigger7=Command="AI6"
trigger8=Command="AI7"
trigger9=Command="AI8"
trigger10=Command="AI9"
trigger11=Command="AI10"
trigger12=Command="AI11"
trigger13=Command="AI12"
trigger14=Command="AI13"
trigger15=Command="AI14"
trigger16=Command="AI15"
trigger17=Command="AI16"
trigger18=Command="AI17"
trigger19=Command="AI18"
trigger20=Command="AI19"
trigger21=Command="AI20"
trigger22=Command="AI21"
trigger23=Command="AI22"
trigger24=Command="AI23"
trigger25=Command="AI24"
trigger26=Command="AI25"
trigger27=Command="AI26"
trigger28=Command="AI27"
trigger29=Command="AI28"
trigger30=Command="AI29"
trigger31=Command="AI30"
trigger32=Command="AI31"
trigger33=Command="AI32"
trigger34=Command="AI33"
trigger35=Command="AI34"
trigger36=Command="AI35"
trigger37=Command="AI36"
trigger38=Command="AI37"
trigger39=Command="AI38"
trigger40=Command="AI39"
trigger41=Command="AI40"
trigger42=Command="AI41"
trigger43=Command="AI42"
trigger44=Command="AI43"
trigger45=Command="AI44"
trigger46=Command="AI45"
trigger47=Command="AI46"
trigger48=Command="AI47"
trigger49=Command="AI48"
trigger50=Command="AI49"
trigger51=Command="AI50"
var(30)=1
;---------------------------------------------------------------------------

[State -1,charge]
type=null;SelfState
value=800
triggerall=!ishelper||IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
triggerall=roundstate<=3&&alive
trigger1=stateno!=800;ctrl=1

[State -1,RunFwd]
type=SelfState
triggerall=IsHelper(1001)||IsHelper(1002)||IsHelper(1003)||IsHelper(1004)
triggerall=!time
triggerall=Var(9)!=1&&Var(30)=59
trigger1=stateno=40
value=100000
ctrl=1

[State -1,RunFwd]
type=SelfState
value=var(26)
triggerall=!ishelper
triggerall=!time
triggerall=Var(9)!=1&&Var(30)=59
trigger1=ctrl||stateno=40