;---------------------------------------------------------------------------
; Sword Frenzy (hyper)
; CNS difficulty: medium
; Notes: Notice that the HitDefs in supers have "getpower = 0". This makes
;        sure KFM doesn't recharge his super guage as he hits.
;        Also, the attributes for the HitDefs is "HA" for "hyper attack",
;        ie. "attr = S, HA".
;        Notice how the first HitDef is reused twice by allowing it to
;        trigger on two animation elements.
[Statedef 3000]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3000
ctrl = 0
sprpriority = 2

[State 2000, SuperPause]
type = SuperPause
trigger1 = AnimElem = 1
pos = -5, -45
anim = -1
time = 20
sound = S20, 0
poweradd = -9000

[State 2300]
type = Explod
trigger1 = time = 0
anim = 3062
sprpriority = -4
postype = p1
pos = 0,-35
bindtime = -1
supermove = 1
under = 0
ownpal = 1

[State 2300]
type = helper
trigger1 = time = 0 || time = 0 ;|| AnimElemTime(6) = 1 || AnimElemTime(7) = 14
id = 26380
persistent = 1
name = "wakka"
pos = 0,-35
postype = P1
stateno = 26380
helpertype = normal
keyctrl = 0
ownpal = 1
pausemovetime = 999
supermovetime = 999

[State 2300]
type = PlaySnd
trigger1 = Time = 0
value = 4000,19

[State 2300]
type = PlaySnd
trigger1 = Time = 0
value = 3000,3

[State 2300]
type = PlaySnd
trigger1 = Time = 0
value = 4000,18

;DREAM CANCEL IF CANCELED FROM MAIN ATTACK
[State 3000, Super]
type = Helper
trigger1 = !time
trigger1 = PrevStateNo = 2200 || PrevStateno = 4310 || Prevstateno = 2000 || Prevstateno = 4567
persistent = 0
id = 30006
name = "DREAM Cancel Helper"
pos = 0,0
postype = P1
stateno = 2320
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 3000, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = AnimElem = 2
value = , NA, SA, AT
time = 11

[State 3000, Super E]
type = NotHitBy
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(14) < 0
value2 = C, NA
time = 1

[State 3000, 2]
type = PosAdd
trigger1 = AnimElem = 2
x = 20

[State 3000, 3]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 11
trigger3 = AnimElem = 13
trigger4 = AnimElem = 19
trigger5 = AnimElem = 21
trigger4 = AnimElem = 31
x = 10

[State 3000, 4]
type = VelSet
trigger1 = AnimElem = 5
trigger2 = AnimElem = 13
trigger3 = AnimElem = 21
x = 6

[State 3000, 4]
type = PosAdd
trigger1 = AnimElem = 5
x = 5

[State 3000, 5]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 5
trigger3 = AnimElem = 7
trigger4 = AnimElem = 9
attr = S, HA
animtype  = Hard
damage    = 50,4
getpower  = 0
priority  = 6
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -6
air.velocity = -3,-2.8
air.fall = 1
fall.animtype = Hard
fall.recover = 0

[State 3000, 6]
type = HitDef
trigger1 = AnimElem = 11
attr = S, HA
animtype  = Hard
damage    = 80,10
getpower  = 0
priority  = 5
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -5, -4
guard.velocity = -12
air.velocity = -5,-4
airguard.velocity = -3,-3
fall.animtype = Hard
fall = 1
fall.recover = 0

[State 3000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 4300
ctrl = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 3000
value = 0,5
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;------------------------------
; Dinner that summons King
[Statedef 2201]
type=S
physics=N
movetype=A
ctrl = 0
anim = 1001
sprpriority = 3
velset = 2,-2
juggle = 1

[State 1001,Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 1001,playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1505, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 0, VelSet]
type = VelSet
trigger1 = time = 47
x = 0
y = 0
;ignorehitpause =
;persistent =

[State 0, HitDef]
type = HitDef
trigger1 = !time
attr = A,HA
hitflag = MAFD
guardflag = MA
animtype = Heavy
air.animtype = Heavy
damage = 30,2
pausetime = 1,9
sparkxy = -10,-30
sparkno = S8210
guard.sparkno = S8105
hitsound   = S2,6
guardsound = S3,0
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-1, -11
air.type=Low
air.hittime=16
air.velocity=-1,-10
yaccel=.5
getpower=30
envshake.time=14
envshake.freq=120
envshake.ampl=4
removeongethit = 1
fall = 1
fall.recover = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, movetype = H
;ignorehitpause =
;persistent =


[State 1001]
type = changestate
trigger1 = time >= 45
value= 2210
;------------------------------------------------------------------------
[Statedef 7005]
type = S
movetype = I
physics = N
ctrl = 0
anim = 7005
sprpriority = 5
juggle = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = nobardisplay

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 901: NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA,AA,AT
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S7001,1
volume = 255
channel = 15

[State 0, EnvColor]
type = BGPalFX
;trigger1 = animelem = 1
trigger1 = time <= 50
add = -200,-200,-200
;sinadd=-255,-255,-255,160
;mul = 10-((time)*10),10-((time)*10),10-((time-45)*10)
;mul = ceil(1-((animtime-15)*10)),ceil(10-((animtime)*15)),ceil(140-((animtime-30)*10))
time = 1
;invertall = 1
;ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = time =0
anim = 7005
ID =  7000
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove =999999
pausemove =999999
supermovetime=9999
scale = 1,1
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = parent,stateno !=[2900,3000]
trigger1 = time =0
anim = 7009
ID =  7009
pos = 73,133
postype = back ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 5
vel = 0,0
accel = 0,0
random = 0,0
removetime = 10
supermove =999999
pausemove =999999
scale = .5,.5
sprpriority = -3
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = parent,stateno !=[2900,3000]
trigger1 = time =10
anim = 7009
ID =  7010
pos = 73,133
postype = back ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 5
vel = -.15,0
accel = 0,0
random = 0,0
removetime = 33
supermove =999999
pausemove =999999
scale = .5,.5
sprpriority = -3
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 4300, shrink]
type=modifyexplod
trigger1=numexplod(7009) && time <=10
ID=7009
scale = 2.5-(.21*(time)),2.5-(.21*(time))

[State 4300, shrink]
type=modifyexplod
trigger1=numexplod(7009) && time >10
ID=7010
scale = .5,.5

[State -3, StopSnd]
type = StopSnd
trigger1 = time >=50
trigger2 = parent,movetype=H
channel = 15
ignorehitpause = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time >=50
trigger2 = parent,movetype=H

[State 901:destroyself]
type = destroyself
trigger1 = time >=50
trigger2 = parent,movetype=H

;---------------------------------------------
; King's Dinner
[StateDef 2200]
type = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 2200
poweradd = 0
sprpriority = 2

[State 2000, BGPalFX]
type = BGPalFX
trigger1 = AnimElem = 9
invertall = 1
time = 15

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 9
value = S1200,4
volume= 320
channel = 1

[State 2000, SuperPause]
type = SuperPause
trigger1 = AnimElem = 9
pos = -5, -45
anim = -1
time = 45
sound = S20, 0
poweradd = -1000

[State 1020, HyperBg1]
type = Explod
trigger1 = AnimElem = 11
anim = 7021
ID = 7021
pos = 0,0
sprpriority = -7
postype = right
bindtime = -1
removetime = 255
removeongethit = 1
facing = ifelse(Facing = -1, -1, 1)
shadow = 68,68,68
ownpal = 1


[State 1020, HyperBg1]
type = Explod
trigger1 = AnimElem = 11
anim = 7021
ID = 7021
pos = 0,0
sprpriority = -7
postype = left
bindtime = -1
removetime = 255
removeongethit = 1
facing = ifelse(Facing = -1, -1, 1)
shadow = 68,68,68
ownpal = 1

[State 2000, Superpause spark]
type=helper
trigger1=animelem = 9
helpertype=normal
stateno=7005
ID=7005
name="Spark"
postype=p1
pos = 30,-35
ownpal=1
persistent=0
supermovetime=9999

;DREAM CANCEL IF CANCELED FROM MAIN ATTACK
[State 3000, Super]
type = Helper
trigger1 = animelem = 9
trigger1 = PrevStateNo = 2000 || PrevStateno = 4310 || Prevstateno = 3000 || Prevstateno = 4567
persistent = 0
id = 30006
name = "DREAM Cancel Helper"
pos = 0,0
postype = P1
stateno = 2320
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 1000, Helper]
type = Helper
triggerall = numhelper(2201) = 0;<= 1
trigger1 = AnimElem = 4
helpertype = player ;player
name = "The Dinner that will call the King"
ID = 2201
stateno = 2201
pos = 50,-20
postype = p1 ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=1
size.yscale=1
removeongethit =1

[State 1000, Helper]
type = Helper
triggerall = numhelper(2202) <= 1
trigger1 = AnimElem = 10
helpertype = normal ;player
name = "King Harkiann"
ID = 2202
stateno = 2202
pos = -55, 5
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=0.5
size.yscale=0.5
supermovetime = 45
pausemovetime = 45
removeongethit =1

[State 2000, SuperPause]
type = SuperPause
trigger1 = AnimElem = 10
pos = -5, -45
anim = -1
time = 94
sound = S20, 0


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 10
value = S1200,5
volume= 320
channel = 1

[State 2200, end]
type = ChangeState
trigger1 = time >= 200
value = 0
ctrl = 1

;------------------------------
; Stationary Dinner
[Statedef 2210]
type=S
physics=N
movetype=A
ctrl = 0
anim = 2210
sprpriority = 3
velset = 0, 0
juggle = 1

[State 1001,Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 1001,playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1505, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 1015, 4]
type = Projectile
triggerall = numhelper(2202)
trigger1 = animelem = 2
projanim = 2204
projremove = 0
projshadow = -1
offset = 30, -30
velocity = 0, 7
accel = 0, 0
sprpriority = 5
attr = A,HP
hitflag = MAFD
guardflag = MA
animtype = Heavy
air.animtype = Heavy
damage = 11,1
pausetime = 1,4
sparkxy = 0,-30
sparkno = 2
guard.sparkno = 2
hitsound   = S0,3
guardsound = S0,3
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-0
air.type=Low
air.hittime=16
air.velocity=0,-2
yaccel=.5
getpower = 0
fall = 1
fall.recover = 0
air.fall = 1
air.fall.recover= 0
removeongethit = 1

[State 1015, 4]
type = Projectile
triggerall = numhelper(2202)
trigger1 = animelem = 2
projanim = 2204
projremove = 0
projshadow = -1
offset = 30, -30
velocity = 3, 7
accel = 0, 0
sprpriority = 5
attr = A,HP
hitflag = MAFD
guardflag = MA
animtype = Heavy
air.animtype = Heavy
damage = ifelse(root,palno=11,20,2),4;11,1
pausetime = 1,4
sparkxy = 0,-30
sparkno = 2
guard.sparkno = 2
hitsound   = S0,3
guardsound = S0,3
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=0
air.type=Low
air.hittime=16
air.velocity=0,-2
yaccel=.5
fall = 1
fall.recover = 0
air.fall = 1
air.fall.recover= 0
removeongethit = 1
getpower = 0
[State 1015, 4]
type = Projectile
triggerall = numhelper(2202)
trigger1 = animelem = 2
projanim = 2204
projremove = 0
projshadow = -1
offset = 30, -30
velocity = -3, 7
accel = 0, 0
sprpriority = 5
attr = A,HP
hitflag = MAFD
guardflag = MA
animtype = Heavy
air.animtype = Heavy
damage = ifelse(root,palno=11,20,2),4;11,1
pausetime = 1,4
sparkxy = 0,-30
sparkno = 2
guard.sparkno = 2
hitsound   = S0,3
guardsound = S0,3
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=0
air.type=Low
air.hittime=16
air.velocity=0,-2
yaccel=.5
fall = 1
fall.recover = 0
air.fall = 1
air.fall.recover= 0
removeongethit = 1
getpower = 0
[State 1001]
type = destroyself
trigger1 = time >= 150
trigger2 = parent, movetype = H
;------------------------------
; King Harkiann
[Statedef 2202]
type=S
physics=N
movetype=A
ctrl = 0
anim = 2201
sprpriority = 3
velset = 0, 0
juggle = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1


[State 1001]
type = changestate
trigger1 = time >= 40
value = 2203

;------------------------------
; King Harkiann throws dinner.
[Statedef 2203]
type=S
physics=N
movetype=A
ctrl = 0
anim = 2202
sprpriority = 3
velset = 0, 0
juggle = 0

[State 0, HitOverride]
type = HitOverride
trigger1 = !time
attr =SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
slot = 0
stateno = 2204
time = 240

[State 0, HitDef]
type = HitDef
trigger1 = animelem = 1
trigger2 =animelem = 2
attr = S,HA
hitflag = MAF
guardflag = MA
animtype = Heavy
air.animtype = Heavy
damage = ifelse(root,palno=11,20,2),4;2,01
pausetime = 1,9
sparkxy = 0,-30
sparkno = 2
guard.sparkno = 2
hitsound   = S2,6
guardsound = S3,0
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-5,-7
air.type=Low
air.hittime=16
air.velocity=-5,-7
fall = 1
fall.recover = 0
air.fall = 1
air.fall.recover= 0
yaccel=.5


[State 1015, 4]
type = Projectile
trigger1 = animelem = 1
trigger2 = animelem = 2
projanim = 2204
projshadow = -1
projsprpriority = 10
projremove = 0
projremovetime = 15
offset = 40, -50
velocity = 5, -5
accel = 0, 0
sprpriority = 5
attr = A,HP
hitflag = MAF
guardflag = MA
animtype = Heavy
air.animtype = Heavy
damage = ifelse(root,palno=11,20,2),4;2,01
pausetime = 1,9
sparkxy = 0,-30
sparkno = S8210
guard.sparkno = S8105
hitsound   = S2,6
guardsound = S3,0
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-7
air.type=Low
air.hittime=16
air.velocity=-5,-7
fall = 1
fall.recover = 0
air.fall = 1
air.fall.recover= 0
yaccel=.5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1200,6
volume = 320
channel = 1


[State 1001]
type = changestate
trigger1 = time >= 150
value = 2204

;------------------------------
; King Harkiann leaves
[Statedef 2204]
type=S
physics=N
movetype=I
ctrl = 0
anim = 2203
sprpriority = 3
velset = 0, 0
juggle = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,7
volume= 320
channel = 1

[State 1505, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !animtime

;========================<TSUKI TSUKI DA!>=============================
[Statedef 4300]
type=A
physics=N
movetype=A
anim=4300
ctrl=0
velset=0,0
sprpriority=1
[State 4300, strengthvar]
type=varset
trigger1= var(10)!=6
var(10)=6

[State Pos]
type=posset
trigger1= !time && pos y>0
y=0

[State 4300, nhb]
type=nothitby
trigger1= 1
time=1
value=SCA
[State 4300, mc]
type=screenbound
trigger1= 1
value=0
movecamera=0,0

[State 4300, vel]
type=velset
trigger1= time
x=0
y=-12

;DREAM CANCEL IF CANCELED FROM MAIN ATTACK
[State 3000, Super]
type = Helper
trigger1 = !time
trigger1 = PrevStateNo = 2200 || PrevStateno = 2000 || Prevstateno = 3000 || Prevstateno = 4567
persistent = 0
id = 30006
name = "DREAM Cancel Helper"
pos = 0,0
postype = P1
stateno = 2320
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4300, end]
type=changestate
trigger1= time>=8 && screenpos y<=-60
value=4301


;---Falling---
[Statedef 4301]
type=A
physics=N
movetype=A
anim=4301
ctrl=0
velset=0,0
sprpriority=3

[State 4301, pos]
type=posadd
trigger1= !time
x= ceil(p2dist x-8)
[State 4301, pos]
type=posset
trigger1= !time
y= ceil(pos y-screenpos y)-240

[State 4301, superchargehelper]
type=helper
trigger1= !time
helpertype=normal
stateno=7005
ID=7500
name="Super Charge"
postype=p1
pos=0,240
ownpal=1
persistent=0
pausemovetime=255
supermovetime=255

[State 4301, superchargepause]
type=superpause
trigger1= !time
time=53
anim=-1
sound=S1200,4
poweradd=-2000*(var(20)<=0)
p2defmul=1
darken=0

[State 4301, nhb]
type=nothitby
trigger1= 1
time=1
value=SCA
[State 4301, mc]
type=screenbound
trigger1= 1
value=0
movecamera=0,0

[State 4301, moon]
type=helper
trigger1= time=1
helpertype=normal
stateno=4305
ID=4305
name="Moon"
postype=p1
facing=facing
size.xscale=1
size.yscale=1
ownpal=1
pausemovetime=var(20)

[State 4301, vel]
type=velset
trigger1= time
x=0
y=16
[State 4301, snd]
type=null
trigger1=time=1
value=445,1+random%7
channel=1

[State 4301, hit]
type=hitdef
trigger1= time && !movecontact
ID=4300
attr=A,HA
damage=ifelse(root,palno=11,350,150),50;150,20
animtype=Hard
guardflag=HA
hitflag=MAFD
priority=7,Hit
pausetime=0,12
sparkno=3
guard.sparkno=40
sparkxy=-10,ceil(p2dist y-48)
hitsound=s5,32
guardsound=s2,0
ground.type=High
ground.slidetime=16
ground.hittime=16
ground.velocity=0,0
air.type=Low
air.velocity=0,0
getpower= ifelse(p2movetype=H,96,192), 48
envshake.time=16
envshake.freq=60
envshake.ampl=5
fall=1
fall.recover=0
p1sprpriority=3
kill=0
absolute = 1

[State 4301, p2state]
type=targetstate
trigger1= movehit && numtarget(4300)
trigger1= !(target(4300),hitshakeover)
value=4330
ID=4300
ignorehitpause=1

[State 4301, land]
type=changestate
trigger1= time && (pos y+230)>-vel y
value= ifelse(movehit, 4310, 4302)


;---End---
[Statedef 4302]
type=A
physics=A
movetype=I
anim=4300
ctrl=0
velset=-2,-12
movehitpersist=1
sprpriority=3

[State useless]
type=varset
trigger1= !time && prevstateno=4301
trigger1= !var(35) && !movecontact && !movereversed
trigger1= (p2dist y=[0,240]) && (p2dist x=[-64,64]) && p2stateno!=5120
var(35)=1

[State 4302, ctrl]
type=posset
trigger1=!time
y=-230

[State 4302, mc]
type=screenbound
trigger1=prevstateno=4311
value=1
movecamera=1,0
[State 4302, snd]
type=playsnd
trigger1=!time && prevstateno=4301
value=5,10
channel=1

[State 4302, ctrl]
type=ctrlset
trigger1=time>=8
value=1


;---Combo---
[Statedef 4310]
type=A
physics=N
movetype=A
anim=4310
ctrl=0
velset=0,0
sprpriority=3

[State 4310, nhb]
type=nothitby
trigger1= time<94
time=1
value=SCA
ignorehitpause=1

[State 4310, mc]
type=width
trigger1=time<24
edge=320,320
ignorehitpause=1
[State 4310, mc]
type=screenbound
trigger1=1
value=0
movecamera=1,(time>=24)
ignorehitpause=1

;[State 4310]
;type=assertspecial
;trigger1= 1
;flag=nomusic
;ignorehitpause=1
[State 4310]
type=assertspecial
trigger1= time>=24
flag=nobardisplay
ignorehitpause=1

[State 4310, pos]
type=posset
trigger1=1
y=-230

[State 4310, snd]
type=playsnd
trigger1= time=24
value=9,12
channel=7
[State 4310, snd]
type=playsnd
trigger1=!time
value=5,10
channel=1

[State 4310, snd]
type=playsnd
trigger1=animelem=4
value=4,11
channel=0
[State 4310, snd]
type=playsnd
trigger1=animelem=16
value=1,6
channel=1

[State 4310, shake]
type=envshake
trigger1=!time
time=16
freq=60
ampl=6
ignorehitpause=1

[State 4310, hit]
type=hitdef
trigger1= animelem=5 || animelem=17
ID=4300
attr=A,HA
damage=20,5
animtype=Hard
guardflag=HA
hitflag=MAFD
priority=7,Hit
pausetime=0,12
sparkno=3
guard.sparkno=40
sparkxy=0,0
hitsound=s5,32
guardsound=s2,0
ground.type=High
ground.slidetime=16
ground.hittime=16
ground.velocity=0,0
air.type=Low
air.velocity=0,0
getpower= ifelse(p2movetype=H,96,192), 48
envshake.time=16
envshake.freq=60
envshake.ampl=5
fall=1
fall.recover=0
p1sprpriority=3
kill=0

[State 4310, armor-piercing damage] ;I added this -- thelordanon
type = TargetLifeAdd
trigger1 = animelem=5 || animelem=17
value = ifelse(random>750, -ceil(enemynear,Const(data.life)/1000), 0)
absolute = 1
ignorehitpause = 1
kill = 0

[State 4310, superkilling damage] ;I added this -- thelordanon
type = TargetLifeAdd
trigger1 = animelem=5 || animelem=17
trigger1 = var(40) = 1
value = -Ceil(enemynear,const(data.life))
absolute = 1
ignorehitpause = 1
kill = 0

[State 4010, VarSet]
type = VarSet
trigger1 = !time
v = 55
value = random%2
ignorehitpause = 1

[State 4310, p2state]
type=targetstate
trigger1= movehit && numtarget(4300)
trigger1= !(target(4300),hitshakeover)
value=4330
ID=4300
ignorehitpause=1
[State 4301, p2state]
type=targetbind
trigger1= numtarget(4300)
ID=4300
pos=0,-ceil(pos y)
ignorehitpause=1

[State 4310, end]
type=changestate
trigger1= time>=180 && !animtime
trigger2= animelemtime(15)>=0 && (roundstate!=2 || movecontact>=64)
value= 4311


;---Finish---
[Statedef 4311]
type=A
physics=N
movetype=A
anim=4311
ctrl=0
velset=0,0
sprpriority=3

[State 4311, nhb]
type=nothitby
trigger1= 1
time=1
value=SCA
ignorehitpause=1

[State 4311, mc]
type=screenbound
trigger1=1
value=0
movecamera=1,(animelemtime(5)<0)
ignorehitpause=1
[State 4311]
type=assertspecial
trigger1= animelemtime(5)<0
flag=nokoslow
flag2=nobardisplay
ignorehitpause=1

[State 4311, pos]
type=posset
trigger1=1
y=-230
ignorehitpause=1

[State 4311, snd]
type=playsnd
trigger1=!time
value=4,10
channel=0

[State 4311, hit]
type=hitdef
trigger1= animelem=4
ID=4300
attr=A,HA
damage=40,7
guardflag=HA
hitflag=MAFD
priority=7,Hit
pausetime=24,24
sparkno=3
guard.sparkno=40
sparkxy=-30,0
hitsound=s5,32
guardsound=s2,0
animtype=Diagup
fall.animtype=Diagup
ground.type=High
air.type=Low
ground.slidetime=16
ground.hittime=16
ground.velocity=-12,-12
air.velocity=-12,-12
down.velocity=-12,-12
air.velocity=0,0
getpower= ifelse(p2movetype=H,96,192), 48
envshake.time=16
envshake.freq=60
envshake.ampl=5
fall=1
fall.recover=0
p1sprpriority=3

[State 4311, p2state]
type=targetstate
trigger1= movehit && numtarget(4300)
trigger1= (target(4300),life<=1)
value=4330
ID=4300
ignorehitpause=1

[State 4311, end]
type=changestate
trigger1= animelemtime(5)>=0 && winko
value= 4312
[State 4311, end]
type=changestate
trigger1= !animtime
value= 4302


;---Win---
[Statedef 4312]
type=S
physics=N
movetype=I
sprpriority=3

[State 4312, anim]
type=changeanim
trigger1= anim!=4312
value=4312

[State 4312, mc]
type=width
trigger1=1
edge=160,160
[State 4312, mc]
type=screenbound
trigger1=1
value=0
movecamera=1,1

[State 4312, snd]
type=playsnd
trigger1= anim=4312 && animelem=6
value=0,0
channel=0

[State 4312, win]
type=changestate
trigger1= prevstateno!=180 && time>120
value=180
ctrl=1


;-----TARGET-----
[Statedef 4330]
type=C
physics=C
movetype=H
ctrl=0
velset=0,0
[State 4330, pos]
type=posset
trigger1= 1
y=0
[State 4330, anim]
type=changeanim
trigger1= 1
value=5080
[State 4330, end]
type=changestate
trigger1= hitshakeover
value=4331

[Statedef 4331]
type=C
physics=C
movetype=H
ctrl=0
velset=0,0
[State 4331, pos]
type=posset
trigger1= 1
y=0
[State 4331, end]
type=selfstate
trigger1= !alive
value=5150
[State 4331, end]
type=selfstate
trigger1= time>=120
value=5120

;========================<MOON>=============================
[Statedef 4305]
type=A
physics=N
movetype=I
anim=4325;ifelse(random<80,4315,ifelse(random<400,4305,4325))
velset=0,0
sprpriority=2

[State 4305, VarSet]
type = VarSet
trigger1 = !time
v = 56
value = ifelse(anim = 4315, 1, ifelse(anim = 4325, 2, 0))
ignorehitpause = 1
persistent = 1

[State 4305, bind]
type=bindtoroot
trigger1= root,stateno=4301
pos=0,230
[State 4305, bind]
type=posset
trigger1= root,stateno=4310 && root,movetype!=H
x=ceil(root,pos x)
[State 4305, bind]
type=posset
trigger1= root,stateno!=4301
y=0

[State 4305, fx]
type=explod
triggerall=!numexplod(4307)
trigger1=anim != 4315
trigger1=anim != 4316
anim=4307
ID=4307
sprpriority=3
postype=p1
pos=0,-230
bindtime=-1
removetime=-1
ignorehitpause=1

[State 4305, anim]
type=changeanim
trigger1= anim=4305 && (root,movecontact=[1,8])
value=4306
[State 4305, anim]
type=changeanim
trigger1= anim=4306 && !(root,movecontact=[1,8])
value=4305
[State 4305, anim]
type=changeanim
trigger1= anim=4315 && (root,movecontact=[1,8])
value=4316
[State 4305, anim]
type=changeanim
trigger1= anim=4316 && !(root,movecontact=[1,8])
value=4315
[State 4305, anim]
type=changeanim
trigger1= anim=4325 && (root,movecontact=[1,8])
value=4326
[State 4305, anim]
type=changeanim
trigger1= anim=4326 && !(root,movecontact=[1,8])
value=4325

[State 4305, end]
type=changestate
trigger1= root,movetype=H
trigger2= root,stateno!=4301 && (root,stateno!=[4310,4312])
value=4306


[Statedef 4306]
type=A
physics=N
movetype=I
anim=4314 ;4305 + (10*(var(56)))
velset=0,24
sprpriority=2

[State 4306, fx]
type=removeexplod
trigger1=numexplod

[State 4306, trans]
type=angledraw
trigger1= 1
scale= 1 + (time*.0625), 1 + (time*.0625)
[State 4306, trans]
type=trans
trigger1= 1
trans=addalpha
alpha= 256 - (time*16), (time*16)

[State 4306, end]
type=destroyself
trigger1= pos x!=[-480,480]
trigger2=time>=16

;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
;---------------------------------------------------------------------------
; 無に還ろう
;---------------------------------------------------------------------------
;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

[Statedef 2600]
type = S
movetype = A
physics = N
velset = 0,0
juggle = 15
poweradd = -4000
anim = 2310
ctrl = 0

[State -2]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = nofg
flag3 = nobg
ignorehitpause = 1

[State -2]
type = AssertSpecial
trigger1 = 1
flag = timerfreeze
ignorehitpause = 1

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

[State 64003]
type = Explod
trigger1 = time >= 0
trigger1 = time <= 80
anim = 10084
id = 10084
sprpriority = -2147483647
postype = p1
pos = 0,-35
vel = 0,0
trans = add
scale = abs(0.05*(time-30)),abs(0.05*(time-30))
bindtime = -1
removetime = 16
supermove = 1
ownpal = 1
ontop = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 64003]
type = RemoveExplod
trigger1 = time = 80
id = 10084

[State 2300]
type = PlaySnd
trigger1 = Time = 0
value = 4000,19

[State 2300]
type = PlaySnd
trigger1 = Time = 0
value = 3000,3

[State 2300]
type = PlaySnd
trigger1 = Time = 0
value = 4000,18

[State 3040, 7]
type = EnvColor
trigger1 = time = 3
persistent = 0
time = 50
value = 0,0,0
under = 2
ignorehitpause = 1

[state a]
type = changestate
trigger1 = animtime = 0
value = 2650

;---------------------------------------------------------------------------
;攻撃
;---------------------------------------------------------------------------

[Statedef 2650]
type = S
movetype = A
physics = N
velset = 0,0
juggle = 15
anim = 2410
ctrl = 0

[State 2650]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = nofg
flag3 = nobg
ignorehitpause = 1

[State 2650]
type = AssertSpecial
trigger1 = 1
flag = timerfreeze
flag2 = nokoslow
ignorehitpause = 1

;[State 2650]
;type = statetypeset
;triggerall = palno = 11
;trigger1 = !ishelper
;statetype = A
;movetype = I
;physics = N
;ignorehitpause = 1

[State 2650]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 2650]
type = EnvColor
trigger1 = 1
time = 10
value = 0,0,0
under = 2
ignorehitpause = 1

[State 2650]
type = PlaySnd
trigger1 = Time = 1
value = 2563,4
volume = 255
freqmul = 0.9
ignorehitpause = 1

[State 2650]
type = PlaySnd
trigger1 = Time = 10
value = 2563,5
volume = 255
freqmul = 0.9
ignorehitpause = 1

[State 2650]
type = Explod
trigger1 = Time = 0
anim = 22176
id = 22176
sprpriority = 2147483647
postype = back
pos = 0,0
bindtime = -1
supermove = 0
under = 0
ownpal = 1
ontop = 1
trans = add
supermovetime = 2147483647
pausemovetime = 2147483647

[State 2650]
type = EnvShake
trigger1 = (GameTime%4) = 1
time = 5
ampl = -5
freq = 95
phase = 95

[State 2650]
type = turn
triggerall = !ishelper
trigger1 = p2dist X < 0
trigger1 = fvar(1) < 0
ignorehitpause = 1

[State 2650]
type = Projectile
triggerall = !ishelper
triggerall = 1
trigger1 = time = [20,220]
trigger1 = (GameTime%3) = 1
attr = S, NA
projanim = 22177
projhitanim = -1
projid = 22177
projpriority = 9999999999
projsprpriority = 5
projremove = 1
projremovetime = 2
postype = p1
offset = 0,0
velocity = 0
animtype  = hard
damage    = 21474836,21474836
getpower = 0,0
givepower = 0-((palno = 12)*9999999999)
hitflag = MAFD
guardflag =
pausetime = 9,5
guard.pausetime = 9,5
sparkno = -1
sparkxy = 40,-74
hitsound   = -1
guard.sparkno = -1
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -0.75,-0.01
guard.velocity = -9.5
air.velocity = -0.75,-0.01
fall = 1
air.fall = 1
fall.recover = 0
p2stateno = 2636
supermovetime = 2147483647
pausemovetime = 2147483647

[State 2650]
type = Projectile
triggerall = !ishelper
trigger1 = 1
attr = S, SP
projanim = 22178
projhitanim = -1
projid = 22178
projpriority = 999999999
projsprpriority = 999999999
projremove = 1
projremovetime = 2
postype = p1
offset = 0,0
velocity = 0
animtype  = Light
damage    = 10,0
getpower = 10,0
givepower = 0,0
guardflag = M
hitflag = MAFD
pausetime = 2,8
sparkno = -1
sparkxy = -15,-77
hitsound   = -1
guard.sparkno = -1
guardsound = -1
ground.type = low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -2
air.velocity = -2,-1
supermovetime = 2147483647
pausemovetime = 2147483647

;[State 2650]
;type = AttackDist
;trigger1 = 1
;value = 0
;ignorehitpause = 1

[State 2650]
type = ReversalDef
triggerall = palno = 11
trigger1 = time = [20,220]
reversal.attr = SCA,AT,AA,AP
hitflag = M-
priority = 7
pausetime = 0,10
numhits = 0
sparkno = -1
hitsound = -1
p2stateno = 2636
ignorehitpause = 1

[State 2650]
type = targetdrop
triggerall = palno = 11
triggerall = numtarget > 0
trigger1 = target,ishelper
trigger2 = numtarget >= 8
ignorehitpause = 1

[state 2650]
type = targetdrop
triggerall = palno = 11
triggerall = numtarget > 0
trigger1 = time > 230
trigger2 = numtarget > 7
ignorehitpause = 1

[state 2650]
type = targetstate
triggerall = palno != 11
triggerall = numtarget > 0
triggerall = !target,ishelper
trigger1 = time = [20,220]
trigger1 = (GameTime%3) = 1
value = 2636
ignorehitpause = 1

[State 2650]
type = targetLifeAdd
triggerall = palno != 11
triggerall = numtarget > 0
trigger1 = !target,ishelper
value = -9999999999999
absolute = 1
ignorehitpause = 1

[State 2650]
type = targetpoweradd
triggerall = numtarget > 0
trigger1 = !target,ishelper
value = -2147483647
absolute = 1
ignorehitpause = 1

[state 2650]
type = targetstate
triggerall = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = roundstate = 3
value = 5150
ignorehitpause = 1

[State 2650]
type = Explod
trigger1 = target,stateno = 2636 && enemyNear,time = 0 || projhit22177 = 1
anim = F1+random%3
sprpriority = 120
postype = p2
pos = (target,const(size.mid.pos.x)),(target,const(size.mid.pos.y))
facing = -1
bindtime = -1
supermove = 1
ownpal = 1
ontop = 1

[State 2650]
type = HitAdd
trigger1 = target,stateno = 2636 && enemyNear,time = 0
value = 1

[state 2650]
type = changestate
trigger1 = time >= 250
value = 2700

;---------------------------------------------------------------------------
;終了
;---------------------------------------------------------------------------

[Statedef 2700]
type = S
movetype = A
physics = N
velset = 0,0
juggle = 15
anim = 2211
ctrl = 0

[State 2700]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 2700]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = timerfreeze
ignorehitpause = 1

[state 2700]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;やられ
;---------------------------------------------------------------------------

[Statedef 2635]
type = A
movetype= H
physics = N
velset = 0,0
facep2 = 1

[State 2635]
type = SelfState
triggerall = name = "White Kyurem"
trigger1 = time >= 0
trigger2 = var(55) != gametime+123456789
value = 1
ctrl = 1
ignorehitpause = 1

[state 2635]
type = destroyself
trigger1 = ishelper

[State 2635]
type = lifeset
triggerall = name != "White Kyurem"
trigger1 = time = 0
ignorehitpause = 1
value = life - (Ceil(0.007 * Const(data.life)))

[State 2635]
type = powerset
triggerall = name != "White Kyurem"
trigger1 = time = 0
ignorehitpause = 1
value = power - (Ceil(0.005 * Const(data.power)))

[State 2635]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 2635]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time = 0
value = 5070

[State 2635]
type = Trans
triggerall = name != "White Kyurem"
trigger1 = 1
trans = add1
alpha = 250,70

[State 2635]
type = changestate
triggerall = name != "White Kyurem"
trigger1 = time >= 8
value = 2637

;---------------------------------------------------------------------------
;やられ
;---------------------------------------------------------------------------

[Statedef 2636]
type = A
movetype= H
physics = N
velset = 0,0
facep2 = 1

[State 2636]
type = SelfState
triggerall = name = "White Kyurem"
trigger1 = time >= 0
trigger2 = var(55) != gametime+123456789
value = 1
ctrl = 1
ignorehitpause = 1

[State 2636]
type = lifeset
triggerall = name != "White Kyurem"
trigger1 = 1
ignorehitpause = 1
value = 0

[State 2636]
type = powerset
triggerall = name != "White Kyurem"
trigger1 = 1
ignorehitpause = 1
value = 0

[State 2636]
type = VarRangeSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
value = 0

[State 2636]
type = VarRangeSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
fvalue = 0

[State 2636]
type = VarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(1) = 0

[State 2636]
type = VarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(2) = 0

[State 2636]
type = VarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(3) = 0

[State 2636]
type = VarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(4) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(1) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(2) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(3) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(4) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(5) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(6) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(7) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(8) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(9) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(10) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(11) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(12) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(13) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(14) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(15) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(16) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(17) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(18) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(19) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(20) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(21) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(22) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(23) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(24) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(25) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(26) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(27) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(28) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(29) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(30) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(31) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(32) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(33) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(34) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(35) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(36) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(37) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(38) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(39) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(40) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(41) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(42) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(43) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(44) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(45) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(46) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(47) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(48) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(49) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(50) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(51) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(52) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(53) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(54) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(55) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(56) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(57) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(58) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
var(59) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(1) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(2) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(3) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(4) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(5) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(6) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(7) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(8) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(9) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(10) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(11) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(12) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(13) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(14) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(15) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(16) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(17) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(18) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(19) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(20) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(21) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(22) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(23) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(24) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(25) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(26) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(27) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(28) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(29) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(30) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(31) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(32) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(33) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(34) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(35) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(36) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(37) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(38) = 0

[State 2636]
type = parentVarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&enemynear,palno=11&&ishelper
fvar(39) = 0

[State 2636]
type = AssertSpecial
triggerall = name != "White Kyurem"
trigger1 = ishelper
flag = invisible

[State 2636]
type = PlayerPush
trigger1 = 1
value = -1

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

[State 2636]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 2636]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time = 0
value = 5070

[State 2636]
type = Trans
triggerall = name != "White Kyurem"
trigger1 = 1
trans = add1
alpha = 250,70

[state 2636]
type = destroyself
triggerall = name != "White Kyurem"
trigger1 = ishelper&&time>=1

[State 2636]
type = changestate
triggerall = name != "White Kyurem"
trigger1 = !ishelper&&time >= 8
value = 2637

;---------------------------------------------------------------------------
;相手落下1
;---------------------------------------------------------------------------

[Statedef 2637]
type = A
movetype= H
physics = N
sprpriority = 4

[State 2637]
type = SelfState
triggerall = name = "White Kyurem"
trigger1 = time >= 0
trigger2 = var(55) != gametime+123456789
value = 1
ctrl = 1
ignorehitpause = 1

[state 2637]
type = destroyself
triggerall = name != "White Kyurem"
trigger1 = ishelper

[State 2637]
type = lifeset
triggerall = name != "White Kyurem"
trigger1 = time = 0
ignorehitpause = 1
value = life - (Ceil(0.035 * Const(data.life)))

[State 2637]
type = lifeset
triggerall = name != "White Kyurem"
trigger1 = life <= (Ceil(0.01 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 2637]
type = powerset
triggerall = name != "White Kyurem"
trigger1 = 1
ignorehitpause = 1
value = 0

[State 2637]
type = VarRangeSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
value = 0

[State 2637]
type = VarRangeSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
fvalue = 0

[State 2637]
type = VarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(1) = 0

[State 2637]
type = VarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(2) = 0

[State 2637]
type = VarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(3) = 0

[State 2637]
type = VarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(4) = 0

[State 2637]
type = PlayerPush
trigger1 = 1
value = -1

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

[State 2637]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 2637]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = time = 0
value = 5050

[state 2637]
type = velset
triggerall = name != "White Kyurem"
trigger1 = time = 0
x = ifelse((p2dist x< 0 ),3.32,-3.32)
y = -2.8

[State 2637]
type = VelAdd
triggerall = name != "White Kyurem"
Trigger1 = time > 0
y = .39

[State 2637]
type = selfstate
triggerall = name != "White Kyurem"
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100


;---------------------------------------------------------------------------
; Celestial Star
[Statedef 22059]
type = S
movetype = I
physics = N
ctrl = 0
anim = 22059
velset = 0,0

[State 1300, SuperPause]
type = SuperPause
trigger1 = time = 0
time = 20
anim = -1
sound = 121,331
pos = 0,-35
move = 1
darken = 1
unhittable = 1

[State 2300]
type = Explod
trigger1 = time = 0
anim = 3062
sprpriority = -4
postype = p1
pos = 0,-35
bindtime = -1
supermove = 1
under = 0
ownpal = 1

[State 2300]
type = helper
trigger1 = time = 0 || time = 0 ;|| AnimElemTime(6) = 1 || AnimElemTime(7) = 14
id = 26380
persistent = 1
name = "wakka"
pos = 0,-35
postype = P1
stateno = 26380
helpertype = normal
keyctrl = 0
ownpal = 1
pausemovetime = 999
supermovetime = 999

[State 2300]
type = PlaySnd
trigger1 = Time = 0
value = 4000,19

[State 2300]
type = PlaySnd
trigger1 = Time = 0
value = 3000,3

[State 2300]
type = PlaySnd
trigger1 = Time = 0
value = 4000,18

[State 1300, PowerAdd]
type = PowerAdd
trigger1 = time = 0
value = -9000

[State 1300, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 22050
;---------------------------------------------------------------------------
; 攻撃
;---------------------------------------------------------------------------

[Statedef 22050]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 15
anim = 22060
ctrl = 0

[state 1]
type = varset
trigger1 = palno=11&&fvar(38)=2
trigger1 = time<150&&enemy,movereversed
fv = 18
value = 1
ignorehitpause = 1
pausemovetime = 999
supermovetime = 999

[State 1]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = nofg
flag3 = nobg
ignorehitpause = 1
pausemovetime = 999
supermovetime = 999

[State 1]
type = ReversalDef
trigger1 = var(1) = 1
reversal.attr = SCA,AA,AT,AP
hitflag = M-
priority = 7
pausetime = 0,0
sparkno = s22133
hitsound = s2562,31
p2facing = 1
p2stateno = 169995

[state 1]
type = targetstate
trigger1 = palno=11&&fvar(18)!=0&&fvar(38)=2
trigger1 = enemy,alive&&time<150
value = 169995

[State 1]
type = targetLifeAdd
trigger1 = palno=11&&(gametime%(1+((time<150)*7)))=1
value = -9999999999999
absolute = 1
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

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

[state a]
type = varset
trigger1 = time = 0
v = 19
value = 0

[State 3040, 7]
type = BGPalfx
trigger1 = 1
ignorehitpause = 1
time = 1
mul = var(19),var(19),var(19)
under = 2

[State 3040, 7]
type = EnvColor
trigger1 = 1
ignorehitpause = 1
value = 0,0,0
time = 200
under = 2

[State 2000, 6]
type = PlaySnd
trigger1 = Time = 0
value = 190,1

[State 1000, 5]
type = Explod
trigger1 = Time = 0
anim = 2990
id = 2200
sprpriority = 99999
postype = back
scale = 1.0,1.0714285714285714285714285714286
pos = 0,0
bindtime = -1
under = 99
ownpal = 1
SuperMove = 0

[State 2000, 6]
type = PlaySnd
trigger1 = Time = 30 || Time = 60 || Time = 74 || Time = 88 || Time = 96 || Time = 112 || Time = 120 || time = 126 || Time = 130 || Time = 140 || Time = 155 || Time = 170 || Time = 180 || Time = 202
;trigger1 = (GameTime%6) = 1
value = 11,1

[State 2000, 6]
type = PlaySnd
trigger1 = Time = 192
value = 2562,1
volume = -40

[State 2000, 6]
type = PlaySnd
trigger1 = Time = 30 || Time = 60 || Time = 74 || Time = 88 || Time = 96 || Time = 112 || Time = 120 || time = 126 || Time = 130 || Time = 140 || Time = 155 || Time = 170 || Time = 180 || Time = 202
;trigger1 = (GameTime%6) = 1
value = 2562,14

[State 1020, 4]
type = EnvShake
trigger1 = Time = 30 || Time = 60 || Time = 74 || Time = 88 || Time = 96 || Time = 112 || Time = 120 || time = 126 || Time = 130 || Time = 140 || Time = 155 || Time = 170 || Time = 180 || Time = 202
;trigger1 = (GameTime%3) = 1
time = 10
ampl = -10
freq = 95
phase = 95

[State 3221, 0]
type = Pause
trigger1 = time >= 202
time = 1

[State 2900, 1]
type = helper
trigger1 = time = 30
id = 2100
persistent = 0
name = "muni"
pos = 0,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 60
id = 2100
persistent = 0
name = "muni"
pos = -80,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 74
id = 2100
persistent = 0
name = "muni"
pos = 100,-240
postype = back
stateno = 22221
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 88
id = 2100
persistent = 0
name = "muni"
pos = -100,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 96
id = 2100
persistent = 0
name = "muni"
pos = 20,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 96
id = 2100
persistent = 0
name = "muni"
pos = -10,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 112
id = 2100
persistent = 0
name = "muni"
pos = -50,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 120
id = 2100
persistent = 0
name = "muni"
pos = -70,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 126
id = 2100
persistent = 0
name = "muni"
pos = 70,-240
postype = back
stateno = 22221
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 130
id = 2100
persistent = 0
name = "muni"
pos = 100,-240
postype = back
stateno = 22221
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 140
id = 2100
persistent = 0
name = "muni"
pos = 50,-240
postype = back
stateno = 22221
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 155
id = 2100
persistent = 0
name = "muni"
pos = 50,-240
postype = back
stateno = 22221
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 155
id = 2100
persistent = 0
name = "muni"
pos = 30,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 170
id = 2100
persistent = 0
name = "muni"
pos = -100,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 170
id = 2100
persistent = 0
name = "muni"
pos = -70,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 180
id = 2100
persistent = 0
name = "muni"
pos = 100,-240
postype = back
stateno = 22221
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 195
id = 2100
persistent = 0
name = "muni"
pos = 0,-240
postype = back
stateno = 22221
helpertype = normal
keyctrl = 0
ownpal = 1

[state a]
type = changestate
trigger1 = time >= 230
value = 22100

;---------------------------------------------------------------------------
; 終了
;---------------------------------------------------------------------------

[Statedef 22100]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 15
anim = 22062
ctrl = 0

[State 1000, 5]
type = Explod
trigger1 = time = 1
anim = 22068
sprpriority = 0
postype = p1
pos = 40,0
vel = 0,0
bindtime = -1
supermove = 0
under = 0
ownpal = 1

[State 1000, 5]
type = Explod
trigger1 = time = 1
anim = 1932
sprpriority = 0
postype = p1
pos = 0,-75
vel = 0,0
bindtime = -1
supermove = 0
under = 0
ownpal = 1

[State 2000, 6]
type = PlaySnd
trigger1 = time = 1
value = 2562,20

[State 10000, sombras]
type = Afterimage
trigger1 = TIME = 12
trans = add
PalContrast =  250, 250, 250
PalBright = 0,0,0
time    =  -1
length  = 13
TimeGap = 1
FrameGap = 1

[State -2]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
pausemovetime = 999
supermovetime = 999

[state a]
type = varadd
trigger1 = var(19) <= 255
v = 19
value = 15

[State 3040, 7]
type = BGPalfx
trigger1 = 1
ignorehitpause = 1
time = 1
mul = var(19),var(19),var(19)
under = 2

[State 3040, 7]
type = EnvColor
trigger1 = 1
ignorehitpause = 1
value = 0,0,0
time = 0
under = 2

[state a]
type = removeexplod
trigger1 = time = 0
is = 2220

[state a]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; ヘルパー
;---------------------------------------------------------------------------

[Statedef 22220]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 3322

[State 0]
type = Projectile
trigger1 = animelem=1&&root,var(1)!=1
attr = S, HA
projanim = 3322
projhitanim = -1
projid = 20000
projpriority = 999999999
projsprpriority = 999999999
;projedgebound = 220
projremove = 1
projremovetime = 10
postype = p1
offset = 0,0
velocity = 0
animtype  = diagup
damage    = 21474836,(random<=40)*(random%250)
getpower = 0,0
givepower = Ceil(-1 * enemy,Const(data.power)),0
guardflag = M
numhits = 1
hitflag = MAFD
pausetime = 2,1
sparkno = -1
sparkxy = -15,-77
hitsound   = -1
guard.sparkno = -1;s7011
guardsound = -1
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -1,-5
air.velocity = -1,-5
fall = 1
fall.recover = 0
p2stateno = 0

[State 1]
type = Projectile
trigger1 = animelem=1&&root,var(1)!=0
attr = S, HA
projanim = 3322
projhitanim = -1
projid = 20000
projpriority = 999999999
projsprpriority = 999999999
;projedgebound = 220
projremove = 1
projremovetime = 10
postype = p1
offset = 0,0
velocity = 0
animtype  = diagup
damage    = 21474836
getpower = 0,0
givepower = Ceil(-1 * enemy,Const(data.power)),0
guardflag =
numhits = (root,palno!=12)
hitflag = MAFD
pausetime = 2,1
sparkno = -1
sparkxy = -15,-77
hitsound   = -1
guard.sparkno = -1;s7011
guardsound = -1
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -1,-5
air.velocity = -1,-5
fall = 1
fall.recover = 0
p2stateno = 0
ignorehitpause = 1

[State 0]
type = HitDef
triggerall = root,var(1)!=1&&ishelper
trigger1 = time = 0
trigger2 = hitcount <= 1
attr = S, HA
animtype  = diagup
damage    = 21474836,(random<=40)*(random%250)
getpower = 0,0
givepower = Ceil(-1*enemy,Const(data.power)),0
guardflag = M
hitflag = MAFD
pausetime = 2,1
sparkno = s22109 + root,var(35)
sparkxy = -2,floor(enemy,pos y)+180
hitsound   = -1
guard.sparkno = s22113
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -1,-6.5
air.velocity = -1,-6.5
fall = 1
fall.recover = 0
yaccel = .7
p2stateno = 49000

[State 1]
type = HitDef
triggerall = root,var(1)!=0&&root,palno!=12&&ishelper
trigger1 = time = 0
trigger2 = hitcount <= 1
attr = S, HA
animtype  = diagup
damage    = 21474836
getpower = 0,0
givepower = Ceil(-1*enemy,Const(data.power)),0
guardflag =
hitflag = MAFD
numhits = 1
pausetime = 2,1
sparkno = s22109 + root,var(35)
sparkxy = -2,floor(enemy,pos y)+180
hitsound   = -1
guard.sparkno = s22113
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -1,-6.5
air.velocity = -1,-6.5
fall = 1
fall.recover = 0
yaccel = .7
p2stateno = 0
ignorehitpause = 1

[state 2901,1]
type = nothitby
trigger1 = 1
value = SCA
time = -1

[state 2901,1]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AP,AT
stateno = 1411

[state a]
type = destroyself
trigger1 = time >= 15
trigger2 = root,stateno != 22050
trigger3 = (moveguarded||hitcount>=1)&&root,var(1)!=1

;---------------------------------------------------------------------------
; ヘルパー
;---------------------------------------------------------------------------

[Statedef 22221]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 3322

[State 0]
type = Projectile
trigger1 = animelem=1&&root,var(1)!=1
attr = S, HA
projanim = 3322
projhitanim = -1
projid = 20000
projpriority = 999999999
projsprpriority = 999999999
;projedgebound = 220
projremove = 1
projremovetime = 10
postype = p1
offset = 0,0
velocity = 0
animtype  = diagup
damage    = 21474836,(random<=40)*(random%250)
getpower = 0,0
givepower = Ceil(-1 * enemy,Const(data.power)),0
guardflag = M
numhits = 1
hitflag = MAFD
pausetime = 2,1
sparkno = -1
sparkxy = -15,-77
hitsound   = -1
guard.sparkno = -1;s7011
guardsound = -1
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -1,-5
air.velocity = -1,-5
fall = 1
fall.recover = 0
p2stateno = 49000

[State 1]
type = Projectile
trigger1 = animelem=1&&root,var(1)!=0
attr = S, HA
projanim = 3322
projhitanim = -1
projid = 20000
projpriority = 999999999
projsprpriority = 999999999
;projedgebound = 220
projremove = 1
projremovetime = 10
postype = p1
offset = 0,0
velocity = 0
animtype  = diagup
damage    = 21474836
getpower = 0,0
givepower = Ceil(-1 * enemy,Const(data.power)),0
guardflag =
numhits = (root,palno!=12)
hitflag = MAFD
pausetime = 2,1
sparkno = -1
sparkxy = -15,-77
hitsound   = -1
guard.sparkno = -1;s7011
guardsound = -1
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -1,-5
air.velocity = -1,-5
fall = 1
fall.recover = 0
p2stateno = 49000
ignorehitpause = 1

[State 0]
type = HitDef
triggerall = root,var(1)!=1&&ishelper
trigger1 = time = 0
trigger2 = hitcount <= 1
attr = S, HA
animtype  = diagup
damage    = 21474836,(random<=40)*(random%250)
getpower = 0,0
givepower = Ceil(-1*enemy,Const(data.power)),0
guardflag = M
hitflag = MAFD
pausetime = 2,1
sparkno = s22109 + root,var(35)
sparkxy = -2,floor(enemy,pos y)+180
hitsound   = -1
guard.sparkno = s22113
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -1,-6.5
air.velocity = -1,-6.5
fall = 1
fall.recover = 0
yaccel = .7
p2stateno = 49000

[State 1]
type = HitDef
triggerall = root,var(1)!=0&&root,palno!=12&&ishelper
trigger1 = time = 0
trigger2 = hitcount <= 1
attr = S, HA
animtype  = diagup
damage    = 21474836
getpower = 0,0
givepower = Ceil(-1*enemy,Const(data.power)),0
guardflag =
hitflag = MAFD
numhits = (root,palno!=12)
pausetime = 2,1
sparkno = s22109 + root,var(35)
sparkxy = -2,floor(enemy,pos y)+180
hitsound   = -1
guard.sparkno = s22113
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -1,-6.5
air.velocity = -1,-6.5
fall = 1
fall.recover = 0
yaccel = .7
p2stateno = 49000
ignorehitpause = 1

[state 2901,1]
type = nothitby
trigger1 = 1
value = SCA
time = -1

[state 2901,1]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AP,AT
stateno = 1411

[state a]
type = destroyself
trigger1 = time >= 15
trigger2 = root,stateno != 22050
trigger3 = (moveguarded||hitcount>=1)&&root,var(1)!=1

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

[Statedef 169995]
type    = A
movetype= H
physics = N
sprpriority = 4
velset = 0,0

[State 169995]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0

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

[State 169995]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow
flag3 = globalnoshadow

[State 169995]
type = lifeset
trigger1 = 1
ignorehitpause = 1
value = 0

[State 169995]
type = powerset
trigger1 = 1
ignorehitpause = 1
value = 0

[state 169995]
type = varset
trigger1 = ishelper && time = 0
v = 2
value = prevstateno

[state 169995]
type = varset
trigger1 = ishelper && time = 0
v = 3
value = anim

[State 169995]
type = ChangeAnim
trigger1 = time = 0 && !ishelper
value = 5070

[state 169995]
type = changestate
trigger1 = IfElse((ishelper),(time>=1),(time>=2))
value = IfElse((ishelper),169994,0)

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

[Statedef 169994]
type    = U
movetype= I
physics = N
sprpriority = 4

[State 169994]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow
flag3 = globalnoshadow

[state 169994]
type = null;varset
trigger1 = ishelper&&root,HitDefAttr=SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT,AA,AT,AP
v = 4
value = root,stateno

[state 169994]
type = null;varset
triggerall = ishelper&&time<14
trigger1 =root,HitDefAttr=SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT,AA,AT,AP
v = 5
value = 1

[State 169994]
type = Projectile
trigger1 = time<=1&&enemynear,name="White Kyurem"&&enemynear,fvar(38)!=0&&ishelper
attr = S, NA
projanim = var(3)
projhitanim = -1
projpriority = 9999999999
projsprpriority = 5
projremove = 1
projid = 169994
projremovetime = 100
postype = p2
offset = 0,250
velocity = 0
animtype  = hard
damage    = 0
numhits = 0
getpower = 0,0
givepower = 0,0
hitflag = MAFLPD
guardflag =
pausetime = 10,10
sparkno = -1
sparkxy = 0,0
hitsound   = -1
guard.sparkno = -1
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -10,-10
air.velocity = -10,-10
fall = 1
air.fall = 1
fall.recover = 0
p1stateno = var(2)
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 169994]
type = Projectile
trigger1 = time>=30&&enemynear,name="White Kyurem"&&enemynear,fvar(38)=1&&ishelper&&root,alive
trigger1 =!(root,HitDefAttr=SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT,AA,AT,AP)
attr = S, NA
projanim = var(3)
projhitanim = -1
projpriority = 9999999999
projsprpriority = 5
projremove = 1
projid = 169994
projremovetime = 100
postype = p2
offset = 0,250
velocity = 0
animtype  = hard
damage    = 0
numhits = 0
getpower = 0,0
givepower = 0,0
hitflag = MAFLPD
guardflag =
pausetime = 10,10
sparkno = -1
sparkxy = 0,0
hitsound   = -1
guard.sparkno = -1
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -10,-10
air.velocity = -10,-10
fall = 1
air.fall = 1
fall.recover = 0
p1stateno = 40
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 169994]
type = Projectile
trigger1 =enemynear,time>=146&&enemynear,name="White Kyurem"&&enemynear,fvar(38)=2&&ishelper&&root,alive
trigger1 =!(root,HitDefAttr=SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT,AA,AT,AP)&&(root,stateno!=[40,52])
trigger1 =numprojid(169994)=0
attr = S, NA
projanim = var(3)
projhitanim = -1
projpriority = 9999999999
projsprpriority = 5
projremove = 1
projid = 169994
projremovetime = 100
postype = p2
offset = 0,250
velocity = 0
animtype  = hard
damage    = 0
numhits = 0
getpower = 0,0
givepower = 0,0
hitflag = MAFLPD
guardflag =
pausetime = 10,10
sparkno = -1
sparkxy = 0,0
hitsound   = -1
guard.sparkno = -1
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -10,-10
air.velocity = -10,-10
fall = 1
air.fall = 1
fall.recover = 0
p1stateno = (enemynear,time>=148)*40
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 169994]
type = null;Projectile
trigger1 = ishelper&&roundstate<=2&&time<=10
projanim = 0
projremove = 1
projremovetime = 1
projpriority = 1
projsprpriority = 1
projid = var(4)
attr = S,NA
offset = 0,2500
hitflag = M
SuperMoveTime = 9999999
PauseMoveTime = 9999999

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

[State 169994]
type = PosSet
trigger1 = ishelper
Y = 2400

[State 169994]
type = ChangeState
trigger1 = !ishelper
value = 0

[State 169994]
type = destroyself
trigger1 = roundstate!=2||root,alive=0||enemynear,name="White Kyurem"&&enemynear,stateno!=22050&&enemynear,fvar(38)=2
trigger2 = enemynear,name="White Kyurem"&&enemynear,fvar(38)=1&&time>=30

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

[Statedef 13121]
type    = A
poweradd = 0
ctrl = 0
velset = 0,0
sprpriority = -1
movetype = H

[State 13121]
type = lifeadd
trigger1 = time = 0
ignorehitpause = 1
value = -(Ceil(0.1 * Const(data.life)))
absolute = 1

[State 13121]
type = lifeset
triggerall = enemynear,name="White Kyurem"&&enemynear,palno=11
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = powerset
triggerall = enemynear,name="White Kyurem"&&enemynear,palno=11
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = VarRangeSet
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
value = 0

[State 1]
type = VarRangeSet
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
fvalue = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(1) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(2) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(3) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(4) = 0
IgnoreHitPause = 1

[State 1]
type = changestate
triggerall = time = 0
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1
trigger1 = (ishelper(1120)||ishelper(2000)||ishelper(2222))
trigger1 = root,var(46)>=1&&root,palno=11
value = 2229902

[State 1]
type = AssertSpecial
trigger1 = ishelper
flag = invisible
flag2 = noshadow
flag3 = globalnoshadow

[State 1]
type = statetypeset
trigger1 = time = 0
trigger1 = pos y = 0
value = S

[State 812,4]
type = changeanim
trigger1 =!ishelper
trigger1 = selfanimexist(anim)
value = anim
elem = animelemno(-1)

[state 1]
type = varset
trigger1 = ishelper&&time=0&&enemynear,name="White Kyurem"&&enemynear,fvar(38)=2
v = 2
value = prevstateno

[state 1]
type = varset
trigger1 = ishelper&&time=0&&enemynear,name="White Kyurem"&&enemynear,fvar(38)=2
v = 3
value = anim

[state 1]
type = destroyself
trigger1 = ishelper&&time>=1&&enemynear,name="White Kyurem"&&enemynear,fvar(19)!=0&&enemynear,fvar(38)=2
trigger2 = ishelper&&time>=1&&enemynear,name="White Kyurem"&&enemynear,fvar(38)=1
trigger3 = ishelper&&time>=5

[state 1]
type = changestate
trigger1 = ishelper&&time>=1&&enemynear,name="White Kyurem"&&enemynear,fvar(19)!=1&&enemynear,fvar(38)=2
value = 2229900

[State 1]
type = changestate
trigger1 = time >=1&&!ishelper
value = 10380

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

[Statedef 2229900]
type    = A
movetype= H
physics = N
sprpriority = 4
velset = 0,0

[State 2229900]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0

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

[State 2229900]
type = PosSet
trigger1 = ishelper
Y = 2400

[State 2229900]
type = AssertSpecial
trigger1 = ishelper
flag = invisible
flag2 = noshadow
flag3 = globalnoshadow

[State 2229900]
type = ChangeAnim
trigger1 = time=0&&!ishelper
value = 5070

[State 2229900]
type = Projectile
trigger1 = ishelper&&roundstate<=2&&time<=2
projanim = 0
projremove = 1
projremovetime = 1
projpriority = 1
projsprpriority = 1
projid = 96968484321
attr = S,NA
offset = 0,2500
hitflag = M
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 2229900]
type = null;helper
trigger1 = numhelper(96968484321)=0&&roundstate<=2&&time=0
id = 96968484321
persistent = 1
name = "flag"
pos = 0,0
postype = P1
stateno = 2229901
helpertype = normal
keyctrl = 0
ownpal = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[state 2229900]
type = changestate
trigger1 = IfElse((ishelper),enemynear,name="White Kyurem"&&(enemynear,stateno=22050),(time>=1))
value = IfElse((ishelper),169994,13120)

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

[Statedef 2229901]
type    = A
movetype= I
physics = N
sprpriority = 4
velset = 0,0

[State 2229901]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0

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

[State 2229901]
type = PosSet
trigger1 = 1
Y = 2500

[State 2229901]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow
flag3 = globalnoshadow

[State 2229901]
type = ChangeAnim
trigger1 = time=0
value = 0

[state 2229901]
type = destroyself
trigger1 =roundstate!=2||root,alive=0
trigger2 =enemynear,name="White Kyurem"&&enemynear,stateno=22100

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

[Statedef 10380]
type    = A
movetype= H
physics = N
sprpriority = 4
velset = -4,-6

[state a]
type = destroyself
trigger1 = ishelper

[State 13121]
type = lifeset
triggerall = enemynear,name="White Kyurem"&&enemynear,palno=11
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = powerset
triggerall = enemynear,name="White Kyurem"&&enemynear,palno=11
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 5050, 1]
type = ChangeAnim
trigger1 = time=0
value = 5070

[State 821, 1]
type = VelAdd
Trigger1 = time > 0
y = .39

[State 821, 4]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100


;---------------------------------------------------------------------------
; Shun Goku Satsu - Startup
[Statedef 4567]
type = S
movetype = I
physics = N
ctrl = 0
anim = 4567
velset = 0,0

[State 1300, SuperPause]
type = SuperPause
trigger1 = time = 0
time = 20
anim = -1
sound = 121,331
pos = 0,-35
move = 1
darken = 1
unhittable = 1

[State 2300]
type = Explod
trigger1 = time = 0
anim = 3062
sprpriority = -4
postype = p1
pos = 0,-35
bindtime = -1
supermove = 1
under = 0
ownpal = 1

;DREAM CANCEL IF CANCELED FROM MAIN ATTACK
[State 3000, Super]
type = Helper
trigger1 = Time = 0
trigger1 = PrevStateNo = 2200 || PrevStateno = 4310 || Prevstateno = 3000 || Prevstateno = 2000
persistent = 0
id = 30006
name = "DREAM Cancel Helper"
pos = 0,0
postype = P1
stateno = 2320
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 2300]
type = helper
trigger1 = time = 0 || time = 0 ;|| AnimElemTime(6) = 1 || AnimElemTime(7) = 14
id = 26380
persistent = 1
name = "wakka"
pos = 0,-35
postype = P1
stateno = 26380
helpertype = normal
keyctrl = 0
ownpal = 1
pausemovetime = 999
supermovetime = 999

[State 2300]
type = PlaySnd
trigger1 = Time = 0
value = 4000,19

[State 2300]
type = PlaySnd
trigger1 = Time = 0
value = 3000,3

[State 2300]
type = PlaySnd
trigger1 = Time = 0
value = 4000,18

[State 1300, PowerAdd]
type = PowerAdd
trigger1 = time = 0
value = -9000

[State 1300, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 4568

;---------------------------------------------------------------------------
; Shun Goku Satsu - Glide
[Statedef 4568]
type = S
movetype = A
physics = N
ctrl = 0
anim = 4568
velset = 0,0

[State 1301, AssertSpecial]
type = AssertSpecial
trigger1 = time > 0
flag = unguardable

[State 1301, AfterImage]
type = AfterImage
trigger1 = AnimTime = 0
time = 0

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

[State 1301, VelSet]
type = VelSet
trigger1 = time > 0
x = 8

[State 1301, AfterImage]
type = AfterImage
trigger1 = time = 0
time = 30
palcontrast = 220,220,220
palbright = 20,20,20
palmul = .75,.75,.75
length = 15
paladd = 255,0,0
framegap = 4

[State 1301, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,HT
hitflag = MAF
guardflag = MA
priority = 1,Miss
getpower = 0,0
givepower = 0,0
p1stateno = 4569
p2stateno = 1310
sparkno = 0
hitsound = s1300,1
numhits = 0

[State 1301, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1300,0

;---------------------------------------------------------------------------
; Shun Goku Satsu - Attack
[Statedef 4569]
type = S
movetype = I
physics = N
ctrl = 0
anim = 4569
velset = 0,0

[State 1302, AssertSpecial]
type = AssertSpecial
trigger1 = time > 0
flag = nobardisplay

[State 1302, NotHitBy]
type = NotHitBy
trigger1 = time > 0
value = SCA

[State 1302, AssertSpecial]
type = AssertSpecial
trigger1 = time > 0
flag = NoKoSlow

[State 1302, AllPalFX]
type = AllPalFX
trigger1 = AnimElemTime(1) = 15
time = 15
sinadd = -255,-255,-255,60

[State 1302, EnvColor]
type = EnvColor
trigger1 = AnimElemTime(2) = 0
value = 0,0,0
time = 150

[State 1302, Explod]
type = Explod
trigger1 = AnimElemTime(2) = 0
trigger2 = AnimElemTime(3) = 0
trigger3 = AnimElemTime(4) = 0
trigger4 = AnimElemTime(5) = 0
trigger5 = AnimElemTime(6) = 0
trigger6 = AnimElemTime(7) = 0
trigger7 = AnimElemTime(8) = 0
trigger8 = AnimElemTime(9) = 0
trigger9 = AnimElemTime(10) = 0
trigger10 = AnimElemTime(11) = 0
trigger11 = AnimElemTime(12) = 0
trigger12 = AnimElemTime(13) = 0
trigger13 = AnimElemTime(14) = 0
trigger14 = AnimElemTime(15) = 0
trigger15 = AnimElemTime(16) = 0
trigger16 = AnimElemTime(17) = 0
trigger17 = AnimElemTime(18) = 0
trigger18 = AnimElemTime(19) = 0
trigger19 = AnimElemTime(20) = 0
trigger20 = AnimElemTime(21) = 0
trigger21 = AnimElemTime(22) = 0
trigger22 = AnimElemTime(23) = 0
trigger23 = AnimElemTime(24) = 0
trigger24 = AnimElemTime(25) = 0
trigger25 = AnimElemTime(26) = 0
trigger26 = AnimElemTime(27) = 0
trigger27 = AnimElemTime(28) = 0
trigger28 = AnimElemTime(29) = 0
trigger29 = AnimElemTime(30) = 0
trigger30 = AnimElemTime(31) = 0
anim = 3062;10020+(random%2)
pos = 0,-40
postype = p2
facing = 1
vfacing = 1
bindtime = 1
random = 120,120
removetime = -2
ontop = 1

[State 1302, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
trigger2 = AnimElemTime(3) = 0
trigger3 = AnimElemTime(4) = 0
trigger4 = AnimElemTime(5) = 0
trigger5 = AnimElemTime(6) = 0
trigger6 = AnimElemTime(7) = 0
trigger7 = AnimElemTime(8) = 0
trigger8 = AnimElemTime(9) = 0
trigger9 = AnimElemTime(10) = 0
trigger10 = AnimElemTime(11) = 0
trigger11 = AnimElemTime(12) = 0
trigger12 = AnimElemTime(13) = 0
trigger13 = AnimElemTime(14) = 0
trigger14 = AnimElemTime(15) = 0
trigger15 = AnimElemTime(16) = 0
trigger16 = AnimElemTime(17) = 0
trigger17 = AnimElemTime(18) = 0
trigger18 = AnimElemTime(19) = 0
trigger19 = AnimElemTime(20) = 0
trigger20 = AnimElemTime(21) = 0
trigger21 = AnimElemTime(22) = 0
trigger22 = AnimElemTime(23) = 0
trigger23 = AnimElemTime(24) = 0
trigger24 = AnimElemTime(25) = 0
trigger25 = AnimElemTime(26) = 0
trigger26 = AnimElemTime(27) = 0
trigger27 = AnimElemTime(28) = 0
trigger28 = AnimElemTime(29) = 0
trigger29 = AnimElemTime(30) = 0
trigger30 = AnimElemTime(31) = 0
value = s5,32

[State 1302, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElemTime(2) = 0
trigger2 = AnimElemTime(3) = 0
trigger3 = AnimElemTime(4) = 0
trigger4 = AnimElemTime(5) = 0
trigger5 = AnimElemTime(6) = 0
trigger6 = AnimElemTime(7) = 0
trigger7 = AnimElemTime(8) = 0
trigger8 = AnimElemTime(9) = 0
trigger9 = AnimElemTime(10) = 0
trigger10 = AnimElemTime(11) = 0
trigger11 = AnimElemTime(12) = 0
trigger12 = AnimElemTime(13) = 0
trigger13 = AnimElemTime(14) = 0
trigger14 = AnimElemTime(15) = 0
trigger15 = AnimElemTime(16) = 0
trigger16 = AnimElemTime(17) = 0
trigger17 = AnimElemTime(18) = 0
trigger18 = AnimElemTime(19) = 0
trigger19 = AnimElemTime(20) = 0
trigger20 = AnimElemTime(21) = 0
trigger21 = AnimElemTime(22) = 0
trigger22 = AnimElemTime(23) = 0
trigger23 = AnimElemTime(24) = 0
trigger24 = AnimElemTime(25) = 0
trigger25 = AnimElemTime(26) = 0
trigger26 = AnimElemTime(27) = 0
trigger27 = AnimElemTime(28) = 0
trigger28 = AnimElemTime(29) = 0
trigger29 = AnimElemTime(30) = 0
value = -18
kill = 0

[State 1302, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElemTime(31) = 0
value = -99999999
kill = 1

[State 1302, HitAdd]
type = HitAdd
trigger1 = AnimElemTime(3) = 0
trigger2 = AnimElemTime(4) = 0
trigger3 = AnimElemTime(5) = 0
trigger4 = AnimElemTime(6) = 0
trigger5 = AnimElemTime(7) = 0
trigger6 = AnimElemTime(8) = 0
trigger7 = AnimElemTime(9) = 0
trigger8 = AnimElemTime(10) = 0
trigger9 = AnimElemTime(11) = 0
trigger10 = AnimElemTime(12) = 0
trigger11 = AnimElemTime(13) = 0
trigger12 = AnimElemTime(14) = 0
trigger13 = AnimElemTime(15) = 0
trigger14 = AnimElemTime(16) = 0
trigger15 = AnimElemTime(17) = 0
trigger16 = AnimElemTime(18) = 0
trigger17 = AnimElemTime(19) = 0
trigger18 = AnimElemTime(20) = 0
trigger19 = AnimElemTime(21) = 0
trigger20 = AnimElemTime(22) = 0
trigger21 = AnimElemTime(23) = 0
trigger22 = AnimElemTime(24) = 0
trigger23 = AnimElemTime(25) = 0
trigger24 = AnimElemTime(26) = 0
trigger25 = AnimElemTime(27) = 0
trigger26 = AnimElemTime(28) = 0
trigger27 = AnimElemTime(29) = 0
trigger28 = AnimElemTime(30) = 0
trigger29 = AnimElemTime(31) = 0
trigger30 = AnimElemTime(2) = 0
value = 1

[State 1302, TargetState]
type = TargetState
trigger1 = AnimTime = 0
value = 1311

[State 1302, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 4670
ctrl = 0
 [State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1300,2
volume = 255

;---------------------------------------------------------------------------
; Shun Goku Satsu - Custom State
[Statedef 1310]
type = S
movetype = H
physics = N
ctrl = 0
velset = 0,0

[State 1310, PosAdd]
type = PosAdd
trigger1 = pos y < 0
y = 4

[State 1310, PosSet]
type = PosSet
trigger1 = pos y > 0
y = 0

[State 1310, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 1310

;---------------------------------------------------------------------------
; Shun Goku Satsu - LieDown State
[Statedef 1311]
type = L
movetype = H
physics = N
ctrl = 0
velset = 0,0

[State 1311, SelfState]
type = SelfState
trigger1 = !Alive
value = 5150

[State 1311, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 1311

[State 1311, Get up]
type = SelfState
trigger1 = AnimTime = 0
value = 5120

;---------------------------------------------------------------------------
; Shun Goku Satsu - End
[Statedef 4670]
type = S
movetype = I
physics = N
ctrl = 0
anim = 4570

[State 1303, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = p2life != 0
value = 0
ctrl = 1

[State 1303, ChangeState]
type = ChangeState
trigger1 = time = 160
trigger1 = p2life = 0
value = 0
ctrl = 1

;Play end quote - KO
[State 0, PlaySnd]
type = PlaySnd
triggerall = P2Life = 0
triggerall = RoundState > 2
trigger1 = Time = 4
value = 6, 6
;---------------------------------------------------------------------------
;超必演出ヘルパ
;---------------------------------------------------------------------------

[Statedef 26380]
type    = A
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 3061
ownpal = 1

[state a]
type = nothitby
trigger1 = 1
value = SCA

[state a]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AP,AT
stateno = 1

[State a]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State a]
type = Trans
trigger1 = 1
trans = add

[state a]
type = varset
trigger1 = time = 0
v = 56
value = 0

[State a]
type = VarAdd
trigger1 = Var(56) <= 40
var(56) = 1

[State a]
Type = AngleDraw
Trigger1 = Time >= 0
scale = 0.2 + Var(56)/10.0 , 0.2 + Var(56)/10.0

[State a]
Type = AngleAdd
Trigger1 = Time >= 0
Value = -3

[state a]
type = destroyself
trigger1 = Time >= 25

;---------------------------------------------------------------------------
;Bus of Doom
[Statedef 2005]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
;Commonly-used controllers:
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 78427                   ;Change animation (Def: no change)
sprpriority = 2                  ;Set layering priority to 2 (in front)

[State 0, ]
type = SuperPause
trigger1 = Time = 0
time = 20
anim = -1
sound = S4, 3
poweradd = -4000
ignorehitpause = 1

[State 4301, superchargehelper]
type=helper
trigger1= !time
helpertype=normal
stateno=7005
ID=7500
name="Super Charge"
postype=p1
pos=0,-35
ownpal=1
persistent=0
pausemovetime=255
supermovetime=255

[State 4301, superchargepause]
type=superpause
trigger1= !time
time=53
anim=-1
sound=S1200,4
poweradd=-4000*(var(20)<=0)
p2defmul=1
darken=0

[State 0, ]
type = Helper
trigger1 = Time = 1
helpertype = normal
name = "Bus"
ID = 2000
pos = -200,0
postype = back
facing = 1
stateno = 2001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
affectteam = T

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Bus of doom strike
[Statedef 2001]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = N                      ;Physics: S-stand, C-crouch, A-air
;Commonly-used controllers:
velset = 13,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 23456                   ;Change animation (Def: no change)
sprpriority = 10                  ;Set layering priority to 2 (in front)

[State 200, 1]
type = HitDef
trigger1 = movecontact = 0
attr = S, HP                     ;Attribute: Standing, Normal Attack
damage = 125, 0                   ;Damage that move inflicts, guard damage
animtype = Hard                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag =                   ;Flags on how move is to be guarded against
hitflag = MAFPD                    ;Flags of conditions that move can hit
pausetime = 12, 12                 ;Time attacker pauses, time opponent shakes
sparkno = S7000                      ;Spark anim no (Def: set above)
sparkxy = 0,0
hitsound = S13, 5               ;Sound to play on hit
guardsound = -1                ;Sound to play on guard
ground.type = Low               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 12             ;Time opponent is in hit state
ground.velocity = -1,-30             ;Velocity at which opponent is pushed
air.type = Low                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1,-30           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12                 ;Time before opponent regains control in air
palfx.time = 450
palfx.add = 100,100,100
palfx.mul = 256,256,256
palfx.sinadd = -80,-80,-80,10
palfx.color = 0
palfx.invertall = 1
fall = 1
fall.recover = 0
fall.damage = 30
p2stateno = 7600

[State 0, ]
type = DestroySelf
trigger1 = time >= 300
ignorehitpause = 1

;------------------------------------------------------------------
; Electric State
[Statedef 7600]
type = A
physics = N
movetype = H
velset = 0,0
ctrl = 0
anim = 5030
juggle = 0

[State 7600, Shock]
type = ChangeAnim
trigger1 = AnimExist(7696)
trigger1 = Anim != 7696
value = 7696

[State 7600, Fau-Shock]
type = Palfx
trigger1 = !AnimExist(7696) && TimeMod = 3, 1
time = 2
mul = 199,198,226

[State 7600, Fau-Shock]
type = Palfx
trigger1 = !AnimExist(7696) && TimeMod = 4, 2
time = 3
mul = 50,26,50

[State 7600, No hit]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 1302, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = TimeMod = 1, 100
value = -2
kill = 0

[State 7600, Fall Back]
type = velset
trigger1 = Time = 300
x = -4.5
y = -6.4

[State 7600, Fall Back]
type = gravity
trigger1 = Time >= 300

[State 7600, Change]
type = Selfstate
trigger1 = Pos Y > 0
value = 5100

;---------------------------------------------------------------------------
; Dream Cancel Display Helper
;-------------------------------------------------------------------------------;
[Statedef 2320]
type = A
movetype = I
physics = N
ctrl = 0
anim = 20000
velset = 0,0
ownpal = 1

[State 3000, 1] ;Dream Cancel Enter
type = Explod
trigger1 = Time = 0
anim = 30006
id = 30006
postype = left
pos = 320,0
vel = -40,0
facing = 1

sprpriority = 7
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

[State 2310, Kill Dream Cancel Entry]
type = RemoveExplod
trigger1 =  time > 5
id =  30006
;ignorehitpause =
;persistent =

[State 3000, 1] ;Dream Cancel Freeze
type = Explod
trigger1 = Time = 5
anim = 30006
id = 30016
postype = left
pos = 0,0
vel = 0,0
facing = 1
bindtime = -1
sprpriority = 7
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

[State 2310, Kill Dream Cancel Freeze]
type = RemoveExplod
trigger1 =  time > 35
id =  30016
;ignorehitpause =
;persistent =

[State 3000, 1] ;Dream Cancel Exit
type = Explod
trigger1 = Time = 35
anim = 30006
id = 30026
postype = left
pos = 0,0
vel = -40,0
facing = 1

sprpriority = 7
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

[State 2310, Kill Dream Cancel Exit]
type = RemoveExplod
trigger1 =  time > 40
id =  30026
;ignorehitpause =
;persistent =

[State 2310, DestroySelf]
type = DestroySelf
trigger1 = time > 40
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; 大?
[Statedef 2000]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 15
poweradd= -3000
anim = 2310
ctrl = 0

[State 2000]
type = varset
trigger1 = palno=11&&time=0
fv = 13
value = 1
ignorehitpause = 1

[State 2000]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = nofg
flag3 = nobg

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

[State 4301, superchargehelper]
type=helper
trigger1= !time
helpertype=normal
stateno=7005
ID=7500
name="Super Charge"
postype=p1
pos=30,-35
ownpal=1
persistent=0
pausemovetime=255
supermovetime=255

;DREAM CANCEL IF CANCELED FROM MAIN ATTACK
[State 3000, Super]
type = Helper
trigger1 = Time = 0
trigger1 = PrevStateNo = 2200 || PrevStateno = 4310 || Prevstateno = 3000 || Prevstateno = 4567
persistent = 0
id = 30006
name = "DREAM Cancel Helper"
pos = 0,0
postype = P1
stateno = 2320
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4301, superchargepause]
type=superpause
trigger1= !time
time=53
anim=-1
sound=S1200,4
poweradd=-3000*(var(20)<=0)
p2defmul=1
darken=0

[State 2000]
type = EnvColor
trigger1 = time = 0
persistent = 0
ignorehitpause = 1
time = 3
value = 255,255,255
under = 2

[State 2000]
type = EnvColor
trigger1 = time = 10
persistent = 0
ignorehitpause = 1
time = 28
value = 255,255,255
under = 2

[State 2000]
type = EnvColor
trigger1 = time = 38
persistent = 0
ignorehitpause = 1
time = 50
value = 0,0,0
under = 2

[state 2000]
type = changestate
trigger1 = animtime = 0
value = 200000
;---------------------------------------------------------------------------
[statedef 200000]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 15
anim = 74124
ctrl = 0

[State 23000]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = nofg
flag3 = nobg
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

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

[State 23000]
type = PlaySnd
trigger1 = Time = 10 || Time = 20 || Time = 30 || Time = 40 || Time = 50 || Time = 60 || Time = 70 || Time = 80 || Time = 90 || Time = 100 || Time = 110 || Time = 120 || Time = 130 || Time = 140 || Time = 150 || Time = 160 || Time = 170 || Time = 180
value = 1150,0
volume = 150

[State 23000]
type = PlaySnd
trigger1 = Time = 0
value = 4000,17
volume = 250
channel = 9

[State 23000]
type = null;PlaySnd
trigger1 = Time = 0
value = 4000,20
volume = 150

[State 23000]
type = Explod
trigger1 = Time = 0
anim = 2650
id = 2650
postype = back
sprpriority = 999999999
pos = 0,0
bindtime = -1
supermove = 0
under = 0
ownpal = 1
ontop = 1
trans = sub

[State 23000]
type = EnvColor
trigger1 = 1
ignorehitpause = 1
time = 10
value = 255,255,255
under = 2

[State 23000]
type = EnvShake
trigger1 = (GameTime%4) = 1
time = 5
ampl = -5
freq = 95
phase = 95

[State 23000]
type = Projectile
triggerall = palno = 11
trigger1 = fvar(16)!=1&&(time=[20,220])&&(GameTime%3) = 1
trigger2 = fvar(16)!=0&&(time=[180,220])&&(GameTime%3) = 1
attr = S, NA
projanim = 3063
projhitanim = -1
projid = 3063
projpriority = 9999999999
projsprpriority = 5
projremove = 1
projremovetime = 2
postype = p1
offset = 0,0
velocity = 0
animtype  = hard
damage    = 21474836
getpower = 0,0
givepower = -9999999999
hitflag = MAFD
guardflag =
pausetime = 9,5
guard.pausetime = 9,5
sparkno = -1
sparkxy = 40,-74
hitsound   = -1
guard.sparkno = -1
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -0.75,-0.01
guard.velocity = -9.5
air.velocity = -0.75,-0.01
fall = 1
air.fall = 1
fall.recover = 0
p2stateno = 5110

[State 23000]
type = Projectile
triggerall = palno = 11
trigger1 = time = [20,220]
trigger1 = (GameTime%3) = 1
attr = S, NA
projanim = 3063
projhitanim = -1
projid = 3063
projpriority = 9999999999
projsprpriority = 5
projremove = 1
projremovetime = 2
postype = p1
offset = 0,0
velocity = 0
animtype  = hard
damage    = ((random<=10)*(random%150))+(random<=(2+(var(1)*5)))*21474836,(random<=20)*(random%200)
getpower = 0,0
givepower = 0
hitflag = MAFD
guardflag = M
pausetime = 9,5
guard.pausetime = 9,5
sparkno = -1
sparkxy = 40,-74
hitsound   = -1
guard.sparkno = -1
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -0.75,-0.01
guard.velocity = -9.5
air.velocity = -0.75,-0.01
fall = 1
air.fall = 1
fall.recover = 0
p2stateno = 5110

[State 23000]
type = Projectile
triggerall = palno = 11
trigger1 = time = [20,220]
trigger1 = (GameTime%2) = 1
attr = S, NA
projanim = 3063
projhitanim = -1
projid = 3067
projpriority = 9999999999
projsprpriority = 5
projremove = 1
projremovetime = 2
postype = back
offset = 160,-140
velocity = 0
animtype  = hard
damage    = ((random<=10)*(random%150))+(random<=(2+(var(1)*5)))*21474836,(random<=20)*(random%200)
getpower = 0,0
givepower = 0
hitflag = MAFD
guardflag = M
pausetime = 9,5
guard.pausetime = 9,5
sparkno = -1
sparkxy = 40,-74
hitsound   = -1
guard.sparkno = -1
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -0.75,-0.01
guard.velocity = -9.5
air.velocity = -0.75,-0.01
fall = 1
air.fall = 1
fall.recover = 0

[State 23000]
type = Projectile
trigger1 = 1
attr = S, SP
projanim = 3063
projhitanim = -1
projid = 3064
projpriority = 999999999
projsprpriority = 999999999
projremove = 1
projremovetime = 2
postype = p1
offset = 0,0
velocity = 0
animtype  = Light
damage    = 1,0
getpower = 10,0
givepower = 0,0
guardflag = M
hitflag = MAFD
pausetime = 2,8
sparkno = -1
sparkxy = -15,-77
hitsound   = -1
guard.sparkno = -1
guardsound = -1
ground.type = low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -2
air.velocity = -2,-1

[State reversal]
type = ReversalDef
Trigger1 = time >= 121
reversal.attr = SCA,AA,AT,AP
priority = 7, Hit
pausetime = 0,0
p2stateno = 5110
palfx.time = 60
palfx.add = -180,-180,100
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[state -1]
type = targetdrop
triggerall = numtarget > 0
triggerall = time >= 125
trigger1 = target,ishelper
trigger2 = animtime = 0
trigger3 = numtarget > 6
ignorehitpause = 1

[state state];おまけ
type = targetstate
triggerall = numtarget > 0
triggerall = target,ishelper != 1
Triggerall = time >= 125
trigger1 = gametime%8 = 1
value = 0
ignorehitpause = 1

[state state];おまけ
type = targetstate
triggerall = numtarget > 0
triggerall = target,ishelper != 1
Triggerall = time >= 125
trigger1 = random%8=1
trigger2 = gametime%8 = 1
value = 5110
ignorehitpause = 1

[state 2000]
type = changestate
trigger1 = time >= 250
value = 275274

;-----------------------------------------------------------------------------------
[Statedef 275274]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 15
anim = 78427
ctrl = 0

[State 24401]
type = nothitby
trigger1 = 1
value = sca

[State 24401]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay

[state 24401]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
