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

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

[command]
name = "doUBle"
command = ~D, DF, F, c
time = 30

[command]
name = "doUBle2"
command = ~D, DB, B,D, DB, B, c
time = 30

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

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

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

[command]
name = "star"
command = ~D$50,$U, a
time = 30

[command]
name = "star"
command = ~D$50,$U, b
time = 30

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

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

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

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

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

[command]
name = "light"
command = ~B, D, DB, x
time = 12

[command]
name = "light"
command = ~B, D, DB, y
time = 12

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

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

[command]
name = "hagure"
command = ~F, D, B, c
time = 17

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

;-| 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 = a+x
time = 30

[command]
name = "frontc";required (do not remove)
command = /$F,y
time = 1

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

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

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

[command]
name = "ab"
command = x+a
time = 1

[command] 
name = "dodge" 
command = x+a 
time = 1 

[command] 
name = "cd" 
command = y+b
time = 1

[command]
name = "ab"
command = z
time = 1

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

[command]
name = "upb";required (do not remove)
command = /$U,b
time = 1

[command]
name = "upx";required (do not remove)
command = /$U,a
time = 1

[command]
name = "upa"
command = /$U,x
time = 1

[command]
name = "upa2"
command = /$FU,x
time = 1

[command]
name = "upa3"
command = /$BU,x
time = 1

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

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

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

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

[command]
name = "reversal3"
command = /$B,a+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

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


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

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

[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 = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 210)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 215)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 265)
trigger13 = movecontact && (stateno = 1100)
trigger14 = movecontact && (stateno = 1200)
trigger15 = movecontact && (stateno = 1705)
trigger16 = movecontact && (stateno = 1810)
trigger17 = movecontact && (stateno = 1811)
trigger18 = movecontact && (stateno = 1812)

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

[state -1]
type = changestate
value = 3100
triggerall = command = "monsters"  
triggerall = power >= 1000
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 210)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 215)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 265)
trigger13 = movecontact && (stateno = 1100)
trigger14 = movecontact && (stateno = 1200)
trigger15 = movecontact && (stateno = 1705)
trigger16 = movecontact && (stateno = 1810)
trigger17 = movecontact && (stateno = 1811)
trigger18 = movecontact && (stateno = 1812)

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

[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 = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 210)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 215)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 1705)
trigger13 = movecontact && (stateno = 1810)
trigger14 = movecontact && (stateno = 1811)
trigger15 = movecontact && (stateno = 1812)

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

[state -1]
type = changestate
value = 3300
triggerall = command = "doUBle2"  
triggerall = power >= 2000
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 210)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 215)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 1705)
trigger13 = movecontact && (stateno = 1810)
trigger14 = movecontact && (stateno = 1811)
trigger15 = movecontact && (stateno = 1812)

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

[state -1]
type = changestate
value = 1000
triggerall = command = "tenku1"  &&  numprojid(1000) = 0
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 210)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 215)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 265)
trigger13 = movecontact && (stateno = 1705)

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

[state -1]
type = changestate
value = 1010
triggerall = command = "tenku2" &&  numprojid(1000) = 0
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 210)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 215)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 265)
trigger13 = movecontact && (stateno = 1705)

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

[state -1]
type = changestate
value = 1100
triggerall = command = "star"
trigger1 = ctrl = 1 && statetype = S
trigger2 = StateNo = 40
trigger3 = movecontact && (stateno = 200)
trigger4 = movecontact && (stateno = 230)
trigger5 = movecontact && (stateno = 235)
trigger6 = movecontact && (stateno = 240)
trigger7 = movecontact && (stateno = 210)
trigger8 = movecontact && (stateno = 400)
trigger9 = movecontact && (stateno = 430)
trigger10 = movecontact && (stateno = 410)
trigger11 = movecontact && (stateno = 215)
trigger12 = movecontact && (stateno = 260)
trigger13 = movecontact && (stateno = 265)
trigger14 = movecontact && (stateno = 1705)

[state -1]
type = changestate
value = 1200
triggerall = command = "x" 
triggerall = statetype = s
trigger1 = stateno = 1101 && time <= 14


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

[state -1]
type = changestate
value = 1300
triggerall = command = "monster2"
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 210)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 215)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 265)
trigger13 = movecontact && (stateno = 1705)

[state -1]
type = changestate
value = 1350
triggerall = command = "monster1"
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 210)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 215)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 265)
trigger13 = movecontact && (stateno = 1705)

[state -1]
type = changestate
value = 1370
triggerall = command = "monster3"
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 210)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 215)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 265)
trigger13 = movecontact && (stateno = 1705)

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

[state -1]
type = changestate
value = 1400
triggerall = command = "bell"
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 210)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 215)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 265)
trigger13 = movecontact && (stateno = 1705)

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

[state -1]
type = changestate
value = 1500
triggerall = command = "juzo" && numhelper(1510) = 0
triggerall = statetype = s
trigger1 = stateno = 1810 && time <= 34

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

[state -1]
type = changestate
value = 1600
triggerall = command = "light"
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 210)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 215)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 265)
trigger13 = movecontact && (stateno = 1705)

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

[state -1]
type = changestate
value = 1700
triggerall = command = "dash"
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 210)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 215)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 265)
trigger13 = movecontact && (stateno = 1705)


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

[state -1]
type = changestate
value = 1800
triggerall = command = "reversal"
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 210)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 215)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 265)
trigger13 = movecontact && (stateno = 1705)

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

[state -1]
type = changestate
value = 1803
triggerall = command = "reversal3"
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 210)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 215)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 265)
trigger13 = movecontact && (stateno = 1705)

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

[state -1]
type = changestate
value = 1801
triggerall = command = "reversal2"
triggerall = statetype = c 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 210)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 215)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 265)
trigger13 = movecontact && (stateno = 1705)

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

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

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

[state -1]
type = changestate
value = 1900
triggerall = command = "hagure"
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 210)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 410)
trigger10 = movecontact && (stateno = 215)
trigger11 = movecontact && (stateno = 260)
trigger12 = movecontact && (stateno = 265)
trigger13 = movecontact && (stateno = 1705)

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

[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
trigger1 = command = "y" && command = "b"
trigger1 = statetype = s && (ctrl || (anim = [99,101])) && stateno != 1700

[state -1, kung Fu throw]
type = changestate
value = 1713
triggerall = command = "y" && command = "b"
trigger1 = stateno = 1700 && time <= 14

;---------------------------------------------------------------------------
;kung Fu throw
;投げ
[state -1, kung Fu throw]
type = changestate
value = 900
trigger1 = command = "y" && command = "b"
trigger1 = statetype = a && (ctrl || (anim = [99,101])) && stateno != 1700

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

[state -1, 700]
type = changestate
value = 250
triggerall = power >= 1000
triggerall = command = "y" && command = "b"
trigger1 = stateno = 150
trigger2 = stateno = 151

;===========================================================================
;---------------------------------------------------------------------------
;stand light punch
;立ち弱パン?
[state -1, stand light punch]
type = changestate
value = 200
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = s
trigger1 = ctrl
trigger2 = stateno = 110 && animelem = 2,>=0

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


;---------------------------------------------------------------------------
;stand strong punch
;立ち強パン?
[state -1, stand strong punch]
type = changestate
value = 260
triggerall = command = "y"
trigger1 = command = "holdback"
trigger1 = statetype = s
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 5
trigger3 = (stateno = 230) && time > 6
trigger4 = movecontact && (stateno = 200)
trigger5 = movecontact && (stateno = 230)
trigger6 = movecontact && (stateno = 235)
trigger7 = movecontact && (stateno = 240)
trigger8 = movecontact && (stateno = 210)
trigger9 = movecontact && (stateno = 400)
trigger10 = movecontact && (stateno = 430)
trigger2 = stateno = 110 && animelem = 2,>=0

;---------------------------------------------------------------------------
;stand light kick
;立ち弱キック
[state -1, stand light kick]
type = changestate
value = 230
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = s
trigger1 = ctrl

;---------------------------------------------------------------------------
;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 = 110 && animelem = 2,>=0

;---------------------------------------------------------------------------
;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 = 110 && animelem = 2,>=0

;---------------------------------------------------------------------------
;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 = 110 && animelem = 2,>=0

;---------------------------------------------------------------------------
;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 = 400) || (stateno = 430)
trigger2 = (time > 9) || (movecontact && time > 5)
trigger2 = stateno = 110 && animelem = 2,>=0

;---------------------------------------------------------------------------
;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)
trigger2 = stateno = 110 && animelem = 2,>=0

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

[state -1, jump light punch]
type = changestate
value = 605
triggerall = command = "x"
triggerall = vel x = 0 && var(13) = 0
trigger1 = statetype = a
trigger1 = ctrl

;---------------------------------------------------------------------------
;jump strong punch
[state -1, jump light 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
trigger2 = stateno = 1350 ;air blocking

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

;jump light punch
;空中弱パン?
[state -1, jump light punch]
type = changestate
value = 640
triggerall = command = "b"
triggerall = vel x != 0 || var(13) = 1
trigger1 = statetype = a
trigger1 = ctrl

[state -1, jump light punch]
type = changestate
value = 645
triggerall = command = "b"
triggerall = vel x = 0 && var(13) = 0
trigger1 = statetype = a
trigger1 = ctrl

;---------------------------------------------------------------------------
;jump strong kick
;空中強キック
[state -1, jump strong kick]
type = changestate
value = 650
triggerall = command = "downa"
trigger1 = statetype = a
trigger1 = ctrl

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

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

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

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

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

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

[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 -1, 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 -1, 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 = 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 -1, 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 -1, 飛び道具ガ?ド]
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 = 1100
trigger1 = var(30) = 1                  
trigger1 = statetype != A              
trigger1 = ctrl 
trigger1 = p2bodydist X <= 40

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

[state -2]
type = ChangeState
value = 1000
trigger1 = numprojid(1000) = 0
trigger1 = var(30) = 1                  
trigger1 = statetype != A              
trigger1 = ctrl 
trigger1 = p2bodydist X >= 40

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

[state -2]
type = ChangeState
value = 1010
trigger1 = numprojid(1000) = 0
trigger1 = var(30) = 1                  
trigger1 = statetype != A              
trigger1 = ctrl 
trigger1 = p2bodydist X >= 40

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

[state -2]
type = ChangeState
value = 1300
trigger1 = var(30) = 1                  
trigger1 = statetype != A              
trigger1 = ctrl 
trigger1 = p2bodydist X <= 40
trigger1 = EnemyNear,HitDefAttr = SCA, NA, SA, SP, HP, HT, HA

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

[state -2]
type = ChangeState
value = 1350
trigger1 = var(30) = 1                  
trigger1 = statetype != A              
trigger1 = ctrl 
trigger1 = p2bodydist X <= 40
trigger1 = EnemyNear,HitDefAttr = SCA, NA, SA, SP, HP, HT, HA

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

[state -2]
type = ChangeState
value = 1370
trigger1 = var(30) = 1                  
trigger1 = statetype != A              
trigger1 = ctrl 
trigger1 = p2bodydist X <= 40
trigger1 = EnemyNear,HitDefAttr = SCA, NA, SA, SP, HP, HT, HA

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

[state -2]
type = ChangeState
value = 1800
trigger1 = var(30) = 1                  
trigger1 = statetype != A              
trigger1 = ctrl 
trigger1 = p2movetype = A
trigger1 = p2bodydist X <= 40
trigger1 = EnemyNear,HitDefAttr = sa,na,sa,ha
trigger1 = p2statetype != C 
trigger1 = p2stateno = [200,299]

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

[state -2]
type = ChangeState
value = 1801
trigger1 = var(30) = 1                  
trigger1 = statetype != A              
trigger1 = ctrl 
trigger1 = p2movetype = A
trigger1 = p2bodydist X <= 40
trigger1 = EnemyNear,HitDefAttr = sa,na,sa,ha
trigger1 = p2statetype = C 
trigger1 = p2stateno = [99,101]
trigger1 = p2stateno = [400,499]

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

[state -2]
type = ChangeState
value = 1802
trigger1 = var(30) = 1                  
trigger1 = statetype = A              
trigger1 = ctrl 
trigger1 = p2movetype = A
trigger1 = p2bodydist X <= 40
trigger1 = EnemyNear,HitDefAttr = sa,na,sa,ha
trigger1 = p2statetype = A
trigger1 = p2stateno = [600,699]

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

[state -2, 700]
type = changestate
value = 250
trigger1 = power >= 1000
trigger1 = var(30) = 1
trigger1 = stateno = 150
trigger1 = stateno = 151

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

[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]
type = ChangeState
value = 3100
trigger1 = var(30) = 1    
trigger1 = power <= 1000              
trigger1 = statetype != A              
trigger1 = ctrl 
trigger1 = p2bodydist X >= 40
trigger1 = p2movetype != H
trigger1 = p2statetype != L
trigger1 = p2statetype != A

