;========================================================
; Original Zero's Command file.
;========================================================
;---------------------------------------------------------------------------
[Command]
name = "hakura_a"
command = ~D, F, D, F, a
Time = 30

[Command]
name = "hakura_b"
command = ~D, F, D, F, b
Time = 30

[Command]
name = "gokusa_x"
command = ~D, F, D, F, x
Time = 30

[Command]
name = "gokusa_y"
command = ~D, F, D, F, y
Time = 30

;---------------------------------------------------------------------------
[Command]
name = "taikuu_x"
command = ~F, D, DF, x
Time = 15

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

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

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

;---------------------------------------------------------------------------
[Command]
name = "fwd_x"
command = /F, x
time = 1

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

[Command]
name = "fwd_a"
command = /F, a
time = 1

[Command]
name = "fwd_b"
command = /F, b
time = 1

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

[Command]
name = "back_y"
command = /B, y
time = 1

[Command]
name = "back_b"
command = /B, b
time = 1

[Command]
name = "back_z"
command = /B, z
time = 1

[Command]
name = "downfwd_x"
command = /DF, x
time = 1

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

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

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

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

[Command]
name = "Bya"
command = /B, y+a
time = 1

[Command]
name = "Fya"
command = /F, y+a
time = 1

[Command]
name = "ya"
command = y+a
time = 1

[Command]
name = "yb"
command = y+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

;---------------------------
; Required(do not remove)
;---------------------------
[Command]
name = "longjump"
command = ~D, $U
time = 5

[Command]
name = "FF"
command = F, F
time = 10

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

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

[Command]
name = "recovery"
command = a+b
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 = ChangeState
value = 3000
triggerall = command = "gokusa_x" || command = "gokusa_y"
triggerall = power >= 1000
trigger1 = ctrl && statetype != A
trigger2 = movecontact && (stateno = 220 || stateno = 225 || stateno = 250 || stateno = 260 || stateno = 230 || stateno = 240 || stateno = 320)
trigger3 = movecontact && (stateno = 400 || stateno = 410 || stateno = 420 || stateno = 430)
trigger4 = movecontact && (stateno = 280 || stateno = 281 || stateno = 290 || stateno = 300 || stateno = 310)
trigger5 = movecontact && power >= 2000
trigger5 = (stateno = [1000,1100]) && Time < 30
trigger6 = stateno = 200
trigger7 = stateno = 210
trigger8 = stateno = 220
trigger9 = stateno = 230
trigger10 = stateno = 400
trigger11 = stateno = 410
trigger12 = stateno = 320

;--------------------------------
; 敀梾柵惛
;--------------------------------
[State -1]
type = ChangeState
value = 3100
triggerall = command = "hakura_a" || command = "hakura_b"
triggerall = power >= 1000
trigger1 = ctrl && statetype != A
trigger2 = movecontact && (stateno = 220 || stateno = 225 || stateno = 250 || stateno = 260 || stateno = 230 || stateno = 240 || stateno = 320)
trigger3 = movecontact && (stateno = 400 || stateno = 410 || stateno = 420 || stateno = 430)
trigger4 = movecontact && (stateno = 280 || stateno = 281 || stateno = 290 || stateno = 300 || stateno = 310)
trigger5 = stateno = 200
trigger6 = stateno = 210
trigger7 = stateno = 220
trigger8 = stateno = 230
trigger9 = stateno = 400
trigger10 = stateno = 410
trigger11 = stateno = 320

;--------------------------------
; 巃晽墠攋丒檧夊
;--------------------------------
[State -1]
type = ChangeState
value = 1200
triggerall = command = "taikuu_x"
trigger1 = ctrl && statetype != A
trigger2 = movecontact && (stateno = 220 || stateno = 225 || stateno = 250 || stateno = 260 || stateno = 230 || stateno = 240 || stateno = 320)
trigger3 = movecontact && (stateno = 400 || stateno = 410 || stateno = 420 || stateno = 430)
trigger4 = movecontact && (stateno = 280 || stateno = 281 || stateno = 290 || stateno = 300 || stateno = 310)
trigger5 = stateno = 200
trigger6 = stateno = 210
trigger7 = stateno = 220
trigger8 = stateno = 230
trigger9 = stateno = 400
trigger10 = stateno = 410
trigger11 = stateno = 320

;--------------------------------
; 巃晽墠攋丒隳攅
;--------------------------------
[State -1]
type = ChangeState
value = 1300
triggerall = command = "taikuu_y"
trigger1 = ctrl && statetype != A
trigger2 = movecontact && (stateno = 220 || stateno = 225 || stateno = 250 || stateno = 260 || stateno = 230 || stateno = 240 || stateno = 320)
trigger3 = movecontact && (stateno = 400 || stateno = 410 || stateno = 420 || stateno = 430)
trigger4 = movecontact && (stateno = 280 || stateno = 281 || stateno = 290 || stateno = 300 || stateno = 310)
trigger5 = stateno = 200
trigger6 = stateno = 210
trigger7 = stateno = 220
trigger8 = stateno = 230
trigger9 = stateno = 400
trigger10 = stateno = 410
trigger11 = stateno = 320

;--------------------------------
; 巃晽墠攋丒斁嬀
;--------------------------------
[State -1]
type = ChangeState
value = 1000
triggerall = command = "manto_x"
trigger1 = ctrl && statetype != A
trigger2 = movecontact && (stateno = 220 || stateno = 225 || stateno = 250 || stateno = 260 || stateno = 230 || stateno = 240 || stateno = 320 && AnimElem = 1,>=2)
trigger3 = movecontact && (stateno = 400 || stateno = 410 || stateno = 420 || stateno = 430)
trigger4 = movecontact && (stateno = 280 || stateno = 281 || stateno = 290 || stateno = 300 || stateno = 310)
trigger5 = stateno = 200
trigger6 = stateno = 210
trigger7 = stateno = 220
trigger8 = stateno = 230
trigger9 = stateno = 400
trigger10 = stateno = 410
trigger11 = stateno = 320

;--------------------------------
; 巃晽墠攋丒嶦杺
;--------------------------------
[State -1]
type = ChangeState
value = 1100
triggerall = command = "manto_y"
trigger1 = ctrl && statetype != A
trigger2 = movecontact && (stateno = 220 || stateno = 225 || stateno = 250 || stateno = 260 || stateno = 230 || stateno = 240 || stateno = 320)
trigger3 = movecontact && (stateno = 400 || stateno = 410 || stateno = 420 || stateno = 430)
trigger4 = movecontact && (stateno = 280 || stateno = 281 || stateno = 290 || stateno = 300 || stateno = 310)
trigger5 = stateno = 200
trigger6 = stateno = 210
trigger7 = stateno = 220
trigger8 = stateno = 230
trigger9 = stateno = 400
trigger10 = stateno = 410
trigger11 = stateno = 320

;--------------------------------
; 悂偭旘偽偟峌寕抧忋
;--------------------------------
[State -1]
type = ChangeState
value = 320
triggerall = command = "c" || command = "yb"
trigger1 = statetype != A && (ctrl || stateno = 100)
trigger2 = (stateno = 150 || stateno = 151) && power >= 1000

;--------------------------------
; 悂偭旘偽偟峌寕嬻拞
;--------------------------------
[State -1]
type = ChangeState
value = 640
trigger1 = (command = "c" || command = "yb") && statetype = A && ctrl

;--------------------------------
; 嬞媫夞旔屻
;--------------------------------
[State -1]
type = ChangeState
value = 825
triggerall = (command = "z" || command = "xa") && command = "holdback"
trigger1 = statetype != A && (ctrl || stateno = 100)
trigger2 = (stateno = 150 || stateno = 151) && power >= 1000

;--------------------------------
; 嬞媫夞旔慜
;--------------------------------
[State -1]
type = ChangeState
value = 820
triggerall = (command = "z" || command = "xa")
trigger1 = statetype != A && (ctrl || stateno = 100)
trigger2 = (stateno = 150 || stateno = 151) && power >= 1000

;--------------------------------
; 搳偘
;--------------------------------
[State -1]
type = ChangeState
value = 800
triggerall = (command = "back_y" || command = "back_b" || command = "fwd_y" || command = "fwd_b")
trigger1 = ctrl && statetype != A && stateno != 100 && p2bodydist x < 20 && (p2statetype = S || p2statetype = C)

;--------------------------------
; 僗僩儔僀僇乕乮僋儕僓儕僢僪乯
;--------------------------------
[State -1]
type = ChangeState
value = 2000
triggerall = command = "Fya"
trigger1 = ctrl && statetype != A
trigger2 = movecontact && (stateno = 220 || stateno = 225 || stateno = 250 || stateno = 260 || stateno = 230 || stateno = 240 || stateno = 320 && AnimElem = 1,>=2)
trigger3 = movecontact && (stateno = 400 || stateno = 410 || stateno = 420 || stateno = 430)
trigger4 = movecontact && (stateno = 280 || stateno = 281 || stateno = 290 || stateno = 300 || stateno = 310)

;--------------------------------
; 僗僩儔僀僇乕乮儘儞乯
;--------------------------------
[State -1]
type = ChangeState
value = 2200
triggerall = command = "Bya"
trigger1 = ctrl && statetype != A
trigger2 = movecontact && (stateno = 220 || stateno = 225 || stateno = 250 || stateno = 260 || stateno = 230 || stateno = 240 || stateno = 320 && AnimElem = 1,>=2)
trigger3 = movecontact && (stateno = 400 || stateno = 410 || stateno = 420 || stateno = 430)
trigger4 = movecontact && (stateno = 280 || stateno = 281 || stateno = 290 || stateno = 300 || stateno = 310)

;--------------------------------
; 僗僩儔僀僇乕乮僌儖僈儞乯
;--------------------------------
[State -1]
type = ChangeState
value = 2100
triggerall = command = "ya"
trigger1 = ctrl && statetype != A
trigger2 = movecontact && (stateno = 220 || stateno = 225 || stateno = 250 || stateno = 260 || stateno = 230 || stateno = 240 || stateno = 320 && AnimElem = 1,>=2)
trigger3 = movecontact && (stateno = 400 || stateno = 410 || stateno = 420 || stateno = 430)
trigger4 = movecontact && (stateno = 280 || stateno = 281 || stateno = 290 || stateno = 300 || stateno = 310)

;--------------------------------
; 尪杺崗復乮捠忢乯
;--------------------------------
[State -1]
type = ChangeState
value = 280
triggerall = command = "downfwd_x"
trigger1 = ctrl && statetype != A

;--------------------------------
; 尪杺崗復乮僉儍儞僙儖乯
;--------------------------------
[State -1]
type = ChangeState
value = 281
triggerall = command = "downfwd_x"
trigger1 = ctrl && statetype != A
trigger2 = movecontact && (stateno = 220 || stateno = 225 || stateno = 240 || stateno = 250 || stateno = 260 || stateno = 270)
trigger3 = movecontact && (stateno = 400 || stateno = 410 || stateno = 420 || stateno = 430)

;--------------------------------
; 愙嬤棫偪嫮俹
;--------------------------------
[State -1]
type = ChangeState
value = 225
triggerall = Var(9) = 0
trigger1 = command = "y" && command != "holddown" && statetype = S && p2bodydist x < 30 && (ctrl || stateno = 100)

;--------------------------------
; 棫偪庛俹
;--------------------------------
[State -1]
type = ChangeState
value = 200
trigger1 = command = "x" && command != "holddown" && statetype = S && (ctrl || stateno = 100)

;--------------------------------
; 棫偪庛俲
;--------------------------------
[State -1]
type = ChangeState
value = 210
trigger1 = command = "a" && command != "holddown" && statetype = S && (ctrl || stateno = 100)

;--------------------------------
; 棫偪嫮俹
;--------------------------------
[State -1]
type = ChangeState
value = 220
trigger1 = command = "y" && command != "holddown" && statetype = S && (ctrl || stateno = 100)

;--------------------------------
; 棫偪嫮俲
;--------------------------------
[State -1]
type = ChangeState
value = 230
trigger1 = command = "b" && command != "holddown" && statetype = S && (ctrl || stateno = 100)

;--------------------------------
; 孅傒庛俹&孅傒庛俲
;--------------------------------
[State -1]
type = ChangeState
value = 400
triggerall = (command = "x") || (command = "a")
triggerall = command = "holddown"
trigger1 = statetype = C && ctrl
trigger2 = (stateno = 400) && (AnimElem = 6,>=2)

;--------------------------------
; 孅傒嫮俹
;--------------------------------
[State -1]
type = ChangeState
value = 220
trigger1 = command = "y" && command = "holddown" && statetype = C && ctrl

;--------------------------------
; 孅傒嫮俲
;--------------------------------
[State -1]
type = ChangeState
value = 410
trigger1 = command = "b" && command = "holddown" && statetype = C && ctrl

;--------------------------------
; 僕儍儞僾庛俹
;--------------------------------
[State -1]
type = ChangeState
value = 600
trigger1 = command = "x" && vel x && statetype = A && ctrl

;--------------------------------
; 悅捈僕儍儞僾庛俹
;--------------------------------
[State -1]
type = ChangeState
value = 600
trigger1 = command = "x" && statetype = A && ctrl

;--------------------------------
; 僕儍儞僾庛俲
;--------------------------------
[State -1]
type = ChangeState
value = 600
trigger1 = command = "a" && vel x && statetype = A && ctrl

;--------------------------------
; 悅捈僕儍儞僾庛俲
;--------------------------------
[State -1]
type = ChangeState
value = 600
trigger1 = command = "a" && statetype = A && ctrl

;--------------------------------
; 僕儍儞僾嫮俹
;--------------------------------
[State -1]
type = ChangeState
value = 620
trigger1 = command = "y" && vel x && statetype = A && ctrl

;--------------------------------
; 悅捈僕儍儞僾嫮俹
;--------------------------------
[State -1]
type = ChangeState
value = 620
trigger1 = command = "y" && statetype = A && ctrl

;--------------------------------
; 僕儍儞僾嫮俲
;--------------------------------
[State -1]
type = ChangeState
value = 620
trigger1 = command = "b" && vel x && statetype = A && ctrl

;--------------------------------
; 悅捈僕儍儞僾嫮俲
;--------------------------------
[State -1]
type = ChangeState
value = 620
trigger1 = command = "b" && statetype = A && ctrl

;--------------------------------
; 僟僢僔儏
;--------------------------------
[State -1]
type = ChangeState
value = 100
trigger1 = command = "FF" && statetype = S && ctrl && stateno != 100

;--------------------------------
; 僶僢僋僟僢僔儏
;--------------------------------
[State -1]
type = ChangeState
value = 105
trigger1 = command = "BB" && statetype = S && ctrl

;--------------------------------
; 挧敪
;--------------------------------
[State -1]
type = ChangeState
value = 195
trigger1 = command = "start" && ctrl && statetype != A && stateno != 195
