;-| Button Remapping |-----------------------------------------------------
[Remap]
x = x
y = y
z = z
a = a
b = b
c = c
s = s

;-| Default Values |-------------------------------------------------------
[Defaults]
command.time = 15
command.buffer.time = 1

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

;-| Super Motions |--------------------------------------------------------
[Command]
name = "escape"
command = ~D, B, D, $B, a
time = 20

[Command]
name = "escape"
command = ~D, B, D, $B, b
time = 20

[Command]
name = "TripleKFPalm"
command = ~D, F, D,$F, x
time = 20

[Command]
name = "TripleKFPalm"
command = ~D, F, D,$F, y
time = 20

[Command]
name = "SmashKFUpper"
command = ~D, DB, B, D, DB, B, x;~F, D, DF, F, D, DF, x
time = 20

[Command]
name = "SmashKFUpper"   ;Same name as above
command = ~D, DB, B, D, DB, B, y;~F, D, DF, F, D, DF, y
time = 20

;-| Special Motions |------------------------------------------------------
[Command]
name = "upper_x"
command = ~F, D, DF, x

[Command]
name = "upper_y"
command = ~F, D, DF, y

[Command]
name = "upper_xy"
command = ~F, D, DF, x+y

[Command]
name = "dd x"
command = ~D, D, x
time = 20

[Command]
name = "dd y"
command = ~D, D, y
time = 20


[Command]
name = "trap x"
command = ~B, D, DF,x
time = 25

[Command]
name = "trap y"
command = ~B, D, DF,y
time = 25

[Command]
name = "trap x"
command = ~B, D, F,x
time = 25

[Command]
name = "trap y"
command = ~B, D, F,y
time = 25

[Command]
name = "DF a"
command = ~D, F, a

[Command]
name = "DF b"
command = ~D, F, b

[Command]
name = "DF ab"
command = ~D, F, a+b

[Command]
name = "DF x"
command = ~D, F, x

[Command]
name = "DF y"
command = ~D, F, y

[Command]
name = "DF z"
command = ~D, F, z

[Command]
name = "DF xy"
command = ~D, F, x+y

[Command]
name = "DB x"
command = ~D, B, x

[Command]
name = "DB y"
command = ~D, B, y

[Command]
name = "DB xy"
command = ~D, B, x+y

[Command]
name = "BD x"
command = ~B, D, x

[Command]
name = "DB a"
command = ~D, B, a

[Command]
name = "DB b"
command = ~D, B, b

[Command]
name = "DB ab"
command = ~D, B, a+b

[Command]
name = "FF_ab"
command = F, F, a+b

[Command]
name = "FF_a"
command = F, F, a

[Command]
name = "FF_b"
command = F, F, b

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

[Command]
name = "xxx"     ;Required (do not remove)
command = ~x, x, x
time = 14

[Command]
name = "yyy"     ;Required (do not remove)
command = ~y, y, y
time = 14

;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "recovery"
command = x+y
time = 1

[Command]
name = "line"
command = x+a
time = 1

[Command]
name = "GC"
command = y+b
time = 1

[Command]
name = "dead"
command = z+c
time = 1

[Command]
name = "dead"
command = /$z+c
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 = "holdx";Required (do not remove)
command = /$x
time = 1

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

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

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


[Statedef -1]

;===========================================================================
[State -1,2]
type = Varset
;triggerall = var(18) != 0
triggerall = var(20) != 1
trigger1 = command = "AI1"
trigger2 = command = "AI2"
trigger3 = command = "AI3"
trigger4 = command = "AI4"
trigger5 = command = "AI5"
trigger6 = command = "AI6"
trigger7 = command = "AI7"
trigger8 = command = "AI8"
trigger9 = command = "AI9"
trigger10 = command = "AI10"
trigger11 = command = "AI11"
trigger12 = command = "AI12"
trigger13 = command = "AI13"
trigger14 = command = "AI14"
trigger15 = command = "AI15"
trigger16 = command = "AI16"
trigger17 = command = "AI17"
trigger18 = command = "AI18"
trigger19 = command = "AI19"
trigger20 = command = "AI20"
trigger21 = command = "AI21"
trigger22 = command = "AI22"
trigger23 = command = "AI23"
trigger24 = command = "AI24"
trigger25 = command = "AI25"
trigger26 = command = "AI26"
trigger27 = command = "AI27"
trigger28 = command = "AI28"
trigger29 = command = "AI29"
trigger30 = command = "AI30"
trigger31 = command = "AI31"
trigger32 = command = "AI32"
trigger33 = command = "AI33"
trigger34 = command = "AI34"
trigger35 = command = "AI35"
trigger36 = command = "AI36"
trigger37 = command = "AI37"
trigger38 = command = "AI38"
trigger39 = command = "AI39"
trigger40 = command = "AI40"
trigger41 = command = "AI41"
trigger42 = command = "AI42"
trigger43 = command = "AI43"
trigger44 = command = "AI44"
trigger45 = command = "AI45"
trigger46 = command = "AI46"
trigger47 = command = "AI47"
trigger48 = command = "AI48"
trigger49 = command = "AI49"
trigger50 = command = "AI50"
trigger51 = command = "AI51"
trigger52 = command = "AI52"
trigger53 = command = "AI53"
trigger54 = command = "AI54"
trigger55 = command = "AI55"
trigger56 = command = "AI56"
trigger57 = command = "AI57"
trigger58 = command = "AI58"
trigger59 = command = "AI59"
v = 51
value = 1

[State -1,2]
type = null;Varset
triggerall = var(18) = 0
triggerall = var(20) = 1
trigger1 = command = "AI1"
trigger2 = command = "AI2"
trigger3 = command = "AI3"
trigger4 = command = "AI4"
trigger5 = command = "AI5"
trigger6 = command = "AI6"
trigger7 = command = "AI7"
trigger8 = command = "AI8"
trigger9 = command = "AI9"
trigger10 = command = "AI10"
trigger11 = command = "AI11"
trigger12 = command = "AI12"
trigger13 = command = "AI13"
trigger14 = command = "AI14"
trigger15 = command = "AI15"
trigger16 = command = "AI16"
trigger17 = command = "AI17"
trigger18 = command = "AI18"
trigger19 = command = "AI19"
trigger20 = command = "AI20"
trigger21 = command = "AI21"
trigger22 = command = "AI22"
trigger23 = command = "AI23"
trigger24 = command = "AI24"
trigger25 = command = "AI25"
trigger26 = command = "AI26"
trigger27 = command = "AI27"
trigger28 = command = "AI28"
trigger29 = command = "AI29"
trigger30 = command = "AI30"
trigger31 = command = "AI31"
trigger32 = command = "AI32"
trigger33 = command = "AI33"
trigger34 = command = "AI34"
trigger35 = command = "AI35"
trigger36 = command = "AI36"
trigger37 = command = "AI37"
trigger38 = command = "AI38"
trigger39 = command = "AI39"
trigger40 = command = "AI40"
trigger41 = command = "AI41"
trigger42 = command = "AI42"
trigger43 = command = "AI43"
trigger44 = command = "AI44"
trigger45 = command = "AI45"
trigger46 = command = "AI46"
trigger47 = command = "AI47"
trigger48 = command = "AI48"
trigger49 = command = "AI49"
trigger50 = command = "AI50"
trigger51 = command = "AI51"
trigger52 = command = "AI52"
trigger53 = command = "AI53"
trigger54 = command = "AI54"
trigger55 = command = "AI55"
trigger56 = command = "AI56"
trigger57 = command = "AI57"
trigger58 = command = "AI58"
trigger59 = command = "AI59"
v = 21
value = 0

;===========================================================================
;-----------AIの行動　位置関係に応じた技の使用 ------------
;===========================================================================

;起きあがり無敵計測
[State -1, Fast Kung Fu Upper]
type = varadd
trigger1 = p2stateno != 5120
trigger1 = var(19) < 15
v = 19
value = 1
[State -1, Fast Kung Fu Upper]
type = varset
trigger1 = var(19) = [13,15]
v = 19
value = 100
[State -1, Fast Kung Fu Upper]
type = varset
trigger1 = p2stateno = 5120
v = 19
value = 0

;-----------AIの行動　ガード(仮) --------
[State -1, AI1];ガード
Type = null;ChangeState
Value = 120
triggerall = alive = 1
triggerall = IsHelper = 0
TriggerAll = Ctrl
triggerAll = var(51) = 1
triggerAll = movetype != A
TriggerAll = InGuardDist
Trigger1 = var(21) = [0,5]

;-----------AIの行動　ダウン中攻撃 --------
;ダウン攻撃
[State -1, stone]
type = ChangeState
value = 510
triggerall = stateno = 5110
triggerall = var(51) = 1
triggerall = life > 0
triggerall = var(21) = [0,6]
trigger1 = p2dist X > 100
trigger1 = enemy,pos Y = 0

[State -1, kick]
type = ChangeState
value = 500
triggerall = stateno = 5110
triggerall = var(51) = 1
triggerall = life > 0
triggerall = var(21) = [0,1]
trigger1 = p2dist X = [0,20]
trigger1 = p2statetype != A
trigger1 = p2movetype = A

[State -1, kick]
type = ChangeState
value = 500
triggerall = stateno = 5110
triggerall = var(51) = 1
triggerall = life > 0
trigger1 = p2dist X = [0,40]
trigger1 = p2statetype = A

;-----------AIの行動　死んだふり ----------
;死んだふり
[State -1, pretend dead]
type = ChangeState
value = 3100
triggerall = var(51) = 1
triggerall = var(50) = 0
triggerall = life < 160
triggerall = power >= 1000
triggerall = movetype = H
triggerall = p2life < 340
trigger1 = stateno = 5000
trigger2 = stateno = 5010
trigger3 = stateno = 5020

;密着距離(と対空投げ)-----------------------

;バックステップ
[State -1, Kung Fu Throw]
type = ChangeState
value = 105
triggerall = var(20) = [0,10]
triggerall = var(51) = 1
triggerall = var(19) = 100
triggerall = p2bodydist X < 2
triggerall = enemy,pos Y = 0
trigger1 = stateno = 21
trigger2 = stateno = 101

;投げ（ヒザ蹴り）
[State -1, Kung Fu Throw]
type = ChangeState
value = 2000
triggerall = var(20) = [0,10]
triggerall = var(51) = 1
triggerall = var(19) = 100
triggerall = statetype != A
triggerall = (ctrl)||(stateno = 21)
triggerall = stateno != 100
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = p2movetype != H
trigger1 = p2bodydist X < 10
trigger1 = (var(12) = 1)&&facing = 1
trigger1 = (frontedgedist < fvar(12)+5)&&(frontedgedist < 50)
trigger2 = p2bodydist X < 10
trigger2 = (var(12) = 2)&&facing = -1
trigger2 = (frontedgedist < fvar(12)+5)&&(frontedgedist < 50)
trigger3 = p2bodydist X < 10
trigger3 = var(12) = 0

;投げ（投げ飛ばし）
[State -1, Kung Fu Throw]
type = ChangeState
value = 2100
triggerall = var(20) = [0,15]
triggerall = var(51) = 1
triggerall = var(19) = 100
triggerall = statetype != A
triggerall = (ctrl)||(stateno = 21)
triggerall = stateno != 100
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = p2movetype != H
triggerall = p2bodydist X < 10
trigger1 = var(12) = 1
trigger1 = facing = -1
trigger2 = var(12) = 2
trigger2 = facing = 1

;投げ（投げ飛ばし）
[State -1, Kung Fu Throw]
type = ChangeState
value = 2101
triggerall = var(20) = [0,15]
triggerall = var(51) = 1
triggerall = var(19) = 100
triggerall = statetype != A
triggerall = (ctrl)||(stateno = 21)
triggerall = stateno != 100
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = p2movetype != H
triggerall = p2bodydist X < 10
trigger1 = var(12) = 1
trigger1 = facing = 1
trigger2 = var(12) = 2
trigger2 = facing = -1

;足踏み
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 235
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = enemy,pos Y = 0
triggerall = var(21) = [0,5]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = p2bodydist X < 8
trigger2 = (enemy,stateno = 5110)&&(enemy,prevstateno != 5081)&&(P2bodyDist X = [1,14])

;小足
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 430
triggerall = var(51) = 1
triggerall = (statetype = S)||(statetype = C)
triggerall = ctrl
triggerall = enemy,pos Y = 0
triggerall = var(21) = [6,7]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = p2bodydist X < 8

;対空投げ
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1500
triggerall = var(20) = [0,2]
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = enemy,pos Y > -130
triggerall = enemy,pos Y < -25
trigger1 = (p2statetype = A)&&(P2bodyDist X = [0,30])&&(enemy,movetype != H)
trigger2 = (p2statetype = A)&&(P2bodyDist X = [20,40])&&(enemy,vel X > 2)&&(enemy,movetype != H)

;ガードキャンセル
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 2200
triggerall = var(51) = 1
triggerall = power >= 2000
trigger1 = stateno = [150,153]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = (P2bodyDist X = [0,30])&&(enemy,movetype = A)
trigger1 = var(21) = [0,3]


;相手ダウン〜復帰状態の時の挙動---------------

;対空投げ直後
;板蹴り
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1700
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = (numhelper(1701) = 0)&&(numhelper(1721) = 0)
triggerall = var(21) = [0,5]
triggerall = P2Life > 0
trigger1 = p2movetype = H
trigger1 = p2stateno = 1521
trigger1 = P2bodyDist X = [70,100]

;ES板遠距離成功後
;ガビョウ
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1900
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = [0,5]
triggerall = Numhelper(1911) = 0
triggerall = P2Life > 0
triggerall = numprojid(10) > 0
trigger1 = P2bodyDist X = [80,240]
trigger1 = p2movetype = H
trigger1 = p2stateno = [1727,1728]
trigger1 = p2stateno = 1728


;ピヨったふり派生-----------------------------

;急所蹴りES
[State -1, groin kick]
type = ChangeState
value = 1220
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = (stateno = 1100)&&(time > 17)
trigger1 = (p2movetype = A)&&(P2bodyDist X = [30,65]);&&(enemy,time < 2)
trigger1 = power > 330
trigger1 = enemy,pos Y > -30

[State -1, kiri];地上の相手に不意にだす
type = ChangeState
value = 1600
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = (stateno = 1100)&&(time > 18)
trigger1 = (p2statetype = S)&&(P2bodyDist X = [50,60])
trigger1 = p2movetype != H

;毒霧
[State -1, kiri];遠目の飛び込みに対して
type = ChangeState
value = 1600
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = (stateno = 1100)&&(time > 18)
trigger1 = (p2statetype = A)&&(P2bodyDist X = [90,100])&&(enemy,vel X > 2)&&(enemy,movetype != H)
trigger1 = p2movetype != H

;毒霧
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1620
triggerall = var(51) = 1
triggerall = power >= 330
triggerall = (stateno = 1100)&&(time > 18)
triggerall = enemy,stateno != 5120
trigger1 = (p2statetype = S)&&(P2bodyDist X = [90,110])
trigger2 = (p2statetype = A)&&(P2bodyDist X = [90,110])

;対空投げ
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1500
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = (stateno = 1100)&&(time > 15)
triggerall = enemy,pos Y > -100
triggerall = enemy,pos Y < -15
triggerall = (enemy,pos Y > -130)&&(enemy,pos Y < -1)
trigger1 = (p2statetype = A)&&(P2bodyDist X = [-5,30])&&(enemy,movetype != H)
trigger2 = (p2statetype = A)&&(P2bodyDist X = [20,40])&&(enemy,vel X > 2)&&(enemy,movetype != H)


;ジャンプ派生(独自ステート51からの派生)-------
;ジャンプキック(独自ジャンプステート51からの派生)
[State -1, Crouching Strong Punch]
type = ChangeState
value = 640
triggerall = var(51) = 1
triggerall = statetype = A
trigger1 = stateno = 51 && time > 24
trigger1 = P2bodyDist X = [-20,60]
trigger1 = (p2statetype = S)||(p2statetype = C)

[State -1, Crouching Strong Punch]
type = ChangeState
value = 610
triggerall = var(51) = 1
triggerall = statetype = A
trigger1 = stateno = 51 && time = [5,18]
trigger1 = P2bodyDist X = [-20,20]
trigger1 = P2bodyDist Y = [-20,20]
trigger1 = p2statetype = A


;近距離(コンボ始動の通常技)-------------------

;足踏み
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 235
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
trigger1 = var(21) = [0,1]
trigger1 = (p2statetype = S)&&(P2bodyDist X = [1,11])
trigger1 = p2movetype != H
trigger2 = var(21) = [0,5]
trigger2 = (enemy,stateno = 5110)&&(enemy,prevstateno != 5081)&&(P2bodyDist X = [1,14])

;Stand Light Kick
;立ち弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = [0,2]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = enemy,stateno != 5120
trigger1 = P2bodyDist X = [1,15]

;しゃがみ弱P
[State -1, Crouching Strong Punch]
type = ChangeState
value = 400
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = [3,6]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = enemy,stateno != 5120
trigger1 = P2bodyDist X = [1,15]
trigger1 = p2movetype != H

;歩き(投げ狙い)
[State -1, Crouching Strong Punch]
type = ChangeState
value = 21
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = [7,8]
triggerall = var(19) = 100
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [10,15]
trigger1 = (p2movetype != H)&&(p2stateno != 5120)
[State -1, Crouching Strong Punch];投げられるタイミングにない場合はしゃがみ弱Pに変更
type = ChangeState
value = 400
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = [7,8]
triggerall = var(19) != 100
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [10,15]
trigger1 = p2movetype != H

;近距離遠め(遠目の通常技)---------------
;しゃがみ弱K
[State -1, Crouching Strong Kick]
type = ChangeState
value = 430
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = [0,2]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = enemy,stateno != 5120
trigger1 = P2bodyDist X = [15,30]
;trigger1 = p2movetype != H

;砂かけ
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 2350
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(16) > 0
triggerall = var(21) = [3,5]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = enemy,stateno != 5120
trigger1 = P2bodyDist X = [20,30]

;立ち強P
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 210
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(21) = [3,4]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = enemy,stateno != 5120
trigger1 = P2bodyDist X = [15,30]

;立ち強K
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(21) = [5,6]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = enemy,stateno != 5120
trigger1 = P2bodyDist X = [15,30]
;trigger1 = p2movetype != H

;対空しゃがみ強P
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = 3
trigger1 = (p2statetype = A)&&(P2bodyDist X = [20,45])&&(enemy,movetype != H)
trigger1 = enemy,pos Y > -70
trigger1 = enemy,vel x > 0
trigger1 = power > 500
trigger1 = p2movetype != A
;(ヒット後はES板追撃)

;歩き(投げ狙い)
[State -1, Crouching Strong Punch]
type = ChangeState
value = 21
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = [7,8]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = enemy,stateno != 5120
trigger1 = P2bodyDist X = [15,30]
trigger1 = p2movetype != H


;近距離もっと遠め-----------------------赤
;画面後ろ逃げ
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 3200
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = [1,4]
triggerall = var(22) = 0
triggerall = power > 1000
triggerall = backedgedist < 150
trigger1 = (p2statetype = S)||(p2statetype = C)
;trigger1 = P2bodyDist X = [25,70]
trigger1 = enemy,frontedgedist < 160
trigger1 = enemy,movetype != A

;砂
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 2350
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(16) > 0
triggerall = var(21) = [0,3]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = enemy,stateno != 5120
trigger1 = P2bodyDist X = [30,60]

;立ち強P
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 210
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(21) = [0,2]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = enemy,stateno != 5120
trigger1 = P2bodyDist X = [30,50]

;立ち強K
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(21) = [3,5]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = enemy,stateno != 5120
trigger1 = P2bodyDist X = [30,50]
;trigger1 = p2movetype != H

;歩き(投げ狙い)
[State -1, Crouching Strong Punch]
type = ChangeState
value = 21
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = [6,7]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = enemy,stateno != 5120
trigger1 = P2bodyDist X = [30,50]
trigger1 = p2movetype != H

[State -1, Crouching Strong Punch]
type = ChangeState
value = 1200
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = 8
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = enemy,stateno != 5120
trigger1 = P2bodyDist X = [30,50]
trigger1 = p2movetype != H


;中距離(50〜60)---------------緑

;立ち強P
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 2350
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(16) > 0
triggerall = var(21) = 1
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = enemy,stateno != 5120
trigger1 = P2bodyDist X = [50,60]

;立ち強P
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 210
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(21) = [0,1]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = enemy,stateno != 5120
trigger1 = P2bodyDist X = [50,60]

;立ち強K
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(21) = 2
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = enemy,stateno != 5120
trigger1 = P2bodyDist X = [50,60]

;歩き(投げ狙い)
[State -1, Crouching Strong Punch]
type = ChangeState
value = 21
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = 3
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = enemy,stateno != 5120
trigger1 = P2bodyDist X = [50,60]
trigger1 = p2movetype != H

;急所蹴り
[State -1, groin kick]
type = ChangeState
value = 1200
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = [4,5]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [50,60]
;trigger1 = p2movetype = H

;奥逃げ
[State -1, esk]
type = ChangeState
value = 1800
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = 6
triggerall = power > 1000
trigger1 = P2bodyDist X = [50,60]
trigger1 = p2movetype = A

;砂ひろい
[State -1, sand]
type = ChangeState
value = 2320
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = 7
triggerall = var(16) = 0
trigger1 = p2movetype = H
trigger1 = P2bodyDist X = [50,60]
trigger1 = p2movetype != A

;ピヨったふり
[State -1, groin kick]
type = ChangeState
value = 1100
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = 7
trigger1 = p2movetype != H
trigger1 = P2bodyDist X = [50,60]
trigger1 = p2movetype != A

;砂ひろい
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 2320
triggerall = var(51) = 1
triggerall = var(16) = 0
triggerall = var(21) = 8
triggerall = statetype != A
trigger1 = P2bodyDist X = [50,60]
trigger1 = p2movetype != A
trigger1 = ctrl


;中距離(60〜80)---------------青

;急所蹴りES
[State -1, Standing Strong Kick]
type = ChangeState
value = 1220
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(21) = 1
triggerall = power > 330
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [60,70]
[State -1, Standing Strong Kick]
type = ChangeState
value = 1200
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(21) = 1
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [60,70]

;ピヨったふり
[State -1, Standing Strong Kick]
type = ChangeState
value = 1100
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(21) = 2
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [70,80]
;trigger1 = p2movetype != H

;走り
[State -1, Crouching Strong Punch]
type = ChangeState
value = 101
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = 3
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [60,80]
trigger1 = p2movetype != H

;前ジャンプ
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 41
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(21) = 4
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [60,80]
trigger2 = p2stateno = 5120
trigger2 = P2bodyDist X = [60,80]

;含み針
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1650
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(21) = 5
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [60,80]

;含み針下段
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1660
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(21) = 6
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [60,80]

;突き
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1000
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(21) = 7
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [60,80]

;砂ひろい
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 2320
triggerall = statetype != A
triggerall = var(51) = 1
triggerall = var(16) = 0
triggerall = var(21) = 8
triggerall = ctrl
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [60,80]

;中距離(80〜110)---------------紫

;立ち強K
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(21) = [1,2]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [80,110]
;trigger1 = p2movetype != H

;砂ひろい
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 2320
triggerall = statetype != A
triggerall = var(51) = 1
triggerall = var(16) = 0
triggerall = var(21) = [3,4]
triggerall = ctrl
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [80,110]

;走り
[State -1, Crouching Strong Punch]
type = ChangeState
value = 101
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = 3
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [80,110]
trigger1 = p2movetype != H

;走り
[State -1, Crouching Strong Punch]
type = ChangeState
value = 101
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = 4
triggerall = var(16) > 0
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [80,110]
trigger1 = p2movetype != H

;前ジャンプ（相手が起き上がり状態だった場合）
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 41
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(21) = 4
triggerall = var(16) != 0
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [80,110]

;含み針
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1650
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(21) = [5,6]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [80,110]

;含み針下段
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1660
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(21) = [7,8]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [80,110]

;ジャンプキック(独自ジャンプステート51からの派生)
[State -1, Crouching Strong Punch]
type = ChangeState
value = 640
triggerall = var(51) = 1
triggerall = statetype = A
trigger1 = stateno = 51 && time > 24
trigger1 = P2bodyDist X = [-20,60]


;遠距離(110〜150)---------------黒

;板蹴りES
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1720
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = power >= 330
triggerall = (numhelper(1701) = 0)&&(numhelper(1721) = 0)
triggerall = var(21) = [1,2]
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = P2bodyDist X = [110,150]
;板蹴り
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1700
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = (numhelper(1701) = 0)&&(numhelper(1721) = 0)
triggerall = var(21) = [1,2]
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = P2bodyDist X = [110,150]

;前ジャンプ
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 41
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
triggerall = var(21) = [3,4]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [110,150]

;ガビョウ
[State -1, Fast Kung Fu Upper];地上の相手に不意にだす
type = ChangeState
value = 1900
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = [6,7]
triggerall = Numhelper(1911) = 0
triggerall = numprojid(10) > 0
trigger1 = P2bodyDist X = [110,150]
trigger1 = (p2statetype = S)||(p2statetype = C)||(p2statetype = A)

;毒霧
[State -1, Fast Kung Fu Upper];地上の相手に不意にだす
type = ChangeState
value = 1620
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = power >= 330
triggerall = var(21) = [5,6]
trigger1 = P2bodyDist X = [110,150]
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = p2movetype != H
trigger2 = P2bodyDist X = [110,150]
trigger2 = p2statetype = A
trigger2 = enemy,vel X = 0
trigger2 = p2movetype != H

[State -1, Crouching Strong Punch]
type = ChangeState
value = 101
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(21) = 8
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [110,150]

;ジャンプキック(独自ジャンプステート51からの派生)
[State -1, Crouching Strong Punch]
type = ChangeState
value = 640
triggerall = var(51) = 1
triggerall = statetype = A
trigger1 = stateno = 51 && time > 24
trigger1 = P2bodyDist X = [-20,60]


;ダッシュ派生------------------------------------------------

[State -1, Light Kung Fu Palm]
type = ChangeState
value = 101
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = ctrl
trigger1 = P2bodyDist X = [30,60]
trigger1 = (p2statetype = S)||(p2statetype = C)

;しゃがみ弱K(ダッシュステートから)
[State -1, Crouching Strong Punch]
type = ChangeState
value = 230
triggerall = var(51) = 1
triggerall = stateno = 101
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [2,24]
trigger1 = var(21) = [0,4]
trigger1 = p2movetype = H

;しゃがみ弱K(ダッシュステートから)
[State -1, Crouching Strong Punch]
type = ChangeState
value = 430
triggerall = var(51) = 1
triggerall = stateno = 101
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [17,24]
trigger1 = var(21) = [0,1]
trigger1 = p2movetype != H

;砂かけ(ダッシュステートから)
[State -1, Crouching Strong Punch]
type = ChangeState
value = 2350
triggerall = var(51) = 1
triggerall = var(16) > 0
triggerall = stateno = 101
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [34,61]
trigger1 = p2movetype != H

;しゃがみ弱P(ダッシュステートから)
[State -1, Crouching Strong Punch]
type = ChangeState
value = 400
triggerall = var(51) = 1
triggerall = stateno = 101
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [1,19]
trigger1 = p2movetype != H

;その他技---------------@

;板殴りES
[State -1, Fast Kung Fu Palm]
type = ChangeState
value = 1420
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = power >= 330
triggerall = power >= 1000
trigger1 = p2movetype = A
trigger1 = P2bodyDist X = [110,130]

;含み針
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1650
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
trigger1 = (p2statetype = S)&&(P2bodyDist X = [95,110])
trigger1 = p2movetype != H

;含み針下
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1650
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
trigger1 = (p2statetype = S)&&(P2bodyDist X = [70,90])
trigger1 = p2movetype != H

;毒霧
[State -1, Fast Kung Fu Upper];地上の相手に不意にだす
type = ChangeState
value = 1600
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
trigger1 = (p2statetype = S)&&(P2bodyDist X = [50,60])
trigger1 = p2movetype != H

;毒霧
[State -1, Fast Kung Fu Upper];遠目の飛び込みに対して
type = ChangeState
value = 1600
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = ctrl
trigger1 = (p2statetype = A)&&(P2bodyDist X = [90,100])&&(enemy,vel X > 2)&&(enemy,movetype != H)
trigger1 = p2movetype != H

;急所蹴り
[State -1, groin kick]
type = ChangeState
value = 1200
triggerall = var(51) = 1
triggerall = var(21) = 2
triggerall = statetype != A
triggerall = ctrl
trigger1 = (p2statetype = S)&&(P2bodyDist X = [20,30])

;---------------------------------------------------------------------------
;ガビョウをまく
;---------------------------------------------------------------------------
[State -1, Fast Kung Fu Palm]
type = ChangeState
value = 1900
triggerall = var(51) = 1
triggerall = Numhelper(1911) = 0
triggerall = statetype != A
triggerall = ctrl
triggerall = numprojid(10) > 0
trigger1 = enemy,stateno = 5110
trigger1 = p2dist X = [60,150]
trigger1 = p2life > 0

[State -1, Fast Kung Fu Palm];遠距離
type = ChangeState
value = 1900
triggerall = var(51) = 1
triggerall = Numhelper(1911) = 0
triggerall = statetype != A
triggerall = ctrl
triggerall = numprojid(10) > 0
trigger1 = enemy,stateno = 5110
trigger1 = p2dist X = [90,180]
trigger1 = p2life > 0

;---------------------------------------------------------------------------
;コンボ @
;---------------------------------------------------------------------------

;砂かけ　2350
;↓
[State -1, Standing Strong Kick]
type = ChangeState
value = 1220
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = var(21) = [1,6]
triggerall = power > 330
triggerall = stateno = 2350
triggerall = movehit && time > 24
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [25,70]
[State -1, Standing Strong Kick]
type = ChangeState
value = 1200
triggerall = var(51) = 1
triggerall = statetype = S
triggerall = var(21) = [1,6]
triggerall = stateno = 2350
triggerall = movehit && time > 24
trigger1 = (p2statetype = S)||(p2statetype = C)
trigger1 = P2bodyDist X = [15,65]

;240 立ち強Ｋ
;↓
;板殴りES
[State -1, Fast Kung Fu Palm]
type = ChangeState
value = 1420
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = power >= 330
trigger1 = var(21) = [1,3]
trigger1 = movehit = 1
trigger1 = stateno = 240
;板殴り
[State -1, Fast Kung Fu Palm]
type = ChangeState
value = 1400
triggerall = var(51) = 1
triggerall = statetype != A
trigger1 = movehit = 1
trigger1 = stateno = 240

;しゃがみ弱パンチ地上ヒットからのコンボ　トラップの有無で分岐
; value = 400
;↓
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall = var(51) = 1
triggerall = statetype != A
trigger1 = stateno = 400
trigger1 = movehit && time > 5
trigger1 = P2bodyDist X < 23
;↓
;板殴りES
[State -1, Fast Kung Fu Palm]
type = ChangeState
value = 1420
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = power >= 330
trigger1 = movehit = 1
trigger1 = time > 7
trigger1 = stateno = 410
trigger1 = p2statetype != A
;毒霧
[State -1, Fast Kung Fu Palm]
type = ChangeState
value = 1600
triggerall = var(51) = 1
triggerall = statetype != A
trigger1 = movehit = 1
trigger1 = time > 3
trigger1 = stateno = 410
trigger1 = p2statetype != A
trigger1 = var(12) > 0
trigger1 = fvar(12) > 80
trigger1 = P2bodyDist X < 28
;板なぐり
[State -1, Fast Kung Fu Palm]
type = ChangeState
value = 1400
triggerall = var(51) = 1
triggerall = statetype != A
trigger1 = movehit = 1
trigger1 = time > 6
trigger1 = stateno = 410
trigger1 = (p2statetype = S) || (p2statetype = C)
;trigger1 = var(12) = 0
trigger1 = P2bodyDist X < 36

;しゃがみ強P空中ヒットからの追撃
;立ち強Pが空中ヒットした場合も同様の追撃をする
;value = 410
;↓
;板殴りES
[State -1, Fast Kung Fu Palm]
type = ChangeState
value = 1420
triggerall = var(51) = 1
triggerall = statetype != A
triggerall = power >= 330
trigger1 = movehit && time > 18
trigger1 = stateno = 410
trigger1 = p2statetype = A
trigger2 = movehit && time > 17;ついでに立ち強Ｐがヒットした時にも適用
trigger2 = stateno = 210
trigger2 = p2statetype = A

;小足ヒットからの足払いへ
;value = 430
;↓
[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall = var(51) = 1
triggerall = statetype != A
trigger1 = stateno = 430
trigger1 = movehit && time > 4
;↓
;ガビョウまき
[State -1, Fast Kung Fu Palm]
type = ChangeState
value = 1900
triggerall = var(51) = 1
triggerall = Numhelper(1911) = 0
triggerall = numprojid(10) > 0
trigger1 = stateno = 440
trigger1 = movecontact && time > 25
trigger1 = p2life > 0

;立ち弱キックヒット時
;value = 230
;↓
[State -1, Crouching Strong Kick];地上ヒットまたは、地上被ガード、かつ近距離
type = ChangeState
value = 240
triggerall = var(51) = 1
triggerall = statetype != A
trigger1 = stateno = 230
trigger1 = p2bodydist X < 38
trigger1 = movecontact && time > 4
[State -1, Crouching Strong Kick];地上ヒットかつ遠距離
type = ChangeState
value = 1000
triggerall = var(51) = 1
triggerall = statetype != A
trigger1 = stateno = 230
trigger1 = p2bodydist X < 38
trigger1 = movehit && time > 4

;強P＞カンフー突き手＞三連
;value = 210
;↓
;カンフー突き手
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1000
triggerall = var(51) = 1
trigger1 = power >= 1000
trigger1 = movehit && stateno = 210
trigger1 = p2statetype != A
;↓
;三烈カンフー突き手（ゲージレベル１）
[State -1, Triple Kung Fu Palm]
type = ChangeState
value = 3000
triggerall = var(51) = 1
triggerall = power >= 1000
trigger1 = movehit && time >10 && time <18 && stateno = 1000
trigger1 = p2statetype != A

;===========================================================================
;人間操作用
;===========================================================================
;---------------------------------------------------------------------------
;画面外逃げ
[State -1, Smash Kung Fu Upper]
type = ChangeState
value = 3200
triggerall = command = "escape"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;死んだふり
[State -1, pretend dead]
type = ChangeState
value = 3100
triggerall = command = "dead"
triggerall = var(50) = 0
triggerall = var(51) = 0
triggerall = life < 500
triggerall = power >= 1000
triggerall = movetype = H
trigger1 = stateno = 5000 && time = 0
trigger2 = stateno = 5010 && time = 0
trigger3 = stateno = 5020 && time = 0

;---------------------------------------------------------------------------
;Triple Kung Fu Palm (uses one super bar)
;三烈カンフー突き手（ゲージレベル１）
[State -1, Triple Kung Fu Palm]
type = ChangeState
value = 3000
triggerall = command = "TripleKFPalm"
triggerall = power >= 1000
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = var(1) ;Use combo condition (above)
trigger3 = movecontact && stateno = 1000

;===========================================================================
[State -1, Combo condition Reset]
type = VarSet
trigger1 = 1
var(1) = 0

[State -1, Combo condition Check]
type = VarSet
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;足払いを除く
trigger2 = stateno != 235 ;足踏みを除く
trigger2 = movecontact
trigger3 = stateno = 440
trigger3 = movecontact && time > 25
var(1) = 1

;---------------------------------------------------------------------------
;Fast Kung Fu Knee (1/3 super bar)
;速いカンフーニー（ゲージレベル１／３）
[State -1, Fast Kung Fu Knee]
type = ChangeState
value = 1070
triggerall = command = "FF_ab"
triggerall = power >= 330
trigger1 = var(1) ;Use combo condition (above)

;Light Kung Fu Knee
;カンフーニー（弱）
[State -1, Light Kung Fu Knee]
type = ChangeState
value = 1050
triggerall = command = "FF_a"
trigger1 = var(1) ;Use combo condition (above)

;Strong Kung Fu Knee
;カンフー蹴り（弱）
[State -1, Strong Kung Fu Knee]
type = ChangeState
value = 1060
triggerall = command = "FF_b"
trigger1 = var(1) ;Use combo condition (above)

;---------------------------------------------------------------------------
;毒霧
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1620
triggerall = command = "DB xy"
triggerall = power >= 330
trigger1 = var(1) ;Use combo condition (above)
trigger2 = (stateno = 1100) && time > 15

[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1600
triggerall = command = "DB y"
trigger1 = var(1) ;Use combo condition (above)
trigger2 = (stateno = 1100) && time > 15

;含み針
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1650
triggerall = command = "DB x"
trigger1 = var(1) ;Use combo condition (above)
trigger2 = (stateno = 1100) && time > 15

;含み針下段
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1660
triggerall = command = "BD x"
trigger1 = var(1) ;Use combo condition (above)
trigger2 = (stateno = 1100) && time > 15

;---------------------------------------------------------------------------
;対空投げ
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1500
triggerall = command = "upper_x"
trigger1 = ctrl
trigger1 = statetype != A
trigger2 = stateno = 40
trigger3 = (stateno = 1100) && time > 15

[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1500
triggerall = command = "upper_y"
trigger1 = ctrl
trigger1 = statetype != A
trigger2 = stateno = 40
trigger3 = (stateno = 1100) && time > 15

;---------------------------------------------------------------------------
;画鋲まき
[State -1, Fast Kung Fu Palm]
type = ChangeState
value = 1900
triggerall = command = "trap y"
triggerall = Numhelper(1911) = 0
trigger1 = var(1) ;Use combo condition (above)

;---------------------------------------------------------------------------
;早いカンフー板(1/3 super bar)
[State -1, Fast Kung Fu Palm]
type = ChangeState
value = 1420
triggerall = command = "DF xy"
triggerall = power >= 330
trigger1 = var(1) ;Use combo condition (above)

;カンフー突き手
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1000
triggerall = command = "DF x"
trigger1 = var(1) ;Use combo condition (above)

;カンフー板
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1400
triggerall = command = "DF y"
trigger1 = var(1) ;Use combo condition (above)

;---------------------------------------------------------------------------
[State -1, groin kick]
type = ChangeState
value = 1220
triggerall = command = "DB ab"
triggerall = power >= 330
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 5
trigger3 = (stateno = 230) && time > 6
trigger4 = (stateno = 1100) && time > 15
trigger5 = stateno = 2350
trigger5 = movecontact && time > 21
 
;急所蹴り
[State -1, groin kick]
type = ChangeState
value = 1200
triggerall = command = "DB a"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 5
trigger3 = (stateno = 230) && time > 6
trigger4 = (stateno = 1100) && time > 15
trigger5 = stateno = 2350
trigger5 = movecontact && time > 21

[State -1, groin kick]
type = ChangeState
value = 1200
triggerall = command = "DB b"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 5
trigger3 = (stateno = 230) && time > 6
trigger4 = (stateno = 1100) && time > 15
trigger5 = stateno = 2350
trigger5 = movecontact && time > 19

;---------------------------------------------------------------------------
;板蹴り
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1720
triggerall = command = "DF ab"
triggerall = power >= 330
trigger1 = var(1) ;Use combo condition (above)
trigger1 = (numhelper(1701) = 0)&&(numhelper(1721) = 0)

[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1700
triggerall = command = "DF a"
trigger1 = var(1) ;Use combo condition (above)
trigger1 = (numhelper(1701) = 0)&&(numhelper(1721) = 0)

[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1700
triggerall = command = "DF b"
trigger1 = var(1) ;Use combo condition (above)
trigger1 = (numhelper(1701) = 0)&&(numhelper(1721) = 0)


;===========================================================================
;---------------------------------------------------------------------------
;Run Fwd
;ダッシュ
[State -1, Run Fwd]
type = ChangeState
value = 100
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;Run Back
;後退ダッシュ
[State -1, Run Back]
type = ChangeState
value = 105
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;ライン逃げ
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1800
triggerall = command = "line"
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = power > 330
trigger2 = stateno = 52

;---------------------------------------------------------------------------
;ピヨったふり
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1100
triggerall = command = "dd x"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype = C
trigger2 = ctrl
trigger3 = stateno = 52

;---------------------------------------------------------------------------
;砂ひろい
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 2320
triggerall = command = "dd y"
triggerall = var(16) = 0
triggerall = statetype != A
trigger1 = var(1)
trigger1 = time > 10
trigger2 = ctrl
trigger3 = stateno = 52

;---------------------------------------------------------------------------
;Kung Fu Throw
;投げ後方
[State -1, Kung Fu Throw]
type = ChangeState
value = 2100
triggerall = command = "y"
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
trigger1 = command = "holdback"
trigger1 = p2bodydist X < 10
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H

;投げ前方
[State -1, Kung Fu Throw]
type = ChangeState
value = 2101
triggerall = command = "y"
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
trigger1 = command = "holdfwd"
trigger1 = p2bodydist X < 9
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H

[State -1, Kung Fu Throw]
type = ChangeState
value = 2000
triggerall = command = "b"
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
trigger1 = command = "holdfwd"
trigger1 = p2bodydist X < 9
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H
trigger2 = command = "holdback"
trigger2 = p2bodydist X < 10
trigger2 = (p2statetype = S) || (p2statetype = C)
trigger2 = p2movetype != H

[State -1, Kung Fu Throw]
type = ChangeState
value = 2000
triggerall = command = "b"
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno = 52
trigger1 = command = "holdfwd"
trigger1 = p2bodydist X < 3
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H
trigger2 = command = "holdback"
trigger2 = p2bodydist X < 5
trigger2 = (p2statetype = S) || (p2statetype = C)
trigger2 = p2movetype != H

;---------------------------------------------------------------------------
;GC砂めつぶし
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 2300
triggerall = command = "GC"
triggerall = command = "holdfwd"
triggerall = power >= 1000
triggerall = var(16) > 0
trigger1 = stateno = [150,153]

;GCめつぶし
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 2200
triggerall = command = "GC"
triggerall = power >= 1000
trigger1 = stateno = [150,153]


;===========================================================================
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;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 = 200
trigger2 = time > 6
trigger3 = stateno = 52

;---------------------------------------------------------------------------
砂かけ
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 2350
triggerall = command = "y"
triggerall = command = "holdfwd"
triggerall = var(16) > 0
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 52

;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 = 200) && time > 5
trigger3 = (stateno = 230) && time > 6
trigger4 = stateno = 52

;---------------------------------------------------------------------------
;Stand Light Kick
;足踏み
[State -1, Stand Light Kick]
type = ChangeState
value = 235
triggerall = command = "a"
;triggerall = command = "holdfwd"
triggerall = (command = "holdfwd")||(command = "holdback")
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 7
trigger3 = (stateno = 230) && time > 9
trigger4 = stateno = 52


;Stand Light Kick
;立ち弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall = command = "a"
triggerall = command != "holdfwd"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 7
trigger3 = (stateno = 230) && time > 9

;---------------------------------------------------------------------------
;立ち強キック
[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

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

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

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

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

;ダウン攻撃
[State -1, Crouching Light Punch]
type = ChangeState
value = 500
triggerall = stateno = 5110
trigger1 = command = "DF a"
trigger2 = command = "DF b"
trigger3 = var(15) = 500

[State -1, Crouching Light Punch]
type = ChangeState
value = 510
triggerall = stateno = 5110
trigger1 = command = "DF x"
trigger2 = command = "DF y"
trigger3 = var(15) = 510

;先行入力
[State -1, senkou]
type = varset
triggerall = stateno = 5101
trigger1 = command = "DF a"
trigger2 = command = "DF b"
v = 15
value = 500

;先行入力
[State -1, senkou]
type = varset
triggerall = stateno = 5101
trigger1 = command = "DF x"
trigger2 = command = "DF y"
v = 15
value = 510

;---------------------------------------------------------------------------
;Jump Light Punch
;空中弱パンチ
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = command = "x"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600
trigger2 = statetime >= 7
trigger3 = stateno = 1350 ;Air blocking

;---------------------------------------------------------------------------
;Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 630 ;jump_x or jump_a
trigger2 = movecontact
trigger3 = stateno = 1350 ;Air blocking

;---------------------------------------------------------------------------
;Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
value = 630
triggerall = command = "a"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 1350 ;Air blocking

;---------------------------------------------------------------------------
;Jump Strong Kick
;空中強キック
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall = command = "b"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 630 ;jump_x or jump_a
trigger2 = movecontact
trigger3 = stateno = 1350 ;Air blocking
