;===========================================================================
;月華の剣士2 骸
;Created by M@PPY
;http://izanai.cjb.net/

;===========================================================================
;-----------------------------------
;CPU only
[Command]
name = "cpu"
command = ~D,B,F,D,F,DF,B,DF,B,B,U,F, c
time = 1

[Command]
name = "cpu2"
command = ~D,B,F,D,F,DF,B,DF,B,B,F,B, c
time = 1

[Command]
name = "cpu3"
command = ~D,B,F,D,F,DF,B,DF,B,B,F,F, c
time = 1

[Command]
name = "cpu4"
command = ~D,B,F,D,B,DF,B,DF,B,B,U,B, c
time = 1

[Command]
name = "cpu5"
command = ~D,B,F,D,F,DF,B,DF,B,B,U,B, c
time = 1

[Command]
name = "cpu6"
command = ~D,B,F,D,F,DF,B,DF,B,B,D,F, c
time = 1

[Command]
name = "cpu7"
command = ~D,F,F,D,F,DF,B,DF,B,B,D,F, c
time = 1

[Command]
name = "cpu8"
command = ~D,F,F,D,F,DF,U,DF,B,B,D,F, c
time = 1

[Command]
name = "cpu9"
command = ~D,DF,B,BU,U,UF,F,DF,D,F, c
time = 1

[Command]
name = "cpu10"
command = ~D,DF,B,DB,U,UF,F,DF,D,F, c
time = 1


;-| Super Motions |--------------------------------------------------------

;迷兇死衰・凶器
[Command]
name = "kyoki"
command = ~D, DF, F, D, DF, F, x+y
time = 45

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

;-| Special Motions |------------------------------------------------------

;禿鷲 x
[Command]
name = "hagewashi_x"
command = ~D, DB, B, x

;禿鷲 y
[Command]
name = "hagewashi_y"
command = ~D, DB, B, y

;斬肉鎌鼬x
[Command]
name = "kamaitati_x"
command = ~B, DB, D, DF, F, x
time = 45

;斬肉鎌鼬y
[Command]
name = "kamaitati_y"
command = ~B, DB, D, DF, F, y
time = 45

;廻転肝えぐりx
[Command]
name = "kimoeguri_x"
command = ~F, D, DF, x

;廻転肝えぐりy
[Command]
name = "kimoeguri_y"
command = ~F, D, DF, y

;ぶち撒きx
[Command]
name = "buchimaki_x"
command = x,x
time = 12

;ぶち撒きy
[Command]
name = "buchimaki_y"
command = y,y
time = 12

;無慈悲刺し
[Command]
name = "mujihizashi"
command = ~F, DF, D, DB, B, a
time = 45

;-| For Debug |---------------------------------
;mu
[Command]
name = "debug2"
command = /$D,c
time = 1

;kai_w
[Command]
name = "debug4"
command = /F,c
time = 1

;kai_s
[Command]
name = "debug3"
command = /B,c
time = 1

;-| 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 = "jinamesuberi"
command = F, B, F, a
time = 30

;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "recovery";Required (do not remove)
command = a+b
time = 1

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


;-| Dir + Button |---------------------------------------------------------
[Command]
name = "abaraori"
command = /F,a
time = 1

[Command]
name = "abarazashi"
command = /F,y
time = 1

[Command]
name = "sunekudaki"
command = /DF,a
time = 1

[Command]
name = "nodoyaburi"
command = /B,x
time = 1

[Command]
name = "sujigiri"
command = /$D,x
time = 1

;-| Single Button |---------------------------------------------------------
[Command]
name = "a"
command = a
time = 1

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

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

[Command]
name = "z"
command = z
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 = "holddownback"
command = /$DB
time = 1

[Command]
name = "holddownforward"
command = /$DF
time = 1

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

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

[Command]
name = "longjump"
command = D, $U
time = 18

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

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

[Statedef -1]
;===========================================================================

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;地舐め滑り
[State -1]
type = ChangeState
value = 110
triggerall = command = "jinamesuberi"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 440)

;---------------------------------------------------------------------------
;RunFwd
[State -1]
type = ChangeState
value = 100
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;RunBack
[State -1]
type = ChangeState
value = 105
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;超奥義 迷兇死衰・凶器
[State -1]
type = ChangeState
value = 2000
triggerall = power >= 2000
triggerall = command = "kyoki"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 440)

;---------------------------------------------------------------------------
;無慈悲刺し
[State -1]
type = ChangeState
value = 550
triggerall = command = "mujihizashi"
triggerall = p2bodydist x < 20
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 440)

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

;禿鷲_弱
[State -1]
type = ChangeState
value = 1500
triggerall = command = "hagewashi_x"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 440)

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

;禿鷲_強
[State -1]
type = ChangeState
value = 1600
triggerall = command = "hagewashi_y"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 440)

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;斬肉鎌鼬 弱
[State -1]
type = ChangeState
value = 950
triggerall = command = "kamaitati_x"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 440)

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;斬肉鎌鼬 強
[State -1]
type = ChangeState
value = 991
triggerall = command = "kamaitati_y"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 440)

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;廻転肝えぐり 弱
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 1000
triggerall = command = "kimoeguri_x"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 440)

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;廻転肝えぐり 強
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 1020
triggerall = command = "kimoeguri_y"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 440)

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;凶虐・スネ砕き
[State -1]
type = ChangeState
value = 405
triggerall = command = "sunekudaki"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 440)

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;凶虐・アバラ折り
[State -1]
type = ChangeState
value = 205
triggerall = command = "abaraori"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;凶手・喉破り
[State -1]
type = ChangeState
value = 235
triggerall = command = "nodoyaburi"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 235
trigger2 = movecontact = 1
trigger2 = time = [7,12]


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;凶刃・アバラ刺し
[State -1]
type = ChangeState
value = 245
triggerall = command = "abarazashi"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;凶行・毒を食らわば
[State -1]
type = ChangeState
value = 900
triggerall = command = "kamituki"
trigger1 = statetype = S
trigger1 = ctrl

;===========================================================================
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Stand_A
[State -1]
type = ChangeState
value = 200
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = movecontact && (stateno = 235)


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Stand_X
[State -1]
type = ChangeState
value = 230
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = command != "holdback"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 235)

;---------------------------------------------------------------------------
;Stand_Y
[State -1]
type = ChangeState
value = 240
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 430)

;---------------------------------------------------------------------------
;Crouch_A
[State -1]
type = ChangeState
value = 400
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)


;---------------------------------------------------------------------------
;Crouch_X
[State -1]
type = ChangeState
value = 430
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 220)
trigger4 = movecontact && (stateno = 235)

;---------------------------------------------------------------------------
;Crouch_Y
[State -1]
type = ChangeState
value = 440
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 430)

;---------------------------------------------------------------------------
;Jump_A
[State -1]
type = ChangeState
value = 600
trigger1 = command = "a"
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
;Jump_X
[State -1]
type = ChangeState
value = 630
triggerall = command = "x"
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
;Jump_Y
[State -1]
type = ChangeState
value = 640
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;CPU only
;---------------------------------------------------------------------------
; 立ちガード
[State -1]
type = ChangeState
value = 120
triggerall = p2movetype = A
triggerall = P2bodydist X <= 40
triggerall = random <= 200
triggerall = statetype != A
triggerall = var(9) = 1
triggerall = ctrl
trigger1 = p2statetype = S

; 立ちガード2
[State -1]
type = ChangeState
value = 130
triggerall = p2movetype = A
triggerall = P2bodydist X <= 40
triggerall = random <= 200
triggerall = statetype != A
triggerall = var(9) = 1
triggerall = ctrl
trigger1 = p2statetype = A

;---------------------------------------------------------------------------
; しゃがみガード
[State -1]
type = ChangeState
value = 121
triggerall = p2movetype = A
triggerall = P2bodydist X <= 40
triggerall = statetype != A
triggerall = random <= 200
triggerall = var(9) = 1
triggerall = ctrl
trigger1 = p2statetype = C

;---------------------------------------------------------------------------
; 空中ガード
[State -1]
type = ChangeState
value = 122
triggerall = p2movetype = A
triggerall = P2bodydist X <= 40
triggerall = statetype = A
triggerall = random <= 200
triggerall = var(9) = 1
triggerall = ctrl
trigger1 = p2statetype = A

;---------------------------------------------------------------------------
; 空中同士で640
[State -1]
type = ChangeState
value = 640
triggerall = var(9) = 1
triggerall = random < 100
triggerall = P2bodydist X <= 35
trigger1 = statetype = A
trigger1 = p2statetype != L
trigger1 = ctrl

;---------------------------------------------------------------------------
; 空中回復
[State -1]
type = ChangeState
value = 5200
triggerall = var(9) = 1
triggerall = random <= 700
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
trigger1 = alive
trigger1 = CanRecover
trigger1 = stateno = 5050

;---------------------------------------------------------------------------
; ダッシュ
[State -1]
type = ChangeState
value = 110
triggerall = var(9) = 1
triggerall = winko != 1
triggerall = p2movetype != A
triggerall = P2bodydist X >= 60
triggerall = random < 100
trigger1 = stateno = 0
trigger1 = ctrl

;---------------------------------------------------------------------------
; 端に追いつめられたら地舐め滑りで回避
[State -1]
type = ChangeState
value = 110
triggerall = var(20) = 1
triggerall = statetype != A
triggerall = winko != 1
triggerall = (FrontEdgeBodyDist - p2BodyDist X) > 220
triggerall = BackEdgeBodyDist <= 20
triggerall = random < 300
trigger1 = ctrl

;---------------------------------------------------------------------------
; 凶器
[State -1]
type = ChangeState
value = 2000
triggerall = var(9) = 1
triggerall = random < 100
triggerall = power >= 2000
triggerall = statetype != A
triggerall = winko != 1
triggerall = p2BodyDist X <= 60
triggerall = p2statetype != L
trigger1 = ctrl


;---------------------------------------------------------------------------
; 凶器を溜めない
[State -1]
type = ChangeState
value = 2010
triggerall = var(9) = 1
trigger1 = time = 19
trigger1 = stateno = 2000

;---------------------------------------------------------------------------
; 肝えぐり
[State -1]
type = ChangeState
value = 1000
triggerall = var(9) = 1
triggerall = winko != 1
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = random < 200
trigger1 = ctrl
trigger1 = P2bodydist X < 60

;---------------------------------------------------------------------------
; 斬肉鎌鼬x
[State -1]
type = ChangeState
value = 950
triggerall = var(9) = 1
triggerall = winko != 1
triggerall = statetype != A
triggerall = (p2statetype != L) && (p2statetype != A)
triggerall = random < 200
trigger1 = ctrl
trigger1 = P2bodydist X < 60

;---------------------------------------------------------------------------
; 斬肉鎌鼬y
[State -1]
type = ChangeState
value = 991
triggerall = var(9) = 1
triggerall = winko != 1
triggerall = statetype != A
triggerall = (p2statetype != L) && (p2statetype != A)
triggerall = random < 50
trigger1 = ctrl
trigger1 = P2bodydist X >= 80

;---------------------------------------------------------------------------
; 無慈悲
[State -1]
type = ChangeState
value = 550
triggerall = var(9) = 1
triggerall = winko != 1
triggerall = statetype = S
triggerall = (p2statetype != L) && (p2statetype != A)
triggerall = random < 50
trigger1 = ctrl
trigger1 = P2bodydist X < 15

;---------------------------------------------------------------------------
; 禿鷲
[State -1]
type = ChangeState
value = 1600
triggerall = var(9) = 1
triggerall = winko != 1
triggerall = statetype = S
triggerall = p2statetype != L
triggerall = random < 20
trigger1 = ctrl
trigger1 = P2bodydist X > 50

;---------------------------------------------------------------------------
; 間合いの離れているときにスライドキック
[State -1]
type = ChangeState
value = 405
triggerall = var(9) = 1
triggerall = winko != 1
triggerall = statetype = S
triggerall = p2statetype != L
triggerall = random < 50
trigger1 = ctrl
trigger1 = P2bodydist X >= 60

