
;------------------------------------------------------------------
;鳥を落とす(開始)
[Statedef 1000]
type = S
movetype = I
physics = S
;anim = 1000
velset = 0,0
ctrl = 0

[State var]
type = varset
trigger1 = time = 0
var(3) = 0
[State var]
type = varset
trigger1 = command = "b" && time = 0
var(3) = 1
[State var]
type = varset
trigger1 = command = "c" && time = 0
var(3) = 2

[State anim]
type = ChangeAnim
trigger1 = time = 0
value = ifelse(var(3)>=1,ifelse(var(3)=2,1020,1010),1000)+var(10)*10000

[State super effect]
type = Helper
trigger1 = var(3) = 2 && animelem = 1
name = "super"
stateno = 4500
pos = 2,-92
ownpal = 1
supermovetime = 78
[State super effect]
type = SuperPause
trigger1 = var(3) = 2 && animelem = 1
time = 52
movetime = 52
anim = -1
sound = s4500
darken = 0
poweradd = -1000
[State pal]
type = BGPalFX
trigger1 = var(3) = 2 && animelem = 1
time = 52
sinadd = -128,-128,-64,104
ignorehitpause = 1

[State hit]
type = NotHitBy
trigger1 = var(3) = 2 && animelem = 1,[0,52]
value = SCA

[State 1000]
type = PlaySnd
trigger1 = var(3) = 2 && animelem = 1
trigger1 = var(10) = 0 && fvar(10) = [0,1]
value = 5120,3
channel = 0
[State 1000]
type = PlaySnd
trigger1 = var(3) = 2 && animelem = 1
trigger1 = var(10) = 1 || fvar(10) = [2,3]
value = 1020,10
channel = 0

[State 1000]
type = ChangeState
triggerall = animelem = 4,>= 5
trigger1 = var(3) = 0 && command != "hold_a"
trigger2 = var(3) = 1 && command != "hold_b"
trigger3 = var(3) = 2 && command != "hold_c"
trigger4 = animelem = 4,10
value = 1001

;鳥を落とす(攻撃)
[Statedef 1001]
type = S
movetype = I
physics = S
anim = ifelse(var(3)>=1,ifelse(var(3)=2,1021,1011),1001)+var(10)*10000
velset = 0,0
ctrl = 0

[State 1001]
type = PlaySnd
trigger1 = var(3) < 2 && animelem = 1
value = 1001,ifelse(var(10)=1||fvar(10)>=2,10,0)
channel = 0

[State var]
type = VarRandom
trigger1 = 1
v = 2
range = 0,4

[State proj]
type = Projectile
trigger1 = animelem = 1
trigger2 = var(3) = 2
trigger2 = time = [3,50]
trigger2 = timemod = 6,0
projID = ifelse(var(3)=2,1042,1040)
projanim = 1040+var(2)
projremove = 0
projremovetime = 44
projhits = 3
projmisstime = 4
offset = 55,0
velocity = 0,0
attr = A,SP
hitflag = MAFP
guardflag = MA
animtype = hard
damage = ifelse(var(3)=2,5,20),ifelse(var(3)=2,2,8)
pausetime = 0,ifelse(var(3)=2,6,3)
sparkno = 2
guard.sparkno = 42
sparkxy = -50+floor(p2dist x),-ifelse(var(2)>=1,ifelse(var(2)>=2,ifelse(var(2)>=3,ifelse(var(2)>=4,65,85),15),45),70)
hitsound = sifelse(var(10)=1||fvar(10)=4,4210,4200),0
guardsound = s4400,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -ifelse(var(3)=2,8,6)
air.velocity = -2,-1
ID = ifelse(var(10)=1||fvar(10)=4,4210,4200)
palfx.time = 24
palfx.add = ifelse(var(10)=1||fvar(10)=4,-50,150),-30,ifelse(var(10)=1||fvar(10)=4,100,-50)
palfx.mul = ifelse(var(10)=1||fvar(10)=4,90,240),210,ifelse(var(10)=1||fvar(10)=4,160,90)
palfx.sinadd = -20,-20,-20,48
palfx.color = 0
palfx.invertall = 1
envshake.time = 4
envshake.ampl = -2

[State 1001]
type = ChangeState
trigger1 = var(3) < 2 && animtime = 0
trigger2 = var(3) = 2 && time = 68
value = 1002

;鳥を落とす(終了)
[Statedef 1002]
type = S
movetype = I
physics = S
anim = ifelse(var(3)>=1,ifelse(var(3)=2,1022,1012),1002)+var(10)*10000
velset = 0,0
ctrl = 0

[State end]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;------------------------------------------------------------------
;鳥を落とす(空中・開始)
[Statedef 1050]
type = A
movetype = I
physics = N
ctrl = 0

[State var]
type = varset
trigger1 = time = 0
var(3) = 0
[State var]
type = varset
trigger1 = command = "b" && time = 0
var(3) = 1
[State var]
type = varset
trigger1 = command = "c" && time = 0
var(3) = 2

[State anim]
type = ChangeAnim
trigger1 = time = 0
value = ifelse(var(3)>=1,ifelse(var(3)=2,1070,1060),1050)+var(10)*10000

[State pos]
type = PosFreeze
trigger1 = var(3) = 2 && animelem = 4,< 0

[State super effect]
type = Helper
trigger1 = var(3) = 2 && animelem = 1
name = "super"
stateno = 4500
pos = 2,-92
ownpal = 1
supermovetime = 78
[State super effect]
type = SuperPause
trigger1 = var(3) = 2 && animelem = 1
time = 52
movetime = 52
anim = -1
sound = s4500
darken = 0
poweradd = -1000
[State pal]
type = BGPalFX
trigger1 = var(3) = 2 && animelem = 1
time = 52
sinadd = -128,-128,-64,104
ignorehitpause = 1

[State hit]
type = NotHitBy
trigger1 = var(3) = 2 && animelem = 1,[0,52]
value = SCA

[State vel]
type = velset
trigger1 =(var(3) = [0,1])&& animelem = 1
x = ifelse(var(3)=1,-1.4,ifelse(vel x <0,-1,1))
y = -ifelse(var(3)=1,5,4)
[State vel]
type = velset
trigger1 = var(3) = 2 && animelem = 4
x = 0
y = -5

[State vel]
type = veladd
trigger1 = 1
y = .35

[State 1050]
type = PlaySnd
trigger1 = var(3) = 2 && animelem = 1
value = 1020,ifelse(var(10)=1||fvar(10)>=2,10,0)
channel = 0

[State 1050]
type = ChangeState
trigger1 = animtime = 0
value = 1051

;鳥を落とす(空中・攻撃)
[Statedef 1051]
type = A
movetype = I
physics = N
anim = ifelse(var(3)>=1,ifelse(var(3)=2,1071,1061),1051)+var(10)*10000
ctrl = 0

[State 1051]
type = PlaySnd
trigger1 = var(3) < 2 && animelem = 1
value = 1001,ifelse(var(10)=1||fvar(10)>=2,10,0)
channel = 0

[State vel]
type = veladd
trigger1 = 1
y = ifelse(var(3)=2,.25,.35)

[State var]
type = VarRandom
trigger1 = 1
v = 2
range = 0,4

[State proj]
type = Projectile
trigger1 = animelem = 1
trigger2 = var(3) = 2
trigger2 = animelem = 1,>= 3
trigger2 = timemod = 3,0
projID = ifelse(var(3)=2,1042,1040)
projanim = 1090+var(2)
projremove = 0
projremovetime = 44
projhits = ifelse(var(10)=1||fvar(10)>=2,3,1)
projmisstime = 4
offset = 10,80
velocity = 0,0
attr = A,SP
hitflag = MAFDP
guardflag = MA
animtype = hard
damage = ifelse(var(3)=2,15,60)/ifelse(var(10)=1||fvar(10)>=2,3,1),ifelse(var(3)=2,8,24)
pausetime = 0,ifelse(var(3)=2,6,3)
sparkno = 2
guard.sparkno = 42
sparkxy = -10+floor(p2dist x),-ifelse(var(2)>=1,ifelse(var(2)>=2,ifelse(var(2)>=3,ifelse(var(2)>=4,90,110),50),70),85)
hitsound = sifelse(var(10)=1||fvar(10)=4,4210,4200),0
guardsound = s4400,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -ifelse(var(3)=2,8,6)
air.velocity = -2,-1
down.velocity = -2,-3
ID = ifelse(var(10)=1||fvar(10)=4,4210,4200)
palfx.time = 24
palfx.add = ifelse(var(10)=1||fvar(10)=4,-50,150),-30,ifelse(var(10)=1||fvar(10)=4,100,-50)
palfx.mul = ifelse(var(10)=1||fvar(10)=4,90,240),210,ifelse(var(10)=1||fvar(10)=4,160,90)
palfx.sinadd = -20,-20,-20,48
palfx.color = 0
palfx.invertall = 1
envshake.time = 4
envshake.ampl = -2

[State 1051]
type = ChangeState
trigger1 = var(3) < 2 && animtime = 0
trigger2 = var(3) = 2 && time = 26
value = 1052

[State land]
type = ChangeState
trigger1 = pos y >= 10 && vel y > 0
value = 52

;鳥を落とす(空中・終了)
[Statedef 1052]
type = A
movetype = I
physics = A
anim = 1052+var(10)*10000
ctrl = 1

[State land]
type = ChangeState
trigger1 = pos y >= 0 && vel y > 0
value = 52

;------------------------------------------------------------------
;獣を焦がす(開始)
[Statedef 1100]
type = S
movetype = I
physics = S
velset = 0,0
ctrl = 0

[State var]
type = varset
trigger1 = time = 0
var(3) = 0
[State var]
type = varset
trigger1 = command = "b" && time = 0
var(3) = 1
[State var]
type = varset
trigger1 = command = "c" && time = 0
var(3) = 2

[State anim]
type = ChangeAnim
trigger1 = time = 0
value = ifelse(var(3)>=1,ifelse(var(3)=2,1020,1010),1000)+var(10)*10000

[State super effect]
type = Helper
trigger1 = var(3) = 2 && animelem = 1
name = "super"
stateno = 4500
pos = 2,-92
ownpal = 1
supermovetime = 78
[State super effect]
type = SuperPause
trigger1 = var(3) = 2 && animelem = 1
time = 52
movetime = 52
anim = -1
sound = s4500
darken = 0
poweradd = -1000
[State pal]
type = BGPalFX
trigger1 = var(3) = 2 && animelem = 1
time = 52
sinadd = -128,-128,-64,104
ignorehitpause = 1

[State hit]
type = NotHitBy
trigger1 = var(3) = 2 && animelem = 1,[0,52]
value = SCA

[State 1100]
type = PlaySnd
trigger1 = var(3) = 2 && animelem = 1
value = 1120,ifelse(var(10)=1||fvar(10)>=2,10,0)

[State 1100]
type = ChangeState
trigger1 = var(3) = 0 && animelem = 4,3
trigger2 = var(3) = 1 && animelem = 4,4
trigger3 = var(3) = 2 && animelem = 4,5
value = 1101

;------------------------------------------------------------------
;獣を焦がす(空中・開始)
[Statedef 1150]
type = A
movetype = I
physics = N
ctrl = 0

[State var]
type = varset
trigger1 = time = 0
var(3) = 0
[State var]
type = varset
trigger1 = command = "b" && time = 0
var(3) = 1
[State var]
type = varset
trigger1 = command = "c" && time = 0
var(3) = 2

[State anim]
type = ChangeAnim
trigger1 = time = 0
value = ifelse(var(3)=2,1070,1050)+var(10)*10000

[State pos]
type = PosFreeze
trigger1 = var(3) >= 1

[State super effect]
type = Helper
trigger1 = var(3) = 2 && animelem = 1
name = "super"
stateno = 4500
pos = 2,-92
ownpal = 1
supermovetime = 78
[State super effect]
type = SuperPause
trigger1 = var(3) = 2 && animelem = 1
time = 52
movetime = 52
anim = -1
sound = s4500
darken = 0
poweradd = -1000
[State pal]
type = BGPalFX
trigger1 = var(3) = 2 && animelem = 1
time = 52
sinadd = -128,-128,-64,104
ignorehitpause = 1

[State hit]
type = NotHitBy
trigger1 = var(3) = 2 && animelem = 1,[0,52]
value = SCA

[State vel]
type = velset
trigger1 = var(3) = 0 && animelem = 1
x = ifelse(vel x <0,-1,1)
[State vel]
type = velset
trigger1 = var(3) >= 1 && animelem = 4
x = ifelse(var(3)=2,0,-2)

[State vel]
type = veladd
trigger1 = 1
y = .35

[State 1150]
type = PlaySnd
trigger1 = var(3) = 2 && animelem = 1
value = 1120,ifelse(var(10)=1||fvar(10)>=2,10,0)
channel = 0

[State 1150]
type = ChangeState
trigger1 = pos y >= 0 && vel y > 0
trigger2 = animtime = 0
value = 1101

;獣を焦がす(攻撃)
[Statedef 1101]
type = A
movetype = I
physics = N
anim = 1101+var(10)*10000
velset = -ifelse((prevstateno=1100&&var(3)>=1),1.8,1.2),-ifelse(var(3)>=1,5,4)
ctrl = 0

[State vel]
type = velset
trigger1 = var(3) >= 1
trigger1 = prevstateno = 1150 && animelem = 1
x = -1.4

[State 1101]
type = PlaySnd
trigger1 = var(3) < 2 && animelem = 1
value = 1101,ifelse(var(10)=1||fvar(10)>=2,10,0)
channel = 0

[State helper]
type = Helper
trigger1 = numhelper(1140) = 0
trigger1 = animelem = 1
helpertype = normal
name = "blaze"
stateno = 1140
ID = 1140
pos = ifelse(var(3)=1,floor(p2dist x),0),0
postype = p1
keyctrl = 1
ownpal = 1
ignorehitpause = 1

[State vel]
type = veladd
trigger1 = 1
y = .35

[State land]
type = ChangeState
trigger1 = pos y >= 0 && vel y > 0
value = 1102

;獣を焦がす(着地)
[Statedef 1102]
type = S
movetype = I
physics = S
anim = 1102+var(10)*10000
velset = 0,0
ctrl = 0

[State pos]
type = posset
trigger1 = time = 0
y = 0

[State snd]
type = PlaySnd
trigger1 = time = 1
value = 52,0

[State end]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;獣を焦がす(発動)
[Statedef 1130]
type = S
movetype = I
physics = S
anim = 1130+var(10)*10000
velset = 0,0
ctrl = 0

[State 1130]
type = PlaySnd
trigger1 = var(10) = 1 || fvar(10) = [2,3]
trigger1 = helper(1140),var(3) < 2
trigger1 = animelem = 5
value = 5200,11
[State 1130]
type = PlaySnd
trigger1 = var(10) = 1 || fvar(10) = [2,3]
trigger1 = helper(1140),var(3) = 2
trigger1 = animelem = 5
value = 901,12

[State 1130]
type = ChangeState
trigger1 = time = 42
value = 1131

;獣を焦がす(発動・終了)
[Statedef 1131]
type = S
movetype = I
physics = S
anim = 1131+var(10)*10000
velset = 0,0
ctrl = 0

[State end]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;獣を焦がす(発射体)
[Statedef 1140]
type = S
movetype = I
physics = S
anim = 1140
velset = 0,0
ctrl = 0
sprpriority = 2

[State pos]
type = posset
trigger1 = 1
y = 0

[State 1140]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State var]
type = varset
trigger1 = parent,var(3) = 0 && time = 0
var(3) = 0
[State var]
type = varset
trigger1 = parent,var(3) = 1 && time = 0
var(3) = 1
[State var]
type = varset
trigger1 = parent,var(3) = 2 && time = 0
var(3) = 2

[State 1140]
type = Explod
trigger1 = time = 0
anim = 1140
ID = 1140
bindtime = -1
removetime = -1
scale = ifelse(var(3)=2,1,.8),ifelse(var(3)=2,.8,.6)
sprpriority = 2

[State 1140]
type = ChangeState
trigger1 = parent,stateno = 1130 && parent,animelem = 6
value = 1141

[State 1140]
type = ChangeState
trigger1 = time = 490
trigger2 = roundstate = 4
value = 1142

;獣を焦がす(発射体・攻撃)
[Statedef 1141]
type = S
movetype = A
physics = S
anim = ifelse(var(3)=2,1142,1141)
velset = 0,0
ctrl = 0
sprpriority = 2

[State 1141]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State explod]
type = RemoveExplod
trigger1 = time = 0
ID = 1140

[State 1141]
type = Explod
trigger1 = time = 0
anim = 1141
ID = 1140
bindtime = -1
removetime = -1
scale = ifelse(var(3)=2,1.6,1),1
sprpriority = 2

[State snd]
type = PlaySnd
trigger1 = animelem = 1
value = 4200,0

[State hit]
type = HitDef
trigger1 = uniqhitcount < ifelse(var(3)=2,6,3)
trigger1 = timemod = 6,1
attr = S,SP
hitflag = MAFDP
guardflag = LA
animtype = back
damage = 40,16
pausetime = 2,12
sparkno = 2
guard.sparkno = 42
sparkxy = 0,-30
hitsound = s4200,0
guardsound = s4400,0
ground.type = trip
ground.slidetime = 20
ground.hittime = 20
yaccel = .5
ground.velocity = -1,-8
air.velocity = -1,-8
ground.cornerpush.veloff = 0
fall = 1
fall.recover = 0
getpower = 0
ID = 4200
palfx.time = 24
palfx.add = 150,-30,-50
palfx.mul = 240,210, 90
palfx.sinadd = -20,-20,-20,48
palfx.color = 0
palfx.invertall = 1
envshake.time = 6

[State 1141]
type = ChangeState
trigger1 = time = ifelse(var(3)=2,36,24)
value = 1142

;獣を焦がす(発射体・消滅)
[Statedef 1142]
type = S
movetype = I
physics = S
anim = 1142
velset = 0,0
ctrl = 0
sprpriority = 2

[State 1142]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State pal]
type = PalFX
trigger1 = time = 0
time = 24
sinadd = -256,-256,-256,96
ignorehitpause = 1

[State explod]
type = RemoveExplod
trigger1 = time = 24
ID = 1140
[State end]
type = DestroySelf
trigger1 = time = 24

;------------------------------------------------------------------
;赫訳・紅葉(開始)
[Statedef 1200]
type = S
movetype = I
physics = S
anim = 1200+var(10)*10000
velset = 0,0
ctrl = 0

[State explod]
type = RemoveExplod
trigger1 = 1
ID = 200

[State var]
type = varset
trigger1 = time = 0
var(3) = 0
[State var]
type = varset
trigger1 = command = "b" && time = 0
var(3) = 1
[State var]
type = varset
trigger1 = command = "c" && time = 0
var(3) = 2

[State anim]
type = ChangeAnim
trigger1 = time = 0
value = ifelse(var(3)>=1,ifelse(var(3)=2,1220,1210),1200)+var(10)*10000

[State super effect]
type = Helper
trigger1 = var(3) = 2 && animelem = 1
name = "super"
stateno = 4500
pos = 6,-58
ownpal = 1
supermovetime = 78
[State super effect]
type = SuperPause
trigger1 = var(3) = 2 && animelem = 1
time = 52
movetime = 52
anim = -1
sound = s4500
darken = 0
poweradd = -1000
[State pal]
type = BGPalFX
trigger1 = var(3) = 2 && animelem = 1
time = 52
sinadd = -128,-128,-64,104
ignorehitpause = 1

[State hit]
type = NotHitBy
trigger1 = var(3) = 2 && animelem = 1,[0,52]
value = SCA

[State 1200]
type = PlaySnd
trigger1 = var(3) = 2 && animelem = 1
trigger1 = var(10) = 0 && fvar(10) = [0,1]
value = 5200,1
channel = 0
[State 1200]
type = PlaySnd
trigger1 = var(3) = 2 && animelem = 1
trigger1 = var(10) = 1 || fvar(10) = [2,3]
value = 200,14
channel = 0

[State 1200]
type = ChangeState
trigger1 = animtime = 0
value = 1201

;赫訳・紅葉(跳躍)
[Statedef 1201]
type = A
movetype = A
physics = N
anim = 1201+var(10)*10000
velset = ifelse(var(3)>=1,ifelse(var(3)=2,4,3),2),-ifelse(var(3)>=1,ifelse(var(3)=2,9,8),7)
ctrl = 0

[State vel]
type = veladd
trigger1 = 1
y = .35

[State hit]
type = HitDef
trigger1 = animelem = 1
trigger2 = var(3) = 1 && uniqhitcount < 2
trigger2 = timemod = 8,0
attr = A,SA
guardflag = HA
animtype = back
damage = ifelse(var(3)=2,50,20),ifelse(var(3)=2,20,8)
pausetime = ifelse(var(3)=2,16,12),ifelse(var(3)=2,14,10)
sparkno = 2
guard.sparkno = 42
sparkxy = -10,-70
hitsound = s4020,0
guardsound = s4400,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
yaccel = .45
ground.velocity = -ifelse(var(3)=2,4,3),-ifelse(var(3)=2,12,9)
air.velocity = -ifelse(var(3)=2,4,3),-ifelse(var(3)=2,11,8)
airguard.velocity = -3,-4
fall = 1
fall.recover = 0
envshake.time = ifelse(var(3)=2,12,0)

[State 1201]
type = PlaySnd
triggerall = var(3) < 2
trigger1 = var(10) = 0 &&(fvar(10) = [0,1])&& animelem = 1
trigger2 =(var(10) = 1 || fvar(10) = [2,3])&& time = 15
value = 1201,ifelse(var(10)=1||fvar(10)>=2,10,0)
channel = 0

[State 1201]
type = ChangeState
trigger1 = var(3) = 0 && time = 15
trigger2 = var(3) = 1 && time = 23
trigger3 = var(3) = 2 && time = 27
value = 1202

;赫訳・紅葉(攻撃)
[Statedef 1202]
type = A
movetype = A
physics = N
anim = 1202+var(10)*10000
ctrl = 0

[State vel]
type = veladd
trigger1 = animelem = 2,< 0
x = -.2
y = .15

[State vel]
type = velset
trigger1 = animelemno(0) = 3
trigger1 = movecontact
x = -2
y = -2

[State vel]
type = veladd
trigger1 = 1
y = .35

[State hit]
type = HitDef
trigger1 = var(3) < 2
trigger1 = animelemno(0) = 3
attr = A,SA
guardflag = HA
animtype = back
damage = 50,20
pausetime = 12,14
sparkno = 7
guard.sparkno = 42
sparkxy = -10,-40+floor(p2dist y)/2
hitsound = s4050,0
guardsound = s4400,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
yaccel = .45
ground.velocity = -3,-4
air.velocity = -4,10
airguard.velocity = -3,-4
p2facing = 1
fall = 1
fall.recover = 0
persistent = 0

[State hit]
type = HitDef
trigger1 = var(3) = 2 && var(10) = 0 && fvar(10) = [0,1]
trigger1 = animelemno(0) = 3
attr = A,HA
guardflag = HA
animtype = diagup
damage = 70,28
pausetime = 12,14
sparkno = 7
guard.sparkno = 42
sparkxy = -10,-40+floor(p2dist y)/2
hitsound = s4050,0
guardsound = s4400,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
yaccel = .45
ground.velocity = -3,-4
air.velocity = -4,10
airguard.velocity = -3,-4
p2facing = 1
fall = 1
fall.recover = 0
persistent = 0

[State hit]
type = HitDef
trigger1 = var(3) = 2 &&(var(10) = 1 || fvar(10) = [2,3])
trigger1 = animelemno(0) = 3
attr = A,HA
guardflag = HA
animtype = back
damage = 40,16
pausetime = 6,10
sparkno = 7
guard.sparkno = 42
sparkxy = -10,-40+floor(p2dist y)/2
hitsound = s4050,0
guardsound = s4400,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
yaccel = .45
ground.velocity = -3,-4
air.velocity = -4,10
airguard.velocity = -3,-4
p2facing = 1
p1stateno = 11230
fall = 1
fall.recover = 0
kill = 0
persistent = 0

[State target]
type = TargetState
trigger1 = movehit && hitpausetime = 1
value = 5060
ignorehitpause = 1

[State explod]
type = Explod
trigger1 = animelem = 2
anim = 1240
ID = 200
bindtime = 5
sprpriority = 2
ownpal = 1
removeongethit = 1

[State snd]
type = PlaySnd
trigger1 = animelem = 3,-1
value = 4000,10

[State type]
type = StateTypeSet
trigger1 = animelem = 4
movetype = I

[State land]
type = ChangeState
trigger1 = pos y >= 0 && vel y > 0
value = 1203

;赫訳・紅葉(紅赤朱・追撃)
[Statedef 11230]
type = A
movetype = A
physics = N
anim = 11230
ctrl = 0

[State vel]
type = veladd
trigger1 = animelem = 4,< 0
x = -.2
y = -.45

[State vel]
type = velset
trigger1 = animelemno(0) = 5
x = -2
y = -3

[State vel]
type = veladd
trigger1 = 1
y = .35

[State hit]
type = HitDef
trigger1 = animelemno(0) = 5
attr = A,HA
guardflag = HA
animtype = up
damage = 40,16
pausetime = 12,14
sparkno = 7
guard.sparkno = 42
sparkxy = -10,-50+floor(p2dist y)/2
hitsound = s4050,0
guardsound = s4400,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
yaccel = .05
ground.velocity = -3,-4
air.velocity = -20,5
airguard.velocity = -3,-4
p2facing = 1
fall = 1
fall.recover = 0
persistent = 0

[State target]
type = TargetState
trigger1 = movehit && hitpausetime = 1
value = 5060
ignorehitpause = 1

[State explod]
type = Explod
trigger1 = animelem = 4
anim = 224
ID = 200
pos = 0,-20
bindtime = 3
sprpriority = 1
ownpal = 1
removeongethit = 1

[State snd]
type = PlaySnd
trigger1 = animelem = 5,-1
value = 4010,10

[State type]
type = StateTypeSet
trigger1 = animelem = 6
movetype = I

[State land]
type = ChangeState
trigger1 = pos y >= 0 && vel y > 0
value = 1203

;赫訳・紅葉(着地)
[Statedef 1203]
type = S
movetype = I
physics = S
anim = 1203+var(10)*10000
velset = 0,0
ctrl = 0

[State pos]
type = posset
trigger1 = 1
y = 0

[State snd]
type = PlaySnd
trigger1 = animelem = 1
value = 52,0

[State ctrl]
type = ctrlset
trigger1 = facing!= enemynear,facing
trigger1 = animelem = 7,>= 0
value = 1

[State end]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;------------------------------------------------------------------
;月を穿つ(開始)
[Statedef 1250]
type = S
movetype = I
physics = S
anim = 1250+var(10)*10000
velset = 0,0
ctrl = 0

[State var]
type = varset
trigger1 = time = 0
var(3) = 0
[State var]
type = varset
trigger1 = command = "b" && time = 0
var(3) = 1
[State var]
type = varset
trigger1 = command = "c" && time = 0
var(3) = 2

[State super effect]
type = Helper
trigger1 = var(3) = 2 && animelem = 1
name = "super"
stateno = 4500
pos = -18,-86
ownpal = 1
supermovetime = 78
[State super effect]
type = SuperPause
trigger1 = var(3) = 2 && animelem = 1
time = 52
movetime = 52
anim = -1
sound = s4500
darken = 0
poweradd = -1000
[State pal]
type = BGPalFX
trigger1 = var(3) = 2 && animelem = 1
time = 52
sinadd = -128,-128,-64,104
ignorehitpause = 1

[State hit]
type = NotHitBy
trigger1 = var(3) = 2 && animelem = 1,[0,52]
value = SCA

[State 1250]
type = PlaySnd
trigger1 = var(3) = 2 && animelem = 1
trigger1 = var(10) = 0 && fvar(10) = [0,1]
value = 1270,0
channel = 0
[State 1050]
type = PlaySnd
trigger1 = var(3) = 2 && animelem = 1
trigger1 = var(10) = 1 || fvar(10) = [2,3]
value = 1020,0
channel = 0

[State 1250]
type = ChangeState
trigger1 = var(3) < 2 && animelem = 3,6
trigger2 = var(3) = 2 && animelem = 3,20
value = 1251

;月を穿つ(発射)
[Statedef 1251]
type = S
movetype = I
physics = S
anim = 1251+var(10)*10000
velset = 0,0
ctrl = 0

[State 1251]
type = PlaySnd
trigger1 = var(3) < 2 && animelem = 1
trigger1 = var(10) = 0 && fvar(10) = [0,1]
value = 901,2
channel = 0
[State 1251]
type = PlaySnd
trigger1 = var(3) < 2 && animelem = 1
trigger1 = var(10) = 1 || fvar(10) = [2,3]
value = 1001,10
channel = 0

[State var]
type = varset
trigger1 = time = 0
var(2) = 0
[State var]
type = VarRandom
trigger1 = var(3) = 2 &&(var(10) = 1 || fvar(10) = [2,3])
trigger1 = time >= 20
trigger1 = timemod = 6,0
v = 2
range = -5,5

[State proj]
type = Projectile
trigger1 = animelem = 4
trigger2 = var(3) = 2 &&(var(10) = 1 || fvar(10) = [2,3])
trigger2 = time >= 20
trigger2 = timemod = 6,0
projID = 1290
projanim = ifelse(var(3)=2,1291,1290)
projremove = 0
projremovetime = ifelse(var(3)=2,58,30)
projhits = ifelse(var(3)=2,6,ifelse(var(10)=1||fvar(10)>=2,3,1))
projmisstime = ifelse(var(3)=2,3,4)
offset = ifelse(var(3)=2,floor(p2dist x),70+var(3)*90)+var(2)*12,0+var(2)
velocity = 0,0
attr = S,SP
hitflag = MAFDP
guardflag = M
animtype = up
damage = ifelse(var(3)=2,30,60)/ifelse(var(10)=1||fvar(10)>=2,3,1),ifelse(var(3)=2,12,24)/ifelse(var(10)=1||fvar(10)>=2,3,1)
pausetime = 0,ifelse(var(3)=2,2,ifelse(var(10)=1||fvar(10)>=2,2,8))
sparkno = 2
guard.sparkno = 42
sparkxy = 0,-40+floor(p2dist y)/2
hitsound = s4200,0
guardsound = s4400,0
ground.slidetime = 20
ground.hittime = 20
yaccel = .5
ground.velocity = -1,-10
air.velocity = -1,-10
fall = 1
fall.recovertime = 40
ID = 4200
palfx.time = 24
palfx.add = 150,-30,-50
palfx.mul = 240,210, 90
palfx.sinadd = -20,-20,-20,48
palfx.color = 0
palfx.invertall = 1
envshake.time = 4
envshake.ampl = -2

[State 1251]
type = ChangeState
trigger1 = time = 39
value = 1252

;月を穿つ(終了)
[Statedef 1252]
type = S
movetype = I
physics = S
anim = 1252+var(10)*10000
velset = 0,0
ctrl = 0

[State end]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;------------------------------------------------------------------
;飛翔(開始)
[Statedef 11300]
type = U
movetype = A
physics = N
anim = ifelse(statetype=A,11300,10040)
velset = 0,0
ctrl = 0

[State pos]
type = posset
trigger1 = anim = 10040
y = 0

[State image]
type = AfterImage
trigger1 = anim = 10040 && animelem = 3
time = 2
length = 20
paladd = -10,-10,-10
palmul = .975,.975,.975
timegap = 2
framegap = 1
trans = add

[State anim]
type = ChangeAnim
trigger1 = anim = 10040 && animtime = 0
value = 11300

[State type]
type = StateTypeSet
trigger1 = anim = 11300 && animelem = 1
statetype = A
[State vel]
type = velset
trigger1 = anim = 11300 && animelem = 1
y = -12

[State hit]
type = NotHitBy
trigger1 = anim = 11300
value = SCA
[State 1300]
type = PlayerPush
trigger1 = anim = 11300
value = 0
[State 11300]
type = ScreenBound
trigger1 = anim = 11300
value = 0
movecamera = 0,0

[State pal]
type = PalFX
trigger1 = anim = 11300 && animelem = 1
time = 16
sinadd = -256,-256,-256,32
ignorehitpause = 1
[State pal]
type = PalFX
trigger1 = anim = 11300 && animelem = 1,>= 8
time = 16
add = -256,-256,-256
sinadd = 256,256,256,64
ignorehitpause = 1

[State 11300]
type = PlaySnd
trigger1 = anim = 11300 && animelem = 5
value = 11300,20

[State super effect]
type = Helper
trigger1 = anim = 11300 && animelem = 5
name = "super"
stateno = 4500
pos = 0,240
ownpal = 1
supermovetime = 78
[State super effect]
type = SuperPause
trigger1 = anim = 11300 && animelem = 5
time = 52
movetime = 0
anim = -1
sound = s4500
darken = 0
poweradd = -1000
[State pal]
type = BGPalFX
trigger1 = anim = 11300 && animelem = 5
time = 52
sinadd = -128,-128,-64,104
ignorehitpause = 1

[State pos]
type = posadd
trigger1 = anim = 11300 && animelem = 5
x = p2dist x
y = p2dist y-240

[State vel]
type = velset
trigger1 = anim = 11300 && animelem = 5
x = 0
y = 20
[State vel]
type = veladd
trigger1 = anim = 11300 && animelem = 5,>= 0
y = .45

[State hit]
type = HitDef
trigger1 = anim = 11300
attr = A,ST
guardflag = HA
animtype = back
damage = 0
pausetime = 0,0
guard.pausetime = 0,12
sparkno = -1
guard.sparkno = 42
sparkxy = -10,-40
hitsound = s4000,0
guardsound = s4400,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
yaccel = .45
ground.velocity = -4
air.velocity = -1,-4
p2facing = 1
p1stateno = 11301
p2stateno = 11305
p2getp1state = 1
fall = 1
fall.recover = 0

[State 11300]
type = ChangeState
trigger1 = moveguarded
value = 11303

[State land]
type = ChangeState
trigger1 = pos y >= 0 && vel y > 0
value = 11304

;飛翔(成功)
[Statedef 11301]
type = A
movetype = A
physics = N
anim = 11301
velset = 0,0
ctrl = 0

[State hit]
type = NotHitBy
trigger1 = 1
value = SCA

[State explod]
type = Explod
trigger1 = animelem = 1
anim = f4
pos = 0,0
supermove = 1
sprpriority = 1
ownpal = 1

[State turn]
type = turn
trigger1 = animelem = 1

[State 11301]
type = AssertSpecial
trigger1 = time = 0
flag = invisible

[State bind]
type = BindToTarget
trigger1 = animelem = 8,< 10
time = 1
pos = 0,0,head

[State snd]
type = PlaySnd
trigger1 = animelem = 2
value = 310,1

[State image]
type = AfterImage
trigger1 = animelem = 6
time = 22
length = 20
paladd = -10,-10,-10
palmul = .95,.95,.95
timegap = 1
framegap = 1
trans = add

[State vel]
type = velset
trigger1 = animelem = 9
x = 12
y = 10

[State pos]
type = posadd
trigger1 = animelem = 9
x = -40
y = 40

[State 11301]
type = PlayerPush
trigger1 = 1
value = 0

[State vel]
type = veladd
trigger1 = animelem = 9,>= 0
y = .45

[State target]
type = TargetState
trigger1 = animelem = 11
value = 11306

[State hit]
type = HitDef
trigger1 = animelem = 11
attr = A,SA
animtype = up
damage = 160,64
pausetime = 12,12
sparkno = 7
guard.sparkno = 42
sparkxy = -10,-40
hitsound = s4060,0
guardsound = s4400,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
yaccel = .5
ground.velocity = 1,-14
air.velocity = 1,-14
fall = 1
fall.recover = 0
envshake.time = 12

[State explod]
type = Explod
trigger1 = animelem = 9
anim = 11340
ID = 200
sprpriority = 2
ownpal = 1
removeongethit = 1

[State 11301]
type = PlaySnd
trigger1 = animelem = 1
value = 11301,20
channel = 0

[State snd]
type = PlaySnd
trigger1 = animelem = 11,-1
value = 4010,10

[State pal]
type = PalFX
trigger1 = animelem = 11
time = 32
sinadd = -256,-256,-256,64
ignorehitpause = 1
[State pal]
type = PalFX
trigger1 = animelem = 11,>= 16
time = 16
add = -256,-256,-256
sinadd = 256,256,256,64
ignorehitpause = 1

[State land]
type = ChangeState
trigger1 = pos y >= 10 && vel y > 0
value = 11302

;飛翔(着地)
[Statedef 11302]
type = S
movetype = I
physics = S
anim = 11302
velset = 0,0
ctrl = 0

[State pos]
type = posset
trigger1 = 1
y = 0

[State snd]
type = PlaySnd
trigger1 = time = 0
value = 52,0

[State 11302]
type = PlaySnd
trigger1 = animelem = 5
value = 11302,20
channel = 0

[State end]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;飛翔(失敗・防御)
[Statedef 11303]
type = A
movetype = I
physics = N
anim = 11303
velset = -1.8,-4.2
ctrl = 0

[State 11303]
type = AssertSpecial
trigger1 = 1
flag = noairguard

[State vel]
type = veladd
trigger1 = 1
y = .35

[State 11303]
type = PlaySnd
trigger1 = animelem = 5
value = 11303,20
channel = 0

[State ctrl]
type = ctrlset
trigger1 = animelem = 6
value = 1

[State land]
type = ChangeState
trigger1 = pos y >= 10 && vel y > 0
value = 52

;飛翔(失敗・着地)
[Statedef 11304]
type = S
movetype = I
physics = S
anim = 11304
velset = 0,0
ctrl = 0

[State pos]
type = posset
trigger1 = 1
y = 0

[State snd]
type = PlaySnd
trigger1 = time = 0
value = 52,0

[State end]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;飛翔(相手)
[Statedef 11305]
type = A
movetype = H
physics = N

[State hit]
type = NotHitBy
trigger1 = 1
value = SCA
[State 11305]
type = PlayerPush
trigger1 = 1
value = 0

[State anim]
type = ChangeAnim
trigger1 = 1
value = 5010

[Statedef 11306]
type = A
movetype = H
physics = N

[State vel]
type = velset
trigger1 = time = 0
x = -1
y = -6

[State end]
type = SelfState
trigger1 = time = 0
value = 5050
