[Command]
name="AI0"
command=a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
time=0
[Command]
name="AI1"
command=b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b
time=0
[Command]
name="AI2"
command=c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
time=0
[Command]
name="AI3"
command=x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
time=0
[Command]
name="AI4"
command=y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
time=0
[Command]
name="AI5"
command=z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time=0
[Command]
name="AI6"
command=s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
time=0
[Command]
name="AI7"
command=F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F
time=0
[Command]
name="AI8"
command=D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D
time=0
[Command]
name="AI9"
command=B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B
time=0
[Command]
name="AI10"
command=U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U
time=0
[Command]
name="AI11"
command=a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
time=0
[Command]
name="AI12"
command=c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
time=0
[Command]
name="AI13"
command=x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
time=0
[Command]
name="AI14"
command=y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
time=0
[Command]
name="AI15"
command=z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time=0
[Command]
name="AI16"
command=s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
time=0
[Command]
name="AI17"
command=a,B,c,x,y,z,s,B,D,F,U,a,b,c,x,y,z,s,s
time=0
[Command]
name="AI18"
command=a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
time=0
[Command]
name="AI19"
command=b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b
time=0
[Command]
name="AI20"
command=c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
time=0
[Command]
name="AI21"
command=x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
time=0
[Command]
name="AI22"
command=y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
time=0
[Command]
name="AI23"
command=z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time=0
[Command]
name="AI24"
command=s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
time=0
[Command]
name="AI25"
command=F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F
time=0
[Command]
name="AI26"
command=D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D
time=0
[Command]
name="AI27"
command=B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B
time=0
[Command]
name="AI28"
command=U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U
time=0
[Command]
name="AI29"
command=a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
time=0
[Command]
name="AI30"
command=c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
time=0
[Command]
name="AI31"
command=x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
time=0
[Command]
name="AI32"
command=y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
time=0
[Command]
name="AI33"
command=z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time=0
[Command]
name="AI34"
command=s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
time=0
[Command]
name="AI35"
command=z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time=0
[Command]
name="AI36"
command=z,z,z,z,z,z,a,a,a,z,z,z,z,z,z,z,z,z,z
time=0
[Command]
name="AI37"
command=z,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,z,z,z
time=0
[Command]
name="AI38"
command=z,z,z,z,z,a,a,a,z,z,z,z,z,a,a,a,z,z,z
time=0
[Command]
name="AI39"
command=z,z,z,z,z,a,a,a,z,z,z,z,z,z,a,a,z,z,z
time=0
[Command]
name="AI40"
command=z,z,z,z,a,a,a,z,z,z,z,a,z,z,a,a,z,z,z
time=0
[Command]
name="AI41"
command=z,z,z,a,z,z,z,z,z,z,z,z,z,a,a,z,z,z,z
time=0
[Command]
name="AI42"
command=z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time=0
[Command]
name="AI43"
command=z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,a,a,z
time=0
[Command]
name="AI44"
command=z,z,a,a,a,a,z,z,z,z,z,z,z,z,z,a,a,a,z
time=0
[Command]
name="AI45"
command=z,z,z,z,z,z,a,a,z,z,z,z,z,a,a,a,a,z,z
time=0
[Command]
name="AI46"
command=z,z,z,z,z,z,z,z,a,a,a,a,a,a,z,z,z,z,z
time=0
[Command]
name="AI47"
command=z,z,z,a,a,a,a,z,z,z,z,z,z,z,z,z,z,z,z
time=0
[Command]
name="AI48"
command=z,z,z,z,z,a,a,a,z,z,z,a,a,a,z,z,a,z,a
time=0
[Command]
name="AI49"
command=z,z,z,z,a,a,a,z,z,z,z,z,a,a,a,z,z,z,z
time=0
[Command]
name="AI50"
command=z,z,z,a,a,z,z,z,z,z,z,z,z,z,a,a,z,z,z
time=0

[Defaults]
command.time=15
command.buffer.time=1

[command]
name="fwd"
command=F
time=1
[command]
name="back"
command=B
time=1
[command]
name="up"
command=U
time=1
[command]
name="start"
command=s
time=1
[command]
name="down"
command=D
time=1

[Command]
name="ShikiEx3-1"
command=~D,DF,F,D,DF,F,c
time=30
[Command]
name="ShikiEx2-1"
command=~D,DF,F,D,DF,F,x+y
time=30
[Command]
name="ShikiEx2-2"
command=~D,DF,F,D,DF,F,a+b
time=30

[Command]
name="ShikiEx-1"
command=~D,DF,F,D,DF,F,x
time=30
[Command]
name="ShikiEx-1"
command=~D,DF,F,D,DF,F,y
time=30
[Command]
name="ShikiEx-2"
command=~D,DF,F,D,DF,F,a
time=30
[Command]
name="ShikiEx-2"
command=~D,DF,F,D,DF,F,b
time=30

[Command]
name="shiki-1"
command=~D,DF,F,x
time=30
[Command]
name="shiki-2"
command=~D,DF,F,y
time=30
[Command]
name="shiki-3"
command=~D,DB,B,x
time=30
[Command]
name="shiki-4"
command=~D,DB,B,y
time=30
[Command]
name="shiki-5"
command=~D,DF,F,b
time=30
[Command]
name="shiki-6"
command=~D,DF,F,a
time=30
[Command]
name="shiki-7"
command=~D,DB,B,b
time=30
[Command]
name="shiki-8"
command=~D,DB,B,a
time=30

[Command]
name="FF"
command=F,F
time=13
[Command]
name="BB"
command=B,B
time=13
[Command]
name="FF"
command=/F,x+a
time=1
[Command]
name="BB"
command=/B,x+a
time=1
[Command]
name="recovery"
command=x+a
[Command]
name="recovery"
command=x
[Command]
name="recovery"
command=a
[Command]
name="recovery"
command=y
[Command]
name="recovery"
command=b
[Command]
name="地上受け身専用"
command=/U
[Command]
name="地上受け身専用"
command=/$F
[Command]
name="地上受け身専用"
command=/$B

[Command]
name="down_a"
command=/$D,a
time=1
[Command]
name="down_b"
command=/$D,b
time=1
[Command]
name="a"
command=a
time=1
[Command]
name="b"
command=b
time=1
[Command]
name="c"
command=c
time=1
[Command]
name="x"
command=x
time=1
[Command]
name="y"
command=y
time=1
[Command]
name="z"
command=z
time=1
[Command]
name="start"
command=s
time=1
[Command]
name="holdfwd"
command=/$F
time=1
[Command]
name="holdback"
command=/$B
time=1
[Command]
name="fwd"
command=$F
time=1
[Command]
name="back"
command=$B
time=1
[Command]
name="hold_x"
command=/x
time=1
[Command]
name="hold_a"
command=/a
time=1
[Command]
name="hold_y"
command=/y
time=1
[Command]
name="hold_b"
command=/b
time=1
[Command]
name="hold_c"
command=/c
time=1
[Command]
name="holdup"
command=/$U
time=1
[Command]
name="holddown"
command=/$D
time=1
[Command]
name="holddown2"
command=$D
time=1
[Command]
name="holddownfwd"
command=/DF
time=1
[Command]
name="1a"
command=/DB,x
time=1
[Command]
name="1b"
command=/DB,a
time=1
[Command]
name="1c"
command=/DB,y
time=1
[Command]
name="3a"
command=/DF,x
time=1
[Command]
name="3b"
command=/DF,a
time=1
[Command]
name="3c"
command=/DF,y
time=1
[Command]
name="up"
command=U
[Command]
name="down"
command=D
[Command]
name="right"
command=F
[Command]
name="left"
command=B

[Statedef -1]
[State ]
type=varset
triggerall=!var(59)
triggerall=roundstate=[1,2]
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"
trigger52=numhelper(99999)=1
trigger52=helper(99999),var(59)=2
trigger53=palno>=7
var(59)=1

[State ]
type=ChangeState
value=6000
triggerall=!IsHelper
triggerall=!var(59)
triggerall=command="ShikiEx3-1"
triggerall=power>=3000
trigger1=statetype!=A
trigger1=ctrl
[State ]
type=ChangeState
value=3000
triggerall=!IsHelper
triggerall=!var(59)
triggerall=command="ShikiEx2-1"
triggerall=power>=2000
trigger1=statetype!=A
trigger1=ctrl
trigger2=stateno=210&&movecontact
trigger3=stateno=220&&movecontact
trigger4=stateno=1002&&movecontact
trigger5=stateno=1071&&movecontact
[State ]
type=ChangeState
value=3100
triggerall=!IsHelper
triggerall=!var(59)
triggerall=command="ShikiEx2-2"
triggerall=power>=2000
trigger1=statetype!=A
trigger1=ctrl
trigger2=stateno=210&&movecontact
trigger3=stateno=220&&movecontact
trigger4=stateno=1005&&movecontact
trigger5=stateno=1071&&movecontact
[State ]
type=ChangeState
value=2000
triggerall=!IsHelper
triggerall=!var(59)
triggerall=command="ShikiEx-1"
triggerall=power>=1000
trigger1=statetype!=A
trigger1=ctrl
trigger2=stateno=210&&movecontact
trigger3=stateno=220&&movecontact
trigger4=stateno=1005&&movecontact
trigger5=stateno=1071&&movecontact
[State ]
type=ChangeState
value=2100
triggerall=!IsHelper
triggerall=!var(59)
triggerall=command="ShikiEx-2"
triggerall=power>=1000
trigger1=statetype!=A
trigger1=ctrl
trigger2=stateno=210&&movecontact
trigger3=stateno=230&&movecontact
trigger4=stateno=1005&&movecontact
trigger5=stateno=1071&&movecontact
[State ]
type=ChangeState
value=1000
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype!=A
triggerall=command!="holddown"
triggerall=command="shiki-1"
trigger1=ctrl
trigger2=stateno=210&&movecontact
trigger3=stateno=220&&movecontact
[State ]
type=ChangeState
value=1010
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype!=A
triggerall=command!="holddown"
triggerall=command="shiki-2"
trigger1=ctrl
trigger2=stateno=210&&movecontact
trigger3=stateno=220&&movecontact
[State ]
type=ChangeState
value=1020
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype!=A
triggerall=command!="holddown"
triggerall=command="shiki-3"
trigger1=ctrl
trigger2=stateno=210&&movecontact
trigger3=stateno=220&&movecontact
trigger4=stateno=410&&movecontact
trigger5=stateno=420&&movecontact
trigger6=stateno=1005&&movehit
[State ]
type=ChangeState
value=1030
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype!=A
triggerall=command!="holddown"
triggerall=command="shiki-4"
trigger1=ctrl
trigger2=stateno=210&&movecontact
trigger3=stateno=220&&movecontact
trigger4=stateno=410&&movecontact
trigger5=stateno=420&&movecontact
trigger6=stateno=1005&&movehit
[State ]
type=ChangeState
value=1040
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype!=A
triggerall=command!="holddown"
triggerall=command="shiki-5"
trigger1=ctrl
trigger2=stateno=210&&movecontact
trigger3=stateno=220&&movecontact
trigger4=stateno=1012&&movecontact
[State ]
type=ChangeState
value=1050
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype!=A
triggerall=command!="holddown"
triggerall=command="shiki-6"
trigger1=ctrl
trigger2=stateno=210&&movecontact
trigger3=stateno=220&&movecontact
trigger4=stateno=1012&&movecontact
[State ]
type=ChangeState
value=1060
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype!=A
triggerall=command!="holddown"
triggerall=command="shiki-7"
trigger1=ctrl
[State ]
type=ChangeState
value=1070
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype!=A
triggerall=command!="holddown"
triggerall=command="shiki-8"
trigger1=ctrl
[State ]
type=ChangeState
value=800
triggerall=!IsHelper
triggerall=!var(59)
triggerall=command="y"
triggerall=command="holdfwd"||command="holdback"
triggerall=statetype=S
triggerall=stateno!=100
trigger1=p2bodydist X<25
trigger1=p2statetype!=A&&p2movetype!=H
trigger1=ctrl
[State ]
type=ChangeState
value=800
triggerall=!IsHelper
triggerall=!var(59)
triggerall=command="b"
triggerall=command="holdfwd"||command="holdback"
triggerall=statetype=S
triggerall=stateno!=100
trigger1=p2bodydist X<25
trigger1=p2statetype!=A&&p2movetype!=H
trigger1=ctrl
[State ]
type=ChangeState
value=200
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype!=A
triggerall=command!="holddown"
triggerall=command="x"
trigger1=ctrl
trigger2=stateno=200&&movecontact
[State ]
type=ChangeState
value=210
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype!=A
triggerall=command!="holddown"
triggerall=command="y"
trigger1=ctrl
trigger2=stateno=200&&movecontact
[State ]
type=ChangeState
value=220
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype!=A
triggerall=command!="holddown"
triggerall=command="a"
trigger1=ctrl
trigger2=stateno=200&&movecontact
trigger3=stateno=210&&movecontact
[State ]
type=ChangeState
value=230
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype!=A
triggerall=command!="holddown"
triggerall=command="b"
trigger1=ctrl
trigger2=stateno=200&&movecontact
trigger3=stateno=220&&movecontact
[State ]
type=ChangeState
value=400
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype!=A
triggerall=command="holddown"
triggerall=command="x"
trigger1=ctrl
trigger2=stateno=400&&movecontact&&animelemtime(4)>=0
[State ]
type=ChangeState
value=410
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype!=A
triggerall=command="holddown"
triggerall=command="y"
trigger1=ctrl
trigger2=stateno=400&&movecontact
[State ]
type=ChangeState
value=420
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype!=A
triggerall=command="holddown"
triggerall=command="a"
trigger1=ctrl
trigger2=stateno=400&&movecontact
trigger3=stateno=410&&movecontact
[State ]
type=ChangeState
value=430
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype!=A
triggerall=command="holddown"
triggerall=command="b"
trigger1=ctrl
trigger2=stateno=400&&movecontact
trigger3=stateno=420&&movecontact
[State ]
type=ChangeState
value=600
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype=A
triggerall=command="x"
trigger1=ctrl
trigger2=stateno=600&&movecontact
[State ]
type=ChangeState
value=610
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype=A
triggerall=command="y"
trigger1=ctrl
trigger2=stateno=600&&movecontact
[State ]
type=ChangeState
value=620
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype=A
triggerall=command="a"
trigger1=ctrl
trigger2=stateno=600&&movecontact
trigger3=stateno=610&&movecontact
[State ]
type=ChangeState
value=630
triggerall=!IsHelper
triggerall=!var(59)
triggerall=statetype=A
triggerall=command="b"
trigger1=ctrl
trigger2=stateno=600&&movecontact
trigger3=stateno=610&&movecontact
trigger4=stateno=620&&movecontact
[State ]
type=ChangeState
value=700
triggerall=!IsHelper
triggerall=!var(59)
triggerall=!var(6)
triggerall=command="z"
trigger1=statetype!=A
trigger1=ctrl
[State ]
type=ChangeState
value=100
triggerall=!Ishelper
triggerall=!var(59)
triggerall=command="FF"
triggerall=statetype!=A
triggerall=stateno!=100
trigger1=ctrl
[State ]
type=ChangeState
value=105
triggerall=!IsHelper
triggerall=!var(59)
triggerall=command="BB"
triggerall=statetype!=A
trigger1=ctrl
trigger2=stateno=101

;----------------------------------------
;KIRIKAESHI
;----------------------------------------

[State -1, AI-6000]
type = ChangeState
value = 6000
TriggerAll = !IsHelper
TriggerAll = power>=3000
TriggerAll=var(59)=1
TriggerAll=RoundState = 2
TriggerAll=StateType!=A
TriggerAll=RoundState=2
TriggerAll=P2BodyDist X=[10,60]
TriggerAll=P2BodyDist Y=0
TriggerAll=Ctrl
TriggerAll=EnemyNear,MoveType=A
TriggerAll=Random<=900 || palno >= 7
TriggerAll=EnemyNear,AnimTime<=-1
TriggerAll=Enemynear,Time>=3 || palno >= 7
TriggerAll = facing != (enemynear,facing)
TriggerAll = EnemyNear,life <= EnemyNear,lifemax/1.43
Trigger1 = Enemynear,Time>=20 || palno >= 7
Trigger2 = (PrevStateNo=[5000,5270])
Trigger3 = (PrevStateNo=[120,159])

[State -1, AI-1060&1070]
type = ChangeState
value = ifelse(Random<=500,1060,1070)
TriggerAll = !IsHelper
TriggerAll=var(59)=1
TriggerAll=RoundState = 2
TriggerAll=StateType!=A
TriggerAll=RoundState=2
TriggerAll=P2BodyDist X=[-5,60]
TriggerAll=P2BodyDist Y=0
TriggerAll=Ctrl
TriggerAll=EnemyNear,MoveType=A
TriggerAll=Random<=200 || palno >= 7
TriggerAll=EnemyNear,AnimTime<=-1
TriggerAll=Enemynear,Time>=4 || palno >= 7
TriggerAll = facing != (enemynear,facing)
Trigger1 = Enemynear,Time>=20 || palno >= 7
Trigger2 = (PrevStateNo=[5000,5270])
Trigger3 = (PrevStateNo=[120,159])

[State -1,AI-105]
type = ChangeState
value = 105
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=var(59)=1
TriggerAll=StateType != A
TriggerAll=Ctrl
TriggerAll=(EnemyNear,StateNo=[200,699])||EnemyNear,HitDefAttr=SCA,AT
TriggerAll=P2BodyDist X=[-5,90]
TriggerAll=EnemyNear,vel x<3
TriggerAll=EnemyNear,MoveType=A
TriggerAll=Random<=600
TriggerAll=EnemyNear,Time>=30
Trigger1 = EnemyNear,Time>=50
Trigger2 = (PrevStateNo=[5000,5270])
Trigger3 = (PrevStateNo=[120,159])

[State -1,AI-40]
type = ChangeState
value = 40
TriggerAll=RoundState=2
TriggerAll=var(59)=1
TriggerAll=StateType!=A
TriggerAll=Ctrl
TriggerAll=EnemyNear,HitDefAttr=SCA,AT
TriggerAll=Random<=600
TriggerAll=EnemyNear,Time>=30
Trigger1 = EnemyNear,Time>=50
Trigger2 = (PrevStateNo=[5000,5270])
Trigger3 = (PrevStateNo=[120,159])

;----------------------------------------
;GUARD
;----------------------------------------

[State -1,AI-120]
Type = ChangeState
Value = 120
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=var(59)=1
TriggerAll=StateNo!=[120,155]
TriggerAll=Ctrl
TriggerAll=inguarddist
Trigger1 = Random<=600 || palno >= 7
Trigger2 = P2BodyDist X>90||EnemyNear,Time>50
Trigger2 = Random<=400 || palno >= 7

;----------------------------------------
;OKIZEME (Ground)
;----------------------------------------

;----------------------------------------
;OKIZEME (Air)
;----------------------------------------

;----------------------------------------
;MEOSHI (Ground)
;----------------------------------------

[State -1,AI-3100]
type = ChangeState
value = 3100
TriggerAll = !IsHelper
TriggerAll = palno >= 7
TriggerAll = power>=2000
TriggerAll=var(59)=1
TriggerAll=RoundState = 2
TriggerAll=StateType != A
TriggerAll=EnemyNear,StateType = L
TriggerAll=!inguarddist
TriggerAll=Random <= 900
TriggerAll=P2BodyDist X=[-5,100]
TriggerAll=P2BodyDist Y=0
TriggerAll=Ctrl
TriggerAll = EnemyNear,Stateno=[5000,5100]
Trigger1 = EnemyNear,MoveType = H
Trigger1 = (EnemyNear,StateNo != [120,159])

[State -1,AI-230]
type = ChangeState
value = 230
TriggerAll = !IsHelper
TriggerAll=var(59)=1
TriggerAll=RoundState = 2
TriggerAll=StateType != A
TriggerAll=EnemyNear,StateType = L
TriggerAll=!inguarddist
TriggerAll=Random <= 900
TriggerAll=P2bodydist X = [-5,85]
TriggerAll=P2bodydist Y = [-70,-1]
TriggerAll=Ctrl
TriggerAll = EnemyNear,Stateno=[5000,5100]
Trigger1 = EnemyNear,MoveType = H
Trigger1 = (EnemyNear,StateNo != [120,159])

[State -1,AI-420]
type = ChangeState
value = 420
TriggerAll = !IsHelper
TriggerAll=var(59)=1
TriggerAll=RoundState = 2
TriggerAll=StateType != A
TriggerAll=EnemyNear,StateType = L
TriggerAll=!inguarddist
TriggerAll=Random <= 950
TriggerAll=P2bodydist X = [-5,135]
TriggerAll=P2bodydist Y >= 0
TriggerAll=Ctrl
TriggerAll = EnemyNear,Stateno=[5000,5100]
Trigger1 = EnemyNear,MoveType = H
Trigger1 = (EnemyNear,StateNo != [120,159])

[State -1,AI-100]
type = ChangeState
value = 100
TriggerAll = !IsHelper
TriggerAll=var(59)=1
TriggerAll=RoundState = 2
TriggerAll=StateType != A
TriggerAll=EnemyNear,StateType = L
TriggerAll=!inguarddist
TriggerAll=Random <= 900
TriggerAll=P2bodydist X >= 50
TriggerAll=P2bodydist Y = 0
TriggerAll=Ctrl
TriggerAll = stateno!=[100,101]
TriggerAll = facing != (enemynear,facing)
Trigger1 = EnemyNear,MoveType = H
Trigger1 = (EnemyNear,StateNo != [120,159])

;----------------------------------------
;SUKITSUKI (Ground)
;----------------------------------------

[State -3,AI-200]
type = ChangeState
value = 200
TriggerAll = !IsHelper
TriggerAll=var(59)=1
TriggerAll=RoundState = 2
TriggerAll=StateType != A
TriggerAll=EnemyNear,StateType != L
TriggerAll=!inguarddist
TriggerAll=Random <= 1000
TriggerAll=P2bodydist X = [-5,17]
TriggerAll=P2bodydist Y >= -55
TriggerAll=Ctrl
TriggerAll=EnemyNear,AnimTime <= -2
TriggerAll = EnemyNear,Vel Y > 0
Trigger1 = (EnemyNear,StateNo = [200,649])
Trigger2 = EnemyNear,MoveType = I
Trigger2 = EnemyNear,StateType = A || EnemyNear,StateType = S
Trigger2 = !EnemyNear,Ctrl

;----------------------------------------
;TSUNAGI (Ground)
;----------------------------------------

[State -1,AI-3000]
type = ChangeState
value = 3000
TriggerAll = !IsHelper
TriggerAll = power>=2000
TriggerAll=RoundState=2
TriggerAll=var(59)=1
TriggerAll=StateType != A
TriggerAll=EnemyNear,Alive
TriggerAll=EnemyNear,MoveType=H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X>=-5
TriggerAll=P2BodyDist Y=0
TriggerAll=MoveHit
Trigger1 = Random<=300 || EnemyNear,life <= EnemyNear,lifemax/2.5 || palno = 12
Trigger1 = StateNo=1002 && EnemyNear,StateType != C
Trigger2 = Random<=400 && (life >= lifemax/5 || EnemyNear,life <= EnemyNear,lifemax/2.5) || palno = 12
Trigger2 = StateNo=220 && EnemyNear,StateType != C

[State -1,AI-3100]
type = ChangeState
value = 3100
TriggerAll = !IsHelper
TriggerAll = power>=2000
TriggerAll=RoundState=2
TriggerAll=var(59)=1
TriggerAll=StateType != A
TriggerAll=EnemyNear,Alive
TriggerAll=EnemyNear,MoveType=H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[-5,100]
TriggerAll=P2BodyDist Y=0
TriggerAll=MoveHit
Trigger1 = Random<=600 || EnemyNear,life <= EnemyNear,lifemax/2 || palno = 12
Trigger1 = StateNo=1005
Trigger2 = Random<=500 && (life >= lifemax/4 || EnemyNear,life <= EnemyNear,lifemax/2) || palno = 12
Trigger2 = StateNo=220

[State -1,AI-2100]
type = ChangeState
value = 2100
TriggerAll = !IsHelper
TriggerAll = power>=1000
TriggerAll=RoundState=2
TriggerAll=var(59)=1
TriggerAll=StateType != A
TriggerAll=EnemyNear,Alive
TriggerAll=EnemyNear,MoveType=H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[-5,30]
TriggerAll=P2BodyDist Y=0
TriggerAll=MoveHit
Trigger1 = Random<=700 || EnemyNear,life <= EnemyNear,lifemax/5 || palno = 12
Trigger1 = StateNo=1005
Trigger2 = Random<=600 && ((life >= lifemax/5) || EnemyNear,life <= EnemyNear,lifemax/5) || palno = 12
Trigger2 = StateNo=230

[State -1,AI-2000]
type = ChangeState
value = 2000
TriggerAll = !IsHelper
TriggerAll = power>=1000
TriggerAll=RoundState=2
TriggerAll=var(59)=1
TriggerAll=StateType != A
TriggerAll=EnemyNear,Alive
TriggerAll=EnemyNear,MoveType=H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[-5,150]
TriggerAll=P2BodyDist Y=0
TriggerAll=MoveHit
Trigger1 = Random<=700 || EnemyNear,life <= EnemyNear,lifemax/5 || palno = 12
Trigger1 = StateNo=1005
Trigger2 = Random<=601 && ((life >= lifemax/5) || EnemyNear,life <= EnemyNear,lifemax/5) || palno = 12
Trigger2 = StateNo=220

[State -1,AI-200]
type = ChangeState
value = 200
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=(var(59)=1&&Random<=1000)
TriggerAll=StateType != A
TriggerAll=EnemyNear,Alive
TriggerAll=EnemyNear,MoveType=H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[-5,6]
TriggerAll=P2BodyDist Y=0
TriggerAll = MoveContAct
Trigger1 = StateNo=200
Trigger1 = EnemyNear,StateType != C

[State -1,AI-210]
type = ChangeState
value = 210
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=(var(59)=1&&Random<=1000)
TriggerAll=StateType != A
TriggerAll=EnemyNear,Alive
TriggerAll=EnemyNear,MoveType=H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[-5,80]
TriggerAll=P2BodyDist Y>=-60
TriggerAll=MoveContAct
Trigger1 = StateNo=200
Trigger1 = EnemyNear,vel y>=0

[State -1,AI-220]
type = ChangeState
value = 220
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=(var(59)=1&&Random<=1000)
TriggerAll=StateType != A
TriggerAll=EnemyNear,Alive
TriggerAll=EnemyNear,MoveType=H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[-5,80]
TriggerAll=P2BodyDist Y>=-65
TriggerAll=MoveContAct
Trigger1 = StateNo=210
Trigger1 = EnemyNear,vel y>=0

[State -1,AI-1000&1010]
type = ChangeState
value = ifelse(Random<=500,1010,1000)
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=(var(59)=1&&Random<=1000)
TriggerAll=StateType != A
TriggerAll=EnemyNear,Alive
TriggerAll=EnemyNear,MoveType=H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[-5,85]
TriggerAll=P2BodyDist Y>=-50
TriggerAll=MoveHit
Trigger1 = StateNo=220
Trigger1 = EnemyNear,vel y>=0

[State -1,AI-230]
type = ChangeState
value = 230
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=(var(59)=1&&Random<=1000)
TriggerAll=StateType != A
TriggerAll=EnemyNear,Alive
TriggerAll=EnemyNear,MoveType=H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[-5,85]
TriggerAll=P2BodyDist Y>=-60
TriggerAll=MoveContact
Trigger1 = StateNo=220
Trigger1 = EnemyNear,vel y>=0

[State -1,AI-1050]
type = ChangeState
value = 1050
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=(var(59)=1&&Random<=1000)
TriggerAll=StateType != A
TriggerAll=EnemyNear,Alive
TriggerAll=EnemyNear,MoveType=H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[-5,100]
;TriggerAll=P2BodyDist Y>=-70
TriggerAll=MoveHit
Trigger1 = StateNo=1012
Trigger1 = EnemyNear,BackEdgeBodyDist>=10

[State -1,AI-410]
type = ChangeState
value = 410
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=(var(59)=1&&Random<=1000)
TriggerAll=StateType != A
TriggerAll=EnemyNear,Alive
TriggerAll=EnemyNear,MoveType=H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[-5,85]
TriggerAll=P2BodyDist Y>=0
TriggerAll=MoveContAct
Trigger1 = StateNo=400

[State -1,AI-420]
type = ChangeState
value = 420
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=(var(59)=1&&Random<=1000)
TriggerAll=StateType != A
TriggerAll=EnemyNear,Alive
TriggerAll=EnemyNear,MoveType=H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[-5,130]
TriggerAll=P2BodyDist Y>=0
TriggerAll=MoveContAct
Trigger1 = StateNo=410

[State -1,AI-430]
type = ChangeState
value = 430
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=(var(59)=1&&Random<=1000)
TriggerAll=StateType != A
TriggerAll=EnemyNear,Alive
TriggerAll=EnemyNear,MoveType=H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[-5,95]
TriggerAll=P2BodyDist Y>=-60
TriggerAll = StateNo=420
Trigger1 = MoveGuarded
Trigger2 = MoveHit
Trigger2 = EnemyNear,StateType = L

[State -1,AI-1030]
type = ChangeState
value = 1030
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=(var(59)=1&&Random<=1000)
TriggerAll=StateType != A
TriggerAll=EnemyNear,Alive
TriggerAll=EnemyNear,MoveType=H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[-5,90]
TriggerAll=P2BodyDist Y>=-70
TriggerAll=MoveHit
TriggerAll = EnemyNear,vel y>=0
Trigger1 = StateNo=1005
Trigger2 = StateNo=420

;----------------------------------------
;MEOSHI (Air)
;----------------------------------------

;----------------------------------------
;SUKITSUKI (Air)
;----------------------------------------

[State -3,AI-610]
type = ChangeState
value = 610
TriggerAll = !IsHelper
TriggerAll=var(59)=1
TriggerAll=RoundState = 2
TriggerAll=StateType = A
TriggerAll=EnemyNear,StateType != L
TriggerAll=!inguarddist
TriggerAll=Random <= 1000
TriggerAll=P2bodydist X = [-5,50]
TriggerAll=P2bodydist Y = [80,20]
TriggerAll=Ctrl
TriggerAll=EnemyNear,AnimTime <= -6
TriggerAll = Vel Y > 0
Trigger1 = (EnemyNear,StateNo = [200,649])
Trigger2 = EnemyNear,MoveType = I
Trigger2 = EnemyNear,StateType = A || EnemyNear,StateType = S
Trigger2 = !EnemyNear,Ctrl

;----------------------------------------
;TSUNAGI (Air)
;----------------------------------------

[State -1,AI-610]
type = ChangeState
value = 610
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=(var(59)=1&&Random<=1000)
TriggerAll=StateType = A
TriggerAll=EnemyNear,Alive
TriggerAll=EnemyNear,MoveType=H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[-5,45]
TriggerAll=(P2BodyDist Y=[-100,45])
TriggerAll=MoveContAct
Trigger1 = StateNo=600

[State -1,AI-620]
type = ChangeState
value = 620
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=(var(59)=1&&Random<=1000)
TriggerAll=StateType = A
TriggerAll=EnemyNear,Alive
TriggerAll=EnemyNear,MoveType=H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[-5,65]
TriggerAll=(P2BodyDist Y=[-80,40])
TriggerAll=MoveContAct
Trigger1 = StateNo=610

[State -1,AI-630]
type = ChangeState
value = 630
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=(var(59)=1&&Random<=1000)
TriggerAll=StateType = A
TriggerAll=EnemyNear,Alive
TriggerAll=EnemyNear,MoveType=H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[-5,65]
TriggerAll=(P2BodyDist Y=[-30,40])
TriggerAll=MoveContAct
Trigger1 = StateNo=620

;----------------------------------------
;Other
;----------------------------------------
[State -1, AI-700]
type = ChangeState
value = 700
TriggerAll = !IsHelper
TriggerAll=RoundState = 2
TriggerAll=var(59)=1
TriggerAll = !var(6)
TriggerAll = power < 2000
TriggerAll=StateType != A
TriggerAll=EnemyNear,MoveType = H || EnemyNear,StateType = L
TriggerAll=P2BodyDist X>=80
TriggerAll=Ctrl
Trigger1 = Life <= Lifemax/2 || Roundno = 3
Trigger1 = Random <= 500
Trigger2 = palno = 12 && Random <= 900

;----------------------------------------
;IDOU (Ground)
;----------------------------------------

[State -1,AI-11]
type = ChangeState
value = 11
Ctrl = 0
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=var(59)
TriggerAll=StateType != A
TriggerAll=StateNo=0
TriggerAll=Ctrl
TriggerAll = EnemyNear,Movetype != I
TriggerAll = P2BodyDist X<100
TriggerAll = facing != (enemynear,facing)
Trigger1 = Random <= 150

[State -1,AI-0]
type = ChangeState
value = 0
Ctrl = 1
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=var(59)
TriggerAll=StateType != A
TriggerAll=StateNo = 11
Trigger1 = Random <= 600

[State -1,AI-100]
type     = ChangeState
value    = 100
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=var(59)=1
TriggerAll=StateType != A
TriggerAll=EnemyNear,StateType != L
TriggerAll=EnemyNear,MoveType = I
TriggerAll=!inguarddist
TriggerAll = stateno!=[100,101]
TriggerAll = facing != (enemynear,facing)
TriggerAll=Ctrl
Trigger1 = Random <= 200
Trigger1 = P2BodyDist X >= 70

[State -1,AI-40]
type     = ChangeState
value    = 40
TriggerAll = !IsHelper
TriggerAll=RoundState=2
TriggerAll=var(59)=1
TriggerAll=StateType != A
TriggerAll=EnemyNear,StateType != L
TriggerAll=EnemyNear,MoveType != H
TriggerAll=!inguarddist
TriggerAll=Ctrl
TriggerAll = facing != (enemynear,facing)
Trigger1 = EnemyNear,StateType = A && EnemyNear,Vel Y < 0
Trigger1 = Random <= 20

;----------------------------------------
;NAGE TAISAKU
;----------------------------------------

;----------------------------------------
;NAGE
;----------------------------------------

[State -1, AI-800]
type = ChangeState
value = 800
TriggerAll = !IsHelper
TriggerAll=var(59)=1
TriggerAll=RoundState = 2
TriggerAll=StateType != A
TriggerAll=EnemyNear,StateType != L
TriggerAll=EnemyNear,MoveType != H
TriggerAll = stateno!=100
TriggerAll = p2bodydist X<25
TriggerAll = p2statetype!=A&&p2movetype!=H
TriggerAll=Ctrl
Trigger1 = Random <= 120 || palno = 12 && Random <= 200
Trigger2 = (EnemyNear,StateNo=[120,159])

;----------------------------------------
;TAIKU
;----------------------------------------
[State -1, AI-1040]
type = ChangeState
value = 1040
TriggerAll = !IsHelper
TriggerAll=var(59)=1
TriggerAll=RoundState = 2
TriggerAll=StateType != A
TriggerAll=EnemyNear,StateType != L
TriggerAll=EnemyNear,MoveType != H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[10,170]
TriggerAll = (EnemyNear,Stateno = [40,50]) && EnemyNear,Vel Y <= 0
TriggerAll=EnemyNear,StateType=A
TriggerAll=Ctrl
Trigger1 = Random <= 200

;----------------------------------------
;GEDAN
;----------------------------------------

[State -1, AI-400]
type = ChangeState
value = 400
TriggerAll = !IsHelper
TriggerAll=var(59)=1
TriggerAll=RoundState = 2
TriggerAll=StateType != A
TriggerAll=EnemyNear,StateType != L
TriggerAll=EnemyNear,MoveType != H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[-5,38]
TriggerAll=EnemyNear,StateType=S
TriggerAll=Ctrl
Trigger1 = Random <= 230

[State -1, AI-1020]
type = ChangeState
value = 1020
TriggerAll = !IsHelper
TriggerAll=var(59)=1
TriggerAll=RoundState = 2
TriggerAll=StateType != A
TriggerAll=EnemyNear,StateType != L
TriggerAll=EnemyNear,MoveType != H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[50,120]
TriggerAll=EnemyNear,StateType=S
TriggerAll=Ctrl
Trigger1 = EnemyNear,Stateno != 40
Trigger1 = EnemyNear,BackEdgeBodyDist>=80
Trigger1 = Random <= 170

;----------------------------------------
;CHUDAN
;----------------------------------------

;----------------------------------------
;KENSEI
;----------------------------------------

[State -1,AI-200]
type = ChangeState
value = 200
TriggerAll = !IsHelper
TriggerAll=var(59)=1
TriggerAll=RoundState = 2
TriggerAll=StateType != A
TriggerAll=EnemyNear,StateType != L
TriggerAll=EnemyNear,MoveType != H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X = [-5,17]
TriggerAll=P2BodyDist Y >= -55
TriggerAll=(EnemyNear,StateNo != [120,159])||EnemyNear,StateType=A
TriggerAll=Ctrl
Trigger1 = Random <= 370

[State -1,AI-210]
type = ChangeState
value = 210
TriggerAll = !IsHelper
TriggerAll=var(59)=1
TriggerAll=RoundState = 2
TriggerAll=StateType != A
TriggerAll=EnemyNear,StateType != L
TriggerAll=EnemyNear,MoveType != H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X = [-5,60]
TriggerAll=P2BodyDist Y >= -70
TriggerAll=(EnemyNear,StateNo != [120,159])||EnemyNear,StateType=A
TriggerAll=Ctrl
Trigger1 = Random <= 290

[State -1,AI-3100]
type = ChangeState
value = 3100
TriggerAll = !IsHelper
TriggerAll = palno = 12
TriggerAll = power>=2000
TriggerAll=var(59)=1
TriggerAll=RoundState=2
TriggerAll=StateType != A
TriggerAll=EnemyNear,StateType != L
TriggerAll=EnemyNear,MoveType != H
TriggerAll=!InGuardDist
TriggerAll=P2BodyDist X=[-5,100]
TriggerAll=P2BodyDist Y=0
TriggerAll=(EnemyNear,StateNo != [120,159])||EnemyNear,StateType=A
TriggerAll=Ctrl
Trigger1 = Random <= 300

;----------------------------------------
;IDOU (Air)
;----------------------------------------

;----------------------------------------
;AIR
;----------------------------------------

[State -1,AI-600]
type = ChangeState
value = 600
TriggerAll = !IsHelper
TriggerAll=var(59)=1
TriggerAll=RoundState = 2
TriggerAll=StateType=A
TriggerAll=EnemyNear,StateType != L
TriggerAll=EnemyNear,MoveType != H
TriggerAll=!InGuardDist
TriggerAll=(P2BodyDist X = [-5,35])
TriggerAll=(P2BodyDist Y = [-90,30])
TriggerAll=(EnemyNear,StateNo != [120,159])||EnemyNear,StateType != A
TriggerAll=Ctrl
Trigger1 = Random <= 230

;----------------------------------------
[State ];AI
type=Changestate
trigger1=Ishelper(99999)
trigger1=stateno!=99999
value=99999

;========================================











