;-| 超必殺技 |--------------------------------------------------------
;ここには超必殺技を記述してください、同じ名前を「name =」欄に書けますが
;コマンドは絶対に違ったものにしてください。
;カンフーマンは弱パンチと強パンチで技が出せるように同じ名前のコマンドで
;内容が弱と強になっています。
;「time=20」と書くことで「コマンドを20フレーム以内に入力」と設定できます。

[Command] 
name = "ten"
command = ~D, DF, F, D, DF, F, c
time = 25

[Command] 
name = "juu"
command = ~D, DB, B, DB, D, DF, F, b
time = 25

[Command]
name = "fen"
command = ~B, F, B, DB, D, DF, F, a
time = 25

;-| 必殺技 |------------------------------------------------------

[Command]
name = "shishi"
command = ~B, DB, D, DF, F, c
time = 20

[Command]
name = "pon"
command = ~B, DB, D, DF, F, b
time = 20

[Command]
name = "hyou"
command = ~B, DB, D, DF, F, a
time = 20

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

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

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

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

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

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

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

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

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

[Command]
name = "sanka"
command = ~D, D, c

[Command]
name = "your"
command = ~D, D, b

[Command]
name = "you"
command = ~D, D, a

[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

;-| ２回押し技 |-----------------------------------------------------------
[Command]
name = "FF"     
command = F, F
time = 10

[Command]
name = "BB"     
command = B, B
time = 10

;-| ２・３個の同時押し技 |-----------------------------------------------
[Command]
name = "hyoso"
command = a+b+c
time = 10

[Command]
name = "hoko"
command = x+y+z
time = 10

[Command]
name = "recovery"
command = a+b
time = 1

[Command]
name = "tobashi"
command = b+c
time = 1

;-| 方向とボタンで出す技 |---------------------------------------------------------
[Command]
name = "down_a"
command = /$D,a
time = 1

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

;-| ボタン設定（いじらない）|---------------------------------------------------------
[Command]
name = "a"
command = a
time = 1

[Command]
name = "b"
command = b
time = 1

[Command]
name = "c"
command = c
time = 1

[Command]
name = "x"
command = x
time = 1

[Command]
name = "y"
command = y
time = 1

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

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

;-| 押しっぱなし設定（いじらない）-------------------------------------------------------

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

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

[Command]
name = "holdb"
command = /$b
time = 1

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

[Command]
name = "holdc"
command = /$c
time = 1

[Command]
name = "holdz"
command = /$z
time = 1

[Command]
name = "fwd"
command = F
time = 1

[Command]
name = "back"
command = B
time = 1

[Command]
name = "up" 
command = U
time = 1

[Command]
name = "down"
command = D
time = 1

[Command]
name = "holdfwd"
command = /$F
time = 1

[Command]
name = "holdback"
command = /$B
time = 1

[Command]
name = "holdup" 
command = /$U
time = 1

[Command]
name = "holddown"
command = /$D
time = 1


; 下の記述↓は絶対に消さないでください。
[Statedef -1]

[State -1]
type = VarSet
triggerall = roundstate <= 2
trigger1 = palno =[3,6]
v = 59
value = 1

[State -1]
type = VarSet
trigger1 = roundstate > 2
v = 59
value = 0

;===========================================================================
;---------------------------------------------------------------------------
;フェンリル
[State -1, Light Kung Fu Knee]
type = ChangeState
value = 3040
triggerall = roundstate = 2
triggerall = power >= 1000
triggerall = var(8) = 1
trigger1 = stateno = 1006
trigger1 = time >= 44
trigger2 = stateno = 1001
trigger3 = stateno = 1005
trigger4 = stateno = 1011
trigger5 = stateno = 1021
trigger6 = stateno = 1023
trigger6 = time >= 44
trigger7 = stateno = [200,499]
trigger7 = movehit

[State -1, Light Kung Fu Knee]
type = ChangeState
value = 3040
triggerall = var(59)=0 && command = "fen"
triggerall = power >= 1000 || life <= lifemax/2
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

[State -1, Light Kung Fu Knee]
type = ChangeState
value = 3040
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 100
triggerall = power >= 1000 || life <= lifemax/2
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

;---------------------------------------------------------------------------
;点穴
[State -1, Light Kung Fu Knee]
type = ChangeState
value = 3030
triggerall = var(59)=0 && command = "ten"
triggerall = power >= 1000 || life <= lifemax/2
triggerall = numhelper(3032) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

[State -1, Light Kung Fu Knee]
type = ChangeState
value = 3030
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 300
triggerall = p2bodydist X = [0,40]
triggerall = p2bodydist y = [-30,0]
triggerall = p2statetype != A
triggerall = power >= 2000 || life <= lifemax/2
triggerall = numhelper(3032) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

;---------------------------------------------------------------------------
;十連
[State -1, Light Kung Fu Knee]
type = ChangeState
value = 3000
triggerall = var(59)=0 && command = "juu"
triggerall = power >= 1000 || life <= lifemax/2
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

[State -1, Light Kung Fu Knee]
type = ChangeState
value = 3000
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 200
triggerall = p2bodydist X = [0,130]
triggerall = p2bodydist y = 0
triggerall = p2statetype != A
triggerall = power >= 1000 || life <= lifemax/2
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

;---------------------------------------------------------------------------
;レーザー
[State -1, Light Kung Fu Knee]
type = ChangeState
value = 3300
triggerall = var(59)=0 && command = "z" && command !="holddown" && command ="holdback" && command !="holdfwd"
triggerall = power >= 2000 || life <= lifemax/3
trigger1 = statetype != L
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

[State -1, Light Kung Fu Knee]
type = ChangeState
value = 3300
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 200
triggerall = p2bodydist X > 0
triggerall = power >= 2000 || life <= lifemax/3
trigger1 = statetype != L
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061


;---------------------------------------------------------------------------
;近寄るな！
[State -1, Light Kung Fu Knee]
type = ChangeState
value = 3400
triggerall = var(59)=0 && command = "z" && command ="holddown" && command !="holdback" && command !="holdfwd"
triggerall = power >= 3000 || life <= lifemax/4
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44


trigger6 = stateno = 1061

[State -1, Light Kung Fu Knee]
type = ChangeState
value = 3400
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 100
triggerall = p2bodydist X > 0
triggerall = power >= 3000 || life <= lifemax/4
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44


trigger6 = stateno = 1061

;===========================================================================
;---------------------------------------------------------------------------
;獅子
[State -1, Light Kung Fu Knee]
type = ChangeState
value = 1050
triggerall = var(59)=0 && command = "shishi"
triggerall = power >= 500 || life <= lifemax/2
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44

trigger6 = stateno = 1061



[State -1, Light Kung Fu Knee]
type = ChangeState
value = 1050
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 300+300*(movehit>0)
triggerall = p2bodydist X = [0,60]
triggerall = p2bodydist y = [-30,0]
triggerall = power >= 500 || life <= lifemax/2
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

;---------------------------------------------------------------------------
;崩拳
[State -1, Light Kung Fu Knee]
type = ChangeState
value = 1040
triggerall = var(59)=0 && command = "pon"
triggerall = power >= 500 || life <= lifemax/2
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

[State -1, Light Kung Fu Knee]
type = ChangeState
value = 1040
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 200
triggerall = p2bodydist X = [0,60]
triggerall = p2bodydist y = [-30,0]
triggerall = power >= 500 || life <= lifemax/2
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

;---------------------------------------------------------------------------
;氷襲
[State -1, Light Kung Fu Knee]
type = ChangeState
value = 1030
triggerall = var(59)=0 && command = "hyou"
triggerall = power >= 500 || life <= lifemax/2
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

[State -1, Light Kung Fu Knee]
type = ChangeState
value = 1030
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 200
triggerall = p2bodydist X = [0,40]
triggerall = p2bodydist y = [-30,0]
triggerall = power >= 500 || life <= lifemax/2
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

;---------------------------------------------------------------------------
;散華
[State -1, Strong Kung Fu Knee]
type = ChangeState
value = 1022
triggerall = var(59)=0 && command = "sanka"
triggerall = power >= 500 || life <= lifemax/2
triggerall = var(3) = 0
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = pos y <= -40
trigger2 = (stateno = [600,699])
trigger2 = movecontact
trigger3 = stateno = 1010
trigger3 = time = [42,55]
trigger4 = stateno = 1000 || stateno = 1002
trigger4 = time = [24,36]
trigger5 = stateno = 1004
trigger5 = time = [4,15]

[State -1, Strong Kung Fu Knee]
type = ChangeState
value = 1022
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 400
triggerall = movecontact || ((p2bodydist x) <= (p2bodydist y)+40) && ((p2bodydist x) >= (p2bodydist y)+20)
triggerall = power >= 500 || life <= lifemax/2
triggerall = var(3) = 0
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = pos y <= -40
trigger2 = (stateno = [600,699])
trigger2 = movecontact
trigger3 = stateno = 1010
trigger3 = time = [42,55]
trigger4 = stateno = 1000 || stateno = 1002
trigger4 = time = [24,36]
trigger5 = stateno = 1004
trigger5 = time = [4,15]

;---------------------------------------------------------------------------
;鷹爪落
[State -1, Strong Kung Fu Knee]
type = ChangeState
value = 1024
triggerall = var(59)=0 && command = "your"
triggerall = power >= 500 || life <= lifemax/2
triggerall = var(3) = 0
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = pos y <= -40
trigger2 = (stateno = [600,699])
trigger2 = movecontact
trigger3 = stateno = 1010
trigger3 = time = [42,55]
trigger4 = stateno = 1000 || stateno = 1002
trigger4 = time = [24,36]
trigger5 = stateno = 1004
trigger5 = time = [4,15]

[State -1, Strong Kung Fu Knee]
type = ChangeState
value = 1024
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 400
triggerall = movecontact || ((p2bodydist x) <= (p2bodydist y)+40) && ((p2bodydist x) >= (p2bodydist y)+20)
triggerall = power >= 500 || life <= lifemax/2
triggerall = var(3) = 0
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = pos y <= -40
trigger2 = (stateno = [600,699])
trigger2 = movecontact
trigger3 = stateno = 1010
trigger3 = time = [42,55]
trigger4 = stateno = 1000 || stateno = 1002
trigger4 = time = [24,36]
trigger5 = stateno = 1004
trigger5 = time = [4,15]

;---------------------------------------------------------------------------
;鷹爪
[State -1, Strong Kung Fu Knee]
type = ChangeState
value = 1020
triggerall = var(59)=0 && command = "you"
triggerall = var(3) = 0
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = pos y <= -40
trigger2 = (stateno = [600,699])
trigger2 = movecontact
trigger3 = stateno = 1010
trigger3 = time = [42,55]
trigger4 = stateno = 1000 || stateno = 1002
trigger4 = time = [24,36]
trigger5 = stateno = 1004
trigger5 = time = [4,15]

[State -1, Strong Kung Fu Knee]
type = ChangeState
value = 1020
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 400
triggerall = movecontact || ((p2bodydist x) <= (p2bodydist y)+40) && ((p2bodydist x) >= (p2bodydist y)+20)
triggerall = var(3) = 0
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = pos y <= -40
trigger2 = (stateno = [600,699])
trigger2 = movecontact
trigger3 = stateno = 1010
trigger3 = time = [42,55]
trigger4 = stateno = 1000 || stateno = 1002
trigger4 = time = [24,36]
trigger5 = stateno = 1004
trigger5 = time = [4,15]

;---------------------------------------------------------------------------
;臥龍
[State -1, Fast Kung Fu Palm]
type = ChangeState
value = 1010
triggerall = var(59)=0 && command = "garyou"
triggerall = var(2) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499]) ;Cancel ground moves
;trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44

[State -1, Fast Kung Fu Palm]
type = ChangeState
value = 1010
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 300
triggerall = p2bodydist X = [0,40]
triggerall = p2bodydist y < 0
triggerall = var(2) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499]) ;Cancel ground moves
;trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44

;---------------------------------------------------------------------------
;八葉連牙
[State -1, Light Kung Fu Knee]
type = ChangeState
value = 1062
triggerall = var(59)=0 && command = "hachiyo"
triggerall = power >= 1000 || life <= lifemax/2
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

[State -1, Light Kung Fu Knee]
type = ChangeState
value = 1062
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 100
triggerall = p2bodydist X = [0,40]
triggerall = p2bodydist y = [-30,0]
triggerall = power >= 1000 || life <= lifemax/2
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

;---------------------------------------------------------------------------
;サマー
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1003
triggerall = var(59)=0 && command = "summer"
triggerall = var(2) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1003
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 100
triggerall = p2bodydist X = [0,30]
triggerall = p2bodydist y < 0
triggerall = var(2) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

;---------------------------------------------------------------------------
;連牙弾
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1060
triggerall = var(59)=0 && command = "renga"
triggerall = power >= 500 || life <= lifemax/2
triggerall = var(9) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1021
trigger4 = stateno = 1023
trigger4 = time >= 44

[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1060
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = power >= 500 || life <= lifemax/2
triggerall = random <= 300
triggerall = p2bodydist X = [0,40]
triggerall = p2bodydist y = 0
triggerall = var(9) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1021
trigger4 = stateno = 1023
trigger4 = time >= 44

;---------------------------------------------------------------------------
;連天
[State -1, Strong Kung Fu Palm]
type = ChangeState
value = 1002
triggerall = var(59)=0 && command = "hienr"
triggerall = power >= 500 || life <= lifemax/2
triggerall = var(2) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

[State -1, Strong Kung Fu Palm]
type = ChangeState
value = 1002
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 300
triggerall = p2bodydist X = [0,30]
triggerall = p2bodydist y < 0
triggerall = power >= 500 || life <= lifemax/2
triggerall = var(2) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

;---------------------------------------------------------------------------
;飛燕
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1000
triggerall = var(59)=0 && command = "hien"
triggerall = var(2) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1000
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 400
triggerall = p2bodydist X = [0,30]
triggerall = p2bodydist Y = [-30,0]
triggerall = var(2) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

;---------------------------------------------------------------------------
;三散華
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1006
triggerall = var(59)=0 && command = "sazan"
triggerall = var(9) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1021
trigger4 = stateno = 1023
trigger4 = time >= 44

[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1006
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 500
triggerall = p2bodydist X = [0,40]
triggerall = p2bodydist y = 0
triggerall = var(9) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1021
trigger4 = stateno = 1023
trigger4 = time >= 44

;---------------------------------------------------------------------------
;掌底破
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1032
triggerall = var(59)=0 && command = "syotei"
triggerall = var(9) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1021
trigger4 = stateno = 1023
trigger4 = time >= 44

[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1032
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 200
triggerall = p2bodydist X = [0,40]
triggerall = p2bodydist y = 0
triggerall = var(9) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1021
trigger4 = stateno = 1023
trigger4 = time >= 44

;---------------------------------------------------------------------------
;双撞
[State -1, Light Kung Fu Knee]
type = ChangeState
value = 1400
triggerall = var(59)=0 && command = "sosyo"
triggerall = power >= 500 || life <= lifemax/2
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

[State -1, Light Kung Fu Knee]
type = ChangeState
value = 1400
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 200
triggerall = p2bodydist X = [0,40]
triggerall = p2bodydist y = [-30,0]
triggerall = power >= 500 || life <= lifemax/2
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

;---------------------------------------------------------------------------
;アイス
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 2000
trigger1 = var(59)=0 && command = "x"
trigger1 = statetype != A
trigger1 = ctrl

[State -1, Light Kung Fu Palm]
type = ChangeState
value = 2000
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 100
triggerall = p2bodydist X > 200 || Facing = enemynear,Facing
triggerall = p2movetype != A
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;ランサー
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 2020
trigger1 = var(59)=0 && command = "y"
trigger1 = statetype != A
trigger1 = ctrl

[State -1, Light Kung Fu Palm]
type = ChangeState
value = 2020
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 100
triggerall = p2bodydist X > 200 || Facing = enemynear,Facing
triggerall = p2movetype != A
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;アイストルネード
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 2500
trigger1 = var(59)=0 && command = "z" && command !="holddown" && command !="holdback" && command ="holdfwd"
trigger1 = statetype != A
trigger1 = ctrl

[State -1, Light Kung Fu Palm]
type = ChangeState
value = 2500
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 100 
triggerall = p2bodydist X > 200 || Facing = enemynear,Facing
triggerall = p2movetype != A
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;治癒功
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 2400
trigger1 = var(59)=0 && command = "z"
trigger1 = statetype != A
trigger1 = ctrl

[State -1, Light Kung Fu Palm]
type = ChangeState
value = 2400
triggerall = !ishelper && var(59)!=0 && P2statetype = L
triggerall = random <= 200 && life < lifemax
triggerall = p2bodydist X > 200
triggerall = p2movetype != A
trigger1 = statetype != A
trigger1 = ctrl

;===========================================================================
;---------------------------------------------------------------------------
;氷槍陣
[State -1, Light Kung Fu Knee]
type = ChangeState
value = 1500
triggerall = var(59)=0 && command = "hyoso"
triggerall = numhelper(1510) = 0
triggerall = power >= 1000 || life <= lifemax/2
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

[State -1, Light Kung Fu Knee]
type = ChangeState
value = 1500
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = numhelper(1510) = 0
triggerall = random <= 200
triggerall = p2bodydist X = [-90,90]
triggerall = p2bodydist y = [-30,0]
triggerall = power >= 1000 || life <= lifemax/2
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1006
trigger3 = time >= 44
trigger4 = stateno = 1021
trigger5 = stateno = 1023
trigger5 = time >= 44
trigger6 = stateno = 1061

;===========================================================================
;立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 800
triggerall = var(59)=0 && command = "a"
triggerall = var(59)=0 && command = "holdfwd" || command = "holdback"
trigger1 = statetype != A
trigger1 = ctrl

[State -1, Stand Light Punch]
type = ChangeState
value = 800
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 300
triggerall = p2bodydist X = [0,40]
triggerall = p2bodydist y = 0 && p2movetype != H
trigger1 = statetype != A
trigger1 = ctrl

;立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 801
triggerall = var(59)=0 && command = "b"
triggerall = var(59)=0 && command = "holdfwd" || command = "holdback"
trigger1 = statetype != A
trigger1 = ctrl

[State -1, Stand Light Punch]
type = ChangeState
value = 801
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 300
triggerall = p2bodydist X = [0,40]
triggerall = p2bodydist y = 0 && p2movetype != H
trigger1 = statetype != A
trigger1 = ctrl

;立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 802
triggerall = var(59)=0 && command = "c"
triggerall = var(59)=0 && command = "holdfwd" || command = "holdback"
trigger1 = statetype != A
trigger1 = ctrl

[State -1, Stand Light Punch]
type = ChangeState
value = 802
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 300
triggerall = p2bodydist X = [0,40]
triggerall = p2bodydist y = 0 && p2movetype != H
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = var(59)=0 && command = "a"
trigger1 = statetype != A
trigger1 = ctrl

[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 600
triggerall = p2bodydist X = [0,25]
triggerall = p2bodydist y = 0
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;立ち強パンチ
[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall = var(59)=0 && command = "b"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 5

[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 600
triggerall = p2bodydist X = [0,40]
triggerall = p2bodydist y = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 5

;---------------------------------------------------------------------------
;立ち弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = 220
triggerall = var(59)=0 && command = "c"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 6
trigger3 = (stateno = 210) && time > 6

[State -1, Stand Light Kick]
type = ChangeState
value = 220
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 600
triggerall = p2bodydist X = [0,40]
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 6
trigger3 = (stateno = 210) && time > 6

;---------------------------------------------------------------------------
;空中強キック
[State -1, Jump Strong Kick]
type = ChangeState
value = 630
triggerall = var(59)=0 && command = "tobashi"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 610
trigger2 = movecontact

[State -1, Jump Strong Kick]
type = ChangeState
value = 630
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 300
triggerall = p2bodydist X = [0,30]
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 610
trigger2 = movecontact

;---------------------------------------------------------------------------
;空中弱パンチ
[State -1, Jump Light Punch]
type = ChangeState
value = 640
triggerall = var(59)=0 && command = "a" && command = "holddown"
trigger1 = statetype = A
trigger1 = ctrl

;空中弱パンチ
[State -1, Jump Light Punch]
type = ChangeState
value = 640
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 200
triggerall = p2bodydist X = [-10,10]
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
;空中弱パンチ
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = var(59)=0 && command = "a"
trigger1 = statetype = A
trigger1 = ctrl || (stateno = 600&&animelem=2,>=0)

;空中弱パンチ
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 600
triggerall = p2bodydist X = [0,30]
trigger1 = statetype = A
trigger1 = ctrl || (stateno = 600&&animelem=2,>=0)

;---------------------------------------------------------------------------
;空中強パンチ
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall = var(59)=0 && command = "b"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600
trigger2 = movecontact

[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 600
triggerall = p2bodydist X = [0,30]
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600
trigger2 = movecontact

;---------------------------------------------------------------------------
;空中強キック
[State -1, Jump Strong Kick]
type = ChangeState
value = 620
triggerall = var(59)=0 && command = "c"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 610
trigger2 = movecontact

[State -1, Jump Strong Kick]
type = ChangeState
value = 620
triggerall = !ishelper && var(59)!=0 && P2statetype != L
triggerall = random <= 600
triggerall = p2bodydist X = [0,30]
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 610
trigger2 = movecontact

;---------------------------------------------------------------------------
;ダッシュ
[State -1, Run Fwd]
type = ChangeState
value = 100
trigger1 = var(59)=0 && command = "FF"
trigger1 = statetype != L
trigger1 = ctrl

[State -1, Run Fwd]
type = ChangeState
value = 100
trigger1 = !ishelper && var(59)!=0 && p2bodydist X > 0
trigger1 = statetype != L
trigger1 = ctrl

[State -1, Run Fwd]
type = null;ChangeState
value = 101
triggerall = alive
triggerall = power >= 1000 || life <= lifemax/2
trigger1 = var(59)=0 && command = "FF"
trigger1 = statetype != L
trigger1 = (stateno=[5000,5150]) || (stateno =[120,155])

[State -1, Run Fwd]
type = null;ChangeState
value = 101
triggerall = alive
triggerall = power >= 1000 || life <= lifemax/2
trigger1 = !ishelper && var(59)!=0 && random <= 100
trigger1 = statetype != L
trigger1 = (stateno=[5000,5150]) || (stateno =[120,155])

;---------------------------------------------------------------------------
;後退ダッシュ
[State -1, Run Back]
type = ChangeState
value = 105
trigger1 = var(59)=0 && command = "BB"
trigger1 = statetype != L
trigger1 = ctrl

[State -1, Run Back]
type = ChangeState
value = 105
trigger1 = !ishelper && var(59)!=0 && (random<=50||(p2bodydist X<=0&&random<=100))
trigger1 = statetype != L
trigger1 = ctrl

;---------------------------------------------------------------------------
;挑発
[State -1, Run Back]
type = ChangeState
value = 195
trigger1 = var(59)=0 && command = "start"
trigger1 = statetype != A
trigger1 = ctrl

[State -1, Run Back]
type = ChangeState
value = 195
trigger1 = !ishelper && var(59)!=0 && P2statetype = L
trigger1 = random <= 50
trigger1 = statetype != A
trigger1 = ctrl
