[Remap]
x = x
y = y
z = z
a = a
b = b
c = c
s = s

;-| Default Values |-------------------------------------------------------
[Defaults]
; Default value for the "time" parameter of a Command. Minimum 1.
command.time = 15

; Default value for the "buffer.time" parameter of a Command. Minimum 1,


command.buffer.time = 1
;--|hypers|--------------------------------------------------

[Command]
name = "ca"
command=~D,DF,F,a+b
time = 15

[Command]
name = "ca"
command=~D,DF,F,a+c
time = 15

[Command]
name = "ca"
command=~D,DF,F,b+c
time = 15

[Command]
name = "sh"
command=~D,DF,F,x+y
time = 15

[Command]
name = "sh"
command=~D,DF,F,x+z
time = 15

[Command]
name = "sh"
command=~D,DF,F,y+z
time = 15

[Command]
name = "ssmvc"
command=~D,DB,B,a+b
time = 30

[Command]
name = "ssmvc"
command=~D,DB,B,a+c
time = 30

[Command]
name = "ssmvc"
command=~D,DB,B,b+c
time = 30

[Command]
name = "ssa"
command=~35DB,DF,DB,$U,a
time = 25



[Command]
name = "ssb"
command=~35DB,DF,DB,$U,b
time = 25



[Command]
name = "ssc"
command=~35DB,DF,DB,$U,c
time = 25

[Command]
name = "ssc"
command=~35DB,DF,DB,$U,~c
time = 25
buffer.time=10

[Command]
name = "sspro"
command=~35DB,DF,DB,$U,a+b
time = 35



[Command]
name = "ssoa"
command=~DB,UF,~a
time = 10
buffer.time= 4
[Command]
name = "ssoa"
command=~DB,UF,a
time = 10
buffer.time= 4
[Command]
name = "ssob"
command=~DB,UF,~b
time = 10
buffer.time= 4
[Command]
name = "ssob"
command=~DB,UF,b
time = 10
buffer.time= 4

[Command]
name = "ssoc"
command=~DB,UF,~c
time = 10
buffer.time= 4
[Command]
name = "ssoc"
command=~DB,UF,c
time = 10
buffer.time= 4


[Command]
name = "twx"
command=~35$B,$F,$B,F,x
time = 25



[Command]
name = "twy"
command=~35$B,$F,$B,F, y
time = 25
[Command]
name = "twz"
command=~35$B,$F,$B,F, z
time = 25
[Command]
name = "twz"
command=~35$B,$F,$B,F, ~z
time = 25

[Command]
name = "twpro"
command=~35$B,$F,$B,F, x+y
time = 30

[Command]
name = "twpro"
command=~35$B,$F,$B,F, ~x+y
time = 25
buffer.time=10


;-------------------------------------------------
[Command]
name = "sbx"
command = ~$B,F,x
time = 15

[Command]
name = "sby"
command =~$B,F,y
time = 15


[Command]
name = "sbz"
command = ~$B,F,z
time = 15

[Command]
name = "sbx"
command = ~$B,F,~x
time = 15
buffer.time=7

[Command]
name = "sby"
command =~$B,F,~y
time = 15
buffer.time=7


[Command]
name = "sbz"
command = ~$B,F,~z
time = 15
buffer.time=7

[Command]
name = "sbex"
command = ~$B,F,x+y
time = 15

[Command]
name = "sbex"
command =~$B,F,y+z
time = 15

[Command]
name = "sbex"
command = ~$B,F,x+z
time = 15
;-----------------------------------
 [Command]
 name = "fkex"
 command = ~$D,$U, a+b
 time = 15

  [Command]
 name = "fkex"
 command = ~$D,$U, b+c
 time = 15


 [Command]
 name = "fkex"
 command = ~$D,$U, a+c
 time = 15

 ;-----------------------------------
 [Command]
 name = "fkaa"
 command = ~D,$U, a
 time = 15

  [Command]
 name = "fkab"
 command = ~D,$U, b
 time = 15


 [Command]
 name = "fkac"
 command = ~D,$U, c
 time = 15

 [Command]
 name = "fkx"
 command = ~$D,$U, a
 time = 15

  [Command]
 name = "fkx"
 command = ~$D,$U, ~a
 time = 15
 buffer.time=7



 [Command]
 name = "fky"
 command = ~$D,$U, b
 time = 15

  [Command]
 name = "fky"
 command =~$D,$U, ~b
 time = 15
 buffer.time=7

 [Command]
 name = "fkz"
 command = ~$D,$U, c
 time = 15

  [Command]
 name = "fkz"
 command = ~$D,$U, ~c
 time = 15
 buffer.time=7



;-| Double Tap |-----------------------------------------------------------


[Command]
name = "FF"     ;Required (do not remove)
command = F, F
time = 10

[Command]
name = "BB"     ;Required (do not remove)
command = B, B
time = 10

;-| 2/3 Button Combination |----------------------------------------------


[Command]
name="recovery"
command=x+y
time=1
[Command]
name="recovery"
command=x+z
time=1
[Command]
name="recovery"
command=y+z
time=1

[Command]
name="charge1"
command= /y

[Command]
name="charge2"
command=/b






[Command]
name="2p"
command=x+y
time=5
[Command]
name="2p"
command=x+z
time=5
[Command]
name="2p"
command=y+z
time=5

[Command]
name="2k"
command=a+b
time=5
[Command]
name="2k"
command=a+c
time=5
[Command]
name="2k"
command=b+c
time=5

[Command]
name = "SJ"
command = D,U
time = 10

[Command]
name = "SJ"
command = D,UF
time = 10

[Command]
name = "SJ"
command = D,UB
time = 10


;-| Dir + Button |---------------------------------------------------------
[Command]
name = "down_a"
command = /$D,a
time = 1

[Command]
name = "down_b"
command = /$D,b
time = 1


;-| Single Button |---------------------------------------------------------
[Command]
name = "a"
command = a
time = 1
buffer.time=3
[Command]
name = "b"
command = b
time = 1
buffer.time=3
[Command]
name = "c"
command = c
time = 1
buffer.time=3
[Command]
name = "x"
command = x
time = 1
buffer.time=3
[Command]
name = "y"
command = y
time = 1
buffer.time=3
[Command]
name = "z"
command = z
time = 1
buffer.time=3

[Command]
name="start"
command=s
time=1

;-| Hold Dir |--------------------------------------------------------------
[Command]
name = "holdfwd";Required (do not remove)
command = /$F
time = 1

[Command]
name = "holdback";Required (do not remove)
command = /$B
time = 1
[Command]
name = "holddown";Required (do not remove)
command = /$D
time = 1
[Command]
name = "holdup";Required (do not remove)
command = /$U
time = 1

[Command]
name = "holddir" ;Required (do not remove)
command = /$UF
time = 1

[Command]
name = "holddir";Required (do not remove)
command = /$DF
time = 1

[Command]
name = "holddir";Required (do not remove)
command = /$UB
time = 1

[Command]
name = "holddir";Required (do not remove)
command = /$DB
time = 1


;--------------------------------------------------------------------------

[Command]
name = "SJ"
command = $D,$U
time = 15

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

;---------------------------------------------------------------------------
[Command]
name="holda"
command=/a
time=1
[Command]
name="holdb"
command=/b
time=1
[Command]
name="holdc"
command=/c
time=1
[Command]
name="holdx"
command=/x
time=1
[Command]
name="holdy"
command=/y
time=1
[Command]
name="holdz"
command=/z
time=1
[Command]
name="holdstart"
command=/s
time=1
;------------------------------------------------------------------------------
[Statedef -1]




;===========================================================================
;---------------------------------------------------------------
[State -1, AI]
type = ChangeState
value = ifelse(var(58)=2,3014,3009)
triggerall = AILevel >0 && StateType != A && Power >= ifelse(var(58)=2,3000,1000)
triggerall = roundstate = 2
triggerall = p2statetype != L
triggerall = Random < 15*AIlevel
triggerall = p2statetype != A
triggerall = var(58) !=1
triggerall = var(19)!=4
triggerall = stateno !=[1000,3999]
triggerall = p2bodydist y=[-20,0]
triggerall = movetype != H
trigger1 = (ctrl || stateno=105 && var(58)=1) || stateno=40 ||stateno=55
trigger2 = stateno=200&&movecontact
trigger3= anim=206&&movecontact
trigger4= anim=211&&movecontact
trigger5= anim=213&&movecontact
trigger6= stateno=400&&movecontact
trigger7= stateno=405&&movecontact
trigger8= stateno=410&&movecontact
trigger9= stateno=430&&movecontact
trigger10= stateno=435&&movecontact
trigger11=((stateno = [200,440]) && movehit) && var(58)=1
trigger12= var(27)=3
trigger13 = stateno=1000&& animelemtime(5)>2&&animelemtime(6)<10&&var(58)=2
trigger14= stateno=1000&&var(58)=1&& animelemtime(5)>0
trigger15= var(28)=4
triggerall = p2bodydist x <60
;---------------------------------------------------------------
[State -1, AI]
type = ChangeState
value = ifelse(var(58)=0,3008,3013)
triggerall = AILevel >0 && StateType != A && Power >= 1000
triggerall = roundstate = 2
triggerall = p2statetype != L
triggerall = Random < 12*AIlevel
triggerall = p2statetype != A
triggerall = var(58) !=1
triggerall = ((p2bodydist x =[0,60])&&var(58)!=1)||((p2bodydist x =[0,90])&&var(58)=1)
triggerall = stateno !=[1000,3999]
triggerall = p2bodydist y=[-85,0]
triggerall = movetype != H
triggerall = var(19)!=4
trigger1 = (ctrl || stateno=105 && var(58)=1) || stateno=40 ||stateno=55
trigger2 = stateno=200&&movecontact
trigger3= anim=206&&movecontact
trigger4= anim=211&&movecontact
trigger5= anim=213&&movecontact
trigger6= stateno=400&&movecontact
trigger7= stateno=405&&movecontact
trigger8= stateno=410&&movecontact
trigger9= stateno=430&&movecontact
trigger10= stateno=435&&movecontact
trigger11=((stateno = [200,440]) && movehit)
trigger12= var(27)=3
trigger13 = stateno=1000&& animelemtime(5)>2&&animelemtime(6)<10&&var(58)=2
trigger14= stateno=1000&&var(58)=1&& animelemtime(5)>0
trigger15= var(28)=4
triggerall = p2bodydist x < 50
Ignorehitpause=1

;---------------------------------------------------------------
[State -1, AI]
type = ChangeState
value =  3000
triggerall = AILevel >0 && StateType != A && Power >= 1000
triggerall = roundstate = 2
triggerall = p2statetype != L
triggerall = Random < 12*AIlevel
triggerall = p2statetype != A
triggerall = p2bodydist x=[20,250]
triggerall = stateno !=[3000,3999]
triggerall = movetype != H
triggerall = var(58) = 1
triggerall = var(50) = 1
triggerall =!winko
triggerall = var(19)!=4
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2=((stateno = [200,440]) && movehit)
trigger3= stateno=1000&&var(58)=1&& animelemtime(6)>1
;---------------------------------------------------------------
[State -1, AI]
type = ChangeState
value =  3005
triggerall = AILevel >0 && StateType != A && Power >= 1000
triggerall = roundstate = 2
triggerall = p2statetype != L
triggerall = Random < 12*AIlevel
triggerall = p2statetype != A
triggerall = var(58) =1
triggerall = stateno !=[1000,3999]
trigger1 = (ctrl || stateno=105 && var(58)=1)
triggerall = movetype != H
triggerall = var(19)!=4
trigger2 =((stateno = [200,440]) && movehit)
trigger3= stateno=1000&&var(58)=1&& animelemtime(6)>1
triggerall = p2bodydist x < 65

;---------------------------------------------------------------
[State -1, AI]
type = ChangeState
value =  3006
triggerall = AILevel >0 && StateType = A && Power >= 1000
triggerall = roundstate = 2
triggerall = p2statetype != L
triggerall = Random < 12*AIlevel
triggerall = p2statetype = A
triggerall = var(58) =1
triggerall = stateno!=[610,611]
triggerall = stateno!=640
triggerall = stateno !=[1000,3999]
triggerall = p2bodydist y=[-30,30]
triggerall = var(19)!=4
trigger1 = (ctrl || stateno=105 && var(58)=1)
triggerall = movetype != H
trigger2 = (stateno = [600,640]) && movecontact|| ((stateno=[600,640]) && var(58)=1)
trigger3=stateno=1051 && (p2bodydist y=[-30,30]) && movehit
triggerall = p2bodydist x < 65
 ;--------------------------------------------
[State -1, Guard]
type = ChangeState
value = 120
triggerall = movetype !=H || stateno=5210
triggerall = roundstate = 2
triggerall = stateno!=[120,155]
triggerall=AILevel>0
triggerall = (statetype!=A)||(statetype=A && p2bodydist x >5)
triggerall =(StateNo !=[200,3999])&&(StateNo != 105)
Triggerall =  Random < (113*AILevel)
triggerall =InGuardDist || enemynear,hitdefattr=SCA,NP,SP,HP || enemynear,hitdefattr = SCA,AA
triggerall =((EnemyNear, movetype=A&& enemynear,hitdefattr!=SCA,AA)||( enemynear,hitdefattr=SCA,NP,SP,HP || enemynear,hitdefattr = SCA,AA))|| enemy,numproj >0
trigger1 = (ctrl || stateno=105 && var(58)=1) ||stateno=20

;---------------------------------------------------------------------------
;Stand Light Punch
;立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 200
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = (StateType = S)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,25]
Triggerall = Random < 63*AIlevel
triggerall = p2statetype !=L
triggerall = p2bodydist y=[-75,0]
triggerall = enemy, statetype != C
triggerall = var(50) = 1
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2= stateno = 400 && movecontact && var(58)!=1&& animelemtime(2)>0
trigger3=  stateno = 430 && movecontact  && var(58)!=1&& animelemtime(4)>0


;---------------------------------------------------------------------------
;Stand Strong Punch
;立ち強パンチ
[State -1, Stand strong Punch]
type = ChangeState
value = ifelse(var(58)=1,205,ifelse(p2bodydist x <20,210,205))
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = Random < 75*AIlevel
triggerall = p2statetype !=L
triggerall = p2bodydist y=[-75,0]
triggerall = enemy, statetype != C
Triggerall = P2BodyDist X = [0,45]
triggerall = var(50) = 1
triggerall = var(58)!=0
triggerall = p2movetype!=A
trigger1 = (ctrl && (var(56)=0||var(58)=2)) || ((stateno = 200 || stateno=230 || stateno = 400 || stateno=430) && movecontact&& var(56)=1&&var(58)=1)
trigger2 = (stateno = [200,201]) && movecontact && var(58) = 1
trigger3= stateno = 230 && movecontact && var(58) = 1


;---------------------------------------------------------------------------
;Stand Strong Punch  2
[State -1, Stand strong Punch2]
type = ChangeState
value = ifelse((var(58)!=1&&p2bodydist x=[40,60]),215,ifelse((var(58)=1&&p2bodydist x=[61,100]),216,ifelse((p2bodydist x >=60&&var(58)!=1),216,ifelse(((p2bodydist x =[20,59]) && var(58)!=1),215,220))))
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = Random < 31*AIlevel
triggerall = p2statetype !=L
triggerall = ((p2bodydist y=[-75,0])&&var(58)!=1)||(p2statetype!=A && var(58)=1)
triggerall = enemy, statetype != C
triggerall = p2bodydist x = [0,70]
triggerall = var(50) = 1
triggerall = stateno != [215,220]
triggerall = p2movetype!=A
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = (stateno = [200,205]) && movecontact && var(58) = 1
trigger3= stateno = 236 && movecontact && var(58) = 1
trigger4=var(27)=2 && var(58)=2 && stateno!=216
trigger5=var(28)=3&& var(58)=2  && stateno!=215




;---------------------------------------------------------------------------
;Stand Light Kick
;立ち弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = ifelse(p2bodydist x >35,231,230)
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = (StateType = S)
triggerall = stateno != [800,3999]
Triggerall = Random < 63*AIlevel
triggerall = p2statetype !=L
triggerall = p2bodydist y=[-75,0]
triggerall = p2bodydist x = [0,50]
triggerall = var(50) = 1
triggerall = enemy, statetype != C
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = stateno = 400 && movecontact && var(58)!=1&& animelemtime(2)>0
trigger3 = stateno = 430 && movecontact && var(58)!=1


;---------------------------------------------------------------------------
;Standing medium Kick
;立ち強キック
[State -1, Standing Strong Kick]
type = ChangeState
value = ifelse(var(58)=2 && var(27)=1,236,ifelse(var(58)=1,235,ifelse(var(58)!=1&&p2bodydist x <=20,235,236)))
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = Random < 75*AIlevel
triggerall = p2statetype !=L
triggerall = p2bodydist y=[-75,0]
triggerall = p2bodydist x = [0,60]
triggerall = var(50) = 1
triggerall = enemy, statetype != C ||var(27)
triggerall = p2movetype!=A
triggerall = var(58)!=0
trigger1 = (ctrl && (var(56)=0||var(58)=2)) || ((stateno = 200 || stateno=230 || stateno = 400 || stateno=430) && movecontact&& var(56)=1&&var(58)=1)
trigger2 = (stateno = [200,201]) && movecontact && var(58) = 1  && animelemtime(2)>2
trigger3= stateno = 230 && movecontact && var(58) = 1
trigger4=var(27)=1&& var(58)=2  && stateno!=236
;--------------------------------------------------------
;Stand hard Kick
;立ち弱キック
[State -1, Stand hard Kick]
type = ChangeState
value = ifelse(var(58)=1&&p2bodydist x >=40,237,ifelse( p2bodydist x <=40 && p2statetype =C,250,ifelse(var(58)!=1&&p2bodydist x >=20,245,240)))
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = Random < 75*AIlevel
triggerall = p2statetype !=L
triggerall = p2bodydist y=[-75,0]
triggerall = p2bodydist x = [0,25]
triggerall = var(50) = 1
triggerall = enemy, statetype != C
triggerall = p2movetype!=A
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = (stateno = [200,206]) && movecontact && var(58) = 1
trigger3= stateno = 237 && movecontact && var(58) = 1
;------------------------------------------------------
[State -1, AI5]
Type = ChangeState
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = (P2BodyDist X = [0,35])&&(P2BodyDist Y = 0 )
Triggerall = Random < 75*AIlevel
triggerall = (p2statetype !=L)
triggerall = p2bodydist y=[-40,0]
triggerall = (movetype !=H)
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = (stateno = [200,201]) && movecontact  && var(58)!=1 
trigger3 = stateno = 400 && movecontact   && var(58)!=1
trigger4 =  stateno = 430 && movecontact  && var(58)!=1&& animelemtime(4)>0
trigger5 = (stateno = [230,231]) && movecontact  && var(58)!=1
value = 400
;------------------------------------------------------
[State -1, AI2]
Type = ChangeState
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = StateType != A
triggerall = stateno != [800,3999]
Triggerall = (P2BodyDist X = [0,35])&&(P2BodyDist Y = 0 )
Triggerall = Random < 75*AIlevel
triggerall = p2statetype !=L
triggerall = (movetype !=H)
triggerall = enemy, statetype != A
triggerall = p2movetype!=A
triggerall = var(58)!=0
trigger1 = (ctrl && (var(56)=0||var(58)=2)) || ((stateno = 200 || stateno=230 || stateno = 400 || stateno=430) && movecontact&& var(56)=1&&var(58)=1)
trigger2 = stateno = 400 && movecontact  && var(58) =1
trigger3 = stateno = 430 && movecontact  && var(58) =1
trigger4 = stateno = 200 && movecontact  && var(58) =1
trigger5 = stateno = 230 && movecontact  && var(58) =1
value = 405
;------------------------------------------------------
[State -1, AI2]
Type = ChangeState
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall =  (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = (P2BodyDist X = [0,45])
triggerall = p2bodydist y=[-75,0]
Triggerall = Random < 75*AIlevel || (var(58)=1 && random <800)
triggerall = p2statetype !=L
triggerall=stateno!=410
triggerall = stateno !=220
triggerall = stateno !=215
triggerall = stateno !=216
triggerall=stateno!=[237,245]
triggerall = p2movetype!=A
triggerall = (movetype !=H)
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2=((stateno = 200) && movecontact|| (stateno=230)) && var(58)=1
trigger3=((stateno = 400) && movecontact|| (stateno=430)) && var(58)=1
trigger10= var(27)=3&& var(58)=1
trigger4= stateno=435&&movehit&&var(58)=2
value = 410
;------------------------------------------------------
[State -1, AI9]
Type = ChangeState
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = StateType != A
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,35]
triggerall = (movetype !=H)
Triggerall = ( Random < 75*AIlevel) && (enemy, statetype != A && enemy,statetype !=L)
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = (stateno = [200,201]) && movecontact  && var(58)!=1  && animelemtime(1)>3
trigger3 = stateno = 400 && movecontact   && var(58)!=1&& animelemtime(1)>3
trigger4 =  stateno = 430 && movecontact  && var(58)!=1&& animelemtime(4)>0
trigger5 = (stateno = [230,231]) && movecontact && var(58) = 0
value = 430
;------------------------------------------------------
[State -1, AI 9]
Type = ChangeState
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = StateType != A
triggerall = stateno != [800,3999]
triggerall = p2movetype!=A
trigger1 = (ctrl && (var(56)=0||var(58)=2)) || ((stateno = 200 || stateno=230 || stateno = 400 || stateno=430) && movecontact&& var(56)=1&&var(58)=1)||(var(58)=0 && ctrl)
trigger2 = stateno = 400 && movecontact  && var(58) =1
trigger3 = stateno = 430 && movecontact  && var(58) =1
trigger4 = stateno = 200 && movecontact  && var(58) =1
trigger5 = stateno = 230 && movecontact  && var(58) =1
triggerall = (movetype !=H)
Triggerall = (P2BodyDist X = [0,45]) && (P2BodyDist Y = 0 )
Triggerall = ( Random < 75*AIlevel) && (enemy, statetype != A && enemy,statetype !=L)
Triggerall = stateno !=435
value = 435
;------------------------------------------------------
[State -1, AI8]
Type = ChangeState
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = StateType != A
triggerall = stateno != [800,3999]
trigger1 = (ctrl || stateno=105 && var(58)=1)
Triggerall = P2BodyDist X = [0,55]
triggerall = (movetype !=H)
triggerall=stateno!=410
triggerall=stateno!=440
triggerall=stateno!=[210,217]
triggerall=stateno!=[237,245]
Triggerall = (( Random < 50*AIlevel&&var(58)!=1)||(random<75*AILevel && var(58)=1)) && (enemy, statetype != A && enemy,statetype !=L)
trigger2=((stateno = 205) && movecontact|| (stateno=235)) && var(58)=1
trigger3=((stateno = 405) && movecontact|| (stateno=435)) && var(58)=1
trigger4= prevstateno=102 && ctrl && p2statetype=S && AILevel >6
value = 440
;---------------------------------------------------------------------------
;Jump Light Punch
;空中弱パンチ
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = statetype = A
triggerall = var(50) = 1
triggerall = stateno !=105
Triggerall = (RoundState = 2) && (AILevel >0)
triggerall = stateno != [800,3999]
Triggerall=(P2BodyDist X = [0,40])
triggerall = (movetype !=H)
triggerall = p2statetype=A &&  (p2stateno!=[5000,5299])  || var(58)=1
triggerall = vel x!=0 || var(58)=1
triggerall = vel y <=0 || var(58)=1
Triggerall =  (P2BodyDist Y = [-35,35])
Triggerall = ( Random < 800) && (enemy, statetype = A || var(58)=1)
trigger1=ctrl

;---------------------------------------------------------------------------
[State -1, Jump medium Punch]
type = ChangeState
value = ifelse(vel x =0,606,605)
triggerall = statetype = A
triggerall = var(50) = 1
triggerall = stateno !=105
Triggerall = (RoundState = 2) && (AILevel >0)
triggerall = stateno != [800,3999]
Triggerall=(P2BodyDist X = [0,50])
triggerall = (movetype !=H)
triggerall = p2statetype=A &&  (p2stateno!=[5000,5299])  || var(58)=1
triggerall = vel y >=0 || var(58)=1 || var(7)=1
Triggerall =  (P2BodyDist Y = [-20,40])
Triggerall = ( Random < 800) && (enemy, statetype = A || var(58)=1)
triggerall=stateno!=610
triggerall=stateno!=640
triggerall=stateno!=[635,636]
triggerall=stateno!=[605,606]
trigger1 = (ctrl && (var(56)=0||var(58)=2)) || ((stateno = 200 || stateno=230 || stateno = 400 || stateno=430) && movecontact&& var(56)=1&&var(58)=1)
trigger2 = (stateno = 600|| stateno=631) && movecontact&& var(58)=1


;---------------------------------------------------------
;Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = ifelse(vel x =0,611,610)
triggerall = statetype = A
triggerall = var(50) = 1
triggerall = stateno !=105
Triggerall = (RoundState = 2) && (AILevel >0)
triggerall = stateno != [800,3999]
Triggerall=(P2BodyDist X = [0,50])
triggerall = (movetype !=H)
triggerall = vel y >0 || var(58)=1|| var(7)=1
Triggerall =  (P2BodyDist Y = [-10,50])
Triggerall = ( Random < 800)
triggerall=stateno!=610
triggerall=stateno!=640
triggerall = enemy,gethitvar(hitcount)>1 || var(58)!=1
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = (stateno = 600|| stateno=631||(stateno=[605,606])||stateno=640) && movecontact&& var(58)=1


;---------------------------------------------------------------------------
;Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
value = ifelse(var(58)=1,631,ifelse(vel x =0,630,631))
triggerall = statetype = A
triggerall = var(50) = 1
triggerall = stateno !=105
Triggerall = (RoundState = 2) && (AILevel >0)
triggerall = stateno != [800,3999]
Triggerall=(P2BodyDist X = [-30,45])
triggerall = (movetype !=H)
triggerall = p2statetype=A &&  (p2stateno!=[5000,5299])  || var(58)=1
Triggerall =  (P2BodyDist Y = [-10,60])
Triggerall = ( Random < 800)
triggerall=stateno!=610
triggerall=stateno!=640
triggerall=stateno!=[635,636]
triggerall=stateno!=[605,606]
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = (stateno = [600,601]) && movecontact&& var(58)=1
;---------------------------------------------------------------------------
;Jump medium Kick
[State -1, Jump medium Kick]
type = ChangeState
value = ifelse(var(58)=1,636,ifelse(vel x =0,635,636))
triggerall = statetype = A
triggerall = var(50) = 1
triggerall = stateno !=105
Triggerall = (RoundState = 2) && (AILevel >0)
triggerall = stateno != [800,3999]
Triggerall=(P2BodyDist X = [0,60])
triggerall = (movetype !=H)
triggerall = vel y >=0 || var(58)=1|| var(7)=1
Triggerall =  (P2BodyDist Y = [-30,70])
Triggerall = ( Random < 800) && (enemy, statetype = A || var(58)=1)
triggerall=stateno!=610
triggerall=stateno!=640
triggerall=stateno!=[635,636]
trigger1 = (ctrl && (var(56)=0||var(58)=2)) || ((stateno = 200 || stateno=230 || stateno = 400 || stateno=430) && movecontact&& var(56)=1&&var(58)=1)
trigger2 = (stateno = 600|| stateno=631) && movecontact&& var(58)=1


;---------------------------------------------------------------------------
;Jump Strong Kick
;空中強キック
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall = statetype = A
triggerall = var(50) = 1
triggerall = stateno !=105
Triggerall = (RoundState = 2) && (AILevel >0)
triggerall = stateno != [800,3999]
Triggerall=(P2BodyDist X = [0,70])
triggerall = (movetype !=H)
triggerall = vel x!=0 || var(58)=1
triggerall = vel y >=0 || var(58)=1|| var(7)=1
Triggerall =  (P2BodyDist Y = [-30,90])
Triggerall = ( Random < 800)
triggerall=stateno!=610
triggerall=stateno!=640
triggerall = enemy,gethitvar(hitcount)>1 || var(58)!=1
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = (stateno = 600|| stateno=631||(stateno=[605,606])||stateno=640) && movecontact&& var(58)=1

;---------------------------------------------------------------------------
[State -1, AI]
type = ChangeState
value = ifelse(var(58)=1,1051,1050)
triggerall = AILevel >0 && (StateType != A||var(58)=1)
triggerall = roundstate = 2
triggerall = ((p2bodydist x=[0,55])&&(p2bodydist y=[-100,0])&& enemy,vel y >=0)||(p2statetype=A && (p2bodydist x=[0,60]))
triggerall = !(EnemyNear,IsHelper)
triggerall = p2statetype != L
triggerall = movetype != H
triggerall = stateno!=231
triggerall = (stateno!=236&&stateno!=240 &&stateno!=237) || var(58)=1
Triggerall = Random <=119
triggerall = var(19)<=1 || (var(58)=1&&statetype=A&&(stateno=[600,640])&&movecontact)
triggerall = stateno !=[800,899]
triggerall = (var(25)<=0)|| (var(58)=1&&statetype=A)
triggerall = var(19)=0||var(58)=1
triggerall = vel x <=0 || (stateno=20 && time <5)|| (stateno=100   && time <5)||(stateno=52&&ctrl)||prevstateno=52
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = ((stateno=[205,220])||(stateno=[400,420]))&&movehit  || ((stateno=[205,440]) && var(58)=1)||((stateno=[200,440]) && p2movetype=A&& var(58)=1)
trigger3=(stateno=605||stateno=636 ||stateno=606) && movecontact && enemy,gethitvar(hitcount)>2
trigger4= var(27)=2
trigger5= var(28)=3
trigger6= p2movetype=A && ctrl
triggerall = p2stateno !=[120,150]

;---------------------------------------------------------------------
[State -1, AI6]
type = ChangeState
value = 1000
triggerall = AILevel >0 && roundstate = 2 && statetype !=A
triggerall = (p2stateno!=[120,155]) && (p2statetype!=L)
triggerall = (p2bodydist y=[-50,0])
triggerall = numhelper(1001) <= 0
triggerall = var(24)<=0
triggerall = var(58)!=1 || stateno!=410
Triggerall = Random <=99
triggerall = vel x <=0 || (stateno=20 && time <5)||(stateno=52&&ctrl)
triggerall = var(19)<=1||var(58)=1
triggerall = (stateno!=236&&stateno!=240 &&stateno!=237) || var(58)=1
triggerall = stateno!=215||var(28)=4||var(27)=3 || var(58)=1
triggerall = stateno!=216||var(28)=4||var(27)=3 || var(58)=1
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = (stateno=[205,440])&&movehit  || ((stateno=[200,440]) && var(58)=1)
trigger3= var(27)=2
trigger4= var(28)=3
;------------------------------------------------------
[State -1, AI]
type=changestate
value=108
triggerall = AILevel >0 && StateType != A
triggerall = statetype = S
triggerall = roundstate = 2
triggerall = stateno !=108
triggerall = var(58)!=1
triggerall = p2statetype!=L
triggerall = p2movetype!=H
triggerall = stateno !=[3000,9999]
triggerall = ((p2bodydist x = [65,755])) && random < 22
trigger2 =(EnemyNear, HitDefAttr = SCA,AA)
triggerall=ctrl
trigger1 = (ctrl || stateno=105 && var(58)=1) ||  backedgedist <= 20
trigger3 = enemy,numproj >= 1





;--------------------------------------------------------------------
[State -1,CancelAI]
type = ChangeState
value = 102
triggerall = AILevel >0
triggerall = stateno !=102
triggerall = AILevel >0
triggerall = roundstate=2
triggerall = var(58) = 2
triggerall = random <149
triggerall = movetype !=H
triggerall = power >= 1000
triggerall = stateno != [200,899]
trigger1 = ((movecontact=1&&var(9)>=2&&stateno=1050)||(stateno=3013 && anim=3007&&movecontact=1 && animelemtime(7)>0)) || (stateno=1000 && animelemtime(6)>2&&animelemtime(6)<4)

;-------------------------------------------------------------------
[State -1, AI]
type=changestate
value=900
Triggerall = (AILevel >0)
triggerall = power != 3000
triggerall = statetype = S
triggerall = var(58) = 0
triggerall = roundstate = 2
triggerall= random < 100
triggerall = p2bodydist x > 100
triggerall = p2statetype=L || (p2statetype=A && p2movetype=H) || (p2movetype=H)
trigger1=ctrl

;------------------------------------------------------------------------
[State -1, AIgp]
type = ChangeState
value = 1600
triggerall = AILevel >0 && StateType != A
triggerall= statetype = S
triggerall = var(58)=1
triggerall = roundstate = 2
trigger1 = stateno = 150 || stateno = 151
triggerall = p2bodydist x < 25
triggerall = random < 499
;------------------------------------------------------------------------
[State -1, AIgp]
type = ChangeState
value = 1601
triggerall = AILevel >0 && StateType != A
triggerall= statetype = C
triggerall = roundstate = 2
triggerall = var(58)=1
trigger1 = stateno = 152 || stateno = 153
triggerall = p2bodydist x < 25
triggerall = random < 499
;------------------------------------------------------------------------
[State -1, AIgp]
type = ChangeState
value = 1602
triggerall = AILevel >0
triggerall= statetype = A
triggerall = roundstate = 2
triggerall = var(58)=1
trigger1 = stateno = 153 || stateno = 154
triggerall = p2bodydist x < 25
triggerall = random < 499
;------------------------------------------------------------------------
[State -1, AI Throw]
type = ChangeState
value = ifelse(statetype=A,ifelse(random<499,830,837),ifelse(random<499,800,850))
triggerall = random <= 30*AILevel
triggerall = AILevel >0
triggerall = statetype != A||(p2statetype=A&&statetype=A)
triggerall= ((p2statetype != A)&&statetype!=A)||p2statetype=A
triggerall = ctrl || stateno=20
triggerall = stateno != [200,9999]
Triggerall = (RoundState = 2)
triggerall = (p2MoveType != H)
trigger1 = p2bodydist X < 25 && (p2bodydist y = [-20,20])
trigger2 = (p2stateno =[120,150]) &&(p2bodydist X < 25 && (p2bodydist y = [-20,20]))
trigger3= p2stateno=5903&& p2bodydist x <25

;-------------------------------------------------
;-------------------------------------------------------------------
[State -1, AISuper Jump]
type = ChangeState
value = 55
triggerall = AILevel >0
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = Random < 31*AIlevel||var(58)=1
triggerall = var(58)!=2
trigger1 = (stateno = 410 && movehit &&var(58)=1 &&var(22)=1)|| (ctrl && var(58)=0 &&var(30)&&p2bodydist x >120)

;-------------------------------------------------
[state -1, AI jump]
type = changestate
triggerall=AILevel>0
triggerall = p2statetype !=L|| p2stateno=5120
triggerall = (p2stateno!=[5090,5119]) &&(p2stateno!=[5121,5899])
triggerall = statetype != A
triggerall = p2bodydist x >70 || p2movetype=H
triggerall = var(30)=1
trigger1 = (ctrl || stateno=105 && var(58)=1) && p2movetype=A && p2statetype=C  && random<119
trigger2 =p2statetype = C && (p2bodydist x = [50,90]) && ctrl && random<119
trigger3= enemy,hitdefattr=SC,AT  && ctrl
trigger4= p2bodydist x >60 && ctrl&& random<249 && p2movetype=A
trigger5= p2stateno =5120 && p2bodydist x <50 && ctrl && random<69
value = 40
;--------------------------------------------------------------------------
[State -1, Guard]
type = ChangeState
value = 120
triggerall = movetype !=H
triggerall = roundstate = 2
triggerall = stateno!=[120,155]
triggerall=AILevel>0
triggerall = (statetype!=A && p2bodydist x <5)||(p2bodydist x>=5)
triggerall = enemynear,hitdefattr!=SC,AA &&statetype=A
triggerall =(StateNo !=[200,3999])&&(StateNo != 105)
triggerall = Random < 900
triggerall =InGuardDist || enemynear,hitdefattr=SCA,NP,SP,HP
triggerall =(EnemyNear, movetype=A)  || enemy,numproj >0
trigger1 = (ctrl || stateno=105 && var(58)=1) ||stateno=20

[State -1, AI run]
type=changestate
value=100
triggerall = roundstate = 2
triggerall=AILevel >0 && statetype=S && ctrl && random < 199
triggerall = p2bodydist y =[-240,0]
triggerall = anim!=100
triggerall= p2bodydist x>30||var(58)!=1
triggerall = p2movetype!=A
trigger1= (stateno!=[100,105]) && p2movetype!=A && ((p2bodydist x=[110,788])|| numhelper(1001) >0)

[State -1, AI run]
type=changestate
value=20
triggerall = roundstate = 2
triggerall=AILevel >0 && statetype=S && ctrl && random < 249
trigger1= (stateno!=[20,105]) && p2movetype!=A && (p2bodydist x=[20,109])

[State -1, AIRun Back]
type = ChangeState
value = 105
triggerall=AILevel>0
triggerall = stateno !=105
triggerall = statetype != A
triggerall = random < 149
triggerall = roundstate = 2
triggerall = var(19)=0
triggerall = ctrl
trigger1 = (p2statetype =L) && ((p2bodydist x=[-99,15])||p2movetype = A)

[State -1, Taunt]
type = ChangeState
value = 195
triggerall = AILevel >0
triggerall = roundstate=2||winko
triggerall = random<299
triggerall = gametime%30=0
triggerall = enemy,life < (enemy,lifemax/2.25) ||winko
triggerall = life >700 ||winko
triggerall = p2statetype = L
triggerall = p2bodydist x >120
triggerall = statetype != A
trigger1 = (ctrl || stateno=105 && var(58)=1)



;------------------------------------------------------------------------------
[State -1, Summersault Strikeother]
type = ChangeState
value = ifelse(var(58)=0,3008,3013)
triggerall = ((command = "ssc"&&var(58)=2||command="sspro"&&var(58)=0)||command = "ssa"||command = "ssb"&&var(17)=0)||((command="ssoa"||command="ssob"||command="ssoc")&&var(17)=1&&(p2bodydist x=[0,65])&&var(58)=2)
triggerall = power>= 1000
triggerall = statetype != A
triggerall = AILevel =0
triggerall = var(50) = 1
triggerall = var(58) != 1
trigger1 = (ctrl || stateno=105 && var(58)=1) || stateno=40 ||stateno=55
trigger2 = stateno=200&&movecontact
trigger3= anim=206&&movecontact
trigger4= anim=211&&movecontact
trigger5= anim=213&&movecontact
trigger6= stateno=400&&movecontact
trigger7= stateno=405&&movecontact
trigger8= stateno=410&&movecontact
trigger9= stateno=430&&movecontact
trigger10= stateno=435&&movecontact
trigger11=(stateno=[200,440]) && var(58)=1
trigger12= var(27)=3
trigger13 = stateno=1000&& animelemtime(5)>2&&animelemtime(6)<10&&var(58)=2
trigger14= stateno=1000&&var(58)=1
trigger15= var(28)=4
Ignorehitpause=1
;------------------------------------------------------------------------------
[State -1, Total wipeout cvs1]
type = ChangeState
value = ifelse(var(58)=2,3014,3009)
triggerall =(command="twz"&&var(58)=2||command = "twpro"&&var(58)=0)|| command = "twx"||command = "twy"
triggerall = power>= ifelse(var(58)=2,3000,1000)
triggerall = statetype != A
triggerall = AILevel =0
triggerall = var(50) = 1
triggerall = var(58) != 1
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = stateno=200&&movecontact
trigger3= anim=206&&movecontact
trigger4= anim=211&&movecontact
trigger5= anim=213&&movecontact
trigger6= stateno=400&&movecontact
trigger7= stateno=405&&movecontact
trigger8= stateno=410&&movecontact
trigger9= stateno=430&&movecontact
trigger10= stateno=435&&movecontact
trigger11= var(27)=3
trigger12= var(28)=4
;------------------------------------------------------------------------------
[State -1, Crossfire Assault]
type = ChangeState
value = 3006
triggerall = command = "ca"
triggerall = power>= 1000
triggerall = statetype = A
triggerall = AILevel =0
triggerall = var(58) = 1
triggerall = var(50) = 1
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = ((stateno = [600,640]))
trigger3 = stateno=1051 
;------------------------------------------------------------------------------
[State -1, Sonic hurricanemvc2]
type = ChangeState
value = 3000
triggerall = command = "sh"
triggerall = power>= 1000
triggerall = statetype != A
triggerall = AILevel =0
triggerall = var(58) = 1
triggerall = var(50) = 1
trigger1 = (ctrl || stateno=105 && var(58)=1)  
trigger2=(stateno=[200,440]) && var(58)=1
trigger3= stateno=1000&&var(58)=1
;------------------------------------------------------------------------------
[State -1, Summersault Strikemvc2]
type = ChangeState
value = 3005
triggerall = command = "ssmvc"
triggerall = power>= 1000
triggerall = statetype != A
triggerall = AILevel =0
triggerall = var(50) = 1
triggerall = var(58) = 1
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2=(stateno=[200,440]) && var(58)=1
trigger3= stateno=1000&&var(58)=1



;===========================================================================
;This is not a move, but it sets up var(1) to be 1 if conditions are right
;for a combo into a special move (used below).
;Since a lot of special moves rely on the same conditions, this reduces
;redundant logic.
[State -1, Combo condition Reset]
type = VarSet
trigger1 = 1
var(1) = 0

[State -1, Combo condition Check]
type = VarSet
triggerall = statetype != A
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 && stateno!=216&& stateno!=215&& stateno!=236&& stateno!=240&& stateno!=237&& stateno!=250&& stateno!=245;Except for sweep kick
trigger2 = movecontact
var(1) = 1
;---------------------------------------------------------------------
[State -1, Flash Kick]
type = ChangeState
value = ifelse(var(58)=1,1051,1050)
triggerall = ((command = "fkx"||command = "fky"  ||(command = "fkz" && (var(56)=0||var(58)=2))) && statetype !=A) ||((command = "fkaa"||command = "fkab"  ||(command = "fkac"&& var(56)=0)) && statetype =A && var(58)=1)
triggerall = AILevel =0
triggerall = var(50) = 1
triggerall = var(53)>40 || statetype=A
trigger1 = (ctrl || stateno=105 && var(58)=1) || stateno=40 ||stateno=55
trigger2 = stateno=200&&movecontact
trigger3= anim=206&&movecontact
trigger4= anim=211&&movecontact
trigger5= anim=213&&movecontact
trigger6= stateno=400&&movecontact
trigger7= stateno=405&&movecontact
trigger8= stateno=410&&movecontact
trigger9=(stateno=[200,440]) && var(58)=1
trigger10= var(27)=3
trigger11=(stateno=[600,640]) && movecontact&&var(58)=1
;---------------------------------------------------------------------
[State -1, Sonic Boom]
type = ChangeState
value = 1000
triggerall = command = "sbx"||command = "sby"  ||(command = "sbz" && (var(56)=0||var(58)=2))
triggerall = statetype !=A
triggerall = AILevel =0
triggerall = var(51)>40

triggerall = var(50) = 1
triggerall = numhelper(1001) <= 0
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = stateno=200&&movecontact
trigger3= anim=206&&movecontact
trigger4= anim=211&&movecontact
trigger5= anim=213&&movecontact
trigger6= stateno=400&&movecontact
trigger7= stateno=405&&movecontact
trigger8= stateno=410&&movecontact
trigger9=(stateno=[200,440]) && var(58)=1
trigger10= var(27)=3
;--------------------------------------------------------------------
[State -1,Cancel]
type = ChangeState
value = 102
triggerall = command = "2p"|| command="2k"
triggerall = stateno !=102
triggerall = AILevel =0
triggerall = var(58) = 2
triggerall = var(50) =1
triggerall = movetype !=H
triggerall = power >= 1000
triggerall = stateno != [200,899]
trigger1 = (movecontact=1||(stateno=3013 && anim=3007&&movecontact=1)) || (stateno=1000 && animelemtime(6)>1)

;-------------------------------------------------------------------------
[State -1, guard push]
type = ChangeState
value = 1600
triggerall = command = "2p"
triggerall= statetype = S
triggerall = AILevel =0
triggerall = var(58)=1
trigger1 = stateno = 150 || stateno = 151
;-------------------------------------------------------------------------
[State -1, guard push]
type = ChangeState
value = 1601
triggerall = command = "2p"
triggerall= statetype = C
triggerall = AILevel =0
triggerall = var(58)=1
trigger1 =  stateno =  152 || stateno = 153
;-------------------------------------------------------------------------
[State -1, guard push]
type = ChangeState
value = 1602
triggerall =command = "2p"
triggerall= statetype = A
triggerall = AILevel =0
triggerall = var(58)=1
trigger1 = stateno =  154 || stateno = 15
;--------------------------------------------------------------------------
[State -1, dash]
type=changestate
value=108
triggerall =  command = "a" && command = "x"
triggerall = statetype = S
triggerall = var(3)=0
triggerall = AILevel =0
triggerall = var(50) = 1
triggerall = var(58) != 1
trigger1=ctrl


;--------------------------------------------------------------------------
;[State -1, charge]
;type=changestate
;value=900
;triggerall = command = "charge1" && command = "charge2"
;triggerall = power != 3000
;triggerall = statetype = S
;triggerall = AILevel =0
;triggerall = var(58) = 0
;triggerall = var(50) = 1
;trigger1=ctrl

;===========================================================================
;---------------------------------------------------------------------------
;Run Fwd
;ダッシュ
[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall = AILevel =0
triggerall = anim!=100
trigger1 = command = "FF"||(command="2p"&&var(58)=1&&command!="holdback")
trigger1 = statetype = S
trigger1 = (ctrl || stateno=105 && var(58)=1)

;--------------------------------------------------------------------
[State -1, Super Jump]
type = ChangeState
value = 55
triggerall = AILevel =0
triggerall = var(50)=1
triggerall = stateno !=[3000,4999]
triggerall = var(58)<=1
trigger1 = command = "SJ"
trigger1 = statetype != A
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2= stateno = 410 && command = "holdup" && movehit  && var(58)=1&&var(22)=1
;---------------------------------------------------------------------------
;Run Fwd
;ダッシュ
[State -1, Jump]
type = changestate
value = 40
triggerall = AILevel =0
triggerall = statetype != A
triggerall = command = "up"
triggerall = stateno!=40
trigger1 = (ctrl || stateno=105 && var(58)=1)

;---------------------------------------------------------------------------
;Run Back
;後退ダッシュ
[State -1, Run Back]
type = ChangeState
value = 105
trigger1 = command = "BB"||(command="2p" &&command="holdback"&& var(58)=1)
trigger1 = statetype = S
trigger1 = (ctrl || stateno=105 && var(58)=1)

;---------------------------------------------------------------------------
;Throw
;投げ
[State -1, Throw]
type = ChangeState
value = 800
triggerall = (command = "z" && (var(56)=0||var(58)=2)) || (command="y" && ((var(56)=1&&var(58)=1)||var(58)=0))
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
triggerall = AILevel =0
triggerall = var(50) = 1
trigger1 = command = "holdfwd" || command = "holdback"
trigger1 = p2bodydist X < 25
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H
;---------------------------------------------------------------------------
;Throw
;投げ
[State -1, Throw]
type = ChangeState
value = 830
triggerall = (command = "z" && (var(56)=0||var(58)=2)) ||  (command="y" && ((var(56)=1&&var(58)=1)||var(58)=0))
triggerall = statetype = A
triggerall = ctrl
triggerall = stateno != 100
triggerall = AILevel =0
triggerall = var(50) = 1
trigger1 = command = "holddir"||command = "holdfwd" ||  command = "holdback"||command = "holddown"
trigger1 = p2bodydist X < 25
triggerall = (p2statetype = A)
trigger1 = p2movetype != H
trigger2=stateno=[120,159]
;---------------------------------------------------------------------------
;Throw
;投げ
[State -1, Throw]
type = ChangeState
value = 837
triggerall = (command = "c" && (var(56)=0||var(58)=2)) || (command="b" && ((var(56)=1&&var(58)=1)||var(58)=0))
triggerall = statetype = A
triggerall = ctrl
triggerall = stateno != 100
triggerall = AILevel =0
triggerall = var(50) = 1
trigger1 = command = "holddir" || command = "holdfwd" ||  command = "holdback" ||command = "holddown"
trigger1 = p2bodydist X < 25
triggerall = (p2statetype = A)
trigger1 = p2movetype != H
trigger2=stateno=[120,159]
;---------------------------------------------------------------------------
; Throw
;投げ
[State -1, Throw]
type = ChangeState
value = 850
triggerall = (command = "c" && (var(56)=0||var(58)=2)) || (command="b" && ((var(56)=1&&var(58)=1)||var(58)=0))
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
triggerall = AILevel =0
triggerall = var(50) = 1
trigger1 = command = "holdfwd" ||  command = "holdback"
trigger1 = p2bodydist X < 25
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H

;===========================================================================
;---------------------------------------------------------------------------
;Stand Light Punch
;立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = stateno != [800,3999]
triggerall = statetype != A
triggerall = AILevel =0
triggerall = var(50) = 1
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = (stateno = [200,201]) && movecontact  && var(58)!=1 && animelemtime(2)>0
trigger3= stateno = 400 && movecontact && var(58)!=1&& animelemtime(2)>0
trigger4=  stateno = 430 && movecontact  && var(58)!=1&& animelemtime(4)>0

;---------------------------------------------------------------------------
;Stand Strong Punch
;立ち強パンチ
[State -1, Stand strong Punch]
type = ChangeState
value = ifelse(var(58)=2&&var(28)=2,210,ifelse(var(58)=1,205,ifelse(p2bodydist x <20,210,205)))
triggerall =((var(56)=0||var(58)=2) && command = "y") || (var(56)=1 &&var(58)=1 && command = "x")
triggerall = command != "holddown"
triggerall = statetype != A
triggerall = stateno != [800,3999]
triggerall = AILevel =0
triggerall= var(58)!=0
triggerall = var(50) = 1
trigger1 = (ctrl && (var(56)=0||var(58)=2)) || ((stateno = 200 || stateno=230 || stateno = 400 || stateno=430) && movecontact&& var(56)=1&&var(58)=1)
trigger2 = (stateno = [200,201]) && movecontact && var(58) = 1
trigger3= stateno = 230 && movecontact && var(58) = 1
trigger4=var(28)=2&& var(58)=2  && stateno!=210




;---------------------------------------------------------------------------
;Stand Strong Punch  2
[State -1, Stand strong Punch2]
type = ChangeState
value = ifelse(var(58)=2&&var(28)=3,215,ifelse(var(27)=2 && var(58)=2,216,ifelse(var(58)=1&&command="holdback",215,ifelse(var(58)=1&&command="holdfwd",216,ifelse((command="holdfwd"||command="holdback")&&var(58)!=1,216,ifelse(p2bodydist x >20 && var(58)!=1,215,220))))))
triggerall =((var(56)=0||var(58)=2) && command = "z") || (var(56)=1 &&var(58)=1 && command = "y")|| (var(58)=0 && command = "y")
triggerall = command != "holddown"
triggerall = stateno != [800,3999]
triggerall = AILevel =0
triggerall = statetype != A
triggerall = var(50) = 1
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = stateno = 400 && movecontact  && var(58) =0  && animelemtime(2)>0
trigger3 = stateno = 430 && movecontact  && var(58) =0&& animelemtime(4)>0
trigger4 = (stateno = [200,205]) && movecontact && var(58) = 1
trigger5= stateno = 236 && movecontact && var(58) = 1
trigger6=(stateno=[230,231])&&movecontact
trigger7=var(27)=2 && var(58)=2 && stateno!=216
trigger8=var(28)=3&& var(58)=2  && stateno!=215

;---------------------------------------------------------------------------
;Stand Light Kick
;立ち弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = ifelse((command="holdfwd"||command="holdback")&&var(58)=0,236,ifelse((command ="holdfwd"&&var(58)=2||command="holdback"&&var(58)!=2),231,230))
triggerall = command = "a"
triggerall = command != "holddown"
triggerall = stateno != [800,3999]
triggerall = statetype = S
triggerall = AILevel =0
triggerall = var(50) = 1
triggerall = stateno !=[800,899]
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = stateno = 400 && movecontact && var(58)!=1&& animelemtime(2)>0
trigger3 = stateno = 430 && movecontact && var(58)!=1

;---------------------------------------------------------------------------
;Standing medium Kick
;立ち強キック
[State -1, Standing Strong Kick]
type = ChangeState
value = ifelse(var(58)=2&& var(28)=1,235,ifelse(var(58)=2 && var(27)=1,236,ifelse(var(58)=1,235,ifelse(var(58)=2&&p2bodydist x <=20,235,236))))
triggerall =((var(56)=0||var(58)=2) && command = "b") || (var(56)=1 &&var(58)=1 && command = "a")
triggerall = command != "holddown" ||var(28)=1
triggerall = stateno != [800,3999]
triggerall = statetype != A
triggerall = AILevel =0
triggerall = var(50) = 1
triggerall= var(58)!=0
trigger1 = (ctrl && (var(56)=0||var(58)=2)) || ((stateno = 200 || stateno=230 || stateno = 400 || stateno=430) && movecontact&& var(56)=1&&var(58)=1)
trigger2 = (stateno = [200,201]) && movecontact && var(58) = 1  && animelemtime(2)>2
trigger3= stateno = 230 && movecontact && var(58) = 1
trigger4=var(27)=1&& var(58)=2  && stateno!=236
trigger5=var(28)=1&& var(58)=2  && stateno!=235
;--------------------------------------------------------
;Stand hard Kick
;立ち弱キック
[State -1, Stand hard Kick]
type = ChangeState
value = ifelse(var(58)=1&&command="holdback",237,ifelse(command="holdfwd" && (p2bodydist x <=45||var(58)=1),250,ifelse(var(58)!=1&&p2bodydist x >=20,245,240)))
triggerall =((var(56)=0||var(58)=2) && command = "c") || (var(56)=1 &&var(58)=1 && command = "b")|| (var(58)=0 && command = "b")
triggerall = command != "holddown"
triggerall = stateno != [800,3999]
triggerall = statetype != A
triggerall = AILevel =0
triggerall = var(50) = 1
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = stateno = 400 && movecontact  && var(58) =0
trigger3 = stateno = 430 && movecontact  && var(58) =0&& animelemtime(4)>0
trigger4 = (stateno = [200,206]) && movecontact && var(58) = 1
trigger5= stateno = 235 && movecontact && var(58) = 1
trigger6=(stateno=[230,231])&&movecontact

;---------------------------------------------------------------------------
;Taunt
;挑発
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = command = "start"
triggerall= AILevel =0
trigger1 = statetype != A
trigger1 = (ctrl || stateno=105 && var(58)=1)

;---------------------------------------------------------------------------
;Crouching Light Punch
;しゃがみ弱パンチ
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = command = "x"
triggerall = command = "holddown"
triggerall = stateno != [800,3999]
triggerall = statetype != A
triggerall = var(50) = 1
triggerall = AILevel =0
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = (stateno = [200,201]) && movecontact  && var(58)!=1  && animelemtime(1)>3
trigger3 = stateno = 400 && movecontact   && var(58)!=1&& animelemtime(1)>3
trigger4 =  stateno = 430 && movecontact  && var(58)!=1&& animelemtime(4)>0
trigger5 = (stateno = [230,231]) && movecontact  && var(58)!=1

;---------------------------------------------------------------------------
;Crouching Strong Punch
;しゃがみ強パンチ
[State -1, Crouching strong Punch]
type = ChangeState
value = 405
triggerall =((var(56)=0||var(58)=2) && command = "y") || (var(56)=1 &&var(58)=1 && command = "x")
triggerall = command = "holddown"
triggerall = stateno != [800,3999]
triggerall = statetype != A
triggerall= var(58)!=0
triggerall = AILevel =0
triggerall = var(50) = 1
trigger1 = (ctrl && (var(56)=0||var(58)=2)) || ((stateno = 200 || stateno=230 || stateno = 400 || stateno=430) && movecontact&& var(56)=1&&var(58)=1)
trigger2 = stateno = 400 && movecontact  && var(58) =1
trigger3 = stateno = 430 && movecontact  && var(58) =1
trigger4 = stateno = 200 && movecontact  && var(58) =1


;-------------------------------------------------------------------------------
;Crouching Strong Punch
;しゃがみ強パンチ
[State -1, Crouching medium Punch]
type = ChangeState
value = 410
triggerall =((var(56)=0||var(58)=2) && command = "z") || (var(56)=1 &&var(58)=1 && command = "y")|| (var(58)=0 && command = "y")
triggerall = command = "holddown"
triggerall = stateno != [800,3999]
triggerall = statetype != A
triggerall = AILevel =0
triggerall = var(50) = 1
triggerall = stateno !=410
triggerall = stateno !=220
triggerall = stateno !=215
triggerall = stateno !=216
triggerall=stateno!=[210,216]
triggerall=stateno!=[237,245]
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2=((stateno = [200,205]) && movecontact|| ((stateno=[400,405])&& movecontact)) && var(58)=1
trigger3=((stateno = [230,235]) && movecontact|| ((stateno=[430,435])&& movecontact)) && var(58)=1
trigger5= var(27)=3&& var(58)=1
trigger4= stateno=435&&movecontact&&var(58)=2



;---------------------------------------------------------------------------
;Crouching Light Kick
;しゃがみ弱キック
[State -1, Crouching light Kick]
type = ChangeState
value = 430
triggerall = command = "a"
triggerall = command = "holddown"
triggerall = stateno != [800,3999]
triggerall = AILevel =0
triggerall = statetype != A
triggerall = var(50) = 1
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = (stateno = [200,201]) && movecontact  && var(58)!=1  && animelemtime(1)>3
trigger3 = stateno = 400 && movecontact   && var(58)!=1&& animelemtime(1)>3
trigger4 =  stateno = 430 && movecontact  && var(58)!=1&& animelemtime(4)>0
trigger5 = (stateno = [230,231]) && movecontact && var(58) = 0
;------------------------------------------------------------------------
[State -1, Crouching medium Kick]
type = ChangeState
value = 435
triggerall =((var(56)=0||var(58)=2) && command = "b") || (var(56)=1 &&var(58)=1 && command = "a")|| (var(58)=0 && command = "b")
triggerall = command = "holddown"
triggerall = stateno != [800,3999]
triggerall = AILevel =0
triggerall = statetype != A
triggerall = var(50) = 1
triggerall = command!="holdfwd"&&var(58)=0 ||var(58)!=0
trigger1 = (ctrl && (var(56)=0||var(58)=2)) || ((stateno = 200 || stateno=230 || stateno = 400 || stateno=430) && movecontact&& var(56)=1&&var(58)=1)|| (var(58)=0 && ctrl)
trigger2 = stateno = 400 && movecontact  && var(58) =1
trigger3 = stateno = 430 && movecontact  && var(58) =1
trigger4 = stateno = 200 && movecontact  && var(58) =1
trigger5 = stateno = 230 && movecontact  && var(58) =1



;---------------------------------------------------------------------------
;Crouching Strong Kick
;しゃがみ強キック
[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall =((var(56)=0||var(58)=2) && command = "c") || (var(56)=1 &&var(58)=1 && command = "b")||(var(58)=0 &&command="holdfwd"&& command = "b") 
triggerall = command = "holddown"
triggerall = stateno != [800,3999]
triggerall = AILevel =0
triggerall = var(50) = 1
triggerall = statetype != A
triggerall=stateno!=[210,217]
triggerall=stateno!=[237,245]
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2=((stateno = [200,205]) && movecontact|| ((stateno=[400,405])&& movecontact)) && var(58)=1
trigger3=((stateno = [230,235]) && movecontact|| ((stateno=[430,435])&& movecontact)) && var(58)=1
trigger4= var(27)=3&& var(58)=1

;---------------------------------------------------------------------------
;Jump Light Punch
;空中弱パンチ
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = command = "x"
triggerall = statetype = A
triggerall = var(50) = 1
triggerall = stateno !=105
triggerall = AILevel =0
trigger1 = (ctrl || stateno=105 && var(58)=1)


;---------------------------------------------------------------------------
[State -1, Jump medium Punch]
type = ChangeState
value = ifelse(vel x =0,606,605)
triggerall =((var(56)=0||var(58)=2) && command = "y") || (var(56)=1 &&var(58)=1 && command = "x")
triggerall = statetype = A
triggerall = var(50) = 1
triggerall = stateno !=105
triggerall= var(58)!=0
triggerall = AILevel =0
trigger1 = (ctrl && (var(56)=0||var(58)=2)) || ((stateno = 200 || stateno=230 || stateno = 400 || stateno=430) && movecontact&& var(56)=1&&var(58)=1)
trigger2 = (stateno = 600|| stateno=631) && movecontact&& var(58)=1


;---------------------------------------------------------
;Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = ifelse(vel x =0,611,610)
triggerall =((var(56)=0||var(58)=2) && command = "z") || (var(56)=1 &&var(58)=1 && command = "y")|| (var(58)=0 && command = "y")
triggerall= statetype = A
triggerall = var(50) = 1
triggerall = stateno !=105
triggerall = AILevel =0
triggerall=stateno!=610
triggerall=stateno!=640
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = (stateno = 600|| stateno=631||(stateno=[605,606])||stateno=640) && movecontact&& var(58)=1
;---------------------------------------------------------------------------
;Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
value = ifelse(var(58)=1,631,ifelse(vel x =0,630,631))
triggerall = command = "a"
triggerall = statetype = A
triggerall = var(50) = 1
triggerall = stateno !=105
triggerall = AILevel =0
triggerall=stateno!=610
triggerall=stateno!=640
triggerall=stateno!=[635,636]
triggerall=stateno!=[605,606]
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = (stateno = [600,601]) && movecontact&& var(58)=1


;---------------------------------------------------------------------------
;Jump medium Kick
[State -1, Jump medium Kick]
type = ChangeState
value = ifelse(var(58)=1,636,ifelse(vel x =0,635,636))
triggerall =((var(56)=0||var(58)=2) && command = "b") || (var(56)=1 &&var(58)=1 && command = "a")
triggerall = var(50) = 1
triggerall = statetype = A
triggerall = stateno !=105
triggerall = AILevel =0
triggerall=stateno!=610
triggerall= var(58)!=0
triggerall=stateno!=640
triggerall=stateno!=[635,636]
trigger1 = (ctrl && (var(56)=0||var(58)=2))
trigger2 = (stateno = 600|| stateno=631) && movecontact&& var(58)=1

;---------------------------------------------------------------------------
;Jump Strong Kick
;空中強キック
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall =((var(56)=0||var(58)=2) && command = "c") || (var(56)=1 &&var(58)=1 && command = "b")|| (var(58)=0 && command = "b")
triggerall = statetype = A
triggerall = var(50) = 1
triggerall = stateno !=105
triggerall = AILevel =0
triggerall=stateno!=610
triggerall=stateno!=640
trigger1 = (ctrl || stateno=105 && var(58)=1)
trigger2 = (stateno = 600|| stateno=631||(stateno=[605,606])||(stateno=[635,636])) && movecontact&& var(58)=1


