;-| ai motions |--------------------------------------------------------

[Command]
name = "ai_01"
command = ~D, D, D, D, D, D
time = 1

[Command]
name = "ai_02"
command = ~F, F, F, F, F, F
time = 1

[Command]
name = "ai_03"
command = ~U, U, B, B, U, U
time = 1

[Command]
name = "ai_04"
command = ~U, U, U, U, U, U
time = 1

[Command]
name = "ai_05"
command = ~B, B, B, B, B, B
time = 1

;-| super motions |--------------------------------------------------------


[command]
name = "rikugo"
command = ~D, B, D, F, x
time = 30

[command]
name = "rikugo"
command = ~D, B, D, F, y
time = 30

[command]
name = "monsters"
command = ~D, DF, F, D, DF, F, x
time = 60

[command]
name = "monsters"
command = ~D, DF, F, D, DF, F, y
time = 60

[command]
name = "magaoh"
command = ~D, DB, B, D, DB, B, a
time = 60

[command]
name = "magaoh"
command = ~D, DB, B, D, DB, B, b
time = 60

[command]
name = "double"
command = ~D, DF, F, c
time = 60

;-| special motions |------------------------------------------------------

[command]
name = "mahojin1"
command = F, D, DF, x
time = 30

[command]
name = "mahojin2"
command = F, D, DF, a
time = 30

[command]
name = "mahojin3"
command = F, D, DF, y
time = 30

[command]
name = "dash"
command = ~D, DB, B, a
time = 30

[command]
name = "dash"
command = ~D, DB, B, b
time = 30

[command]
name = "bell"
command = F, D, B, x
time = 30

[command]
name = "henshin"
command = F, D, B, b
time = 30

[command]
name = "dairi"
command = F, D, B, a
time = 30

[command]
name = "bell"
command = F, D, B, y
time = 30

[command]
name = "star1"
command = D, U, a
time = 30

[command]
name = "star2"
command = D, U, b
time = 30

[command]
name = "tenku1"     
command = D, DF, F, x
time = 19

[command]
name = "tenku2"     
command = D, DF, F, y
time = 19

[command]
name = "reversal"
command = /$F,a+b
time = 1

[command]
name = "reversal2"
command = /$D,a+b
time = 1

[command]
name = "juzo"     
command = D, DF, F, x+y
time = 19

;-| 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";required (do not remove)
command = x+a
time = 1

[command]
name = "cd";required (do not remove)
command = y+b
time = 1

;-| 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

[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

;-| 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 = "holdup" ;required (do not remove)
command = /$U
time = 1

[command]
name = "holddown";required (do not remove)
command = /$D
time = 1

[command] 
name = "longjump"       
command = ~D, $U      
time = 5

[command]
name = "holdx"
command = /x
time = 1

[command]
name = "holda"
command = /$a
time = 1

[command]
name = "hold_x+y"
command = /x+y
time = 1

[command]
name = "holdy"
command = /y
time = 1

;---------------------------------------------------------------------------
; 2. state entry
; --------------

; Don't remove the Following line. it's required by the cmd standard.
[statedef -1]

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

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

[state -1]
type = changestate
value = 3300
triggerall = command = "magaoh"  
triggerall = power >= 1000
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 205)
trigger4 = movecontact && (stateno = 230)
trigger5 = movecontact && (stateno = 210)
trigger6 = movecontact && (stateno = 215)
trigger7 = movecontact && (stateno = 245)
trigger8 = stateno = 400 && time = [5,11]
trigger9 = movecontact && (stateno = 430)
trigger10 = movecontact && (stateno = 410)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 261)
trigger13 = movecontact && (stateno = 1510)
trigger14 = movecontact && (stateno = 1150)
trigger15 = movecontact && (stateno = 1100)
trigger16 = stateno = [1610,1612]

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

[state -1]
type = changestate
value = 3200
triggerall = command = "double"  
triggerall = power >= 2000
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 205)
trigger4 = movecontact && (stateno = 230)
trigger5 = movecontact && (stateno = 210)
trigger6 = movecontact && (stateno = 215)
trigger7 = movecontact && (stateno = 245)
trigger8 = stateno = 400 && time = [5,11]
trigger9 = movecontact && (stateno = 430)
trigger10 = movecontact && (stateno = 410)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 261)
trigger13 = movecontact && (stateno = 1510)
trigger14 = movecontact && (stateno = 1150)
trigger15 = movecontact && (stateno = 1100)
trigger16 = stateno = [1610,1612]

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

[state -1]
type = changestate
value = 3000
triggerall = command = "rikugo"  
triggerall = power >= 1000
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 205)
trigger4 = movecontact && (stateno = 230)
trigger5 = movecontact && (stateno = 210)
trigger6 = movecontact && (stateno = 215)
trigger7 = movecontact && (stateno = 245)
trigger8 = stateno = 400 && time = [5,11]
trigger9 = movecontact && (stateno = 430)
trigger10 = movecontact && (stateno = 410)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 261)
trigger13 = movecontact && (stateno = 1510)
trigger14 = movecontact && (stateno = 1150)
trigger15 = movecontact && (stateno = 1100)
trigger16 = stateno = [1610,1612]

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

[state -1]
type = changestate
value = 3100
triggerall = command = "monsters"  
triggerall = power >= 2000
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 205)
trigger4 = movecontact && (stateno = 230)
trigger5 = movecontact && (stateno = 210)
trigger6 = movecontact && (stateno = 215)
trigger7 = movecontact && (stateno = 245)
trigger8 = stateno = 400 && time = [5,11]
trigger9 = movecontact && (stateno = 430)
trigger10 = movecontact && (stateno = 410)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 261)
trigger13 = movecontact && (stateno = 1510)
trigger14 = movecontact && (stateno = 1150)
trigger15 = movecontact && (stateno = 1100)
trigger16 = stateno = [1610,1612]

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

[state -1]
type = changestate
value = 1602
triggerall = command = "reversal"
triggerall = statetype = a 
trigger1 = ctrl = 1 

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

[state -1]
type = changestate
value = 1601
triggerall = command = "reversal2"
triggerall = statetype = c 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 205)
trigger4 = movecontact && (stateno = 230)
trigger5 = movecontact && (stateno = 210)
trigger6 = movecontact && (stateno = 215)
trigger7 = movecontact && (stateno = 245)
trigger8 = stateno = 400 && time = [5,11]
trigger9 = movecontact && (stateno = 430)
trigger10 = movecontact && (stateno = 410)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 261)
trigger13 = movecontact && (stateno = 1510)

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

[state -1]
type = changestate
value = 1600
triggerall = command = "reversal"
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 205)
trigger4 = movecontact && (stateno = 230)
trigger5 = movecontact && (stateno = 210)
trigger6 = movecontact && (stateno = 215)
trigger7 = movecontact && (stateno = 245)
trigger8 = stateno = 400 && time = [5,11]
trigger9 = movecontact && (stateno = 430)
trigger10 = movecontact && (stateno = 410)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 261)
trigger13 = movecontact && (stateno = 1510)

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

[state -1]
type = null ;changestate
value = 1800
triggerall = command = "henshin"
triggerall = statetype != a
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 205)
trigger4 = movecontact && (stateno = 230)
trigger5 = movecontact && (stateno = 210)
trigger6 = movecontact && (stateno = 215)
trigger7 = movecontact && (stateno = 245)
trigger8 = stateno = 400 && time = [5,11]
trigger9 = movecontact && (stateno = 430)
trigger10 = movecontact && (stateno = 410)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 261)
trigger13 = movecontact && (stateno = 1510)


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

[state -1]
type = changestate
value = 1700
triggerall = command = "dairi"
triggerall = statetype != a
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 205)
trigger4 = movecontact && (stateno = 230)
trigger5 = movecontact && (stateno = 210)
trigger6 = movecontact && (stateno = 215)
trigger7 = movecontact && (stateno = 245)
trigger8 = stateno = 400 && time = [5,11]
trigger9 = movecontact && (stateno = 430)
trigger10 = movecontact && (stateno = 410)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 261)
trigger13 = movecontact && (stateno = 1510)


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

[state -1]
type = changestate
value = 1500
triggerall = command = "dash"
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 205)
trigger4 = movecontact && (stateno = 230)
trigger5 = movecontact && (stateno = 210)
trigger6 = movecontact && (stateno = 215)
trigger7 = movecontact && (stateno = 245)
trigger8 = stateno = 400 && time = [5,11]
trigger9 = movecontact && (stateno = 430)
trigger10 = movecontact && (stateno = 410)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 261)
trigger13 = movecontact && (stateno = 1510)

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

[state -1]
type = changestate
value = 1400
triggerall = command = "bell"
triggerall = statetype != a
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 205)
trigger4 = movecontact && (stateno = 230)
trigger5 = movecontact && (stateno = 210)
trigger6 = movecontact && (stateno = 215)
trigger7 = movecontact && (stateno = 245)
trigger8 = stateno = 400 && time = [5,11]
trigger9 = movecontact && (stateno = 430)
trigger10 = movecontact && (stateno = 410)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 261)
trigger13 = movecontact && (stateno = 1510)


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

[state -1]
type = changestate
value = 1300
triggerall = command = "mahojin1"
triggerall = statetype != a
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 205)
trigger4 = movecontact && (stateno = 230)
trigger5 = movecontact && (stateno = 210)
trigger6 = movecontact && (stateno = 215)
trigger7 = movecontact && (stateno = 245)
trigger8 = stateno = 400 && time = [5,11]
trigger9 = movecontact && (stateno = 430)
trigger10 = movecontact && (stateno = 410)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 261)
trigger13 = movecontact && (stateno = 1510)


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

[state -1]
type = changestate
value = 1310
triggerall = command = "mahojin2"
triggerall = statetype != a
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 205)
trigger4 = movecontact && (stateno = 230)
trigger5 = movecontact && (stateno = 210)
trigger6 = movecontact && (stateno = 215)
trigger7 = movecontact && (stateno = 245)
trigger8 = stateno = 400 && time = [5,11]
trigger9 = movecontact && (stateno = 430)
trigger10 = movecontact && (stateno = 410)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 261)
trigger13 = movecontact && (stateno = 1510)


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

[state -1]
type = changestate
value = 1320
triggerall = command = "mahojin3"
triggerall = statetype != a
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 205)
trigger4 = movecontact && (stateno = 230)
trigger5 = movecontact && (stateno = 210)
trigger6 = movecontact && (stateno = 215)
trigger7 = movecontact && (stateno = 245)
trigger8 = stateno = 400 && time = [5,11]
trigger9 = movecontact && (stateno = 430)
trigger10 = movecontact && (stateno = 410)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 261)
trigger13 = movecontact && (stateno = 1510)


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

[state -1] 
type = changestate 
value = 1330
triggerall = command = "holdfwd" 
triggerall = statetype = s
trigger1 = stateno = 1326 && time = [29,62]

[state -1] 
type = changestate 
value = 1331
triggerall = command = "holdback" 
triggerall = statetype = s
trigger1 = stateno = 1326 && time = [29,62] 

;---------------------------------------------------------------------------
;jump light kick
[state -1, jump light kick]
type = changestate
value = 1200
triggerall = command = "a"
triggerall = command = "holddown"
triggerall = statetype = a
trigger1 = ctrl
trigger2 = movecontact && (stateno = 600)
trigger3 = movecontact && (stateno = 605)
trigger4 = movecontact && (stateno = 630)
trigger5 = movecontact && (stateno = 610)
trigger6 = movecontact && (stateno = 640)
trigger7 = movecontact && (stateno = 645)

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

[state -1]
type = changestate
value = 1110
triggerall = command = "star2"
trigger1 = ctrl = 1 && statetype != a
trigger2 = StateNo = 40
trigger3 = movecontact && (stateno = 200)
trigger4 = movecontact && (stateno = 205)
trigger5 = movecontact && (stateno = 230)
trigger6 = movecontact && (stateno = 210)
trigger7 = movecontact && (stateno = 215)
trigger8 = movecontact && (stateno = 245)
trigger9 = stateno = 400 && time = [5,11]
trigger10 = movecontact && (stateno = 430)
trigger11 = movecontact && (stateno = 410)
trigger12 = movecontact && (stateno = 260)
trigger13 = movecontact && (stateno = 261)
trigger14 = movecontact && (stateno = 1510)


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

[state -1]
type = changestate
value = 1100
triggerall = command = "star1"
trigger1 = ctrl = 1 && statetype != a
trigger2 = StateNo = 40
trigger3 = movecontact && (stateno = 200)
trigger4 = movecontact && (stateno = 205)
trigger5 = movecontact && (stateno = 230)
trigger6 = movecontact && (stateno = 210)
trigger7 = movecontact && (stateno = 215)
trigger8 = movecontact && (stateno = 245)
trigger9 = stateno = 400 && time = [5,11]
trigger10 = movecontact && (stateno = 430)
trigger11 = movecontact && (stateno = 410)
trigger12 = movecontact && (stateno = 260)
trigger13 = movecontact && (stateno = 261)
trigger14 = movecontact && (stateno = 1510)


[state -1]
type = changestate
value = 1150
triggerall = command = "star1" || command = "star2"
triggerall = statetype = s
trigger1 = stateno = 1101 && time <= 14

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

[state -1]
type = changestate
value = 1010
triggerall = command = "tenku2"  
triggerall = numproj = 0
triggerall = statetype != a 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 205)
trigger4 = movecontact && (stateno = 230)
trigger5 = movecontact && (stateno = 210)
trigger6 = movecontact && (stateno = 215)
trigger7 = movecontact && (stateno = 245)
trigger8 = stateno = 400 && time = [5,11]
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 260)
trigger11 = movecontact && (stateno = 261)
trigger12 = movecontact && (stateno = 1510)


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

[state -1]
type = changestate
value = 1000
triggerall = command = "tenku1"  
triggerall = numproj = 0
triggerall = statetype != a 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 205)
trigger4 = movecontact && (stateno = 230)
trigger5 = movecontact && (stateno = 210)
trigger6 = movecontact && (stateno = 215)
trigger7 = movecontact && (stateno = 245)
trigger8 = stateno = 400 && time = [5,11]
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 260)
trigger11 = movecontact && (stateno = 261)
trigger12 = movecontact && (stateno = 1510)

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

[State -1, UKEMI]
type = ChangeState
value = 5201
triggerall = command = "recovery"
triggerall = alive = 1
trigger1 = stateno = 5050
trigger1 = pos y > -30

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

[State -1, T S]
type = ChangeState
value = 110
triggerall = command = "recovery" || command = "z"
triggerall = power >= 500
trigger1 = statetype != A
trigger1 = ctrl

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

[State -1, GC T S]
type = ChangeState
value = 110
triggerall = command = "recovery" || command = "z"
triggerall = power >= 1000
trigger1 = stateno = 150
trigger2 = stateno = 151

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

[State -1, AC T S]
type = ChangeState
value = 110
triggerall = command = "recovery" || command = "z"
triggerall = power >= 1000
trigger1 = stateno = [200,499]

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

[State -1, Run Fwd]
type = ChangeState
value = 102
trigger1 = command = "ff" && statetype = S && ctrl

[State -1, T S]
type = ChangeState
value = 102
triggerall = command = "ff"
triggerall = power >= 500
trigger1 = stateno = 150
trigger2 = stateno = 151

;---------------------------------------------------------------------------
;run back
;後退?ッシュ
[state -1, run back]
type = changestate
value = 105
trigger1 = command = "bb"
trigger1 = statetype = s
trigger1 = ctrl

;---------------------------------------------------------------------------
;kung Fu throw
;投げ
[state -1, kung Fu throw]
type = changestate
value = 800
triggerall = command = "cd"
triggerall = statetype = s
triggerall = ctrl
triggerall = stateno != 100
trigger1 = (p2statetype = s) || (p2statetype = c)
trigger2 = p2movetype != h

[state -1, kung Fu throw]
type = changestate
value = 1530
triggerall = command = "cd" 
trigger1 = stateno = 1500 && time = [5,30]

;---------------------------------------------------------------------------
;kung Fu throw
;投げ
[state -1, kung Fu throw]
type = changestate
value = 900
triggerall = command = "cd"
triggerall = statetype = a
triggerall = ctrl
triggerall = stateno != 100
trigger1 = p2statetype = a 
trigger2 = p2movetype != h

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

[state -1,cd counter] 
type = changestate 
value = 250
triggerall = command = "cd" || command = "c"
triggerall = power >= 1000 && life > 0 && statetype != a 
trigger1 = stateno = 150 
trigger2 = stateno = 152

;---------------------------------------------------------------------------
;stand light punch
;立ち弱パン?
[state -1, stand light punch]
type = changestate
value = 200
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = statetype != a
trigger1 = ctrl
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 205 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 110 

;---------------------------------------------------------------------------
;stand light kick
;立ち弱キック
[state -1, stand light kick]
type = changestate
value = 260
triggerall = command = "y"
triggerall = command = "holdback"
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 205)
trigger4 = movecontact && (stateno = 230)
trigger5 = movecontact && (stateno = 210)
trigger6 = movecontact && (stateno = 215)
trigger7 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 1510)

;---------------------------------------------------------------------------
;stand strong punch
;立ち強パン?
[state -1, stand strong punch]
type = changestate
value = 210
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = s
trigger1 = ctrl
trigger2 = stateno = 110 

;---------------------------------------------------------------------------
;stand light kick
;立ち弱キック
[state -1, stand light kick]
type = changestate
value = 230
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = s
trigger1 = ctrl
trigger2 = (stateno = 205) && time > 7
trigger3 = (stateno = 430) && time > 9
trigger4 = stateno = 110 

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

[state -1, stand light kick]
type = ChangeState
value = 280
triggerall = command = "b" && command = "holdup"
triggerall = ctrl || StateNo = 40
trigger1 = P2Statetype = L
trigger2 = P2MoveType = H

;---------------------------------------------------------------------------
;standing strong kick
;立ち強キック
[state -1, standing strong kick]
type = changestate
value = 240
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = s
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 5
trigger3 = (stateno = 230) && time > 6
trigger4 = stateno = 110 

;---------------------------------------------------------------------------
;taunt
;挑発
[state -1, taunt]
type = changestate
value = 195
triggerall = command = "start"
trigger1 = statetype != a
trigger1 = ctrl

;---------------------------------------------------------------------------
;crouching light punch
;しゃがみ弱パン?
[state -1, crouching light punch]
type = changestate
value = 400
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = c
trigger1 = ctrl
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 205 && movecontact
trigger4 = stateno = 430 && movecontact
trigger5 = stateno = 110 

;---------------------------------------------------------------------------
;crouching strong punch
;しゃがみ強パン?
[state -1, crouching strong punch]
type = changestate
value = 270
triggerall = command = "y"
triggerall = command = "holddown"
triggerall = command = "holdfwd"
trigger1 = statetype = c
trigger1 = ctrl
trigger2 = (stateno = 400) || (stateno = 430)
trigger2 = (time > 9) || (movecontact && time > 5)
trigger3 = stateno = 110

;---------------------------------------------------------------------------
;crouching strong punch
;しゃがみ強パン?
[state -1, crouching strong punch]
type = changestate
value = 410
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = c
trigger1 = ctrl
trigger2 = (stateno = 400) || (stateno = 430)
trigger2 = (time > 9) || (movecontact && time > 5)
trigger3 = stateno = 110 

;---------------------------------------------------------------------------
;crouching light kick
;しゃがみ弱キック
[state -1, crouching light kick]
type = changestate
value = 430
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype = c
trigger1 = ctrl
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 110 

;---------------------------------------------------------------------------
;crouching strong kick
;しゃがみ強キック
[state -1, crouching strong kick]
type = changestate
value = 440
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype = c
trigger1 = ctrl
trigger2 = (stateno = 400) || (stateno = 430)
trigger2 = (time > 9) || (movecontact && time > 5)
trigger3 = stateno = 110 

;---------------------------------------------------------------------------
;jump light punch
;空中弱パン?
[state -1, jump light punch]
type = changestate
value = 600
triggerall = command = "x"
triggerall = vel x != 0 
trigger1 = statetype = a
trigger1 = ctrl

;---------------------------------------------------------------------------
;jump light punch
;空中弱パン?
[state -1, jump light punch]
type = changestate
value = 605
triggerall = command = "x"
triggerall = vel x = 0 
trigger1 = statetype = a
trigger1 = ctrl

;---------------------------------------------------------------------------
;jump strong punch
[state -1, jump strong punch]
type = changestate
value = 610
triggerall = command = "y"
trigger1 = statetype = a
trigger1 = ctrl

;---------------------------------------------------------------------------
;jump light kick
[state -1, jump light kick]
type = changestate
value = 630
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = a
trigger1 = ctrl

;---------------------------------------------------------------------------
;jump strong kick
;空中強キック
[state -1, jump strong kick]
type = changestate
value = 640
triggerall = command = "b"
triggerall = vel x != 0
trigger1 = statetype = a
trigger1 = ctrl

;---------------------------------------------------------------------------
;jump strong kick
;空中強キック
[state -1, jump strong kick]
type = changestate
value = 645
triggerall = command = "b"
triggerall = vel x = 0
trigger1 = statetype = a
trigger1 = ctrl

[state -2]
type = varset
trigger1 = command = "ai_01"
trigger2 = command = "ai_02"
trigger3 = command = "ai_03"
trigger4 = command = "ai_04"
trigger5 = command = "ai_05"
var(30) = 1

[State -2, SGuard]
type = ChangeState
Value = 130
triggerall = var(30) = 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2movetype = A && MoveType = I && InGuardDist
Triggerall = ctrl
Trigger1 = StateNo = 151 || StateNo = 153
Trigger1 = StateType = S && p2statetype = S && p2bodydist X < 50 && BackEdgeBodyDist > 30 && random = [281,999]
trigger2 = StateType = S && p2statetype = A
trigger2 = p2bodydist X < 50 && random = [601,999]
trigger3 = StateType = S && p2statetype = S && p2bodydist X < 50 && BackEdgeBodyDist <= 30 && random = [261,999]
trigger4 = enemynear,statetype = S && enemynear,movetype = A && (Prevstateno = 5120 || Prevstateno = 5200)
trigger4 = p2bodydist X < 50 && random = [350,999]
trigger4 = EnemyNear,HitDefAttr != SC,AT

[State -2, CGuard]
type = ChangeState
Value = 131
triggerall = var(30) = 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2statetype != A
triggerall = p2movetype = A && MoveType = I && InGuardDist
triggerall = p2statetype = C
Triggerall = ctrl
Trigger1 = StateNo = 151 || StateNo = 153
Trigger1 = StateType = C && p2statetype = C && abs(enemynear,Pos X - Pos X)<= 70;&& BackEdgeBodyDist > 30
;Trigger2 = StateType = C && p2statetype = C && P2bodydist X < 70 && BackEdgeBodyDist <= 30
trigger2 = enemynear,statetype = C && enemynear,movetype = A && (Prevstateno = 5120 || Prevstateno = 5200)
trigger2 = p2bodydist X < 50 && random = [350,999]
trigger2 = EnemyNear,HitDefAttr != SC,AT
trigger3 = p2stateno = [99,101]
trigger4 = p2stateno = [400,499]

[State -2, AGuard]
type = ChangeState
Value = 132
triggerall = var(30) = 1
triggerall = RoundState = 2
triggerall = statetype = A
triggerall = p2statetype != L
triggerall = p2movetype = A && MoveType = I && InGuardDist
Triggerall = ctrl
trigger1 = P2bodydist X < 80;(abs(enemynear,Pos X - Pos X)<= 80
trigger2 = ctrl && enemynear,NumProj ;&& (enemynear,NumProj,Pos X - Pos X) >= 0

[State -2, 飛び道具ガ?ド]
type = ChangeState
value = 130
TriggerAll = Var(30) = 1
triggerall = RoundState = 2
;triggerall = enemynear,NumProj && MoveType = I && InGuardDist
trigger1 = ctrl && enemynear,NumProj && statetype != A && random = [70,200]
trigger2 = inguarddist = [0,120]
trigger2 = ctrl && enemynear,NumProj && statetype != A ;&& random < 100

[state -2]
type = ChangeState
value = 800
trigger1 = var(30) = 1                  
trigger1 = statetype != A              
trigger1 = ctrl 
trigger1 = p2bodydist X <= 20
trigger1 = p2movetype != H
trigger1 = p2statetype != L
trigger1 = p2statetype != A

[state -2,cd counter] 
type = changestate 
value = 250
triggerall = var(30) = 1 && (P2Life > 0) && p2movetype != H 
triggerall = power >= 1000 && statetype != a 
trigger1 = stateno = 150 
trigger2 = stateno = 152

[State -2]
Type = ChangeState
Value = 102
triggerall = Var(30) = 1
triggerall = StateType != A
triggerall = P2MoveType != A
triggerall = enemy,Pos Y = 0
triggerall = random = [0,249]
trigger1 = P2BodyDist X = [40,99]
trigger1 = ctrl

[State -2]
Type = ChangeState
Value = 430
triggerall = Var(30) = 1
triggerall = StateType != A
triggerall = P2MoveType != H
triggerall = enemy,Pos Y = 0
trigger1 = enemy,stateno != [5100,5199]
trigger1 = P2BodyDist X = [-20,20]
trigger1 = ctrl 

[State -2]
Type = ChangeState
Value = 400
triggerall = Var(30) = 1
triggerall = StateType != A
triggerall = P2MoveType != A
triggerall = EnemyNear,MoveType != A
trigger1 = MoveHit
trigger1 = StateNo = 430
trigger1 = P2BodyDist X = [-40,40]

[State -2]
type = ChangeState
value = 1100
triggerall = var(30) = 1 && (P2Life > 0)
triggerall = (StateType != A) && (enemy, numproj = 0)
trigger1 = (p2bodydist x <= 50) && (p2bodydist x >= 0) && (p2bodydist y <= -30) && random <= 300 && p2statetype = A && p2movetype != H && ctrl

[State -2, hadouken]
type = ChangeState
value = 1110
triggerall = var(30) = 1
trigger1 = ctrl && (enemynear,statetype != A) && (enemynear,movetype != A) && (BackEdgeBodyDist <= 30)
trigger1 = (abs(enemynear,Pos X - Pos X) < 60) && random = [0,40]
trigger2 = ctrl && (enemynear,statetype = A) && (enemynear,movetype != A) && (BackEdgeBodyDist <= 30)
trigger2 = (abs(enemynear,Pos Y - Pos Y) >= 120) && (abs(enemynear,Pos X - Pos X) < 60) && random = [0,50]
trigger3 = stateno = 440 && (animelem=4,>0 && animelem=6,<0) && movehit && (BackEdgeBodyDist <= 30)
trigger3 = (power < 2000) && random = [0,200]
trigger4 = movehit
trigger4 = stateno = 260
trigger4 = stateno = 400

[State -2]
Type = ChangeState
Value = 1000
triggerall = Var(30) = 1
triggerall = StateType != A && NumProjID(1000) = 0
triggerall = random = [100,200]
trigger1 = P2BodyDist X >= 100
trigger1 = ctrl

[State -2]
Type = ChangeState
Value = 1010
triggerall = Var(30) = 1
triggerall = StateType != A && NumProjID(1000) = 0
triggerall = random = [100,200]
trigger1 = P2BodyDist X >= 100
trigger1 = ctrl