;＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝
; 基本行動／システム
;＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝
;===========================================================================
; 基本行動
;===========================================================================
;---------------------------------------------------------------------------
; Jump Start
[Statedef 40]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 40, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 40, 2]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 40, 3]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

[State 40, 4]
type = VelSet
trigger1 = PrevStateNo != 41
trigger1 = PrevStateNo != 42
trigger1 = Time = 3
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[State 40, 5]
type = VelSet
trigger1 = PrevStateNo != 41
trigger1 = PrevStateNo != 42
trigger1 = Time = 3
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[State 40, 6]
type = ChangeState
trigger1 = PrevStateNo != 41
trigger1 = PrevStateNo != 42
trigger1 = Time = 3
value = 50
ctrl = 1

;***********************************
;
[state -1, ジャンプ音]
type = playsnd
triggerall = time = 3
trigger1 = PrevStateNo = 41
trigger2 = PrevStateNo = 42
value = 25, 1

[state -1, エフェクト]
type = explod
triggerall = time = 3
trigger1 = PrevStateNo = 41
trigger2 = PrevStateNo = 42
anim = 6031
id = 6031
pos = 0,0
postype = p1
facing = -1
scale = 1, 1
sprpriority = 1
ownpal = 1
removeongethit = 1

[state -1, ハイジャンプ（垂直）]
type = veladd
triggerall = time = 4
trigger1 = PrevStateNo = 41
x = 0
y = (const(velocity.jump.y)) * 1.3

[state -1, ハイジャンプ（前方）]
type = veladd
triggerall = time = 4
trigger1 = PrevStateNo = 42
x = 7
y = const(velocity.jump.y)

[State 40, 6]
type = ChangeState
triggerall = time = 4
trigger1 = PrevStateNo = 41
trigger2 = PrevStateNo = 42
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;ハイジャンプ（垂直）
[statedef 41]
type    = s
physics = s
anim = 40
ctrl = 0
sprpriority = 1

[state -1, 6]
type = changestate
trigger1 = time = 0
value = 40


;---------------------------------------------------------------------------
;ハイジャンプ（前方）
[statedef 42]
type    = s
physics = s
anim = 40
ctrl = 0
sprpriority = 1

[state -1, 6]
type = changestate
trigger1 = time = 0
value = 40

;---------------------------------------------------------------------------
;空中ジャンプ
[statedef 45]
type    = a
physics = n
ctrl = 0

[state -1, エフェクト]
type = explod
trigger1 = time = 0
anim = 6033
id = 6033
pos = 0,0
postype = p1
facing = -1
scale = .5, .5
sprpriority = 1
ownpal = 1
removeongethit = 1

[state -1, 1]
type = changeanim
trigger1 = selfanimexist(44)
value = 44

[state -1, 2]
type = changeanim
trigger1 = !selfanimexist(44)
value = 41

[state -1, 3]
type = varset
trigger1 = time = 0
sysvar(1) = 0

[state -1, 4]
type = varset
trigger1 = command = "holdfwd"
sysvar(1) = 1

[state -1, 5]
type = varset
trigger1 = command = "holdback"
sysvar(1) = -1

[state -1, 6]
type = velset
trigger1 = time = 2
x = ifelse(sysvar(1)=0, const(velocity.airjump.neu.x), ifelse(sysvar(1)=1, const(velocity.airjump.fwd.x), const(velocity.airjump.back.x)))
y = const(velocity.airjump.y)

[state -1, 0]
type = varset
trigger1 = time = 2
var(10) = 1

[state -1, 7]
type = changestate
trigger1 = time = 2
value = 50
ctrl = 1

[state -1]
type = changestate
trigger1 = (var(10) = 1) && (time = 0)
value = 51
ctrl = 1

;---------------------------------------------------------------------------
; Jump Land
[Statedef 52]
type    = S
physics = S
ctrl = 0
anim = 47

[state -1, エフェクト]
type = explod
trigger1 = time = 0
anim = 6032
id = 6032
pos = 0,0
postype = p1
facing = -1
scale = .5, .25
sprpriority = -1
ownpal = 1
removeongethit = 1

[State 52, サウンド]
type = PlaySnd
trigger1 = time = 0
value = 16, 0

[State 52, 1]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 52, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 52, 3]
type = CtrlSet
trigger1 = Time = 3
value = 1

[State 52, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;空中ダッシュ（前）
[statedef 55]
type = a
movetype = i
physics = a
anim = 55
ctrl = 1

[state -1, 速さ設定]
type = velset
trigger1 = time >= 0
trigger1 = animelemtime(3) < 0
x = 0
y = 0

[state -1, 速さ設定]
type = velset
trigger1 = animelemtime(3) >= 0
trigger1 = animelemtime(3) < 15
x = 6.5
y = 0

[state -1, 速さ設定]
type = velset
trigger1 = animelemtime(3) = 15
x = 3
y = 0

[state -1, ダッシュ音]
type = playsnd
trigger1 = animelemtime(3) = 0
value = 25, 0

[state -1, 空中ダッシュ回数制限]
type = varset
trigger1 = time = 0
var(12) = 1

[state -1, エフェクト]
type = helper
trigger1 = animelemtime(3) = 0
name = "myhelper"
id = 6021
pos = 60,const(size.mid.pos.y)
postype = p1
stateno = 6021
ownpal = 1
ignorehitpause = 1
persistent = 0

[state -1, エフェクト]
type = explod
trigger1 = animelemtime(3) = 0
anim = 6020
id = 6020
pos = -40,const(size.mid.pos.y)
postype = p1
facing = 1
scale = 1, 1
sprpriority = 1
ownpal = 1
removeongethit = 1

;---------------------------------------------------------------------------
;空中ダッシュ（後）
[statedef 56]
type = a
movetype = i
physics = a
anim = 56
ctrl = 0

[state -1, 無敵]
type = nothitby
trigger1 = time < 6
value = sca
time = 1

[state -1, 速さ設定]
type = velset
trigger1 = time >= 0
trigger1 = time < 10
x = -6
y = 0

[state -1, 速さ設定]
type = velset
trigger1 = time = 10
x = -3
y = 0

[state -1, ダッシュ音]
type = playsnd
trigger1 = time = 0
value = 25, 0

[state -1, 空中ダッシュ回数制限]
type = varset
trigger1 = time = 0
var(12) = 1

[state -1, エフェクト]
type = helper
trigger1 = time = 0
name = "myhelper"
id = 6021
pos = -60,const(size.mid.pos.y)
postype = p1
facing = -1
stateno = 6021
ownpal = 1
ignorehitpause = 1
persistent = 0

[state -1, エフェクト]
type = explod
trigger1 = time = 0
anim = 6020
id = 6020
pos = 40,const(size.mid.pos.y)
postype = p1
facing = -1
scale = 1, 1
sprpriority = 1
ownpal = 1
removeongethit = 1

[state -1, コントロール変更]
type = CtrlSet
trigger1 = time = 10
value = 1

;---------------------------------------------------------------------------
;前ダッシュ

[statedef 100]
type    = s
physics = s
ctrl = 0
anim = 100
sprpriority = 1

[state -1, エフェクト]
type = helper
trigger1 = animelemtime(3) = 0
name = "myhelper"
id = 6021
pos = 60,const(size.mid.pos.y)
postype = p1
stateno = 6021
ownpal = 1
ignorehitpause = 1
persistent = 0

[state -1, ダッシュ音]
type = playsnd
trigger1 = animelemtime(3) = 0
value = 25, 0

[state -1, エフェクト]
type = explod
trigger1 = animelemtime(3) = 0
anim = 6020
id = 6020
pos = -40,-45
postype = p1
facing = 1
scale = 1, 1
sprpriority = 1
ownpal = 1
removeongethit = 1

[state 100, 1]
type = velset
trigger1 = time = 0
x = vel x*0.2
y = 0

[state -1, velmul]
type = veladd
trigger1 = animelemtime(3) > 0
trigger1 = vel x < const(velocity.run.fwd.x)
x = 1.2

[state -1, 1]
type = velset
trigger1 = animelemtime(3) > 0
trigger1 = vel x >= const(velocity.run.fwd.x)
x = const(velocity.run.fwd.x)

[state -1 ,ctrlset]
type = ctrlset
trigger1 = animelemtime(3) > 0
value = 1

[state -1, 2] ;prevent run from canceling into walk
type = assertspecial
trigger1 = 1
flag = nowalk

[state -1, 3] ;prevent from turning
type = assertspecial
trigger1 = 1
flag = noautoturn

[state -1, 4]
type = changestate
trigger1 = (command != "holdfwd") && (animelemtime(3) > 1)
value = 101

;***********************************

[statedef 101]
type    = s
physics = s
anim = 101
sprpriority = 1

[state -1, 1]
type = velset
trigger1 = (animelemtime(3) > 0) && (command = "holdfwd")
x = const(velocity.run.fwd.x)

[state -1, 2] ;prevent run from canceling into walk
type = assertspecial
trigger1 = 1
flag = nowalk

[state -1, 3] ;prevent from turning
type = assertspecial
trigger1 = 1
flag = noautoturn

[state -1, 4]
type = changestate
trigger1 = animtime = 0
value = 0

;---------------------------------------------------------------------------
;バックステップ

[statedef 105]
type    = a
physics = a
ctrl = 0
anim = 105
sprpriority = 1

[state -1, 無敵]
type = nothitby
trigger1 = 1
value = sca
time = 1

[state -1, エフェクト]
type = helper
trigger1 = time = 0
name = "myhelper"
id = 6021
pos = -60,const(size.mid.pos.y)-20
postype = p1
facing = -1
stateno = 6021
ownpal = 1
ignorehitpause = 1
persistent = 0

[state -1, ダッシュ音]
type = playsnd
trigger1 = time = 0
value = 25, 0

[state -1, エフェクト]
type = explod
trigger1 = time = 0
anim = 6020
id = 6020
pos = 40,-45
postype = p1
facing = -1
scale = 1, 1
sprpriority = 1
ownpal = 1
removeongethit = 1

[state 105, 1]
type = velset
trigger1 = time = 0
x = const(velocity.run.back.x)
y = const(velocity.run.back.y)

[state 105, 3]
type = changestate
trigger1 = vel y > 0
trigger1 = pos y >= 0
value = 106

;***********************************
; run_back2 (land)
[statedef 106]
type    = s
physics = s
ctrl = 0
anim = 47

[state 106, 1]
type = velset
trigger1 = time = 0
y = 0

[state 106, 2]
type = posset
trigger1 = time = 0
y = 0

[state 106, 3]
type = makedust
trigger1 = time = 2
pos = -5,-2
spacing = 1

[state 106, 4]
type = changestate
trigger1 = time = 7
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; GUARD (start)
[Statedef 120]
type = U    ;Leave state type unchanged
physics = U ;Leave physics unchanged

[State 120, エフェクト]
type = Helper
trigger1 = numhelper(6020) = 0
helpertype = normal
name = "MyHelper"
ID = 6020
pos = 15,0
postype = p1
stateno = 6020
ownpal = 1

[State 120, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 120 + (statetype = C) + (statetype = A)*2

[State 120, 2]
type = StateTypeSet
trigger1 = Time = 0 && statetype = S
physics = S

[State 120, 3]
type = StateTypeSet
trigger1 = Time = 0 && statetype = C
physics = C

[State 120, 4]
type = StateTypeSet
trigger1 = Time = 0 && statetype = A
physics = A

[State 120, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 120, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 120, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 130 + (statetype = C) + (statetype = A)*2

[State 120, Stop Guarding]
type = ChangeState
trigger1 = command != "holdback"
trigger2 = !inguarddist
value = 140

;---------------------------------------------------------------------------
; STAND GUARD (guarding)
[Statedef 130]
type    = S
physics = S

[State 130, エフェクト]
type = Helper
trigger1 = numhelper(6020) = 0
helpertype = normal
name = "MyHelper"
ID = 6020
pos = 15,0
postype = p1
stateno = 6020
ownpal = 1

[State 130, 1]
type = ChangeAnim
trigger1 = Anim != 130
value = 130

[State 130, Hi to Lo]
type = ChangeState
trigger1 = command = "holddown"
value = 131

[State 130, Stop Guarding]
type = ChangeState
trigger1 = command != "holdback"
trigger2 = !inguarddist
value = 140

;---------------------------------------------------------------------------
; CROUCH GUARD (guarding)
[Statedef 131]
type    = C
physics = C

[State 131, エフェクト]
type = Helper
trigger1 = numhelper(6020) = 0
helpertype = normal
name = "MyHelper"
ID = 6020
pos = 15,0
postype = p1
stateno = 6020
ownpal = 1

[State 131, 1]
type = ChangeAnim
trigger1 = Anim != 131
value = 131

[State 131, Lo to Hi]
type = ChangeState
trigger1 = command != "holddown"
value = 130

[State 131, Stop Guarding]
type = ChangeState
trigger1 = command != "holdback"
trigger2 = !inguarddist
value = 140

;---------------------------------------------------------------------------
; AIR GUARD (guarding)
[Statedef 132]
type    = A
physics = N

[State 132, エフェクト]
type = Helper
trigger1 = numhelper(6020) = 0
helpertype = normal
name = "MyHelper"
ID = 6020
pos = 15,0
postype = p1
stateno = 6020
ownpal = 1

[State 132, 1]
type = ChangeAnim
trigger1 = Anim != 132
value = 132

[State 132, 2]
type = VelAdd
trigger1 = 1
y = Const(movement.yaccel)

[State 132, 3]
type = VarSet
trigger1 = 1
sysvar(0) = (pos y >= 0) && (vel y > 0)

[State 132, 4]
type = VelSet
trigger1 = sysvar(0)
y = 0

[State 132, 5]
type = PosSet
trigger1 = sysvar(0)
y = 0

[State 132, 6]
type = ChangeState
trigger1 = sysvar(0)
trigger1 = command = "holdback"
trigger1 = inguarddist
value = 130

[State 132, 7]
type = ChangeState
trigger1 = sysvar(0)
value = 52

[State 132, Stop Guarding]
type = ChangeState
trigger1 = command != "holdback"
trigger2 = !inguarddist
value = 140

;---------------------------------------------------------------------------
; GUARD (end)
[Statedef 140]
type = U    ;Leave state type unchanged
physics = U ;Leave physics unchanged
ctrl = 1

[State 140, エフェクト]
type = Helper
trigger1 = numhelper(6020) = 0
helpertype = normal
name = "MyHelper"
ID = 6020
pos = 15,0
postype = p1
stateno = 6020
ownpal = 1

[State 140, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 140 + (statetype = C) + (statetype = A)*2

[State 140, 2]
type = StateTypeSet
trigger1 = Time = 0 && statetype = S
physics = S

[State 140, 3]
type = StateTypeSet
trigger1 = Time = 0 && statetype = C
physics = C

[State 140, 4]
type = StateTypeSet
trigger1 = Time = 0 && statetype = A
physics = A

[State 140, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 140, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

;[State 140, 5] ;Implemented within engine
;type = ChangeState
;trigger1 = AnimTime = 0
;value = (statetype = C)*11 + (statetype = A)*51

;---------------------------------------------------------------------------
; SGUARDHIT (shaking)
[Statedef 150]
type    = S
movetype= H
physics = N
velset = 0,0

[State 150, エフェクト]
type = Helper
trigger1 = numhelper(6020) = 0
helpertype = normal
name = "MyHelper"
ID = 6020
pos = 15,0
postype = p1
stateno = 6020
ownpal = 1

[State 150, 1]
type = ChangeAnim
trigger1 = 1
value = 150

[State 150, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State 150, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 150, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 150, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 3

;---------------------------------------------------------------------------
; SGUARDHIT2 (knocked back)
[Statedef 151]
type    = S
movetype= H
physics = S
anim = 150

[State 151, エフェクト]
type = Helper
trigger1 = numhelper(6020) = 0
helpertype = normal
name = "MyHelper"
ID = 6020
pos = 15,0
postype = p1
stateno = 6020
ownpal = 1

[State 151, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 151, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = HitOver
x = 0

[State 151, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 151, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 151, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 151, 4]
type = ChangeState
trigger1 = HitOver
value = 130
ctrl = 1

;---------------------------------------------------------------------------
; CGUARDHIT (shaking)
[Statedef 152]
type    = C
movetype= H
physics = N
velset = 0,0

[State 152, エフェクト]
type = Helper
trigger1 = numhelper(6020) = 0
helpertype = normal
name = "MyHelper"
ID = 6020
pos = 15,0
postype = p1
stateno = 6020
ownpal = 1

[State 152, 1]
type = ChangeAnim
trigger1 = 1
value = 151

[State 152, 3]
type = ChangeState
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State 152, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 152, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 152, 4]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

;---------------------------------------------------------------------------
; CGUARDHIT2 (knocked back)
[Statedef 153]
type    = C
movetype= H
physics = C
anim = 151

[State 153, エフェクト]
type = Helper
trigger1 = numhelper(6020) = 0
helpertype = normal
name = "MyHelper"
ID = 6020
pos = 15,0
postype = p1
stateno = 6020
ownpal = 1

[State 153, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 153, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = HitOver
x = 0

[State 153, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 153, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 153, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 153, 4]
type = ChangeState
trigger1 = HitOver
value = 131
ctrl = 1

;---------------------------------------------------------------------------
; AGUARDHIT (shaking)
[Statedef 154]
type    = A
movetype= H
physics = N
velset = 0,0

[State 154, エフェクト]
type = Helper
trigger1 = numhelper(6020) = 0
helpertype = normal
name = "MyHelper"
ID = 6020
pos = 15,0
postype = p1
stateno = 6020
ownpal = 1

[State 154, 1]
type = ChangeAnim
trigger1 = 1
value = 152

[State 154, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 155 ;AGUARDHIT2

[State 154, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

;---------------------------------------------------------------------------
; AGUARDHIT2 (knocked away)
[Statedef 155]
type    = A
movetype= H
physics = N
anim = 152

[State 155, エフェクト]
type = Helper
trigger1 = numhelper(6020) = 0
helpertype = normal
name = "MyHelper"
ID = 6020
pos = 15,0
postype = p1
stateno = 6020
ownpal = 1

[State 155, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 155, 2]
type = VelAdd
trigger1 = 1
y = Const(movement.yaccel)

[State 155, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 155, 4]
type = VarSet
trigger1 = 1
sysvar(0) = (pos y >= 0) && (vel y > 0)

[State 155, 5]
type = VelSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = PosSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = ChangeState
trigger1 = sysvar(0)
trigger1 = command = "holdback"
trigger1 = inguarddist
value = 130

[State 155, 7]
type = ChangeState
trigger1 = sysvar(0)
value = 52

;---------------------------------------------------------------------------
; HIT_FALLRECOVER (on the ground)
[Statedef 5200]
type    = A
movetype= I
physics = N
anim = 5200
ctrl = 0

[State 5201, エフェクト]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "MyHelper"
id = 6022
pos = Const(size.mid.pos.x),Const(size.mid.pos.y)
postype = p1
stateno = 6022
ownpal = 1

[state -1, サウンド]
type = playsnd
trigger1 = time = 0
value = 25, 0

[state -1, サウンド]
type = playsnd
trigger1 = time = 0
value = 15, 0

[State 5210, 1] ;Blink white
type = PalFX
trigger1 = Time = 0
time = 3
add = 128,128,128 ;256,256,256

[State 5210, 1]
type = PosFreeze
trigger1 = Time = 0
value = 4

[State 5210, 2] ;Turn if not facing opponent
type = Turn
trigger1 = Time = 0
trigger1 = p2dist X < -20

[state -1, var(14)]
type = varset
trigger1 = time = 0
var(14) = 0

[state -1, var(14)]
type = varset
trigger1 = command = "holdfwd"
var(14) = 1

[state -1, var(14)]
type = varset
trigger1 = command = "holdback"
var(14) = -1

[state -1, 6]
type = velset
trigger1 = time = 1
x = ifelse(var(14)=0, 0, ifelse(var(14)=1, 5, -5))
y = -5

[State 5210, 3]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 15

[State 5210, 4]
type = CtrlSet
trigger1 = Time = 20
value = 1

[State 5210, 5]
type = VelAdd;Gravity
trigger1 = Time >= 4
y = .35

[State 5210, 5] ;Land on ground
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger1 = time > 1
value = 52 ;JUMP_LAND
ctrl = 1
;---------------------------------------------------------------------------
; HIT_AIRFALLRECOVER
[Statedef 5210]
type    = A
movetype= I
physics = N
anim = 5210
ctrl = 0

[State 5201, エフェクト]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "MyHelper"
id = 6022
pos = Const(size.mid.pos.x),Const(size.mid.pos.y)
postype = p1
stateno = 6022
ownpal = 1

[state -1, サウンド]
type = playsnd
trigger1 = time = 0
value = 25, 0

[State 5210, 1] ;Blink white
type = PalFX
trigger1 = Time = 0
time = 3
add = 128,128,128 ;256,256,256

[State 5210, 1]
type = PosFreeze
trigger1 = Time = 0
value = 4

[State 5210, 2] ;Turn if not facing opponent
type = Turn
trigger1 = Time = 0
trigger1 = p2dist X < -20

[state -1, var(14)]
type = varset
trigger1 = time = 0
var(14) = 0

[state -1, var(14)]
type = varset
trigger1 = command = "holdfwd"
var(14) = 1

[state -1, var(14)]
type = varset
trigger1 = command = "holdback"
var(14) = -1

[state -1, 6]
type = velset
trigger1 = time = 1
x = ifelse(var(14)=0, 0, ifelse(var(14)=1, 5, -5))
y = -5

[State 5210, 3]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 15

[State 5210, 4]
type = CtrlSet
trigger1 = Time = 20
value = 1

[State 5210, 5]
type = VelAdd;Gravity
trigger1 = Time >= 4
y = .35

[State 5210, 5] ;Land on ground
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger1 = time > 1
value = 52 ;JUMP_LAND
ctrl = 1

;===========================================================================
; システム
;===========================================================================
;---------------------------------------------------------------------------
;立シールド
[statedef 7000]
type = s
movetype = i
physics = s
anim = 7000
velset = 0,0
ctrl = 0

[state -1, 無敵]
type = NotHitBy
trigger1 = 1
value = SCa
time = 1

[state -1, 音を鳴らす]
type = playsnd
trigger1 = time = 1
value = 30, 0
IgnoreHitPause = 1

[state -1, エフェクト]
type = explod
trigger1 = time = 0
anim = 7005
id = 7005
pos = 13, -58
postype = p1
bindtime = -1
ontop = 1
ownpal = 1
removeongethit = 1
IgnoreHitPause = 1

[state -1, エフェクト]
type = explod
trigger1 = time%14 = 0
anim = 7006
id = 7006
pos = 13, -58
postype = p1
bindtime = -1
ontop = 1
ownpal = 1
removeongethit = 1
IgnoreHitPause = 1

[State -1, 受け止め定義]
type = ReversalDef
triggerall = ((var(59) = 1) && (var(30) != 3)) || ((var(59) = 0) && (power != powermax))
trigger1 = time = [0,6]
reversal.attr = ScA, AA,AP
pausetime = 15,19
sparkno = S7007
sparkxy = 0,0
hitsound = S31,0
p1stateno = 7002
IgnoreHitPause = 1
supermovetime = 999999
pausemovetime = 999999

[State -1, 受け止め定義]
type = ReversalDef
triggerall = ((var(59) = 1) && (var(30) = 3)) || ((var(59) = 0) && (power = powermax))
trigger1 = time = [0,6]
reversal.attr = ScA, AA,AP
pausetime = 0,4
sparkno = S7007
sparkxy = 0,0
hitsound = S31,0
p1stateno = 9500
IgnoreHitPause = 1
supermovetime = 999999
pausemovetime = 999999

[State -1, 受け止め定義]
type = ReversalDef
trigger1 = time > 6
reversal.attr = ScA, AA,AP
pausetime = 15,15
sparkno = S7008
sparkxy = 0,0
hitsound = S31,1
p1stateno = 7003
IgnoreHitPause = 1
supermovetime = 999999
pausemovetime = 999999

[State -1, 食らい上書き]
type = HitOverride
trigger1 = 1
attr = ScA, AA,AP
stateno = 7003
IgnoreHitPause = 1
supermovetime = 999999
pausemovetime = 999999

[State -1, ゲージ減少]
type = PowerAdd
trigger1 = time > 5
value = -5

[state -1, ステート変更]
type = changestate
trigger1 = time > 90
trigger2 = (time = (5,90]) && (command != "holdz")
trigger3 = time > 5
trigger3 = Power = 0
value = 7001

;***********************************

[statedef 7001]
type = u
movetype = u
physics = u
anim = 7001
velset = 0,0
ctrl = 0

[state -1, ステート変更]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;***********************************

[statedef 7002]
type = u
movetype = u
physics = u
anim = 7000
velset = 0,0
ctrl = 0
sprpriority = 1

[state -1, 無敵]
type = NotHitBy
trigger1 = time = 0
value = SCa
time = 4

[state -1, ステート変更]
type = changestate
trigger1 = time = 1
value = 0
ctrl = 1

;***********************************

[statedef 7003]
type = u
movetype = u
physics = u
anim = 7000
velset = 0,0
ctrl = 0
sprpriority = 1

[state -1, ステート変更]
type = changestate
trigger1 = time = 1
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;屈シールド
[statedef 7010]
type = c
movetype = i
physics = c
anim = 7010
velset = 0,0
ctrl = 0

[state -1, 無敵]
type = NotHitBy
trigger1 = 1
value = SCa
time = 1

[state -1, 音を鳴らす]
type = playsnd
trigger1 = time = 1
value = 30, 0
IgnoreHitPause = 1

[state -1, エフェクト]
type = explod
trigger1 = time = 0
anim = 7005
id = 7005
pos = 19,-31
postype = p1
bindtime = -1
ontop = 1
ownpal = 1
removeongethit = 1
IgnoreHitPause = 1
Pausemovetime = 999999
supermovetime = 999999

[state -1, エフェクト]
type = explod
trigger1 = time%14 = 0
anim = 7006
id = 7006
pos = 19,-31
postype = p1
bindtime = -1
ontop = 1
ownpal = 1
removeongethit = 1
IgnoreHitPause = 1
Pausemovetime = 999999
supermovetime = 999999

[State -1, 受け止め定義]
type = ReversalDef
triggerall = ((var(59) = 1) && (var(30) != 3)) || ((var(59) = 0) && (power != powermax))
trigger1 = time = [0,6]
reversal.attr = ScA, AA,AP
pausetime = 15,19
sparkno = S7007
sparkxy = 0,0
hitsound = S31,0
p1stateno = 7012
IgnoreHitPause = 1
supermovetime = 999999
pausemovetime = 999999

[State -1, 受け止め定義]
type = ReversalDef
triggerall = ((var(59) = 1) && (var(30) = 3)) || ((var(59) = 0) && (power = powermax))
trigger1 = time = [0,6]
reversal.attr = ScA, AA,AP
pausetime = 0,4
sparkno = S7007
sparkxy = 0,0
hitsound = S31,0
p1stateno = 9500
IgnoreHitPause = 1
supermovetime = 999999
pausemovetime = 999999

[State -1, 受け止め定義]
type = ReversalDef
trigger1 = time > 5
reversal.attr = ScA, AA,AP
pausetime = 15,19
sparkno = S7008
sparkxy = 0,0
hitsound = S31,1
p1stateno = 7013
IgnoreHitPause = 1
supermovetime = 999999
pausemovetime = 999999

[State -1, 食らい上書き]
type = HitOverride
trigger1 = 1
attr = ScA, AA,AP
stateno = 7003
IgnoreHitPause = 1
supermovetime = 999999
pausemovetime = 999999

[State -1, ゲージ減少]
type = PowerAdd
trigger1 = time > 5
value = -5

[state -1, ステート変更]
type = changestate
trigger1 = time > 90
trigger2 = (time = (5,90]) && (command != "holdz")
trigger3 = time > 5
trigger3 = Power = 0
value = 7011

;***********************************

[statedef 7011]
type = u
movetype = u
physics = u
anim = 7011
velset = 0,0
ctrl = 0

[state -1, ステート変更]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;***********************************

[statedef 7012]
type = u
movetype = u
physics = u
anim = 7010
velset = 0,0
ctrl = 0
sprpriority = 1

[state -1, 無敵]
type = NotHitBy
trigger1 = time = 0
value = SCa
time = 4

[state -1, ステート変更]
type = changestate
trigger1 = time = 1
value = 11
ctrl = 1

;***********************************

[statedef 7013]
type = u
movetype = u
physics = u
anim = 7010
velset = 0,0
ctrl = 0
sprpriority = 1

[state -1, ステート変更]
type = changestate
trigger1 = time = 1
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;空シールド
[statedef 7020]
type = a
movetype = i
physics = a
anim = 7020
ctrl = 0

[state -1, 無敵]
type = NotHitBy
trigger1 = 1
value = SCa
time = 1

[state -1, 音を鳴らす]
type = playsnd
trigger1 = time = 1
value = 30, 0

[state -1, エフェクト]
type = explod
trigger1 = time = 0
anim = 7005
id = 7005
pos = 8,-63
postype = p1
bindtime = -1
ontop = 1
ownpal = 1
removeongethit = 1
IgnoreHitPause = 1
Pausemovetime = 999999
supermovetime = 999999

[state -1, エフェクト]
type = explod
trigger1 = time%14 = 0
anim = 7006
id = 7006
pos = 8,-63
postype = p1
bindtime = -1
ontop = 1
ownpal = 1
removeongethit = 1
IgnoreHitPause = 1
Pausemovetime = 999999
supermovetime = 999999

[State -1, 受け止め定義]
type = ReversalDef
trigger1 = time = [0,5]
reversal.attr = ScA, AA,AP
pausetime = 15,19
sparkno = S7007
sparkxy = 0,0
hitsound = S31,0
stateno = 7002
p1stateno = 7022
IgnoreHitPause = 1
supermovetime = 999999
pausemovetime = 999999

[State -1, 受け止め定義]
type = ReversalDef
trigger1 = time > 5
reversal.attr = ScA, AA,AP
pausetime = 15,15
sparkno = S7008
sparkxy = 0,0
hitsound = S31,1
p1stateno = 7023
IgnoreHitPause = 1
supermovetime = 999999
pausemovetime = 999999

[State -1, 食らい上書き]
type = HitOverride
trigger1 = 1
attr = ScA, AA,AP
stateno = 7003
IgnoreHitPause = 1
supermovetime = 999999
pausemovetime = 999999

[State -1, ゲージ減少]
type = PowerAdd
trigger1 = time > 5
value = -5

[state -1, ステート変更]
type = changestate
trigger1 = time > 90
trigger2 = (time = (5,90]) && (command != "holdz")
trigger3 = time > 5
trigger3 = Power = 0
value = 7021

;***********************************

[statedef 7021]
type = u
movetype = u
physics = u
anim = 7021
ctrl = 0

[state -1, ステート]
type = Null
trigger1 = 1

;***********************************

[statedef 7022]
type = u
movetype = u
physics = u
anim = 7020
ctrl = 0
sprpriority = 1

[state -1, 無敵]
type = NotHitBy
trigger1 = time = 0
value = SCa
time = 4

[state -1, ステート]
type = Null
trigger1 = 1

;***********************************

[statedef 7023]
type = u
movetype = u
physics = u
anim = 7020
ctrl = 0
sprpriority = 1

[state -1, ステート]
type = Null
trigger1 = 1

;---------------------------------------------------------------------------
;強制解放（heat）

[statedef 7030]
type = s
movetype = a
physics = s
anim = 7030
velset = 0,0
ctrl = 0

[state -1, リバーサルアタックエフェクト]
type = helper
trigger1 = time = 0
trigger1 = PrevStateNo = 5120
helpertype = normal
name = "myhelper"
id = 6023
pos = const(size.mid.pos.x),const(size.mid.pos.y)
postype = p1
stateno = 6023
ownpal = 1
ignorehitpause = 1
persistent = 0
supermovetime = 99999

[state -1, heat]
type = VarSet
trigger1 = var(30) = 0
var(30) = 2
ignorehitpause = 1

[state -1, 無敵]
type = NotHitBy
trigger1 = 1
value = SCa
time = 1

[state -1, MAXスイッチ]
type = VarSet
triggerall = roundstate = 2
trigger1 = power = powermax
trigger1 = var(30) = 0
var(30) = 2

[state -1, 色変更]
type = PalFX
trigger1 = animelemtime(8) = 0
time = 15
sinadd = 256,256,150,30

[state -1, 音を鳴らす]
type = PlaySnd
trigger1 = animelemtime(8) = 0
value = 21, 0

[state -1, エフェクト]
type = Explod
trigger1 = animelemtime(8) = 0
anim = 7031
ID = 0
pos = 26,-97
postype = p1
scale = 1,1
ontop = 1
ownpal = 1
scale = .5, .5

[state -1, ヒット定義]
type = HitDef
trigger1 = animelemtime(8) = 0
attr = S,NA
hitflag = MAFd
guardflag = 
animtype = hard
air.animtype = Back
priority = 4,Hit
damage = 0
hitsound = S5 ,2
ground.type = High
air.type = low
guard.slidetime = 20
ground.hittime = 20
air.hittime = 20
guard.ctrltime = 20
yaccel = .48
ground.velocity = -8.5, -.1
air.velocity = -8.5, ifelse(var(4) = 1 ,-.1 ,-4.5)
ground.cornerpush.veloff = 0
sprpriority = 1
p2stateno = ifelse(var(4) = 1 ,-1 ,900)
fall = 1
air.fall = 1
fall.yvelocity = -3
fall.recover = 0
air.fall = 1
down.velocity = -3, -.5
down.hittime = 10

[state -1, ステート変更]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;強制解放（blood heat）

[statedef 7031]
type = s
movetype = a
physics = s
anim = 7030
velset = 0,0
ctrl = 0

[state -1, リバーサルアタックエフェクト]
type = helper
trigger1 = time = 0
trigger1 = PrevStateNo = 5120
helpertype = normal
name = "myhelper"
id = 6023
pos = const(size.mid.pos.x),const(size.mid.pos.y)
postype = p1
stateno = 6023
ownpal = 1
ignorehitpause = 1
persistent = 0
supermovetime = 99999

[state -1, blood heat]
type = VarSet
trigger1 = time = 0
var(30) = 3
ignorehitpause = 1

[state -1, 無敵]
type = NotHitBy
trigger1 = 1
value = SCa
time = 1

[state -1, MAXスイッチ]
type = VarSet
triggerall = roundstate = 2
trigger1 = power = powermax
trigger1 = var(30) = 0
var(30) = 2

[state -1, 色変更]
type = PalFX
trigger1 = animelemtime(8) = 0
time = 15
sinadd = 256,256,150,30

[state -1, 音を鳴らす]
type = PlaySnd
trigger1 = animelemtime(8) = 0
value = 21, 0

[state -1, エフェクト]
type = Explod
trigger1 = animelemtime(8) = 0
anim = 7031
ID = 0
pos = 26,-97
postype = p1
scale = 1,1
ontop = 1
ownpal = 1
scale = .5, .5

[state -1, ヒット定義]
type = HitDef
trigger1 = animelemtime(8) = 0
attr = S,NA
hitflag = MAFd
guardflag = 
animtype = hard
air.animtype = Back
priority = 4,Hit
damage = 0
hitsound = S5 ,2
ground.type = High
air.type = low
guard.slidetime = 20
ground.hittime = 20
air.hittime = 20
guard.ctrltime = 20
yaccel = .48
ground.velocity = -8.5, -.1
air.velocity = -8.5, ifelse(var(4) = 1 ,-.1 ,-4.5)
ground.cornerpush.veloff = 0
sprpriority = 1
p2stateno = ifelse(var(4) = 1 ,-1 ,900)
fall = 1
air.fall = 1
fall.yvelocity = -3
fall.recover = 0
air.fall = 1
down.velocity = -3, -.5
down.hittime = 10

[state -1, ステート変更]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;サーキットスパーク

[statedef 7040]
type = s
movetype = a
physics = s
anim = 7040
velset = 0,0
ctrl = 0

[state -1, max／blood heat解除]
type = VarSet
triggerall = var(59) = 1
trigger1 = time = 0
var(30) = 0

[state -2, パワー０（var(59) = 0）]
type = powerset
triggerall = var(59) = 0
trigger1 = time = 0
value = 0

[state -1, 無敵]
type = NotHitBy
trigger1 = 1
value = SCa
time = 1

[state -1, 色変更]
type = PalFX
trigger1 = animelemtime(2) = 0
time = 15
sinadd = 256,256,150,30

[state -1, 音を鳴らす]
type = PlaySnd
trigger1 = animelemtime(8) = 0
value = 21, 0

[state -1, エフェクト]
type = Explod
trigger1 = animelemtime(8) = 0
anim = 7042
ID = 0
pos = 0,0
postype = p1
scale = 1,1
sprpriority = 1
ownpal = 1

[state -1, ヒット定義]
type = HitDef
trigger1 = animelemtime(8) = 0
attr = S,NA
hitflag = MAFd
guardflag = 
animtype = hard
air.animtype = Back
priority = 4,Hit
damage = 0
hitsound = S5 ,2
ground.type = High
air.type = low
guard.slidetime = 20
ground.hittime = 20
air.hittime = 20
guard.ctrltime = 20
yaccel = .48
ground.velocity = -8.5, -.1
air.velocity = -8.5, ifelse(var(4) = 1 ,-.1 ,-4.5)
ground.cornerpush.veloff = 0
sprpriority = 1
p2stateno = ifelse(var(4) = 1 ,-1 ,900)
fall = 1
air.fall = 1
fall.yvelocity = -3
fall.recover = 0
air.fall = 1
down.velocity = -3, -.5
down.hittime = 10
sprpriority = 0

[state -1, ステート変更]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;空中サーキットスパーク

[statedef 7041]
type = a
movetype = a
physics = n
anim = 7041
velset = 0,0
ctrl = 0

[state -1, max／blood heat解除]
type = VarSet
triggerall = var(59) = 1
trigger1 = time = 0
var(30) = 0

[state -2, パワー０（var(59) = 0）]
type = powerset
triggerall = var(59) = 0
trigger1 = time = 0
value = 0

[state -1, 無敵]
type = NotHitBy
trigger1 = 1
value = SCa
time = 1

[state -1, 色変更]
type = PalFX
trigger1 = animelemtime(2) = 0
time = 15
sinadd = 256,256,150,30

[state -1, 音を鳴らす]
type = PlaySnd
trigger1 = animelemtime(8) = 0
value = 21, 0

[state -1, エフェクト]
type = Explod
trigger1 = animelemtime(8) = 0
anim = 7042
ID = 0
pos = 0,0
postype = p1
scale = 1,1
sprpriority = 1
ownpal = 1

[state -1, StateType変更]
type = StateTypeSet
trigger1 = animelemtime(11) = 0
statetype = a
movetype = I
physics = a

[state -1, ヒット定義]
type = HitDef
trigger1 = animelemtime(8) = 0
attr = S,NA
hitflag = MAFd
guardflag = 
animtype = hard
air.animtype = Back
priority = 4,Hit
damage = 0
hitsound = S5 ,2
ground.type = High
air.type = low
guard.slidetime = 20
ground.hittime = 20
air.hittime = 20
guard.ctrltime = 20
yaccel = .48
ground.velocity = -8.5, -.1
air.velocity = -8.5, -.1
ground.cornerpush.veloff = 0
sprpriority = 1
p2stateno = ifelse(var(4) = 1 ,-1 ,900)
fall = 1
air.fall = 1
fall.yvelocity = -3
fall.recover = 0
air.fall = 1
down.velocity = -3, -.5
down.hittime = 10
sprpriority = 0

;---------------------------------------------------------------------------
;シールドバンカー

[statedef 7050]
type = s
movetype = i
physics = s
anim = 7050
velset = 0,0
ctrl = 0

[state -1, リバーサルアタックエフェクト]
type = helper
trigger1 = time = 0
trigger1 = PrevStateNo = 5120
helpertype = normal
name = "myhelper"
id = 6023
pos = const(size.mid.pos.x),const(size.mid.pos.y)
postype = p1
stateno = 6023
ownpal = 1
ignorehitpause = 1
persistent = 0
supermovetime = 99999

[state -1, 無敵]
type = NotHitBy
trigger1 = 1
value = SCa
time = 1

[state -1, 音を鳴らす]
type = playsnd
trigger1 = time = 1
value = 30, 0
IgnoreHitPause = 1

[state -1, エフェクト]
type = explod
trigger1 = time = 0
anim = 7005
id = 7005
pos = 31, -55
postype = p1
bindtime = -1
ontop = 1
ownpal = 1
removeongethit = 1
IgnoreHitPause = 1

[state -1, エフェクト]
type = explod
trigger1 = time = 0
anim = 7006
id = 7006
pos = 31, -55
postype = p1
bindtime = -1
ontop = 1
ownpal = 1
removeongethit = 1
IgnoreHitPause = 1
Pausemovetime = 999999
supermovetime = 999999

[State -1, 受け止め定義]
type = ReversalDef
trigger1 = time = [0,4]
reversal.attr = ScA, AA,AP
pausetime = 15,25
sparkno = S7007
sparkxy = 0,0
hitsound = S31,0
p1stateno = 7051
IgnoreHitPause = 1
supermovetime = 999999
pausemovetime = 999999

[State -1, 食らい上書き]
type = HitOverride
trigger1 = 1
attr = ScA, AA,AP
stateno = 7003
IgnoreHitPause = 1
supermovetime = 999999
pausemovetime = 999999

[state -1, ステート変更]
type = changestate
trigger1 = animtime = 0
value = 7052

;***********************************

[statedef 7051]
type = u
movetype = u
physics = u
velset = 0,0
ctrl = 1
sprpriority = 1

[state -1, 無敵]
type = NotHitBy
trigger1 = 1
value = SCa
time = 1

[state -1, ステート変更]
type = changestate
trigger1 = time = 0
value = 7052

;***********************************

[statedef 7052]
type = u
movetype = a
physics = u
anim = 7051
velset = 0,0
ctrl = 0

[state -1, 攻撃エフェクト]
type = helper
trigger1 = animelemtime(2) = -2
stateno = 226
id = 226
name = "atackeffect"
pos = 0,-63
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
size.xscale = 0.5
size.yscale = 0.5

[state -1, 音を鳴らす]
type = playsnd
trigger1 = animelemtime(2) = 0
value = 0, 2

[state -1, ヒット定義]
type = hitdef
triggerall = var(6) = 0
trigger1  = animelemtime(2) = 0
attr = s,na
guardflag =
animtype = hard
air.animtype = back
priority = 3,hit
damage = 50
pausetime = 10,10
hitsound = s5 ,2
guardsound = s10, 0
ground.type = high
ground.slidetime = 20
guard.slidetime = 20
ground.hittime = 20
air.hittime = 20
guard.ctrltime = 20
yaccel = .48
ground.velocity = -8.5, -.1
air.velocity = ifelse(var(4) = 1 ,-3.5 ,-8.5) ,ifelse(var(4) = 1 ,-2.5 ,-.1)
ground.cornerpush.veloff = -15
p2stateno = 900
fall = 1
fall.yvelocity = -3
fall.recover = 0
air.fall = 1
down.velocity = -3, 0
down.hittime = 10
envshake.time = 10
envshake.freq = 60
envshake.ampl = -7
getpower = 100,100
givepower = 50,50

[state -1, ヒットスパーク]
type = helper
triggerall = numenemy > 0
trigger1 = movehit
stateno = 6002
id = 6002
name = "hit_spark"
pos = enemy,const(size.mid.pos.x),enemy,const(size.mid.pos.y)
postype = p2
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0

[state -1, var(5)ヒット数追加]
type = varadd
trigger1  = movehit = 1
var(5) = 10

[state -1, コントロール変更]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;ガードキャンセルシールドバンカー

[statedef 7060]
type = s
movetype = a
physics = s
anim = 7060
velset = 0,0
ctrl = 0

[state -1, 音を鳴らす]
type = playsnd
trigger1 = time = 0
value = 10, 1

[State -1, 受け止め定義]
type = ReversalDef
trigger1 = time > 0
trigger1 = animelemtime(5) < 0
reversal.attr = ScA, AA,AP
pausetime = 0,20
hitsound = S31, 0
p1stateno = 7051
IgnoreHitPause = 1
supermovetime = 999999
pausemovetime = 999999

[state -1, エフェクト]
type = helper
trigger1 = time = 0
helpertype = normal
name = "ex_whirlwind_spring"
id = 7061
pos = const(size.mid.pos.x), const(size.mid.pos.y)
postype = p1
facing = 1
stateno = 7061
ownpal = 1

[state -1, ゲージ減少]
type = PowerAdd
trigger1 = time = 0
value = -500

[state -1, 無敵]
type = NotHitBy
trigger1 = 1
value = SCa
time = 1

[state -1, 攻撃エフェクト]
type = helper
trigger1 = animelemtime(4) = 0
stateno = 226
id = 226
name = "atackeffect"
pos = 0,-63
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
size.xscale = 0.5
size.yscale = 0.5

[state -1, 音を鳴らす]
type = playsnd
trigger1 = animelemtime(5) = 0
value = 0, 2

[state -1, ヒット定義]
type = hitdef
triggerall = var(6) = 0
trigger1 = animelemtime(5) = 0
attr = s,na
guardflag =
animtype = hard
air.animtype = back
priority = 3,hit
damage = 50
pausetime = 10,10
hitsound = s5 ,2
guardsound = s10, 0
ground.type = high
ground.slidetime = 20
guard.slidetime = 20
ground.hittime = 20
air.hittime = 20
guard.ctrltime = 20
yaccel = .48
ground.velocity = -8.5, -.1
air.velocity = ifelse(var(4) = 1 ,-3.5 ,-8.5) ,ifelse(var(4) = 1 ,-2.5 ,-.1)
ground.cornerpush.veloff = -15
p2stateno = 900
fall = 1
fall.yvelocity = -3
fall.recover = 0
air.fall = 1
down.velocity = -3, 0
down.hittime = 10
envshake.time = 10
envshake.freq = 60
envshake.ampl = -7

[state -1, ヒットスパーク]
type = helper
triggerall = numenemy > 0
trigger1 = movehit
stateno = 6002
id = 6002
name = "hit_spark"
pos = enemy,const(size.mid.pos.x),enemy,const(size.mid.pos.y)
postype = p2
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0

[state -1, var(5)ヒット数追加]
type = varadd
trigger1  = movehit = 1
var(5) = 10

[state -1, ステート変更]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;***********************************
[statedef 7061] 
type = s        
movetype = i
physics = n
anim = 7061
sprpriority = 1

[state -1, 影の消去]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[state -1, 無敵]
type = nothitby
trigger1 = 1
value = sca
time = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[state -1, 食らい上書き]
type = hitoverride
trigger1 = 1
attr = sca,na,sa,ha,np,sp,hp,nt,st,aa,at,ap
stateno = 999
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[state -1, var(0)設定]
type = varset
trigger1 = time = 0
var(0) = 256

[state -1, var(0)減少]
type = varadd
trigger1 = time > 3
trigger1 = var(0) > 0
var(0) = -16

[state -1, 透過処理]
type = trans
trigger1 = 1
trans = addalpha
alpha = var(0),256

[state -1, fvar(0)設定]
type = varset
trigger1 = time = 0
fvar(0) = .4

[state -1, fvar(0)増加]
type = varadd
trigger1 = 1
fvar(0) = .15

[state -1, サイズ変更]
type = angledraw
trigger1 = 1
scale = fvar(0),fvar(0)

[state -1, 角度設定]
type = angleadd
trigger1 = 1
value = 30

[state -1, ヘルパー消去]
type = destroyself
trigger1 = var(0) <= 0

;---------------------------------------------------------------------------
;回避

[statedef 7070]
type = s
movetype = i
physics = s
anim = 7070
velset = 0,0
ctrl = 0

[state -1, リバーサルアタックエフェクト]
type = helper
trigger1 = time = 0
trigger1 = PrevStateNo = 5120
helpertype = normal
name = "myhelper"
id = 6023
pos = const(size.mid.pos.x),const(size.mid.pos.y)
postype = p1
stateno = 6023
ownpal = 1
ignorehitpause = 1
persistent = 0
supermovetime = 99999

[state -1, 無敵]
type = NotHitBy
trigger1 = 1
value = SCa
time = 1

[state -1, パレット操作]
type = PalFX
trigger1 = time = 0
time = 21
sinadd = 150,150,150,42

[state -1, ステート変更]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;空中回避

[statedef 7080]
type = a
movetype = i
physics = n
anim = 7080
velset = 0,0
ctrl = 0

[state -1, 無敵]
type = NotHitBy
trigger1 = time = 0
value = SCa
time = 20
[state -1, パレット操作]
type = PalFX
trigger1 = time = 0
time = 21
sinadd = 150,150,150,42

[state -1, StateType変更]
type = StateTypeSet
trigger1 = animelemtime(6) = 0
statetype = a
movetype = I
physics = a

[state -1, ステート変更]
type = CtrlSet
trigger1 = animelemtime(6) = 0
value = 1