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

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

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

[Command]
name = "AFF"
command = ~F, F
time = 20

[Command]
name = "ABB"
command = ~B, B
time = 20

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

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

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

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

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

[Statedef -1] 

[state -1, ステ抜け用変数無感知化] 
type = varset
trigger1 = 1
var(0) = 0
ignorehitpause = 1

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

[State -1, 専用対策]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = anim != [10,15]
triggerall = anim != [116,117]
triggerall = anim != 1000
triggerall = anim != 7000
triggerall = anim != 9000
triggerall = roundstate = 2
triggerall = var(10) = 1
triggerall = life >= 500
triggerall = palno = 12
triggerall = enemy,alive
triggerall = command != "holddown"
trigger1 = enemy,name = "ONI-MIKO-REIMU"
trigger2 = enemy,name = "Chu-goku"
trigger3 = enemy,name = "Poltergeist"
trigger4 = enemy,name = "UNKNOWN"
value = 9000
ignorehitpause = 1

[State -1, 立ちプログラム]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = palno != 11
triggerall = anim != [10,15]
triggerall = anim != [116,117]
triggerall = anim != 1000
triggerall = anim != 7000
triggerall = anim != 9000
triggerall = roundstate = 2
triggerall = !time
triggerall = var(10) = 1
triggerall = palno != 10
triggerall = command = "start"
triggerall = command != "holddown"
trigger1 = palno != [4,6]
trigger1 = life >= 500
trigger2 = palno = [4,6]
trigger2 = helper(150),var(13) > 1800
trigger3 = palno = [7,9]
value = 1000
ignorehitpause = 1

[State -1, 立ちＲＢＭ]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = anim != [10,15]
triggerall = anim != [116,117]
triggerall = anim != 1000
triggerall = anim != 7000
triggerall = anim != 9000
triggerall = roundstate = 2
triggerall = !time
triggerall = var(10) = 1
triggerall = palno != 10
triggerall = numhelper(150)
triggerall = helper(150),var(13) > 1000
triggerall = command = "z+c"
triggerall = command != "holddown"
trigger1 = palno = [7,10]
trigger2 = palno = 12
value = 9000
ignorehitpause = 1

[State -1, 立ち弱レーザー]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = ctrl
triggerall = anim != [10,15]
triggerall = anim != [116,117]
triggerall = palno != 11
triggerall = command = "x"
trigger1 = command != "holddown"
value = ifelse(random % 2 = 0, 200, 230)
ignorehitpause = 1

[State -1, 立ち中レーザー]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = ctrl
triggerall = anim != [10,15]
triggerall = anim != [116,117]
triggerall = palno != 11
triggerall = command = "y"
trigger1 = command != "holddown"
value = ifelse(random % 2 = 0, 210, 240)
ignorehitpause = 1

[State -1, 立ち強レーザー]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = ctrl
triggerall = anim != [10,15]
triggerall = anim != [116,117]
triggerall = palno != 11
triggerall = power >= 1000
triggerall = command = "z"
trigger1 = command != "holddown"
value = ifelse(random % 2 = 0, 220, 250)
ignorehitpause = 1

[State -1, 立ち設置ミラー]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = ctrl
triggerall = anim != [10,15]
triggerall = anim != [116,117]
triggerall = palno != 11
triggerall = power >= 1000
triggerall = command = "c"
trigger1 = command != "holddown"
value = 2000
ignorehitpause = 1

[State -1, 立ち跳弾Ａ]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = ctrl
triggerall = anim != [10,15]
triggerall = anim != [116,117]
triggerall = palno != 11
triggerall = command = "a"
trigger1 = command != "holddown"
value = 3000
ignorehitpause = 1

[State -1, 立ち跳弾Ｂ]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = ctrl
triggerall = anim != [10,15]
triggerall = anim != [116,117]
triggerall = palno = [1,10]
triggerall = command = "b"
trigger1 = command != "holddown"
value = 3300
ignorehitpause = 1

[State -1, 立ち破片]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = ctrl
triggerall = anim != [10,15]
triggerall = anim != [116,117]
triggerall = palno = 12
triggerall = numExplod(7000) = 0
triggerall = !var(12)
triggerall = command = "b"
trigger1 = command != "holddown"
value = 7000
ignorehitpause = 1

[State -1, 発光１１Ｐ]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = ctrl
triggerall = anim != [10,15]
triggerall = anim != [116,117]
triggerall = palno = 11
triggerall = numExplod(12000) = 0
trigger1 = command = "x"
value = 8000
ignorehitpause = 1

[State -1, 立ちバリア]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = anim != [10,15]
triggerall = anim != [116,117]
triggerall = palno != 11
triggerall = numhelper(150)
triggerall = helper(150),gethitvar(damage)
trigger1 = numExplod(700) = 0
trigger2 = numProjID(700) = 0
value = 700
ignorehitpause = 1

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

[State -1, しゃがみエラーコード]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = C
triggerall = anim != 10
triggerall = anim != 12
triggerall = anim != [116,117]
triggerall = anim != 1100
triggerall = anim != 7100
triggerall = anim != 9100
triggerall = roundstate = 2
triggerall = !var(12)
triggerall = enemy,name != "UNKNOWN"
triggerall = command = "start"
triggerall = command = "holddown"
triggerall = palno != [10,11]
trigger1 = palno != [4,6]
trigger2 = palno = [4,6]
trigger2 = helper(150),var(13) > 1800
value = 1100
ignorehitpause = 1

[State -1, しゃがみＲＢＭ]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = C
triggerall = anim != 10
triggerall = anim != 12
triggerall = anim != [116,117]
triggerall = anim != 1100
triggerall = anim != 7100
triggerall = anim != 9100
triggerall = roundstate = 2
triggerall = command = "z+c"
triggerall = command = "holddown"
trigger1 = palno = [7,9]
trigger2 = palno = 12
value = 9100
ignorehitpause = 1

[State -1, しゃがみ弱レーザー]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = C
triggerall = ctrl
triggerall = anim != 10
triggerall = anim != 12
triggerall = anim != [116,117]
triggerall = palno != 11
triggerall = command = "x"
trigger1 = command = "holddown"
value = ifelse(random % 2 = 0, 400, 430)
ignorehitpause = 1

[State -1, しゃがみ中レーザー]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = C
triggerall = ctrl
triggerall = anim != 10
triggerall = anim != 12
triggerall = anim != [116,117]
triggerall = palno != 11
triggerall = command = "y"
trigger1 = command = "holddown"
value = ifelse(random % 2 = 0, 410, 440)
ignorehitpause = 1

[State -1, しゃがみ強レーザー]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = C
triggerall = ctrl
triggerall = anim != 10
triggerall = anim != 12
triggerall = anim != [116,117]
triggerall = palno != 11
triggerall = power >= 1000
triggerall = command = "z"
trigger1 = command = "holddown"
value = ifelse(random % 2 = 0, 420, 450)
ignorehitpause = 1

[State -1, しゃがみ設置ミラー]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = C
triggerall = ctrl
triggerall = anim != 10
triggerall = anim != 12
triggerall = anim != [116,117]
triggerall = palno != 11
triggerall = power >= 1000
triggerall = command = "c"
trigger1 = command = "holddown"
value = 2100
ignorehitpause = 1

[State -1, しゃがみ跳弾Ａ]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = C
triggerall = ctrl
triggerall = anim != 10
triggerall = anim != 12
triggerall = anim != [116,117]
triggerall = palno != 11
triggerall = command = "a"
trigger1 = command = "holddown"
value = 3100
ignorehitpause = 1

[State -1, しゃがみ跳弾Ｂ]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = C
triggerall = ctrl
triggerall = anim != 10
triggerall = anim != 12
triggerall = anim != [116,117]
triggerall = palno = [1,10]
triggerall = command = "b"
trigger1 = command = "holddown"
value = 3400

[State -1, しゃがみ破片]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = C
triggerall = ctrl
triggerall = anim != 10
triggerall = anim != 12
triggerall = anim != [116,117]
triggerall = palno = 12
triggerall = numExplod(7000) = 0
triggerall = !var(12)
triggerall = command = "b"
trigger1 = command = "holddown"
value = 7100
ignorehitpause = 1

[State -1, しゃがみバリア]
type = ChangeState
triggerall = !ishelper
triggerall = alive
triggerall = statetype = C
triggerall = anim != 10
triggerall = anim != 12
triggerall = anim != [116,117]
triggerall = palno != 11
triggerall = numhelper(150)
triggerall = helper(150),gethitvar(damage)
trigger1 = numExplod(800) = 0
trigger2 = numProjID(800) = 0
value = 800
ignorehitpause = 1

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

[State -1, 専用対策]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = A
triggerall = anim != [10,15]
triggerall = anim != 117
triggerall = anim != 1200
triggerall = anim != 7200
triggerall = anim != 9200
triggerall = palno = 12
triggerall = roundstate = 2
triggerall = life >= 400
triggerall = enemy,alive
trigger1 = enemy,name = "ONI-MIKO-REIMU"
value = 9200
ignorehitpause = 1

[State -1, ジャンプエラーコード]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = A
triggerall = anim != [10,15]
triggerall = anim != 117
triggerall = anim != 1200
triggerall = anim != 7200
triggerall = anim != 9200
triggerall = roundstate = 2
triggerall = !var(12)
triggerall = enemy,name != "UNKNOWN"
triggerall = command = "start"
triggerall = palno != [10,11]
trigger1 = palno != [4,6]
trigger2 = palno = [4,6]
trigger2 = helper(150),var(13) > 1800
value = 1200
ignorehitpause = 1

[State -1, ジャンプＲＢＭ]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = A
triggerall = anim != [10,15]
triggerall = anim != 117
triggerall = anim != 1200
triggerall = anim != 7200
triggerall = anim != 9200
triggerall = roundstate = 2
triggerall = numhelper(150)
triggerall = helper(150),var(13) > 1000
triggerall = command = "z+c"
trigger1 = palno = [7,9]
trigger2 = palno = 12
value = 9200
ignorehitpause = 1

[State -1, ジャンプ弱レーザー]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = A
triggerall = ctrl
triggerall = anim != [10,15]
triggerall = anim != 117
triggerall = palno != 11
trigger1 = command = "x"
value = ifelse(random % 2 = 0, 600, 630)
ignorehitpause = 1

[State -1, ジャンプ中レーザー]
type = ChangeState
triggerall = !ishelper
triggerall = alive
triggerall = statetype = A
triggerall = ctrl
triggerall = anim != [10,15]
triggerall = anim != 117
triggerall = palno != 11
trigger1 = command = "y"
value = ifelse(random % 2 = 0, 610, 640)
ignorehitpause = 1

[State -1, ジャンプ強レーザー]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = A
triggerall = ctrl
triggerall = anim != [10,15]
triggerall = anim != 117
triggerall = palno != 11
triggerall = power >= 1000
trigger1 = command = "z"
value = ifelse(random % 2 = 0, 620, 650)
ignorehitpause = 1

[State -1, ジャンプ設置ミラー]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = A
triggerall = ctrl
triggerall = anim != [10,15]
triggerall = anim != 117
triggerall = palno != 11
triggerall = power >= 1000
trigger1 = command = "c"
value = 2200
ignorehitpause = 1

[State -1, ジャンプ跳弾Ａ]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = A
triggerall = ctrl
triggerall = anim != [10,15]
triggerall = anim != 117
triggerall = palno != 11
trigger1 = command = "a"
value = 3200
ignorehitpause = 1

[State -1, ジャンプ跳弾Ｂ]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = A
triggerall = ctrl
triggerall = anim != [10,15]
triggerall = anim != 117
triggerall = palno = [1,10]
trigger1 = command = "b"
value = 3500
ignorehitpause = 1

[State -1, ジャンプ破片]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = A
triggerall = ctrl
triggerall = anim != [10,15]
triggerall = anim != 117
triggerall = palno = 12
triggerall = numExplod(7000) = 0
triggerall = !var(12)
trigger1 = command = "b"
value = 7200
ignorehitpause = 1

[State -1, ジャンプバリア]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = A
triggerall = anim != [10,15]
triggerall = anim != 117
triggerall = palno != 11
triggerall = numhelper(150)
triggerall = helper(150),gethitvar(damage)
trigger1 = numExplod(900) = 0
trigger2 = numProjID(900) = 0
value = 900
ignorehitpause = 1

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

[State -1, 勝利]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = roundstate > 3
triggerall = anim != [170,181]
triggerall = !time
trigger1 = win
value = 180
ignorehitpause = 1

[State -1, 引き分け]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = roundstate > 3
triggerall = anim != [170,181]
triggerall = !time
trigger1 = drawgame
value = 175
ignorehitpause = 1

[State -1, 判定負け]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = roundstate > 3
triggerall = anim != [170,181]
triggerall = !time
trigger1 = losetime
value = 170
ignorehitpause = 1

[State -1, 空中バックステップ]
type = ChangeState
triggerall = !ishelper
triggerall = alive
triggerall = statetype = A
triggerall = ctrl
triggerall = anim != 105
triggerall = anim != 117
trigger1 = command = "ABB" 
value = 117
ignorehitpause = 1

[State -1, 空中ダッシュ]
type = ChangeState
triggerall = !ishelper
triggerall = alive
triggerall = statetype = A
triggerall = ctrl
triggerall = anim != 105
triggerall = anim != 116
trigger1 = command = "AFF"
value = 116
ignorehitpause = 1

[State -1, バックステップ]
type = ChangeState
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = ctrl
trigger1 = command = "BB"
value = 105
ignorehitpause = 1

[State -1, ダッシュ]
type = ChangeState
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = ctrl
trigger1 = command = "FF"
value = 100
ignorehitpause = 1

[state -1, 空中ジャンプ]
type = changestate
triggerall = !ishelper
triggerall = alive
triggerall= statetype = A
triggerall = ctrl
triggerall = vel y > 0
triggerall = var(9) < 2
triggerall = command = "up"
trigger1 = animelemtime(1) > 5
trigger2 = anim != 51
value = 40
ignorehitpause = 1

[State -1, ジャンプ]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = ctrl
trigger1 = command = "holdup"
value = 40
ignorehitpause = 1

[State -1, 歩き]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = ctrl
triggerall = roundstate = 2
triggerall = anim != [10,15]
triggerall = anim != [100,105]
trigger1 = command = "holdfwd"
trigger2 = command = "holdback"
value = 20
ignorehitpause = 1

[State -1, しゃがみ歩き]
type = ChangeState
triggerall = !ishelper
triggerall = alive
triggerall = statetype = C
triggerall = ctrl
triggerall = anim = 11
triggerall = anim != 15
trigger1 = command = "holdfwd"
trigger2 = command = "holdback"
value = 15
ignorehitpause = 1

[State -1, 立ち上がる動作]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = C
triggerall = ctrl
trigger1 = command != "holddown"
value = 12
ignorehitpause = 1

[State -1, しゃがみ]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = C
triggerall = ctrl
triggerall = animtime = 0
trigger1 = command = "holddown"
value = 11
ignorehitpause = 1

[State -1, しゃがむ動作]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = statetype = S
triggerall = ctrl
trigger1 = command = "holddown"
value = 10
ignorehitpause = 1

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