
;---------------------------------------------------------------------------
;奇跡の詩
[Statedef 4500]
type = A
movetype = A
physics = N
sprpriority = 2
ctrl = 0

[State 4500, 0]
type = ChangeAnim
triggerall = PrevStateno != 5
trigger1 = time = 0
value = 4500

[State 4500, 1]
type = VelSet
triggerall = PrevStateno != 5
trigger1 = time = 0
x = 0
y = 0

[State 4500, 2]
type = PowerAdd
triggerall = PrevStateno != 5
triggerall = PalNo <= 10
trigger1 = time = 10
value = -3000

[State 4500, 3]
type = SuperPause
triggerall = PrevStateno != 5
trigger1 = time = 10
time = 50
anim = -1
sound = -1
pos = 0,0
movetime = 1
darken = 0

[State 4500, 4]
type = BGPalFX
triggerall = PrevStateno != 5
trigger1 = time = 10
time = 50
add = 0,0,0
mul = 0,0,0
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 4500, 5]
type = Explod
triggerall = PrevStateno != 5
trigger1 = time = 10
anim = 8200
ID = 8200
sprpriority = 3
postype = p1
pos = 0,Const(size.mid.pos.y)
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State 4500, 6]
type = Explod
triggerall = PrevStateno != 5
trigger1 = time = 10
anim = 8300
ID = 8300
sprpriority = 3
postype = p1
pos = 0,Const(size.mid.pos.y)
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State 4500, 7]
type = PlaySnd
triggerall = PrevStateno != 5
trigger1 = time = 10
value = S5,2
channel = 7

[State 4500, 8]
type = PlaySnd
triggerall = PrevStateno != 5
trigger1 = time = 10
value = S5,3
channel = 9

[State 4500, 9]
type = BGPalFX
triggerall = PrevStateno != 5
trigger1 = time >= 12
trigger1 = Anim = 4500
trigger1 = NumExplod(13000) = 0
time = 15
add = 0,0,0
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 1
color = 256

[State 4500, 10]
type = VelSet
trigger1 = time = 12
y = -0.1

[State 4500, 11]
type = Explod
triggerall = PrevStateno != 5
trigger1 = Anim = 4500
trigger1 = Animelem = 6
anim = 4600
ID = 4600
sprpriority = 1
postype = p1
pos = 0,Const(size.mid.pos.y)+10
ownpal = 1
bindtime = -1
removetime = -1
removeongethit = 1
ignorehitpause = 1

[State 4500, 12]
type = Explod
triggerall = PrevStateno != 5
trigger1 = Anim = 4500
trigger1 = Animelem = 6
anim = 4700
ID = 4700
sprpriority = 3
postype = p1
pos = 0,Const(size.mid.pos.y)
ontop = 1
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 4500, 13]
type = PlaySnd
trigger1 = Anim = 4500
trigger1 = Animelem = 6
value = S7,0
channel = 1

[State 4500, 14]
type = PlaySnd
trigger1 = Anim = 4500
trigger1 = Animelem = 6
value = S7,1
channel = 5

[State 4500, 15]
type = PlaySnd
trigger1 = Anim = 4500
trigger1 = Animelem = 6
value = S12,0
channel = 8

[State 4500, 16]
type = Hitdef
trigger1 = Anim = 4500
trigger1 = Animelem = 8
attr = A,HP
damage = 100,25
animtype = hard
hitflag = MAF
guardflag = M
priority = 5,Hit
pausetime = 0,6
guard.pausetime = 0,6
sparkno = s6600
guard.sparkno = s7100
sparkxy = -10,Const(size.mid.pos.y)
hitsound = -1
guardsound = -1
ground.type = High
ground.slidetime = 22
ground.hittime = 27
guard.slidetime = 18
guard.hittime = 21
ground.velocity = 0,-7.9
guard.velocity = -2.2
air.velocity = 0,-7.7
airguard.velocity = 0,0
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = ceil(83*Fvar(0))
getpower = 0,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.kill = 0

[State 4500, 17]
type = AssertSpecial
trigger1 = time >= 10
trigger1 = Anim = 4500
flag = noFG

[State 4500, 18]
type = Helper
triggerall = Anim = 4500
triggerall = Gametime%3 = 0
trigger1 = Animelemtime(13) >= 0
trigger2 = Animelemtime(14) >= 0
trigger3 = Animelemtime(15) >= 0
trigger4 = Animelemtime(16) >= 0
trigger5 = Animelemtime(17) >= 0
helpertype = normal
name = "feather"
ID = 4600
stateno = 4600
pos = -300,Var(3)
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 4500, 19]
type = Helper
triggerall = Anim = 4500
triggerall = Gametime%3 = 1
trigger1 = Animelemtime(13) >= 0
trigger2 = Animelemtime(14) >= 0
trigger3 = Animelemtime(15) >= 0
trigger4 = Animelemtime(16) >= 0
trigger5 = Animelemtime(17) >= 0
helpertype = normal
name = "feather"
ID = 4700
stateno = 4700
pos = -300,Var(3)
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 4500, 20]
type = VarRandom
trigger1 = 1
v = 3
range = -100,100

[State 4500, 21]
type = ChangeAnim
trigger1 = Anim = 4500
trigger1 = time >= 313
value = 4550

[State 4500, 22]
type = Explod
trigger1 = Anim = 4550
trigger1 = Animelem = 1
anim = 4700
ID = 4700
sprpriority = 3
postype = p1
pos = 0,Const(size.mid.pos.y)
ontop = 1
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 0

[State 4500, 23]
type = PlaySnd
trigger1 = Anim = 4550
trigger1 = Animelem = 1
value = S7,0
channel = 10
persistent = 0

[State 4500, 24]
type = Hitdef
trigger1 = Anim = 4550
trigger1 = Animelem = 1
attr = A,HP
damage = 100,25
animtype = hard
hitflag = MAF
guardflag = M
priority = 5,Hit
pausetime = 0,6
guard.pausetime = 0,6
sparkno = s6600
guard.sparkno = s7100
sparkxy = -10,Const(size.mid.pos.y)
hitsound = -1
guardsound = -1
ground.type = High
ground.slidetime = 22
ground.hittime = 27
guard.slidetime = 18
guard.hittime = 21
ground.velocity = 0,-7.9
guard.velocity = -2.2
air.velocity = 0,-7.7
airguard.velocity = 0,0
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = ceil(83*Fvar(0))
getpower = 0,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.kill = 0
persistent = 0

[State 4500, 25]
type = PlaySnd
trigger1 = MoveHit
value = S4,0
channel = 4
ignorehitpause = 1

[State 4500, 26]
type = PlaySnd
trigger1 = MoveGuarded
value = S3,2
channel = 4
ignorehitpause = 1

[State 4500, 27]
type = VarSet
trigger1 = MoveHit
fv = 0
value = Fvar(0)-(Fvar(0)*0.01)
ignorehitpause = 1

[State 4500, 28]
type = TargetState
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Target,isHelper = 0
trigger1 = Target,stateno != [120,155]
value = 4218

[State 4500, 29]
type = MoveHitReset
trigger1 = MoveContact
ignorehitpause = 1

[State 4550, 30]
type = RemoveExplod
trigger1 = NumExplod(4600) > 0
trigger1 = time >= 313
ID = 4600

[State 4500, 31]
type = VelAdd
trigger1 = Anim = 4550
y = Const(movement.yaccel)

[State 4500, 32]
type = CtrlSet
trigger1 = Anim = 4550
value = 1

[State 4500, 33]
type = ChangeState
trigger1 = Anim = 4550
trigger1 = Pos Y >= 0
value = 52

[State -1, NotHitBy]
type = NotHitBy
trigger1 = Anim = 4500
value = SCA
time = 2

;---------------------------------------------------------------------------
;飛び散る羽(大)
[Statedef 4600]
type = A
movetype = A
physics = N
ctrl = 0
anim = 4800

[State 4600, 0]
type = HitOverRide
trigger1 = 1
time = -1
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
stateno = 0
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State 4600, 1]
type = VelSet
trigger1 = 1
x = 10
y = Var(1)

[State 4600, 2]
type = VarRandom
trigger1 = Var(1) = 0
v = 1
range = -5,5

[State 4600, 3]
type = Hitdef
trigger1 = time = 0
attr = A,HP
damage = ceil(40*Parent,Fvar(0)),5
animtype = Hard
hitflag = MAF
guardflag = MA
priority = 4,Hit
pausetime = 0,3
guard.pausetime = 0,3
sparkno = s6600
guard.sparkno = s7100
sparkxy = -10,-10
hitsound = -1
guardsound = -1
ground.type = High
ground.slidetime = 14
ground.hittime = 26
guard.slidetime = 12
guard.hittime = 19
ground.velocity = -1.8,-4.4
guard.velocity = -2.6
air.velocity = -1.8,-4.8
airguard.velocity = -2.7,-5.6
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = ceil(40*Parent,Fvar(0))
getpower = 0,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.kill = 0
p2facing = 1

[State 4600, 4]
type = ParentVarSet
trigger1 = MoveHit
fv = 0
value = Parent,Fvar(0)-(Parent,Fvar(0)*0.07)

[State 4600, 5]
type = ParentVarSet
trigger1 = MoveHit
var(16) = 10

[State 4600, 6]
type = ParentVarSet
trigger1 = MoveGuarded
var(16) = 10000

[State 4600, 7]
type = TargetState
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Target,isHelper = 0
trigger1 = Target,stateno != [120,155]
value = 4712

[State 4600, 8]
type = Helper
trigger1 = NumHelper(4800) = 0
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Target,isHelper = 0
trigger1 = Target,stateno != [120,155]
helpertype = normal
name = "HitCount"
ID = 4800
stateno = 4800
pos = 0,0
postype = p2
facing = -1
keyctrl = 0
ownpal = 1

[State 4600, 9]
type = MoveHitReset
trigger1 = MoveContact

[State 4600, 10]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 4600, 11]
type = DestroySelf
trigger1 = time >= 100
trigger2 = FrontEdgeBodyDist <= -50

;---------------------------------------------------------------------------
;飛び散る羽(小)
[Statedef 4700]
type = A
movetype = A
physics = N
ctrl = 0
anim = 4900

[State 4700, 0]
type = HitOverRide
trigger1 = 1
time = -1
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
stateno = 0
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State 4700, 1]
type = VelSet
trigger1 = 1
x = 10
y = Var(1)

[State 4700, 2]
type = VarRandom
trigger1 = Var(1) = 0
v = 1
range = -5,5

[State 4700, 3]
type = Hitdef
trigger1 = time = 0
attr = A,HP
damage = ceil(40*Parent,Fvar(0)),5
animtype = Hard
hitflag = MAF
guardflag = MA
priority = 4,Hit
pausetime = 0,3
guard.pausetime = 0,3
sparkno = s6600
guard.sparkno = s7100
sparkxy = -10,-10
hitsound = -1
guardsound = -1
ground.type = High
ground.slidetime = 14
ground.hittime = 26
guard.slidetime = 12
guard.hittime = 19
ground.velocity = -1.8,-4.4
guard.velocity = -2.6
air.velocity = -1.8,-4.8
airguard.velocity = -2.7,-5.6
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = ceil(40*Parent,Fvar(0))
getpower = 0,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.kill = 0
p2facing = 1

[State 4700, 4]
type = ParentVarSet
trigger1 = MoveHit
fv = 0
value = Parent,Fvar(0)-(Parent,Fvar(0)*0.07)

[State 4700, 5]
type = ParentVarSet
trigger1 = MoveHit
var(16) = 10

[State 4700, 6]
type = ParentVarSet
trigger1 = MoveGuarded
var(16) = 10000

[State 4700, 7]
type = TargetState
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Target,isHelper = 0
trigger1 = Target,stateno != [120,155]
value = 4712

[State 4700, 8]
type = Helper
trigger1 = NumHelper(4800) = 0
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Target,isHelper = 0
trigger1 = Target,stateno != [120,155]
helpertype = normal
name = "HitCount"
ID = 4800
stateno = 4800
pos = 0,0
postype = p2
facing = -1
keyctrl = 0
ownpal = 1

[State 4700, 9]
type = MoveHitReset
trigger1 = MoveContact

[State 4700, 10]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 4700, 11]
type = DestroySelf
trigger1 = time >= 100
trigger2 = FrontEdgeBodyDist <= -50

;---------------------------------------------------------------------------
;電撃やられ
[Statedef 4712]
type = A
movetype = H
physics = N
ctrl = 0

[State 4712, 0]
type = ChangeAnim
triggerall = time = 0
trigger1 = name = "Ayu Tukimiya" && Authorname = "shikkoku"
trigger2 = name = "Reimu_Hakurei" && Authorname = "Nachel"
trigger3 = name = "Sayuri Kurata" && Authorname = "586"
trigger4 = name = "Nayuki Minase" && Authorname = "586"
value = 5056

[State 4712, 0]
type = ChangeAnim
trigger1 = name = "Kaori Misaka" && Authorname = "rouge noir"
trigger2 = name = "Kaori Misaka" && Authorname = "rouge noir(+Rekku)"
trigger3 = name = "Kaori Kamisaka" && Authorname = "rouge noir(+Rekku)"
value = 5057

[State 4712, 0]
type = ChangeAnim
triggerall = time = 0
trigger1 = name = "Mayu Shiina" && Authorname = "BF"
trigger2 = name = "Makoto Sawatari" && Authorname = "BF"
value = 9010

[State 4712, 0]
type = ChangeAnim
triggerall = time = 0
trigger1 = name = "D-Mai_Kawasumi_by_Nachel" && Authorname = "Nachel"
value = 4900

[State 4712, 0]
type = ChangeAnim
triggerall = time = 0
trigger1 = name = "Nayuki Minase" && authorname = "EL"
trigger2 = name = "Makoto Sawatari" && authorname = "EL"
value = 3590

[State 4712, 0]
type = ChangeAnim2
trigger1 = Anim != 3590
trigger1 = Anim != 4900
trigger1 = Anim != 5056
trigger1 = Anim != 5057
trigger1 = Anim != 9010
trigger1 = time <= 40
value = 5700

[State 4712, 1]
type = VelSet
trigger1 = time < 40
x = -1.4
y = -1.8

[State 4712, 2]
type = VelSet
trigger1 = time = 40
y = -3.9

[State 4712, 3]
type = VelAdd
trigger1 = time > 40
y = Const(movement.yaccel)

[State 4712, 4]
type = PalFX
trigger1 = Anim = 5700
trigger1 = time < 40
time = 1
add = 200,200,0
mul = 256,256,256
sinadd = 200,200,0,1
invertall = 0
color = 256

[State 4712, 5]
type = ChangeAnim2
trigger1 = time > 40
trigger1 = Anim != 5670
value = 5670

[State 4712, 6]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0

[State 4712, 7]
type = SelfState
trigger1 = time > 40
trigger1 = Pos Y >= 0
value = 5100

;---------------------------------------------------------------------------
;ヒットカウンター
[Statedef 4800]
type = A
movetype = A
physics = N
ctrl = 0
anim = 4950

[State 4800, 0]
type = HitOverRide
trigger1 = 1
time = -1
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
stateno = 0
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State 4800, 1]
type = Hitdef
trigger1 = time = 0
attr = A,HP
damage = 0,0
animtype = Hard
hitflag = MAF
priority = 4,Hit
pausetime = 0,3
guard.pausetime = 0,3
sparkno = -1
guard.sparkno = -1
sparkxy = -10,-10
hitsound = -1
guardsound = -1
ground.type = High
ground.slidetime = 14
ground.hittime = 26
guard.slidetime = 12
guard.hittime = 19
ground.velocity = -1.8,-4.4
guard.velocity = -2.6
air.velocity = -1.8,-4.8
airguard.velocity = -2.7,-5.6
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = ceil(40*Parent,Fvar(0))
getpower = 0,0
givepower = 0,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.kill = 0
numhits = 0
persistent = 0

[State 4800, 2]
type = AssertSpecial
trigger1 = 1
flag = noshadow
flag2 = invisible

[State 4800, 3]
type = TargetState
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Target,isHelper = 0
trigger1 = Target,stateno != [120,155]
value = 4712

[State 4800, 4]
type = MoveHitReset
trigger1 = MoveContact

[State 4800, 5]
type = DestroySelf
trigger1 = P2Movetype != H
trigger2 = P2Stateno = 5150
