;---------------------------------------------------------------------------
;特殊技
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; シールド

[Statedef 510] 
type     = U
movetype = I
physics  = N
ctrl     = 0
anim     = ifelse(StateType=C,161,ifelse(StateType=A,162,160))


[State 510,状態パラメータ変更]
type = StateTypeSet
triggerall = StateType = A
trigger1 = 1
physics = A
ignorehitpause = 1
persistent = 1


[State 510,受け止め定義（空中以外）]
type = ReversalDef
triggerall = StateType != A
trigger1 = time = [0,6]
reversal.attr = SCA, AA, AP 
pausetime     = 0,12
numhits       = 0
sparkno       = -1
sparkxy       = 0,0
hitsound      = -1,-1
p1stateno = 511


[State 510,やられ状態上書き（空中以外）]
type = HitOverRide
triggerall = StateType != A
trigger1 = time = [0,6]
time = 1
attr = SCA, AA, AP
stateno = 511
ignorehitpause = 1


[State 510,受け止め定義（空中）]
type = ReversalDef
triggerall = StateType = A
trigger1 = Time = [0,10]
reversal.attr = SCA, AA, AP 
pausetime     = 0,12
numhits       = 0
sparkno       = -1
sparkxy       = 0,0
hitsound      = -1,-1
p1stateno = 511


[State 510,やられ状態上書き（空中）]
type = HitOverRide
triggerall = StateType = A
trigger1 = Time = [0,10]
time = 1
attr = SCA, AA, AP
stateno = 511
ignorehitpause = 1


[State 510, 軸位置設定]
type = PosSet
triggerall = StateType != A
trigger1 = 1
y = 0


[State 510,立ちシールドエフェクト]
type = explod
trigger1 = time = 1
trigger1 = anim = 160
anim = 40020
id = 160
postype = p1
pos = 15,-75
ownpal = 1
sprpriority = 5
bindtime = -1
persistent = 0
ignorehitpause = 1
supermovetime  = 9999
pausemovetime  = 9999


[State 510,しゃがみシールドエフェクト]
type = explod
trigger1 = time = 1
trigger1 = anim = 161
anim = 40020
id = 160
postype = p1
pos = 20,-40
ownpal = 1
sprpriority = 5
bindtime = -1
persistent = 0
ignorehitpause = 1
supermovetime  = 9999
pausemovetime  = 9999


[State 510,空中シールドエフェクト]
type = explod
trigger1 = time = 1
trigger1 = anim = 162
anim = 40020
id = 160
postype = p1
pos = 30,-70
ownpal = 1
sprpriority = 5
bindtime = -1
persistent = 0
ignorehitpause = 1
supermovetime  = 9999
pausemovetime  = 9999


[State 510,移動速度]
type = VelSet
triggerall = StateType != A
trigger1 = 1
x = 0
y = 0


[State 510,シールド音]
type = playsnd
trigger1 = time = 4
value = s0,17
channel = 1
ignorehitpause = 1
persistent = 0


[State 510,ステート変更]
type = ChangeState
triggerall = StateType != A
trigger1 = AnimTime = 0
value = ifelse(StateType=C,11,0)
ctrl = 1

[State 510,ステート変更]
type = ChangeState
triggerall = StateType = A
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;------------------
;シールド成功

[Statedef 511]
type     = U
movetype = I
physics  = N
ctrl     = 0
velset   = 0,0
anim     = ifelse(StateType=C,164,ifelse(StateType=A,165,163))


[State 511,効果音分岐]
type = VarRandom
trigger1 = time = 0
v = 9
range =0,3


[State 511,シールド成立１]
type = PlaySnd
triggerall = Time = 0
trigger1 = var(9) = [0,1]
value = s0, 15
channel = 1
ignorehitpause = 1
persistent = 0


[State 511,シールド成立１]
type = PlaySnd
triggerall = Time = 0
trigger1 = var(9) = [2,3]
value = s0, 16
channel = 1
ignorehitpause = 1
persistent = 0


[State 511,「止まって見える」]
type = PlaySnd
triggerall = Time = 1
trigger1 = var(9) = 0
trigger2 = var(9) = 2
value = s8, 3
channel = 0
ignorehitpause = 1
persistent = 0


[State 511,「亀ですか貴方は」]
type = PlaySnd
triggerall = Time = 1
trigger1 = var(9) = 1
trigger2 = var(9) = 3
value = s8, 4
channel = 0
ignorehitpause = 1
persistent = 0


[State 511,状態パラメータ変更]
type = StateTypeSet
triggerall = StateType = A
trigger1 = 1
physics = A
ignorehitpause = 1
persistent = 1


[State 511,ゲージ上昇]
type = PowerAdd
trigger1 = Time = 0
value = 40
ignorehitpause = 1
persistent = 1


[State 511,無敵]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 18


[State 511,動きを止める（ポーズ）]
type = Pause
trigger1 = Time = 0
time = 13
movetime = 13
ignorehitpause = 1
persistent = 0

[State 511,画面全体の色合い]
type = EnvColor
trigger1 = Time = 0
value = 255,255,255
time = 1

[State 511,軸位置設定]
type = PosSet
triggerall = StateType != A
trigger1 = 1
y = 0

[State 511,移動速度]
type = VelSet
triggerall = StateType = A
trigger1 = AnimTime <= 0
x = 0
y = 0

[State 511,ステート変更] ;立ちとしゃがみ
type = ChangeState
triggerall = StateType != A
trigger1 = AnimTime = 0
value = ifelse(StateType=C,11,0)
ctrl = 1

[State 511,ステート変更] ;空中のみ
type = ChangeState
triggerall = StateType = A
trigger1 = Time = 14
value = 50 ;common1.cns参照
ctrl = 1

[State 511,ラストアーク発動] ;立ちとしゃがみ
type = ChangeState
triggerall = StateType != A
trigger1 = Time >= 5
trigger1 = var(4) = 3
value = 4000
ctrl = 0
;---------------------------------------------------------------------------
;相殺
[statedef 520]
type = U
movetype = A
physics = U
ctrl = 0


[State 520,効果音分岐]
type = VarRandom
trigger1 = time = 0
v = 9
range =0,3


[State 520,シールド成立１]
type = PlaySnd
triggerall = Time = 0
trigger1 = var(9) = [0,1]
value = s0, 15
channel = 1
ignorehitpause = 1
persistent = 0


[State 520,シールド成立１]
type = PlaySnd
triggerall = Time = 0
trigger1 = var(9) = [2,3]
value = s0, 16
channel = 1
ignorehitpause = 1
persistent = 0


[State 520,動きを止める]
type = Pause
trigger1 = time = 0
time = 15
movetime = 0
ignorehitpause = 1
persistent = 0


[State 520,フラッシュ]
type = EnvColor
trigger1 = time = 0
value = 255,255,255
time = 1


[State 520,アニメ固定]
type = changeanim
trigger1 = 1
value = anim
elem = AnimElemNo(0)
persistent = 1


[state 520,ステート変更]
type = ChangeState
trigger1 = Time = 1
value = var(31) ;common1.cns参照
ctrl = 0
;---------------------------------------------------------------------------
;シールドバンカー
[Statedef 530]
type     = S
movetype = A
physics  = S
juggle   = 0
velset   = 0,0
ctrl     = 0
;anim     = 530
poweradd = 0
sprpriority = 2


[State 530,アニメ変更（相殺用）]
type = ChangeAnim
trigger1 = anim != 530
persistent = 0
ignorehitpause = 1
value = 530


[State 530,相殺]
type = ReversalDef
trigger1 = AnimElemTime(2) >= 0
trigger1 = AnimElemTime(3) < 0
reversal.attr = SCA, AA, AP 
pausetime = 0,2
numhits = 0
sparkno = -1
sparkxy = 0,0
hitsound = -1,-1
p1stateno = 531


[State 530, ヒット定義]
type = Hitdef
trigger1 = AnimElemTime(7) = 0
attr = S,NA
hitflag = MAF
priority = 4, Hit
guardflag = MA
animtype = up
air.animtype = diagup
fall.animtype = diagup
ground.type = high
air.type = high
damage = ceil(fvar(0) * 40),0
getpower = 12,3
givepower = 4,0
pausetime = 12,12
guard.pausetime = 5,5
sparkno = S40000
guard.sparkno = S40010
sparkxy = -15,ceil(p2bodydist y - 70)
hitsound = S0,2
guardsound = S0,10
ground.hittime = 15
ground.slidetime = 15
guard.hittime = 13
air.hittime = 22
guard.ctrltime = 8
airguard.ctrltime = 10
ground.velocity = 0,-7.5
guard.velocity = -3
air.velocity = 0,-7.5
fall.yvelocity = 0
airfuard.velocity = -2,-1
sprpriority = 2
fall.recover = 1
forcestand = 0
fall = 1
air.fall = 1
kill = 1
guard.kill = 0
envshake.time = 15
envshake.ampl = -5


[State 530,シールド音]
type = playsnd
trigger1 = AnimElemTime(2) = 0
value = s0,17
channel = 1
ignorehitpause = 1
persistent = 0


[State 530,「軽過ぎる！！」]
type = PlaySnd
trigger1 = AnimElemTime(6) = 0
value = s2, 10
channel = 0


[State 530,シールドエフェクト]
type = explod
trigger1 = AnimElemTime(2) = 0
anim = 40020
id = 160
postype = p1
pos = -5,-45
ownpal = 1
sprpriority = 5
bindtime = -1
persistent = 0
ignorehitpause = 1
supermovetime  = 9999
pausemovetime  = 9999


[State 530,シールドバンカーエフェクト]
type = explod
trigger1 = AnimElemTime(7) = 0
anim = 10400
id = 530
postype = p1
pos = 30,-50
ownpal = 1
sprpriority = 5
bindtime = -1
removeongethit = 1
persistent = 0
ignorehitpause = 1
supermovetime  = 9999
pausemovetime  = 9999


[State 530, 補正用ヒットカウント]
type = VarAdd
trigger1 = movehit
var(18) = 1
persistent = 0
ignorehitpause = 1


[State 530,ステート変更]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;シールバンカー専用相殺
[statedef 531]
type = U
movetype = A
physics = U
ctrl = 0


[State 531,効果音分岐]
type = VarRandom
trigger1 = time = 0
v = 9
range =0,3


[State 531,シールド成立１]
type = PlaySnd
triggerall = Time = 0
trigger1 = var(9) = [0,1]
value = s0, 15
channel = 1
ignorehitpause = 1
persistent = 0


[State 531,シールド成立１]
type = PlaySnd
triggerall = Time = 0
trigger1 = var(9) = [2,3]
value = s0, 16
channel = 1
ignorehitpause = 1
persistent = 0


[State 531,動きを止める]
type = Pause
trigger1 = time = 0
time = 8
movetime = 8
ignorehitpause = 1
persistent = 0


[State 531,フラッシュ]
type = EnvColor
trigger1 = time = 0
value = 255,255,255
time = 1


;[State 531,アニメ固定]
;type = changeanim
;trigger1 = 1
;value = anim
;elem = AnimElemNo(0)
;persistent = 1


[state 531,ステート変更]
type = ChangeState
trigger1 = Time >= 1
value = 530
ctrl = 0


;---------------------------------------------------------------------------
;強制開放（本体）
[Statedef 550]
type     = S
movetype = I
physics  = S
juggle   = 0
velset   = 0,0
ctrl     = 0
anim     = 510
poweradd = 0
sprpriority = 2


[State 550, ヒット定義]
type = Hitdef
trigger1 = AnimElemTime(5) = 0
attr = A,SA
hitflag = MAF
priority = 4, Hit
guardflag = MA
animtype = hard
air.animtype = hard
fall.animtype = hard
ground.type = high
air.type = high
damage = ceil(fvar(0) * 0),0
getpower = 0,0
givepower = 0,0
pausetime = 0,0
guard.pausetime = 0,0
sparkno = -1;S40000
guard.sparkno = -1;S40010
sparkxy = -15,ceil(p2bodydist y - 70)
hitsound = S0,1
guardsound = S0,10
sprpriority = 2
ground.hittime = 15
ground.slidetime = 15
guard.hittime = 18
air.hittime = 15
guard.ctrltime = 18
airguard.ctrltime = 18
ground.velocity = 0,-9
guard.velocity = - 8
air.velocity = 0,-9
airfuard.velocity = -2,-1
fall.yvelocity = 0
fall.recover = 1
forcestand = 0
fall = 1
air.fall = 1
kill = 0
guard.kill = 0
guard.dist = 0
;envshake.time = 12
;envshake.ampl = -4
p2stateno = 710



[State 550,ボイス分岐]
type = VarRandom
trigger1 = time = 0
v = 9
range = 0,1


[State 550,通常からヒートへ]
type = VarSet
trigger1 = var(4) = 0
trigger1 = AnimElemTime(5) = 0
var(4) = 1


[State 550,マックスからブラッドヒートへ]
type = VarSet
trigger1 = var(4) = 2
trigger1 = AnimElemTime(5) = 0
var(4) = 3


[State 550,振動]
type = envShake
trigger1 = AnimElemTime(5) = 0
time = 10
ampl = -4
ignorehitpause = 1


[State 550,「うあああっ！！」]
type = PlaySnd
trigger1 = AnimElemTime(4) = 0
trigger1 = var(9) = 0
value = s2,13
channel = 0


[State 550,「止まらない…！！」]
type = PlaySnd
trigger1 = AnimElemTime(4) = 0
trigger1 = var(9) = 1
value = s2,14
channel = 0


[State 550,強制開放]
type = PlaySnd
trigger1 = AnimElemTime(5) = 0
value = s0,22
channel = 1


[State 550,ヒートの残像]
type = AfterImage
;trigger1 = AnimElemTime(5) = 1
triggerall = var(7) = 0
trigger1 = var(4) = 1
Time = -1
trans = add
timegap = 1
framegap = 1
length = 20
palbright = 0,0,10
palcontrast = 0,0,255
;palpostbright = 0,0,5
paladd = 0,0,5
palmul = 0.85,0.85,0.85
ignorehitpause = 1
Peresistent = 1


[State 550,ブラッドヒートの残像]
type = AfterImage
;trigger1 = AnimElemTime(5) = 1
triggerall = var(7) = 0
trigger1 = var(4) = 3
Time = -1
trans = add
timegap = 1
framegap = 1
length = 10
palbright = 10,10,0
palcontrast = 255,255,0
;palpostbright = 0,0,5
paladd = 0,0,5
palmul = 0.85,0.85,0.85
ignorehitpause = 1
Peresistent = 1


[State 550,サイクバースト（金）]
type = explod
trigger1 = AnimElemTime(5) = 0
anim = 40070
id = 510
postype = p1
pos = 0,-70
ownpal = 1
sprpriority = 4
bindtime = -1
persistent = 0
scale = 0.5,0.5
ignorehitpause = 1
supermovetime  = 9999
pausemovetime  = 9999


[State 550,状態変化]
type = StateTypeSet
trigger1 = AnimElemTime(5) = 0
type     = S
movetype = A
physics  = S
ignorehitpause = 1
persistent = 0


[State 550,状態変化]
type = StateTypeSet
trigger1 = AnimElemTime(5) >= 1
type     = S
movetype = I
physics  = S
ignorehitpause = 1
persistent = 0


[State 550,無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1


[State 550,ステート変更]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;サーキットスパーク（本体）
[Statedef 560]
type     = S
movetype = I
physics  = S
juggle   = 0
velset   = 0,0
ctrl     = 0
anim     = 510
poweradd = -99999
sprpriority = 2


[State 560, ヒット定義]
type = Hitdef
trigger1 = AnimElemTime(5) = 0
attr = A,SA
hitflag = MAF
priority = 4, Hit
guardflag = MA
animtype = hard
air.animtype = hard
fall.animtype = hard
ground.type = high
air.type = high
damage = ceil(fvar(0) * 0),0
getpower = 0,0
givepower = 0,0
pausetime = 0,0
guard.pausetime = 0,0
sparkno = -1;S40000
guard.sparkno = -1;S40010
sparkxy = -15,ceil(p2bodydist y - 70)
hitsound = S0,1
guardsound = S0,10
sprpriority = 2
ground.hittime = 15
ground.slidetime = 15
guard.hittime = 18
air.hittime = 15
guard.ctrltime = 18
airguard.ctrltime = 18
ground.velocity = 0,-9
guard.velocity = - 8
air.velocity = 0,-9
airfuard.velocity = -2,-1
fall.yvelocity = 0
fall.recover = 1
forcestand = 0
fall = 1
air.fall = 1
kill = 0
guard.kill = 0
guard.dist = 0
;envshake.time = 12
;envshake.ampl = -4
p2stateno = 710



[State 560,ボイス分岐]
type = VarRandom
trigger1 = time = 0
v = 9
range = 0,1


[State 550,ヒート状態解除]
type = VarSet
trigger1 = AnimElemTime(5) = 0
var(4) = 0


[State 560,残像消去]
type = AfterImageTime
trigger1 = var(4) = 0
time = 0


[State 560,振動]
type = envShake
trigger1 = AnimElemTime(5) = 0
time = 10
ampl = -4
ignorehitpause = 1


[State 560,「うあああっ！！」]
type = PlaySnd
trigger1 = AnimElemTime(4) = 0
trigger1 = var(9) = 0
value = s2,13
channel = 0


[State 560,「止まらない…！！」]
type = PlaySnd
trigger1 = AnimElemTime(4) = 0
trigger1 = var(9) = 1
value = s2,14
channel = 0


[State 560,強制開放]
type = PlaySnd
trigger1 = AnimElemTime(5) = 0
value = s0,22
channel = 1


[State 560,サイクバースト（青）]
type = explod
trigger1 = AnimElemTime(5) = 0
anim = 40071
id = 510
postype = p1
pos = 0,-70
ownpal = 1
sprpriority = 4
bindtime = -1
persistent = 0
scale = 0.5,0.5
ignorehitpause = 1
supermovetime  = 9999
pausemovetime  = 9999


[State 560,状態変化]
type = StateTypeSet
trigger1 = AnimElemTime(5) = 0
type     = S
movetype = A
physics  = S
ignorehitpause = 1
persistent = 0


[State 560,状態変化]
type = StateTypeSet
trigger1 = AnimElemTime(5) >= 1
type     = S
movetype = I
physics  = S
ignorehitpause = 1
persistent = 0


[State 560,無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1


[State 560,ステート変更]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;強制開放（スタンド）
[Statedef 20550]
type     = S
movetype = I
physics  = S
juggle   = 0
velset   = 0,0
ctrl     = 0
anim     = 20510
poweradd = 0
sprpriority = 2


[State 20550, ヒット定義]
type = Hitdef
trigger1 = AnimElemTime(3) = 0
attr = A,SA
hitflag = MAF
priority = 4, Hit
guardflag = MA
animtype = hard
air.animtype = hard
fall.animtype = hard
ground.type = high
air.type = high
damage = ceil(fvar(0) * 0),0
getpower = 0,0
givepower = 0,0
pausetime = 0,0
guard.pausetime = 0,0
sparkno = -1;S40000
guard.sparkno = -1;S40010
sparkxy = -15,ceil(p2bodydist y - 70)
hitsound = S0,1
guardsound = S0,10
sprpriority = 2
ground.hittime = 15
ground.slidetime = 15
guard.hittime = 18
air.hittime = 15
guard.ctrltime = 18
airguard.ctrltime = 18
ground.velocity = 0,-9
guard.velocity = - 8
air.velocity = 0,-9
airfuard.velocity = -2,-1
fall.yvelocity = 0
fall.recover = 1
forcestand = 0
fall = 1
air.fall = 1
kill = 0
guard.kill = 0
guard.dist = 0
;envshake.time = 12
;envshake.ampl = -4
p2stateno = 710



[State 20550,ボイス分岐]
type = VarRandom
trigger1 = time = 0
v = 9
range = 0,1


[State 20550,通常からヒートへ]
type = VarSet
trigger1 = var(4) = 0
trigger1 = AnimElemTime(3) = 0
var(4) = 1


[State 20550,マックスからブラッドヒートへ]
type = VarSet
trigger1 = var(4) = 2
trigger1 = AnimElemTime(3) = 0
var(4) = 3


[State 20550,振動]
type = envShake
trigger1 = AnimElemTime(3) = 0
time = 10
ampl = -4
ignorehitpause = 1


[State 20550,「うあああっ！！」]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
trigger1 = var(9) = 0
value = s2,13
channel = 0


[State 20550,「止まらない…！！」]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
trigger1 = var(9) = 1
value = s2,14
channel = 0


[State 20550,強制開放]
type = PlaySnd
trigger1 = AnimElemTime(3) = 0
value = s0,22
channel = 1


[State 20550,ヒートの残像]
type = AfterImage
;trigger1 = AnimElemTime(3) = 1
trigger1 = var(4) = 1
Time = -1
trans = add
timegap = 1
framegap = 1
length = 20
palbright = 0,0,10
palcontrast = 0,0,255
;palpostbright = 0,0,5
paladd = 0,0,5
palmul = 0.85,0.85,0.85
ignorehitpause = 1
Peresistent = 1


[State 20550,ブラッドヒートの残像]
type = AfterImage
;trigger1 = AnimElemTime(3) = 1
trigger1 = var(4) = 3
Time = -1
trans = add
timegap = 1
framegap = 1
length = 10
palbright = 10,10,0
palcontrast = 255,255,0
;palpostbright = 0,0,5
paladd = 0,0,5
palmul = 0.85,0.85,0.85
ignorehitpause = 1
Peresistent = 1


[State 20550,サイクバースト（金）]
type = explod
trigger1 = AnimElemTime(3) = 0
anim = 40070
id = 510
postype = p1
pos = 0,-70
ownpal = 1
sprpriority = 4
bindtime = -1
persistent = 0
scale = 0.5,0.5
ignorehitpause = 1
supermovetime  = 9999
pausemovetime  = 9999


[State 20550,状態変化]
type = StateTypeSet
trigger1 = AnimElemTime(3) = 0
type     = S
movetype = A
physics  = S
ignorehitpause = 1
persistent = 0


[State 20550,状態変化]
type = StateTypeSet
trigger1 = AnimElemTime(3) >= 1
type     = S
movetype = I
physics  = S
ignorehitpause = 1
persistent = 0


[State 20550,無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1


[State 20550,ステート変更]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1



;---------------------------------------------------------------------------
;サーキットスパーク（スタンド）
[Statedef 20560]
type     = S
movetype = I
physics  = S
juggle   = 0
velset   = 0,0
ctrl     = 0
anim     = 20510
poweradd = -99999
sprpriority = 2


[State 20560, ヒット定義]
type = Hitdef
trigger1 = AnimElemTime(3) = 0
attr = A,SA
hitflag = MAF
priority = 4, Hit
guardflag = MA
animtype = hard
air.animtype = hard
fall.animtype = hard
ground.type = high
air.type = high
damage = ceil(fvar(0) * 0),0
getpower = 0,0
givepower = 0,0
pausetime = 0,0
guard.pausetime = 0,0
sparkno = -1;S40000
guard.sparkno = -1;S40010
sparkxy = -15,ceil(p2bodydist y - 70)
hitsound = S0,1
guardsound = S0,10
sprpriority = 2
ground.hittime = 15
ground.slidetime = 15
guard.hittime = 18
air.hittime = 15
guard.ctrltime = 18
airguard.ctrltime = 18
ground.velocity = 0,-9
guard.velocity = - 8
air.velocity = 0,-9
airfuard.velocity = -2,-1
fall.yvelocity = 0
fall.recover = 1
forcestand = 0
fall = 1
air.fall = 1
kill = 0
guard.kill = 0
guard.dist = 0
;envshake.time = 12
;envshake.ampl = -4
p2stateno = 710



[State 20560,ボイス分岐]
type = VarRandom
trigger1 = time = 0
v = 9
range = 0,1


[State 20560,ヒート状態解除]
type = VarSet
trigger1 = AnimElemTime(3) = 0
var(4) = 0


[State 560,残像消去]
type = AfterImageTime
trigger1 = var(4) = 0
time = 0


[State 20560,振動]
type = envShake
trigger1 = AnimElemTime(3) = 0
time = 10
ampl = -4
ignorehitpause = 1


[State 20560,「うあああっ！！」]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
trigger1 = var(9) = 0
value = s2,13
channel = 0


[State 20560,「止まらない…！！」]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
trigger1 = var(9) = 1
value = s2,14
channel = 0


[State 20560,強制開放]
type = PlaySnd
trigger1 = AnimElemTime(3) = 0
value = s0,22
channel = 1


[State 20560,サイクバースト（青）]
type = explod
trigger1 = AnimElemTime(3) = 0
anim = 40071
id = 510
postype = p1
pos = 0,-70
ownpal = 1
sprpriority = 4
bindtime = -1
persistent = 0
scale = 0.5,0.5
ignorehitpause = 1
supermovetime  = 9999
pausemovetime  = 9999


[State 20560,状態変化]
type = StateTypeSet
trigger1 = AnimElemTime(3) = 0
type     = S
movetype = A
physics  = S
ignorehitpause = 1
persistent = 0


[State 20560,状態変化]
type = StateTypeSet
trigger1 = AnimElemTime(3) >= 1
type     = S
movetype = I
physics  = S
ignorehitpause = 1
persistent = 0


[State 20560,無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1


[State 20560,ステート変更]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;スタンドモードON（地上）
[Statedef 600]
type     = U
movetype = I
physics  = S
juggle   = 0
velset   = 0,0
ctrl     = 0
anim     = 520
poweradd = 0
sprpriority = 2


[State 600,「ハァッ！！」]
type = PlaySnd
trigger1 = Time = 2
value = s2, 6
channel = 0


[State 600,ステート変更]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = Parent,stateno != 0
trigger2 = Parent,stateno != 2
value = 20000
ctrl = 0
;---------------------------------------------------------------------------
;スタンドモードOFF（地上）
[Statedef 610]
type     = S
movetype = I
physics  = S
juggle   = 0
velset   = 0,0
ctrl     = 0
anim     = 0
poweradd = 0
sprpriority = 0

[state 610,スタンド判定]
type = VarSet
trigger1 = 1
var(3) = 0
ignorehitpause = 1


[State 610,スタンド判定設定]
type = VarSet
trigger1 = 1
var(15) = 0
ignorehitpause = 1


[State 610,後退]
type = PosAdd
trigger1 = Time = 0
x = -15


[State 610,ステート変更]
type = ChangeState
trigger1 = Time >= 1
value = ifelse(StateType=C,11,0)
ctrl = 1
;---------------------------------------------------------------------------
;スタンドモードOFF（空中）
[Statedef 615]
type     = A
movetype = I
physics  = A
juggle   = 0
;velset   = 0,0
ctrl     = 0
;anim     =ifelse(StateType=A,520,520)
poweradd = 0
sprpriority = 0

[state 615,スタンド判定]
type = VarSet
trigger1 = 1
var(3) = 0
ignorehitpause = 1


[State 615,スタンド判定設定]
type = VarSet
trigger1 = 1
var(15) = 0
ignorehitpause = 1


[State 615,回数減]
type = VarAdd
trigger1 = Time = 0
v = 13
value = -1

[State 615,回数減]
type = VarAdd
trigger1 = Time = 0
v = 14
value = -1

[State 615,後退]
type = PosAdd
trigger1 = Time = 0
x = -15


[State 615,ステート変更（空中）]
type = ChangeState
triggerall = StateType = A
trigger1 = Time >= 1
value = 50
ctrl = 1

[State 615,ステート変更（着地）]
type = ChangeState
triggerall = StateType = A
trigger1 = Pos y >= 0
value = 52
ctrl = 1
;---------------------------------------------------------------------------
;共通ふっとばしやられ
[Statedef 710]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
sprpriority = 0


[state 710,吹っ飛びアニメ]
type = changeanim2
trigger1 = time = 0
value = 5700


[State 710,吹っ飛べ]
type = VelSet
trigger1 = time = 1
x = -18;ifelse(p2dist x <= 0,18,-18)


[State 710,画面を固定]
type = screenbound
trigger1 = backedgebodydist < 65
trigger2 = frontedgebodydist < 65
value = 1
movecamera = 0,0


[State 710,激突へ]
type = ChangeState
trigger1 = BackEdgeBodyDist = 0
trigger2 = frontedgebodydist = 0
trigger3 = time >= 120
value = 711
ctrl = 0
;---------------------------------------------------------------------------
;激突直後
[Statedef 711]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
sprpriority = 0


[State 711, 振動]
type = envShake
trigger1 = time = 0
time = 15
ampl = -10
ignorehitpause = 1


[State 711,激突へ]
type = ChangeState
trigger1 = time = 1
value = 712
ctrl = 0

;---------------------------------------------------------------------------
;共通ふっとばしやられ（落下）
[Statedef 712]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
sprpriority = 0


[State 712,直撃により反転]
type = turn
trigger1 = time = 0


[State 712,跳ね返り]
type = VelSet
trigger1 = time = 0
x = ifelse(p2dist x <= 0,-1,1)
y = -5.6


[State 712,重力]
type = Gravity
trigger1 = time >= 0


[state 712,落下アニメ]
type = changeanim
trigger1 = time = 0
value = 5050


[State 712,開放]
type = SelfState
trigger1 = Vel y > 0
trigger1 = Pos y >= 0
value = 5110
;---------------------------------------------------------------------------
;空中ダッシュ

[Statedef 103]
type    = A
physics = A
anim    = 110 + var(15)
velset  = 0,0
ctrl    = 0
sprpriority = 0


[State 103,回数減]
type = VarAdd
trigger1 = Time = 0
v = 14
value = -1


[State 103,停止]
type = PosFreeze
trigger1 = Time = [0,1]


[State 103,速度決定]
type = VelSet
trigger1 = Time = 2
x = 5
y = -4

[State 103,コマンドOK]
type = CtrlSet
trigger1 = Time = 3
value = 1


[State 103, エフェクト表示（空中ダッシュ）]
type = explod
trigger1 = Time = 3
anim = 40030
ownpal = 1
id = 2
sprpriority = -1
postype = p1
pos = 10,-40
bindtime = 1
removeongethit = 0
scale = 0.5,0.5
pausemovetime = ifelse(var(21)=1,999999,0)


[State 103,空中ダッシュ]
type = PlaySnd
trigger1 = Time = 3
value = s0, 21
channel = 1
ignorehitpause = 1
persistent = 0


;ここ以下はオプション。

[State 103,上に少し加速]
type = VelAdd
trigger1 = Time = [9,19]
y = -0.11

[State 103,減速落下]
type = VelAdd
trigger1 = Time = 20
y = 0.2
x = -0.8

;---------------------------------------------------------------------------
;バックダッシュ

[Statedef 108]
type    = A
physics = A
anim    = 115 + var(15)
velset  = 0,0
ctrl    = 0
sprpriority = 0

[State 108,回数減]
type = VarAdd
trigger1 = Time = 0
v = 14
value = -1

[State 108,停止]
type = PosFreeze
trigger1 = Time = [0,2]

[State 108,速度決定]
type = VelSet
trigger1 = Time = 3
x = -4
y = -3.8


[State 108,空中ダッシュ]
type = PlaySnd
trigger1 = Time = 3
value = s0, 21
channel = 1
ignorehitpause = 1
persistent = 0


[State 108, エフェクト表示（空中ダッシュ）]
type = explod
trigger1 = Time = 3
anim = 40031
ownpal = 1
id = 40030
sprpriority = -1
postype = p1
pos = -10,-40
bindtime = 1
removeongethit = 0
scale = 0.5,0.5
pausemovetime = ifelse(var(21)=1,999999,0)


[State 108,コマンドOK]
type = CtrlSet
trigger1 = Time = 4
value = 1

;ここ以下はオプション

[State 108,上に少し加速]
type = VelAdd
trigger1 = Time = [8,18]
y = -0.11

[State 108,減速落下]
type = VelAdd
trigger1 = Time = 20
y = 0.2
x = -0.5
;===========================================================================
;AI専用ステート郡
;===========================================================================
;AI専用前進
[statedef 50020]
type = S
physics = S
ctrl = 1
sprpriority = 0


[State 50020,歩きます]
type = VelSet
trigger1 = 1
x = const(velocity.walk.fwd.x)


[State 50020,アニメ変更]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 + var(15) && Anim != 5 + var(15)
trigger2 = Anim = 5 + var(15) && AnimTime = 0
value = 20 + var(15)


[State 50020,歩行停止]
type = ChangeState
triggerall = var(0) != 0
trigger1 = P2BodyDist X < 0
value = 0
ctrl = 1
IgnoreHitPause = 1


;---------------------------------------------------------------------------
;AI専用前方ジャンプ
[statedef 50040]
type    = S
movetype = I
physics = S
anim = 40 + var(15)
ctrl = 0
sprpriority = 0


[State 50040,前方ジャンプの為変数を操作]
type = VarSet
trigger1 = 1
sysvar(1) = 1


[State 50040,加速をセット]
type = VelSet
trigger1 = AnimTime = 0
x = const(velocity.jump.fwd.x)
y = const(velocity.jump.y)


[State 50040,ジャンプへ]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1
;---------------------------------------------------------------------------

