;------------------------------------------------------------------------------
;==============================================================================
;------------------------------------------------------------------------------


[Command]
name = "CPU0"
command = F,F
time = 0

[Command]
name = "CPU1"
command = B,B
time = 0

[Command]
name = "CPU2"
command = U,U
time = 0

[Command]
name = "CPU3"
command = D,D
time = 0

[Command]
name = "CPU4"
command = a,a
time = 0

[Command]
name = "CPU5"
command = b,b
time = 0

[Command]
name = "CPU6"
command = c,c
time = 0

[Command]
name = "CPU7"
command = x,x
time = 0

[Command]
name = "CPU8"
command = y,y
time = 0

[Command]
name = "CPU9"
command = z,z
time = 0

[Command]
name = "CPU10"
command = s,s
time = 0

[Command]
name = "CPU11"
command = a+b+c+s
time = 0

[Command]
name = "CPU12"
command = x+y+z+s
time = 0

[Command]
name = "CPU13"
command = F,B
time = 0

[Command]
name = "CPU14"
command = B,U
time = 0

[Command]
name = "CPU15"
command = U,D
time = 0

[Command]
name = "CPU16"
command = D,a
time = 0

[Command]
name = "CPU17"
command = a,b
time = 0

[Command]
name = "CPU18"
command = b,c
time = 0

[Command]
name = "CPU19"
command = c,x
time = 0

[Command]
name = "CPU20"
command = x,y
time = 0

[Command]
name = "CPU21"
command = y,z
time = 0

[Command]
name = "CPU22"
command = z,F
time = 0

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

[Command]
name = "DarkShadow"
command = ~F, B, D, U, y
time = 30

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

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

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

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

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

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


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

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

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

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

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

[Command]
name = "recovery"
command = y
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 = "hold_a"
command = /a

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

[Command]
name = "hold_b"
command = /b

;------------------------------------------------------------------------------
[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, DarkShadow]
type = SelfState
value = 3330
triggerall = roundstate = 2
triggerall = Var(59) <= 0
triggerall = command = "DarkShadow"
triggerall = power >= 3000 || (powerMax < 3000)
triggerall = statetype != A
triggerall = (life <= lifemax / 3) || (life <= 300) ||  (powerMax < 3000)
trigger1 = (numhelper(771)=0) && (numhelper(881)=0) && (numhelper(991)=0)
trigger1 = stateno != 3330
trigger1 = stateno != 66666
trigger1 = Var(17) <= 0
trigger1 = Alive = 1
ignorehitpause=1

[State -1, DarkForce]
type = SelfState
value = 770
triggerall = Var(59) <= 0
triggerall = command = "DarkForce"
triggerall = power >= 500
triggerall = statetype != A
triggerall = (numhelper(771)=0) && (numhelper(881)=0) && (numhelper(991)=0)
trigger1 = ctrl

[State -1, SummonDemon]
type = SelfState
value = 880
triggerall = Var(59) <= 0
triggerall = command = "SummonDemon"
triggerall = power >= 1000
triggerall = statetype != A
triggerall = (numhelper(771)=0) && (numhelper(881)=0) && (numhelper(991)=0)
trigger1 = ctrl

[State -1, BloodyHowl]
type = SelfState
value = 990
triggerall = Var(59) <= 0
triggerall = command = "BloodyHowl"
triggerall = power >= 2000
triggerall = statetype != A
triggerall = (life <= lifemax / 2) || (life <= 500)
triggerall = (numhelper(771)=0) && (numhelper(881)=0) && (numhelper(991)=0)
trigger1 = ctrl

[State -1, Barrier]
type = SelfState
value = 555
triggerall = Var(59) <= 0
triggerall = command = "Barrier"
triggerall = power >= 500
triggerall = statetype != A
trigger1 = ctrl

;===========================================================================
;------------------------------------------------------------------------------

[State -1, ShadowThrust]
type = SelfState
value = 1100
triggerall = Var(59) <= 0
triggerall = command = "ShadowThrust"
triggerall = statetype != A
triggerall = power >= 300
triggerall = (life <= lifemax / 2) || (life <= 500)
trigger1 = ctrl
trigger2 = (stateno = 400)
trigger2 = movecontact

[State -1, ShadowSpin]
type = SelfState
value = 1000
triggerall = Var(59) <= 0
triggerall = command = "ShadowSpin"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,210]) || (stateno = [400,410])
trigger2 = stateno != 440
trigger2 = movecontact

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

[State -1, Power Gauge Charge]
type = SelfState
value = 700
triggerall = command = "hold_a"
triggerall = power < 3000
triggerall = Var(59) <= 0
triggerall = statetype != A
trigger1 = statetype != A
trigger1 = ctrl = 1

;------------------------------------------------------------------------------
;==============================================================================
;------------------------------------------------------------------------------

[State -1, Stand Light Punch]
type = SelfState
value = 200
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = Var(59) <= 0
triggerall = statetype != A
trigger1 = statetype = S
trigger1 = ctrl = 1

[State -1, Stand Strong Punch]
type = SelfState
value = 400
triggerall = command = "y"
triggerall = command != "holddown"
triggerall = Var(59) <= 0
triggerall = statetype != A
trigger1 = statetype = S
trigger1 = ctrl = 1

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

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

;[State -1, Taunt]
;type = SelfState
;value = 195
;triggerall = Var(59) <= 0
;triggerall = command = "start"
;trigger1 = statetype != A
;trigger1 = ctrl

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

[State -1, Crouching Light Punch]
type = SelfState
value = 210
triggerall = command = "x"
triggerall = command = "holddown"
triggerall = Var(59) <= 0
triggerall = statetype != A
trigger1 = statetype = C
trigger1 = ctrl = 1

[State -1, Crouching Strong Punch]
type = SelfState
value = 410
triggerall = command = "y"
triggerall = command = "holddown"
triggerall = Var(59) <= 0
triggerall = statetype != A
trigger1 = statetype = C
trigger1 = ctrl = 1

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

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

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

[State -1, AI]
Type = VarSet
TriggerAll = Var(59) <= 0
trigger1 = command = "CPU0"
trigger2 = command = "CPU1"
trigger3 = command = "CPU2"
trigger4 = command = "CPU3"
trigger5 = command = "CPU4"
trigger6 = command = "CPU5"
trigger7 = command = "CPU6"
trigger8 = command = "CPU7"
trigger9 = command = "CPU8"
trigger10 = command = "CPU9"
trigger11 = command = "CPU10"
trigger12 = command = "CPU11"
trigger13 = command = "CPU12"
trigger14 = command = "CPU13"
trigger15 = command = "CPU14"
trigger16 = command = "CPU15"
trigger17 = command = "CPU16"
trigger18 = command = "CPU17"
trigger19 = command = "CPU18"
trigger20 = command = "CPU19"
trigger21 = command = "CPU20"
trigger22 = command = "CPU21"
trigger23 = command = "CPU22"
V = 59
Value = 666
ignorehitpause=1

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

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

[State -1, DarkShadow]
type = SelfState
value = 3330
triggerall = var(3) = 0
triggerall = var(1) > -100
triggerall = roundstate = 2
triggerall = Var(59) >= 1
triggerall = power >= 3000 || (powerMax < 3000) || (var(16)=666)
triggerall = statetype != A
triggerall = (life <= lifemax / 3) || (life <= 300) || (powerMax < 3000) || (var(16)=666)
trigger1 = (numhelper(771)=0) && (numhelper(881)=0) && (numhelper(991)=0)
trigger1 = stateno != 3330
trigger1 = stateno != 66666
trigger1 = Var(17) <= 0
trigger1 = Alive = 1
ignorehitpause=1

[State -1, Barrier]
type = SelfState
value = 555
triggerall = Var(59) >= 1
triggerall = (p2bodydist X != [-100,100]) || (p2stateno = [5100,5200]) || (enemynear,hitfall)
triggerall = Var(18) < 200
triggerall = power >= 500 || (powerMax < 3000) || (var(16) != 666)
triggerall = (!inguarddist) || (var(16)=666)
triggerall = (enemy,movetype != A) || (var(16)=666)
triggerall = statetype != A
triggerall = (stateno != [5000,5200])
trigger1 = ctrl

[State -1, ShadowThrust]
type = SelfState
value = 1100
triggerall = power >= 300 || (powerMax < 3000) || (var(16)=666)
triggerall = Var(59) >= 1
triggerall = (p2bodydist y = [-70,0]) || ((p2bodydist y = [-130,0]) && (enemynear,hitfall))
triggerall = p2stateno != [5050,5200]
triggerall = Random = [500,1000]
triggerall = (life <= lifemax / 2) || (life <= 500) || (powerMax < 3000) || (var(16)=666)
;triggerall = p2bodydist X >= -1
trigger1 = ctrl
trigger2 = (stateno = 400)
trigger2 = moveHit

[State -1, DarkForce]
type = SelfState
value = 770
triggerall = Var(59) >= 1
triggerall = (p2bodydist X != [-100,100]) || (p2stateno = [5100,5200]) || (p2bodydist y <= -150)
triggerall = Random = [0,250]
triggerall = power >= 500 || (powerMax < 3000)
triggerall = (!inguarddist) || (var(16)=666)
triggerall = (enemy,movetype != A) || (var(16)=666)
triggerall = statetype != A
triggerall = (stateno != [5000,5200])
triggerall = (numhelper(771)=0) && (numhelper(881)=0) && (numhelper(991)=0)
trigger1 = ctrl

[State -1, SummonDemon]
type = SelfState
value = 880
triggerall = Var(59) >= 1
triggerall = (p2bodydist y = [-50,0]) || ((p2bodydist y = [-100,0]) && (enemynear,hitfall))
triggerall = (p2bodydist X != [-100,100]) || (p2stateno = [5100,5200])
triggerall = (!inguarddist)
triggerall = statetype != A || (var(16)=666)
triggerall = power >= 1000 || (powerMax < 3000) || (var(16)=666)
triggerall = Random = [750,1000]
triggerall = (stateno != [5000,5200])
triggerall = (enemy,movetype != A) || (var(16)=666)
triggerall = (numhelper(771)=0) && (numhelper(881)=0) && (numhelper(991)=0)
trigger1 = ctrl

[State -1, BloodyHowl]
type = SelfState
value = 990
triggerall = Var(59) >= 1
triggerall = (p2bodydist y = [-300,0]) || ((p2bodydist y = [-500,0]) && (enemynear,hitfall))
triggerall = (p2bodydist X != [-100,100]) || (p2stateno = [5100,5200])
triggerall = (!inguarddist) || (var(16)=666)
triggerall = statetype != A
triggerall = power >= 2000 || (powerMax < 3000) || (var(16)=666)
triggerall = Random = [250,750]
triggerall = (stateno != [5000,5200])
triggerall = (enemy,movetype != A) || (var(16)=666)
triggerall = (numhelper(771)=0) && (numhelper(881)=0) && (numhelper(991)=0)
triggerall = (life <= lifemax / 2) || (life <= 500) || (powerMax < 3000) || (var(16)=666)
trigger1 = ctrl

[State -1, ShadowSpin]
type = SelfState
value = 1000
triggerall = Var(59) >= 1
triggerall = Random = [0,500]
triggerall = p2bodydist X = [-1,100]
triggerall = p2stateno != [5100,5200]
triggerall = (p2bodydist y = [-90,0]) || ((p2bodydist y = [-150,0]) && (enemynear,hitfall))
triggerall = (!inguarddist) || (var(16)=666)
triggerall = (enemy,movetype != A) || (var(16)=666)
trigger1 = ctrl
trigger2 = (stateno = [200,210]) || (stateno = [400,410])
trigger2 = stateno != 440
trigger2 = movecontact

;==============================================================================
[State -3]
type = SelfState
value = 700
triggerall = Var(59) >= 1
triggerall = power < 3000 && (power < powerMax)
triggerall = p2bodydist X != [-150,150]
triggerall = statetype != A
triggerall = (stateno != 700)
triggerall = (stateno != [5000,5200])
triggerall =  (powerMax >= 3000) && (var(16) != 666)
trigger1 = enemy,movetype != A
trigger1 = !inguarddist
trigger1 = (stateno != 20)
trigger1 = (stateno != 100)
trigger1 = (stateno != [120,160])
trigger1 = (movetype != H)
trigger1 = ctrl = 1

[State -3]
type = SelfState
value = 700
triggerall = Var(59) >= 1
triggerall = power < 3000 && (power < powerMax)
triggerall = p2bodydist X = [-150,150]
triggerall = statetype != A
triggerall = (stateno != 700)
triggerall = (stateno != [5000,5200])
triggerall =  (powerMax >= 3000) && (var(16) != 666)
trigger1 = (p2stateno = [5050,5200])
trigger1 = enemy,movetype != A
trigger1 = !inguarddist
trigger1 = (stateno != 20)
trigger1 = (stateno != 100)
trigger1 = (stateno != [120,160])
trigger1 = (movetype != H)
trigger1 = ctrl = 1

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

;------------------------------------------------------------------------------
;==============================================================================
;------------------------------------------------------------------------------

[State -3,3]
Type = SelfState
value = 400
triggerall = Var(59) >= 1
triggerall = enemy,movetype != A
triggerall = StateType != A
triggerall = p2bodydist X = [-1,65]
triggerall = p2dist y = [-80,0]
triggerall = p2stateno != [5100,5200]
triggerall = !inguarddist
trigger1 = ctrl
trigger2 = stateno = 100

[State -3,3]
Type = SelfState
value = 200
triggerall = Var(59) >= 1
triggerall = StateType != A
triggerall = p2bodydist X = [-85,85]
triggerall = p2dist y = [-100,0]
trigger1 = ctrl
trigger2 = stateno = 100

[State -3,3]
Type = SelfState
value = 210
triggerall = Var(59) >= 1
triggerall = enemy,movetype != A
triggerall = StateType != A
triggerall = P2StateType != A
triggerall = p2bodydist X = [-1,100]
triggerall = p2dist y = [-50,0]
triggerall = p2stateno != [5100,5200]
triggerall = !inguarddist
trigger1 = ctrl
trigger2 = stateno = 100

[State -3,3]
Type = SelfState
value = 410
triggerall = Var(59) >= 1
triggerall = enemy,movetype != A
triggerall = StateType != A
triggerall = p2bodydist X = [20,70]
triggerall = p2dist y = [-100,-50]
triggerall = p2stateno != [5100,5200]
triggerall = !inguarddist
trigger1 = ctrl
trigger2 = stateno = 100


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

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

[State -3,nojump]
Type = SelfState
Value = 40
triggerall = Var(59) >= 1
triggerall = power < 0
trigger1 = statetype != A
trigger1 = (stateno = 40)
trigger1 = Ctrl

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

;[State -1 , Noused]
;type = SelfState
;triggerall = stateno != 105
;triggerall = stateno != 6565
;triggerall = Var(59) >= 1
;triggerall = (stateno != [141,155])
;triggerall = (stateno != [120,139])
;triggerall = !enemynear,hitdefattr=SCA,NT,ST,HT,AT
;triggerall = ctrl = 1
;triggerall = statetype != A
;trigger1 = enemy,movetype = A
;trigger2 = inguarddist
;value = 120
;ignorehitpause=1