;============================================================== 
; CNS File for Piccolo by Team Z2
; Helper States
;==============================================================

;======================================================================
; Repel helper : 305
; Destroyed : 306
; Reflect with random projectile : 308
; Reflected projectile : 315
; Reflected projectile explods : 316
;======================================================================

;------------------------------------------------------------------------------;
;Backdash Helper States
;------------------------------------------------------------------------------;
;Vanish effect
[Statedef 107]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
sprpriority = 4
juggle = 10

[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 107, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = 105
elem = 3

[State 107, Trans]
type = Trans
trigger1 = 1
trans = addalpha ;none, add, addalpha, add1, sub
alpha = 256-floor(time*256/10),floor(time*256/10)

[State 107, NotHitBy]
type = NotHitBy
trigger1 = 1 
value = SCA
time = 1
ignorehitpause = 1
 
[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 10

;------------------------------------------------------------------------------;
;c.HP Helper States
;------------------------------------------------------------------------------;
;Laser
[Statedef 426] ;here
type = A
movetype = A
physics = N
ctrl = 0
velset = 0, 0
sprpriority = 4

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

[State 0, VarAdd]
type = ParentVarAdd
triggerall = !root, StateNo = 3411
triggerall = root,var(53) < 2100
trigger1 = MoveHit = 1
var(53) = 50


[State 0, VarAdd]
type = ParentVarAdd
triggerall = !root, StateNo = 3411
triggerall = root,var(53) < 2100
trigger1 = MoveGuarded = 1
var(53) = 25

[State 1, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno
Value = 421 ;here (last anim frame should loop and be invisible or something)

[State 421, BindToRoot]
type = BindToRoot
trigger1 = 1 
time = 1
pos = 0,0
ignorehitpause = 1 

[State 0, Projectile]
type = Projectile
trigger1 = MoveContact
ProjID = 426
projanim = 1606
projremovetime = 16

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1
trigger1 = P2StateType = A
var(18) = 1

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 2,2
channel = 1

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 5
value = 2,4
channel = 2

[State 1061, Hitdef]
type = HitDef
triggerall = root, Var(18) <= 55
trigger1 = animelemtime(4) >= 0 && animelemtime(9) < 0
attr = S, SP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 23/root,fvar(19) < 7, 7, root,fvar(11) * 23/root,fvar(19))), 3
priority  = 4,Hit
guardflag = L
hitflag = MFD
pausetime = 0,10
sparkno = s10030
guard.sparkno = s10000
sparkxy = -32,0
hitsound = s2, 3
guardsound = S5,21
ground.type = low
air.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7.8,0
guard.velocity = -7.5
air.velocity = -5.8,-3
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = ifelse(p2movetype=H,40,140), 10
givepower = 35,35
persistent = 0
palfx.add = 255,50,0
palfx.sinadd = -255,-50,0,20
palfx.time = 25


[State 421, Explod]
type = Explod
trigger1 = movehit
anim = 423
ID = 423
pos = 10,0
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,-0.25
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
persistent = 0
ignorehitpause = 1

[State 421, Explod]
type = Explod
trigger1 = animelem = 5
anim = 422
ID = 422
pos = 120,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
pausemovetime = 0
scale = 1,1
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

;HITDEFS, EXPLODS, PLAYSND, VARS GO HERE
 
[State 1, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0 && numtarget = 0


;---------------------------
; POWER CHARGE AURA
[Statedef 905]
type = A
movetype = I
physics = N
ctrl = 0
anim = 905
velset = 0,0
sprpriority = -1


[State 905, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 905, NoShadow]
type = Trans
trigger1 = root,var(2)=0
trans = none
ignorehitpause = 1

[State 905, BindToParent]
type = BindToParent
trigger1 = anim = 905 

pos = -10,3

[State 905, Anim]
type = ChangeAnim
triggerall = anim = 905 
trigger1 = root,stateno = 901 
value = 906

[State 905, DestroySelf]
type = DestroySelf
trigger1 = (anim = 905) && (Root,StateNo != 900)
trigger2 = (anim = 906) && animtime = 0
trigger3 = Root,stateno = [5000,5090]

;---------------------------
;Detect life Helper (Coded by 2OS)
[Statedef 2]

[State 2OS]
type = statetypeset
trigger1 = 1
movetype = I
ignorehitpause = 1
persistent = 1

[State 2OS, Blank Animation]
type = changeanim
trigger1 = 1
value = 15999
ignorehitpause = 1
persistent = 1

[State 2OS]
type = bindtoroot
trigger1 = 1
pos = 0,0
ignorehitpause = 1
persistent = 1

[State 2OS, Damage Var Delay Reset]
type = varset
trigger1 = var(1)>1
var(1) = 0
ignorehitpause = 1
persistent = 1

[State 2OS, Damage Var Delay]
type = varadd
trigger1 = var(2) != root,life
var(1) = 1
ignorehitpause = 1
persistent = 1

[State 2OS, Damage Var]
type = varset
trigger1 = (var(1)!=[0,1])
var(2) = root,life
ignorehitpause = 1
persistent = 1

;======================================================================
; Repel helper : 1305
; Destroyed : 1306
; Reflect with random projectile : 1308
; Reflected projectile : 1315
; Reflected projectile explods : 1316
;======================================================================

; REPEL HELPER FOR Focus Attack
[Statedef 1305]
type = S
physics = N
movetype = A
ctrl = 0
sprpriority = 4

[State 1305, nothitby]
type = nothitby
trigger1 = 1
time = -1
value = SCA
ignorehitpause = 1

[State 1305, HB]
type = hitby
trigger1 = 1
time = 1
value = SCA, NP, SP, HP
ignorehitpause = 1

[State 1305, HitOverride]
type = hitoverride
trigger1 = 1
time = -1
attr = SCA, AA, AP, AT
stateno = 1306
ignorehitpause = 1

[State 1305, HitOverride]
type = hitoverride
trigger1 = 1
time = -1
attr = SCA, NP, SP,HP
stateno = 1308
ignorehitpause = 1

[State 1305, Anim]
type = changeanim
trigger1 = anim != 1305
value = 1305

[State 1305, timevar]
type = varadd
trigger1 = 1
var(4) = 1

[State 1305, Shadows]
type = afterimage
trigger1 = !time && !prevstateno
time = 999
timegap = 1
framegap = 4
length = 12
palcontrast = 30, 60, 120
trans = add

[State 1305, Type]
type = statetypeset
trigger1 = movecontact
movetype = I

[State 1305, End]
type = changestate
trigger1 = var(4) >= 13
value = 1306

;-----------------------------------------
; Destroyed
[Statedef 1306]
type = A
physics = N
movetype = I
velset = 0, 0
ctrl = 0
sprpriority = 1
anim = 15998

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

[State 1306, End]
type = destroyself
trigger1 = !animtime

;-----------------------------------------
; Reflect with projectile
[Statedef 1308]
type = A
physics = N
movetype = I
ctrl = 0
anim = 15998

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

[State 1308, reflected]
type = helper
trigger1 = !time
helpertype = normal
stateno = 1315
ID = 1315
name = "Reflected"
postype = p1
pos = 25, -20
ownpal = 1
size.xscale = 1
size.yscale = 1

[State 1308, End]
type = changestate
trigger1 = 1
value = 1306   ;1305

;-----------------------------------------
; Reflected projectile Kamehameha
[Statedef 1315]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=4
poweradd = 100

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

[State 200, Ki goes SFX]
type = PlaySnd
trigger1 = !time
value = 10,0
channel = 1

[State -2, Explod];P1 Side.
type = Explod
trigger1 = !time && numexplod(13300)=0 && teamside = 1
anim = 13300
pos = 10,-169
postype = left  ;p2,front,back,left,right
removetime = -2
supermove = 1
sprpriority = 0
id = 13300
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = -1
persistent = 0

[State -2, Explod];P2 Side.
type = Explod
trigger1 = !time && numexplod(13300)=0 && teamside = 2
anim = 13301
pos = 10,-169
postype = right
removetime = -2
supermove = 1
sprpriority = 0
id = 13300
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = -1
persistent = 0

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, NoShadow]
type = Trans
trigger1 = root,var(2)=0
trans = none
ignorehitpause = 1

[State 1315, HitOverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=1316
ignorehitpause=1

[State 1315, HB]
type=hitby
trigger1= 1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1

[state 1315]
type = varset
triggerall = numenemy
triggerall = enemy,authorname = "Balthazar & Cybaster"
trigger1 = enemy,name = "Goku Z2"
trigger2 = enemy,name = "SSJ Goku Z2"
trigger3 = enemy,name = "Vegeta Z2"
trigger4 = enemy,name = "Gohan Z2"
var(11) = 1

[State 1315, Anim];normal kamehameha FX (yellow/blue)
type=changeanim
trigger1= !time && !prevstateno && var(11)=0 && root,var(44)=0
value=1311
[State 1315, Anim];normal kamehameha FX (old purple)
type=changeanim
trigger1= !time && !prevstateno && var(11)=0 && root,var(44)>=1
value=1310
[State 1315, Anim];Vegeta kamehameha FX
type=changeanim
trigger1= !time && !prevstateno && var(11)=1
value=1010

[State 1315, Vel]
type=velset
trigger1= 1
x = 8

[State 1315, image]
type=afterimage
trigger1= !time && !prevstateno
time=999
timegap=1
framegap=2
length=5
palcontrast=50,50,200
trans=add

[State 1315, Hit]
type=hitdef
trigger1= 1
priority=4,Hit
attr = S,SP
damage = Cond(parent,Ishelper,26,ceil(ifElse(root,fvar(11)/root,fvar(19) * 53 < 7, 7, root,fvar(11) * 53/root,fvar(19)))),Cond(parent,Ishelper,0,15)
animtype = Hard
hitflag = MAF
guardflag=MA
pausetime=0,10
sparkno = -1
guard.sparkno = -1
sparkxy = -10,0
hitsound  = S1000,0
guardsound = S6,1
ground.type=High
ground.slidetime=16
ground.hittime=16
ground.velocity=-10,0
ground.cornerpush.veloff=0
air.velocity=-4,-2
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
envshake.time=14
envshake.freq=120
envshake.ampl=4
air.fall=1
fall.recover=1
fall.recovertime=16
yaccel=.5
airguard.ctrltime= 16
airguard.velocity= -8, -1.5
forcestand=1
p1sprpriority = 5

[State 1315, Sparks]
type=explod
trigger1= movehit && numtarget
trigger1= (target,movetype=H) && !(target,time)
anim=7020
sprpriority=3
postype=p2
pos=(target,const(size.ground.front)-10),-floor(p2dist y)
removetime=-2
ownpal=1
facing=-1
ignorehitpause=1
persistent=0
pausemovetime=100
supermovetime=100

[State 1315, End]
type=changestate
trigger1= movecontact
value=1316
ignorehitpause=1

[State 1315, End]
type=destroyself
trigger1=pos x!=[-200,200]

;-----------------------------------------
; Kamehameha explod/vanish
[Statedef 1316]
type=A
physics=N
movetype=I
velset=0,0
ctrl=0
sprpriority=4

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

[State 3005, anim];VS Z2 chars
type = changeanim
trigger1 = !time && var(11)=1
value = 1013
[State 3005, anim];Repel (old)
type = changeanim
trigger1 = !time && var(11)=0 && prevstateno=1315 && root,var(44)>=1
value = 1316
[State 3005, anim];Repel (yellow/blue)
type = changeanim
trigger1 = !time && var(11)=0 && prevstateno=1315 && root,var(44)=0
value = 1311

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, NoShadow]
type = Trans
trigger1 = root,var(2)=0
trans = none
ignorehitpause = 1

[State 1316, End]
type=destroyself
trigger1= !animtime


;------------------------------------------------------------------------------;
;Micro Wave Helper States
;------------------------------------------------------------------------------;
[Statedef 1355]
type    = S
movetype= A
physics = N
sprpriority = 3
hitcountpersist = 1
movehitpersist = 1

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

[State 0, VarAdd]
type = ParentVarAdd
triggerall = !root, StateNo = 3411
triggerall = root,var(53) < 2100
trigger1 = MoveHit = 1
var(53) = 50

[State 0, VarAdd]
type = ParentVarAdd
triggerall = !root, StateNo = 3411
triggerall = root,var(53) < 2100
trigger1 = MoveGuarded = 1
var(53) = 25


[State 1355, VarSet]
type = VarSet
trigger1 = !time
var(0) = (random<100)
[State 1061, gethit gut ?]
type = VarSet
trigger1 = !time
var(14) = root,var(14)
[State 1061, gethit gut ?]
type = VarSet
trigger1 = !time
var(41) = parent,var(41)


[State 1370, ChangeAnim]
type = ChangeAnim
trigger1 = !time && !prevstateno
trigger2 = !Time && PrevStateNo = 1355
value = 1355+var(41)+(var(0))*10

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = !Time && !PrevStateNo
var(9) = 4

[State 0, VarAdd]
type = VarAdd
trigger1 = MoveContact
var(9) = -1

[State 1061, HitOverride]
type = HitOverride
trigger1 = !NumTarget(1355)
trigger1 = Time >= 0
slot = 1
time = 1
stateno = Cond(Var(9)>0,1355,1356)
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = NumTarget(1355)
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1356
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
value = SCA,NA,SA,HA,NT,ST,HT
time = 1
ignorehitpause = 1

[State 1355, BindToParent]
type = BindToParent
trigger1 = animelemtime(10+cond(var(41)=2,6,var(41)*4)) < 0
time = 1
pos = 36,8
ignorehitpause = 1
[State 1355, BindToParent]
type = BindToParent
trigger1 = animelemtime(10+cond(var(41)=2,6,var(41)*4)) >= 0 && animelemtime(14+cond(var(41)=2,6,var(41)*4)) < 0
time = 1
pos = 0,0
ignorehitpause = 1

[State 250, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 2,10
channel = 4

[State 250, 1]
type = PlaySnd
trigger1 = animelemtime(10+cond(var(41)=2,6,var(41)*4)) = 1
value = 2,6
persistent = 0
channel = 5

[State 1355, Explod]
type = Explod
trigger1 = animelemtime(11+cond(var(41)=2,6,var(41)*4)) = 0
anim = 1359+(var(0))*10
ID = 1309
pos = -42,0
postype = p1  
vel = -0.25,0
accel = -1.125,0
persistent = 0
sprpriority = 4

[State 1061, Hitdef]
type = HitDef
triggerall = root, Var(18) <= 55
triggerall = !NumTarget(1676)
triggerall = !NumTarget(1355)
trigger1 = !var(41) 
trigger1 = !parent, IsHelper
attr = S, SP
animtype  = hard
damage    = Cond(parent,Ishelper,31,ceil(ifElse(root,fvar(11) * 63/root,fvar(19) < 7, 7, root,fvar(11) * 63/root,fvar(19)))),Cond(parent,Ishelper,0,15)
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 50,-86
hitsound   = s2,8
guardsound = S5,20
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 12
ground.velocity = -7.8,0
guard.velocity = -7.5
air.velocity = -5.8,-3
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = Cond(p2movetype=H,Cond(parent,IsHelper,0,40),Cond(parent,IsHelper,0,140)), Cond(parent,IsHelper,0,10)
givepower = 35,35
persistent = 0
id=1355

[State 1061, Hitdef]
type = HitDef
triggerall = root, Var(18) <= 55
triggerall = !NumTarget(1676)
triggerall = !NumTarget(1355)
trigger1 = var(41) = 1
trigger1 = !parent, IsHelper
attr = S, SP
animtype  = hard
damage    = Cond(parent,Ishelper,31,ceil(ifElse(root,fvar(11) * 63/root,fvar(19) < 7, 7, root,fvar(11) * 63/root,fvar(19)))),Cond(parent,Ishelper,0,15)
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 50,-86
hitsound   = s2,8
guardsound = S5,20
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 12
ground.velocity = -5,-4
guard.velocity = -7.5
air.velocity = -5,-4
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = Cond(p2movetype=H,Cond(parent,IsHelper,0,40),Cond(parent,IsHelper,0,140)), Cond(parent,IsHelper,0,10)
givepower = 35,35
persistent = 0
id=1355

[State 1061, Hitdef]
type = HitDef
triggerall = root, Var(18) <= 55
triggerall = !NumTarget(1676)
triggerall = !NumTarget(1355)
trigger1 = var(41) = 2
trigger1 = !parent, IsHelper
attr = S, SP
animtype = diagup
damage    = Cond(parent,Ishelper,36,ceil(ifElse(root,fvar(11) * 73/root,fvar(19) < 7, 7, root,fvar(11) * 73/root,fvar(19)))),Cond(parent,Ishelper,0,15)
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 50,-86
hitsound   = s2,8
guardsound = S5,20
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 12
ground.velocity = -8,-4
guard.velocity = -7.5
air.velocity = -8,-4
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = Cond(p2movetype=H,Cond(parent,IsHelper,0,40),Cond(parent,IsHelper,0,140)), Cond(parent,IsHelper,0,10)
givepower = 35,35
persistent = 0
id = 1355

[State 1061, Hitdef]
type = HitDef
triggerall = root, Var(18) <= 55
triggerall = !NumTarget(1676)
triggerall = !NumTarget(1355)
triggerall = root, StateNo != [1600,1680]
trigger1 = !var(41) 
trigger1 = parent, IsHelper
attr = S, SP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 27 < 7, 7, root,fvar(11) * 27)), 15
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 50,-86
hitsound   = s2,8
guardsound = S5,20
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 12
ground.velocity = -7.8,0
guard.velocity = -7.5
air.velocity = -5.8,-3
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 35,35
persistent = 0
id = 1355

[State 1061, Hitdef]
type = HitDef
triggerall = root, Var(18) <= 55
triggerall = !NumTarget(1676)
triggerall = !NumTarget(1355)
triggerall = root, StateNo != [1600,1680]
trigger1 = var(41) = 1
trigger1 = parent, IsHelper
attr = S, SP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 32 < 7, 7, root,fvar(11) * 32)),15
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 50,-86
hitsound   = s2,8
guardsound = S5,20
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 12
ground.velocity = -5,-4
guard.velocity = -7.5
air.velocity = -5,-4
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 35,35
persistent = 0
id = 1355

[State 1061, Hitdef]
type = HitDef
triggerall = !NumTarget(1676)
triggerall = !NumTarget(1355)
triggerall = root, Var(18) <= 55
triggerall = root, StateNo != [1600,1680]
trigger1 = var(41) = 2
trigger1 = parent, IsHelper
attr = S, SP
animtype = diagup
damage    = ceil(ifElse(root,fvar(11) * 37 < 7, 7, root,fvar(11) * 37)),15
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 50,-86
hitsound   = s2,8
guardsound = S5,20
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 12
ground.velocity = -8,-4
guard.velocity = -7.5
air.velocity = -8,-4
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 35,35
persistent = 0
id = 1355

[State 1061, End]
type = destroyself
trigger1 = !animtime
trigger2 = parent,stateno != [1350,1351]



;----------------------------------------------------
;Canceled
[Statedef 1356]
type    = A
movetype= A
physics = N
sprpriority = 3
velset = 0,0

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

[State 1355, BindToParent]
type = BindToParent
trigger1 = animelemtime(10+cond(var(41)=2,6,var(41)*4)) < 0
time = 1
pos = 36,8
ignorehitpause = 1
[State 1355, BindToParent]
type = BindToParent
trigger1 = animelemtime(10+cond(var(41)=2,6,var(41)*4)) >= 0 && animelemtime(14+cond(var(41)=2,6,var(41)*4)) < 0
time = 1
pos = 0,0
ignorehitpause = 1

[State 1002, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1061, End]
type = destroyself
trigger1 = animtime = 0

;----------------------------------------------------
;EX版
[Statedef 1357]
type    = S
movetype= A
physics = N
sprpriority = 3
hitcountpersist = 1
movehitpersist = 1

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

[State 0, VarAdd]
type = ParentVarAdd
triggerall = !root, StateNo = 3411
triggerall = root,var(53) < 2100
trigger1 = MoveHit = 1
var(53) = 100

[State 0, VarAdd]
type = ParentVarAdd
triggerall = !root, StateNo = 3411
triggerall = root,var(53) < 2100
trigger1 = MoveGuarded = 1
var(53) = 50


[State 1061, gethit gut ?]
type = VarSet
trigger1 = !time
var(14) = root,var(14)
[State 1061, gethit gut ?]
type = VarSet
trigger1 = !time
var(41) = root,var(41)

[State 1370, ChangeAnim]
type = ChangeAnim
trigger1 = !time && !prevstateno
value = 1358

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = !Time && !PrevStateNo
var(9) = 4

[State 0, VarAdd]
type = VarAdd
trigger1 = MoveContact
var(9) = -1

[State 1061, HitOverride]
type = HitOverride
trigger1 = !NumTarget(1360)
trigger1 = Time >= 0
slot = 1
time = 1
stateno = Cond(Var(9)>0,1357,1358)
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = NumTarget(1360)
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1358
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
value = SCA,NA,SA,HA,NT,ST,HT
time = 1
ignorehitpause = 1

[State 1355, BindToRoot]
type = BindToRoot
trigger1 = animelemtime(12) < 0
time = 1
pos = 36,8
ignorehitpause = 1
[State 1355, BindToRoot]
type = BindToRoot
trigger1 = animelemtime(12) >= 0 && animelemtime(16) < 0
time = 1
pos = 0,0
ignorehitpause = 1

[State 250, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 2,10
channel = 4

[State 250, 1]
type = PlaySnd
trigger1 = animelemtime(12) = 1
value = 2,7
persistent = 0

[State 1355, Explod]
type = Explod
trigger1 = animelemtime(13) = 0
anim = 1359
ID = 1309
pos = -42,0
postype = p1  
vel = -0.25,0
accel = -1.125,0
persistent = 0
sprpriority = 4

[State 1061, Hitdef]
type = HitDef
triggerall = !NumTarget(1676)
triggerall = !NumTarget(1360)
triggerall = root, Var(18) <= 55
trigger1 = !time
attr = S, SP
animtype = back
damage    = ceil(ifElse(root,fvar(11) * 93 < 47, 47, root,fvar(11) * 93)),20
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,-86
hitsound   = s2,8
guardsound = S5,20
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7,-6
guard.velocity = -7.5
air.velocity = -7,-6
airguard.velocity = -5, -4
envshake.time = 10
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
;p2stateno = 1360
getpower = 0, 0
givepower = 35,35
persistent = 0
id = 1360

[State 0, TargetState]  ;New state
type = TargetState
trigger1 = Numtarget(1360)
trigger1 = movehit = 1
value = 1360
ID = 1360
ignorehitpause = 1
persistent = 0

[State 1061, End]
type = destroyself
trigger1 = !animtime
trigger2 = root,stateno != [1350,1352]


;----------------------------------------------------
;Canceled
[Statedef 1358]
type    = A
movetype= A
physics = N
sprpriority = 3
velset = 0,0

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

[State 1355, BindToRoot]
type = BindToRoot
trigger1 = animelemtime(12) < 0
time = 1
pos = 36,8
ignorehitpause = 1
[State 1355, BindToRoot]
type = BindToRoot
trigger1 = animelemtime(12) >= 0 && animelemtime(16) < 0
time = 1
pos = 0,0
ignorehitpause = 1

[State 1002, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1061, End]
type = destroyself
trigger1 = animtime = 0

;------------------------------------------------------------------------------;
;Micro Wave Helper States AIR
;------------------------------------------------------------------------------;
[Statedef 1375]
type    = A
movetype= A
physics = N
sprpriority = 3
hitcountpersist = 1
movehitpersist = 1

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

[State 0, VarAdd]
type = ParentVarAdd
triggerall = !root, StateNo = 3411
triggerall = root,var(53) < 2100
trigger1 = MoveHit = 1
var(53) = 50

[State 0, VarAdd]
type = ParentVarAdd
triggerall = !root, StateNo = 3411
triggerall = root,var(53) < 2100
trigger1 = MoveGuarded = 1
var(53) = 25

[State 1355, VarSet]
type = VarSet
trigger1 = !time
var(0) = (random<100)
[State 1061, gethit gut ?]
type = VarSet
trigger1 = !time
var(14) = root,var(14)
[State 1061, gethit gut ?]
type = VarSet
trigger1 = !time
var(41) = root,var(41)

[State 1370, ChangeAnim]
type = ChangeAnim
trigger1 = !time && !prevstateno
value = 1375+var(41)+(var(0))*10

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = !Time && !PrevStateNo
var(9) = 4

[State 0, VarAdd]
type = VarAdd
trigger1 = MoveContact
var(9) = -1

[State 1061, HitOverride]
type = HitOverride
trigger1 = !NumTarget(1355)
trigger1 = Time >= 0
slot = 1
time = 1
stateno = Cond(Var(9)>0,1375,1376)
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = NumTarget(1355)
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1356
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
value = SCA,NA,SA,HA,NT,ST,HT
time = 1
ignorehitpause = 1

[State 1355, BindToRoot]
type = BindToRoot
trigger1 = animelemtime(6+var(41)*2) < 0
time = 1
pos = 0,-16
ignorehitpause = 1
[State 1355, BindToRoot]
type = BindToRoot
trigger1 = animelemtime(6+var(41)*2) >= 0 && animelemtime(10+var(41)*2) < 0
time = 1
pos = 0,0
ignorehitpause = 1

[State 250, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 2,10
channel = 4


[State 250, 1]
type = PlaySnd
trigger1 = animelemtime(6+var(41)*2) = 1
value = 2,6
persistent = 0

[State 1355, Explod]
type = Explod
trigger1 = animelemtime(7+var(41)*2) = 0
anim = 1379+(var(0))*10
ID = 1379
pos = -42,-42
postype = p1  
vel = -0.25*cos(pi/4),-0.25*sin(pi/4)
accel = -1.125*cos(pi/4),-1.125*sin(pi/4)
persistent = 0
sprpriority = 4

[State 1061, Hitdef]
type = HitDef
triggerall = root, Var(18) <= 55
triggerall = !NumTarget(1355)
trigger1 = !var(41)
attr = A, SP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 53/root,fvar(19) < 7, 7, root,fvar(11) * 53/root,fvar(19))),15
priority  = 4,Hit
guardflag = HA
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,-36
hitsound   = s2,8
guardsound = S5,20
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 12
ground.velocity = -7.8,0
guard.velocity = -7.5
air.velocity = -5.8,-3
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = ifelse(p2movetype=H,40,140), 10
givepower = 35,35
persistent = 0
ID = 1355

[State 1061, Hitdef]
type = HitDef
triggerall = !NumTarget(1355)
triggerall = root, Var(18) <= 55
trigger1 = var(41) = 1
attr = A, SP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 63/root,fvar(19) < 7, 7, root,fvar(11) * 63/root,fvar(19))),15
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,-36
hitsound   = s2,8
guardsound = S5,20
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 12
ground.velocity = -5,-4
guard.velocity = -7.5
air.velocity = -5,-4
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = ifelse(p2movetype=H,40,140), 10
givepower = 35,35
persistent = 0
id = 1355

[State 1061, Hitdef]
type = HitDef
triggerall = !NumTarget(1355)
triggerall = root, Var(18) <= 55
trigger1 = var(41) = 2
attr = A, SP
animtype = diagup
damage    = ceil(ifElse(root,fvar(11) * 73/root,fvar(19) < 7, 7, root,fvar(11) * 73/root,fvar(19))),15
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,-36
hitsound   = s2,8
guardsound = S5,20
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 12
ground.velocity = -8,-4
guard.velocity = -7.5
air.velocity = -8,-4
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = ifelse(p2movetype=H,40,140), 10
givepower = 35,35
persistent = 0
id = 1355

[State 1061, End]
type = destroyself
trigger1 = !animtime
trigger2 = animelemtime(10+var(41)*2) < 0
trigger2 = root,stateno != [1370,1375]


;------------------------------------------------------------------------------;
;Clone Micro Wave Helper States AIR
;------------------------------------------------------------------------------;
[Statedef 1396]
type    = A
movetype= A
physics = N
sprpriority = 3
hitcountpersist = 1
movehitpersist = 1

[State 1355, VarSet]
type = VarSet
trigger1 = !time
var(0) = (random<100)
[State 1061, gethit gut ?]
type = VarSet
trigger1 = !time
var(14) = root,var(14)
[State 1061, gethit gut ?]
type = VarSet
trigger1 = !time
var(41) = parent, Var(41)

[State 1370, ChangeAnim]
type = ChangeAnim
trigger1 = !time && !prevstateno
value = 1375+var(41)+(var(0))*10

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = !Time && !PrevStateNo
var(9) = 4

[State 0, VarAdd]
type = VarAdd
trigger1 = MoveContact
var(9) = -1

[State 1061, HitOverride]
type = HitOverride
trigger1 = !NumTarget(1355)
trigger1 = Time >= 0
slot = 1
time = 1
stateno = Cond(Var(9)>0,1396,1397)
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = NumTarget(1355)
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1397
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
value = SCA,NA,SA,HA,NT,ST,HT
time = 1
ignorehitpause = 1

[State 1355, BindToParent]
type = BindToParent
trigger1 = animelemtime(6+var(41)*2) < 0
time = 1
pos = 0,-16
ignorehitpause = 1
[State 1355, BindToParent]
type = BindToParent
trigger1 = animelemtime(6+var(41)*2) >= 0 && animelemtime(10+var(41)*2) < 0
time = 1
pos = 0,0
ignorehitpause = 1

[State 250, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 2,10
channel = 4

[State 250, 1]
type = PlaySnd
trigger1 = animelemtime(6+var(41)*2) = 1
value = 2,6
persistent = 0

[State 1355, Explod]
type = Explod
trigger1 = animelemtime(7+var(41)*2) = 0
anim = 1379+(var(0))*10
ID = 1379
pos = -42,-42
postype = p1  
vel = -0.25*cos(pi/4),-0.25*sin(pi/4)
accel = -1.125*cos(pi/4),-1.125*sin(pi/4)
persistent = 0
sprpriority = 4

[State 1061, Hitdef]
type = HitDef
triggerall = !NumTarget(1355)
trigger1 = root, Var(18) <= 55
attr = A, SP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 27 < 7, 7, root,fvar(11) * 27)),0
priority  = 4,Hit
guardflag = HA
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,-36
hitsound   = s2,8
guardsound = S5,20
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 12
ground.velocity = -7.8,0
guard.velocity = -7.5
air.velocity = -5.8,-3
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 35,35
persistent = 0
id = 1355

[State 1061, End]
type = destroyself
trigger1 = !animtime
trigger2 = animelemtime(10+var(41)*2) < 0
trigger2 = parent,stateno != [1370,1395]

;----------------------------------------------------
;Canceled
[Statedef 1376]
type    = A
movetype= A
physics = N
sprpriority = 3
velset = 0,0

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

[State 1355, BindToRoot]
type = BindToRoot
trigger1 = animelemtime(6+var(41)*2) < 0
time = 1
pos = 0,-16
ignorehitpause = 1
[State 1355, BindToRoot]
type = BindToRoot
trigger1 = animelemtime(6+var(41)*2) >= 0 && animelemtime(10+var(41)*2) < 0
time = 1
pos = 0,0
ignorehitpause = 1

[State 1002, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1061, End]
type = destroyself
trigger1 = animtime = 0

;----------------------------------------------------
;Canceled
[Statedef 1397]
type    = A
movetype= A
physics = N
sprpriority = 3
velset = 0,0

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

[State 1355, BindToParent]
type = BindToParent
trigger1 = animelemtime(6+2*2) < 0
time = 1
pos = 0,-16
ignorehitpause = 1
[State 1355, BindToParent]
type = BindToParent
trigger1 = animelemtime(6+2*2) >= 0 && animelemtime(10+2*2) < 0
time = 1
pos = 0,0
ignorehitpause = 1

[State 1002, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1061, End]
type = destroyself
trigger1 = animtime = 0

;----------------------------------------------------
;EX版
[Statedef 1377]
type    = A
movetype= A
physics = N
sprpriority = 3
hitcountpersist = 1
movehitpersist = 1

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

[State 0, VarAdd]
type = ParentVarAdd
triggerall = !root, StateNo = 3411
triggerall = root,var(53) < 2100
trigger1 = MoveHit = 1
var(53) = 100

[State 0, VarAdd]
type = ParentVarAdd
triggerall = !root, StateNo = 3411
triggerall = root,var(53) < 2100
trigger1 = MoveGuarded = 1
var(53) = 50

[State 1061, gethit gut ?]
type = VarSet
trigger1 = !time
var(14) = root,var(14)
[State 1061, gethit gut ?]
type = VarSet
trigger1 = !time
var(41) = root,var(41)

[State 1370, ChangeAnim]
type = ChangeAnim
trigger1 = !time && !prevstateno
value = 1378

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = !Time && !PrevStateNo
var(9) = 4

[State 0, VarAdd]
type = VarAdd
trigger1 = MoveContact
var(9) = -1

[State 1061, HitOverride]
type = HitOverride
trigger1 = !NumTarget(1355)
trigger1 = Time >= 0
slot = 1
time = 1
stateno = Cond(Var(9)>0,1377,1378)
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = NumTarget(1355)
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1378
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
value = SCA,NA,SA,HA,NT,ST,HT
time = 1
ignorehitpause = 1

[State 1355, BindToRoot]
type = BindToRoot
trigger1 = animelemtime(8) < 0
time = 1
pos = 0,-16
ignorehitpause = 1
[State 1355, BindToRoot]
type = BindToRoot
trigger1 = animelemtime(8) >= 0 && animelemtime(12) < 0
time = 1
pos = 0,0
ignorehitpause = 1

[State 250, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 2,10
channel = 4

[State 250, 1]
type = PlaySnd
trigger1 = animelemtime(8) = 1
value = 2,7
persistent = 0

[State 1355, Explod]
type = Explod
trigger1 = animelemtime(9) = 0
anim = 1379
ID = 1379
pos = -42,-42
postype = p1  
vel = -0.25*cos(pi/4),-0.25*sin(pi/4)
accel = -1.125*cos(pi/4),-1.125*sin(pi/4)
persistent = 0
sprpriority = 4

[State 1061, Hitdef]
type = HitDef
trigger1 = !NumTarget(1355)
triggerall = root, Var(18) <= 55
trigger1 = 1
attr = S, SP
animtype = diagup
damage    = ceil(ifElse(root,fvar(11) * 93 < 47, 47, root,fvar(11) * 93)),20
priority  = 4,Hit
guardflag = HA
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,-36
hitsound   = s2,8
guardsound = S5,20
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 12
ground.velocity = -12*cos(pi/4),12*sin(pi/4)
guard.velocity = -7.5
air.velocity = -12*cos(pi/4),12*sin(pi/4)
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = ifelse(p2movetype=H,40,140), 10
givepower = 35,35
persistent = 0
Id = 1355

[State 0, TargetState]  ;New state
type = TargetState
trigger1 = Numtarget(647)
trigger1 = movehit = 1
value = 647
ID = 647
ignorehitpause = 1
persistent = 0

[State 1061, End]
type = destroyself
trigger1 = !animtime
trigger2 = animelemtime(12) < 0
trigger2 = root,stateno != [1370,1375]


;----------------------------------------------------
;Canceled
[Statedef 1378]
type    = A
movetype= A
physics = N
sprpriority = 3
velset = 0,0

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

[State 1355, BindToRoot]
type = BindToRoot
trigger1 = animelemtime(8) < 0
time = 1
pos = 0,-16
ignorehitpause = 1
[State 1355, BindToRoot]
type = BindToRoot
trigger1 = animelemtime(8) >= 0 && animelemtime(12) < 0
time = 1
pos = 0,0
ignorehitpause = 1

[State 1002, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1061, End]
type = destroyself
trigger1 = animtime = 0

;===================================================
;Mental Shock lightning
[Statedef 1450]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 5
anim = 1450

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

[State 0, VarAdd]
type = ParentVarAdd
triggerall = !root, StateNo = 3411
triggerall = root,var(53) < 2100
trigger1 = MoveHit = 1
var(53) = 50

[State 0, VarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1
trigger1 = P2MoveType = H
var(18) = 9

[State 0, VarAdd]
type = ParentVarAdd
triggerall = !root, StateNo = 3411
triggerall = root,var(53) < 2100
trigger1 = MoveGuarded = 1
var(53) = 25


[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(16) = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 1400,0
volumescale = 155
channel = -1
freqmul = 1.0
loop = 0
pan = 0
ignorehitpause = 1
persistent = 0

[State 0, BindToParent]
type = BindToParent
trigger1 = !Time
time = -1
pos = 8,-115

[State 1061, Hitdef]
type = HitDef
trigger1 = !time
trigger1 = parent,IsHelper
attr = S, SP
animtype  = hard
damage    = cond(parent, var(16) = 2, ceil(ifElse(root,fvar(11) * 33/root,fvar(19) < 7, 7, root,fvar(11) * 23/root,fvar(19))), ceil(ifElse(root,fvar(11) * 55/root,fvar(19) < 7, 7, root,fvar(11) * 45/root,fvar(19)))), 0
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s3100,0 ;s5, 5
guardsound = S6,1
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -2,0
guard.velocity = -7.5
air.velocity = -2,-3
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 35,35

[State 1061, Hitdef]
type = HitDef
triggerall = root, Var(18) <= 55
trigger1 = !time
attr = S, SP
animtype  = hard
damage    = cond(parent, var(16) = 2, ceil(ifElse(root,fvar(11) * 45 < 7, 7, root,fvar(11) * 45)), ceil(ifElse(root,fvar(11) * 90/root,fvar(19) < 7, 7, root,fvar(11) * 90/root,fvar(19)))), 10
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s3100,0 ;s5, 5
guardsound = S6,1
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -2,0
guard.velocity = -7.5
air.velocity = -2,-3
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = ifelse(p2movetype=H,40,140), 10
givepower = 35,35

[State 0, Projectile]
type = Projectile
trigger1 = MoveContact
ProjID = 1451
projanim = 1606
projremovetime = 50

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = parent, movetype=H
value = 1450
elem = 17
ignorehitpause = 1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = movehit
value = 1400,10
volumescale = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
ignorehitpause = 1
persistent = 0

[State 0, VarSet]
type = VarSet
trigger1 = movehit
var(16) = 2


[State 0, TargetState]
type = targetstate
triggerall = NumTarget
trigger1 = movehit
value =1475
ID = -1
ignorehitpause = 1
persistent = 0


[State 1400]
type = destroyself
trigger1 = animtime = 0


;----------------------------------------
;Carnage Blitz After Image
[Statedef 1545]
type = S
physics = S
movetype = I
anim = 1541


[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(5) = 1
x = 20

[State 0, VelAdd]
type = VelAdd
triggerall = vel y >= 0.5
trigger1 = animelemtime(5) >= 1
x = -0.15
ignorehitpause = 1
persistent = 1

[State 1500]
type = DestroySelf
trigger1 = !AnimTime

;----------------------------------------
;Push P2
[Statedef 1546]
type = S
physics = S
movetype = I
anim = 1542

[State 0, VelSet]
type = VelSet
trigger1 = !Time
x = -20

[State 0, PosAdd]
type = PosAdd
trigger1 = root, anim=1871 || root, anim=1802
trigger1 = enemy,BackEdgeBodyDist <=10
x = 160

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

[State 0, Width]
type = Width
trigger1 = Time < 2
player = 100,100

[State 0, PlayerPush]
type = PlayerPush
trigger1 = Time < 6
value = 1

[State 1500]
type = DestroySelf
trigger1 = !AnimTime
trigger2 = root, anim=1871 || root, anim=1802
trigger2 = enemy,BackEdgeBodyDist >80

;----------------------------------------
;Carnage Blitz After Image
[Statedef 1555]
type = S
physics = S
movetype = I
anim = 1555

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 2302,0


[State 0, VelSet]
type = VelSet
trigger1 = !Time
x = 20

[State 0, VelAdd]
type = VelAdd
triggerall = vel y >= 0.5
trigger1 = !Time
x = -0.15
ignorehitpause = 1
persistent = 1

[State 1500]
type = DestroySelf
trigger1 = !AnimTime

;----------------------------------------
;TeleSweep After Image
[Statedef 1557]
type = S
physics = S
movetype = I
anim = 1556

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 2302,0


[State 0, VelSet]
type = VelSet
trigger1 = !Time
x = 20

[State 0, VelAdd]
type = VelAdd
triggerall = vel y >= 0.5
trigger1 = !Time
x = -0.15
ignorehitpause = 1
persistent = 1

[State 1500]
type = DestroySelf
trigger1 = !AnimTime


;----------------------------------------
;Carnage Blitz Sounds
[Statedef 1556]
type = S
physics = S
movetype = I
anim = 1606

[State 0, PlaySnd]
type = PlaySnd
trigger1 = root, Var(55) = 0
trigger1 = !Time
trigger1 = root, StateNo = 1500
value = 1500,1
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
ignorehitpause = 1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = root, Var(55) = 1
trigger1 = !Time
trigger1 = root, StateNo = 1500
value = 1500,21
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
ignorehitpause = 1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = root, Var(55) = 2
trigger1 = !Time
trigger1 = root, StateNo = 1500
value = 1500,31
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
ignorehitpause = 1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = root, Var(55) = 0
trigger1 = !Time
trigger1 = root, StateNo = 1510
value = 1500,0
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
ignorehitpause = 1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = root, Var(55) = 1
trigger1 = !Time
trigger1 = root, StateNo = 1510
value = 1500,20
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
ignorehitpause = 1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = root, Var(55) = 2
trigger1 = !Time
trigger1 = root, StateNo = 1510
value = 1500,30
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
ignorehitpause = 1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = root, Var(55) = 0
trigger1 = !Time
trigger1 = root, StateNo = 1520
value = 1500,2
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
ignorehitpause = 1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = root, Var(55) = 1
trigger1 = !Time
trigger1 = root, StateNo = 1520
value = 1500,22
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
ignorehitpause = 1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = root, Var(55) = 2
trigger1 = !Time
trigger1 = root, StateNo = 1520
value = 1500,32
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
ignorehitpause = 1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
trigger1 = root, StateNo = 1500 
value = 1501,0
volumescale = 255
channel = -1
freqmul = 1.0
loop = 0
ignorehitpause = 1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
triggerall = !Time
trigger1 = root, StateNo = 1510 
trigger2 = root, StateNo = 1520 
trigger3 = root, StateNo = 1550 
value = 1501,1
volumescale = 255
channel = -1
freqmul = 1.0
loop = 0
ignorehitpause = 1
persistent = 0

[State 1500]
type = DestroySelf
trigger1 = root, StateNo != [1500,1551]

;----------------------------------------------------
;Mystic Harpoon Projectile Destroying Helper
[Statedef 1604]
type    = S
movetype= I
physics = N
anim = 1604
sprpriority = 1
velset = 0,0

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 1 && !NumHelper(1606) 
reversal.attr = SCA,SP,NP;,HP;,NA,SA,HA,NT,ST;,AA,AT 
hitsound = s1620,0
sparkno = S1319
sparkxy = ceil(84 * const(size.xScale)), 0
p1stateno = 1605
p2stateno = 1605

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 2 && !NumHelper(1606) 
reversal.attr = SCA,SP,NP;,HP;,NA,SA,HA,NT,ST;,AA,AT 
hitsound = s1620,0
sparkno = S1319
sparkxy = ceil(107 * const(size.xScale)), 0
p1stateno = 1605
p2stateno = 1605

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 3 && !NumHelper(1606) 
reversal.attr = SCA,SP,NP;,HP;,NA,SA,HA,NT,ST;,AA,AT 
hitsound = s1620,0
sparkno = S1319
sparkxy = ceil(160 * const(size.xScale)), 0
p1stateno = 1605
p2stateno = 1605

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 4 && !NumHelper(1606) 
reversal.attr = SCA,SP,NP;,HP;,NA,SA,HA,NT,ST;,AA,AT 
hitsound = s1620,0
sparkno = S1319
sparkxy = ceil(207 * const(size.xScale)), 0
p1stateno = 1605
p2stateno = 1605

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 5 && !NumHelper(1606) 
reversal.attr = SCA,SP,NP;,HP;,NA,SA,HA,NT,ST;,AA,AT 
hitsound = s1620,0
sparkno = S1319
sparkxy = ceil(216 * const(size.xScale)), 0
p1stateno = 1605
p2stateno = 1605

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 1 && NumHelper(1606) >= 1
reversal.attr = SCA,SP,NP;,HP;,NA,SA,HA,NT,ST;,AA,AT 
sparkno = S1319
sparkxy = ceil(84 * const(size.xScale)), 0
p1stateno = 1605
p2stateno = 1605

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 2 && NumHelper(1606) >= 1
reversal.attr = SCA,SP,NP;,HP;,NA,SA,HA,NT,ST;,AA,AT 
;hitsound = s54,17
sparkno = S1319
sparkxy = ceil(107 * const(size.xScale)), 0
p1stateno = 1605
p2stateno = 1605

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 3 && NumHelper(1606) >= 1
reversal.attr = SCA,SP,NP;,HP;,NA,SA,HA,NT,ST;,AA,AT 
;hitsound = s54,17
sparkno = S1319
sparkxy = ceil(160 * const(size.xScale)), 0
p1stateno = 1605
p2stateno = 1605

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 4 && NumHelper(1606) >= 1
reversal.attr = SCA,SP,NP;,HP;,NA,SA,HA,NT,ST;,AA,AT 
;hitsound = s54,17
sparkno = S1319
sparkxy = ceil(207 * const(size.xScale)), 0
p1stateno = 1605
p2stateno = 1605

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 5 && NumHelper(1606) >= 1
reversal.attr = SCA,SP,NP;,HP;,NA,SA,HA,NT,ST;,AA,AT 
;hitsound = s54,17
sparkno = S1319
sparkxy = ceil(216 * const(size.xScale)), 0
p1stateno = 1605
p2stateno = 1605

[State 0, ChangeState]
type = ChangeState
trigger1 = root, MoveType = H
trigger2 = !AnimTime
value = 1605
ignorehitpause = 1

;----------------------------------------------------
; Destroy Mystic Harpoon Projectile Destroying Helper
[Statedef 1605]
type    = S
movetype= I
physics = N
sprpriority = 1
velset = 0,0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = IsHelper
ignorehitpause = 1

;----------------------------------------------------
; This is an EX as long as I LIIIIIIVVVVVE
[Statedef 1606]
type    = S
movetype= I
physics = N
anim = 1606
sprpriority = 1
velset = 0,0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root, MoveType = H
trigger2 = root, StateNo != [1603,1680]
trigger2 = root, StateNo != [1540,1555]

;----------------------------------------------------
; MH Beam
[Statedef 1676]
type    = S
movetype= A
physics = N
anim = 1676
sprpriority = 5
velset = 0,0

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

[State 250, 1]
type = PlaySnd
trigger1 = !Time
value = 1676,0
persistent = 0

[State 1061, Hitdef]
type = HitDef
triggerall = root, Var(18) <= 55
trigger1 = AnimElem = 3
attr = S, SP
animtype = diagup
damage    = ceil(ifElse(root,fvar(11) * 93 < 47, 47, root,fvar(11) * 93)), 10
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 40,-106
hitsound   = s2,8
guardsound = S5,20
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 12
ground.velocity = -8,-4
guard.velocity = -7.5
air.velocity = -8,-4
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 35,35
persistent = 0
id = 1676

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

;----------------------------------------------------
; MH Eye Beam
[Statedef 1681]
type    = S
movetype= A
physics = N
anim = 1681
sprpriority = 5
velset = 0,0

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 2,2
channel = 1

[State 1061, Hitdef]
type = HitDef
triggerall = root, Var(18) <= 55
trigger1 = AnimElem = 3
attr = S, SP
animtype = diagup
damage    = ceil(ifElse(root,fvar(11) * 103 < 52, 52, root,fvar(11) * 103)),10
priority  = 4,Hit
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,0
sparkno = s10030
sparkxy = 40,-106
hitsound   = s2,8
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 12
ground.velocity = -8,-4
guard.velocity = -7.5
air.velocity = -8,-5
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 35,35
persistent = 0
palfx.add = 255,50,0
palfx.sinadd = -255,-50,0,20
palfx.time = 25

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


;----------------------------------------------------
; BallMaker 2000
[Statedef 1740]
type    = S
movetype= I
physics = N
anim = 1606
sprpriority = 5

[State 0, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
facing = 1

[State 1740, Helper]
type = Helper
trigger1 = parent,StateNo = 1700
trigger1 = (parent,anim = [1700,1702]) && parent,AnimElem = 6
trigger1 = !NumHelper(1751)
ID = 1751
name = "Ball1"
stateno = 1750 ;All from 1750
ownpal = 1
[State 1740, Helper]
type = Helper
trigger1 = parent,StateNo = 1700
trigger1 = (parent,anim = [1700,1702]) && parent,AnimElem = 6
trigger1 = !NumHelper(1752)
trigger1 = NumHelper(1751) && helper(1751), StateNo != 1750
ID = 1752
name = "Ball2"
stateno = 1750 ;All from 1750
ownpal = 1
[State 1740, Helper]
type = Helper
trigger1 = parent,StateNo = 1700
trigger1 = (parent,anim = [1700,1702]) && parent,AnimElem = 6
trigger1 = !NumHelper(1753)
trigger1 = NumHelper(1751) && helper(1751), StateNo != 1750
trigger1 = NumHelper(1752) && helper(1752), StateNo != 1750
ID = 1753
name = "Ball3"
stateno = 1750 ;All from 1750
ownpal = 1

[State 1740, Helper]
type = Helper
trigger1 = parent,StateNo = 1701
trigger1 = (parent,anim = [1700,1702]) && parent,AnimElem = 6
trigger1 = !NumHelper(1754)
ID = 1754
name = "Ball1"
stateno = 1759 ;All from 1759
ownpal = 1
[State 1740, Helper]
type = Helper
trigger1 = parent,StateNo = 1701
trigger1 = (parent,anim = [1700,1702]) && parent,AnimElem = 6
trigger1 = !NumHelper(1755)
trigger1 = NumHelper(1754) && helper(1754), StateNo != 1759
ID = 1755
name = "Ball2"
stateno = 1759 ;All from 1759
ownpal = 1
[State 1740, Helper]
type = Helper
trigger1 = parent,StateNo = 1701
trigger1 = (parent,anim = [1700,1702]) && parent,AnimElem = 6
trigger1 = !NumHelper(1756)
trigger1 = NumHelper(1754) && helper(1754), StateNo != 1759
trigger1 = NumHelper(1755) && helper(1755), StateNo != 1759
ID = 1756
name = "Ball3"
stateno = 1759 ;All from 1759
ownpal = 1

[State 1000, BALL 1 x position]
type = VarSet
trigger1 = NumHelper(1751)
var(10) = Ceil(Helper(1751), screenpos x)
[State 1000, BALL 2 x position]
type = VarSet
trigger1 = NumHelper(1752)
var(11) = Ceil(Helper(1752), screenpos x)
[State 1000, BALL 3 x position]
type = VarSet
trigger1 = NumHelper(1753)
var(12) = Ceil(Helper(1753), screenpos x)

[State 1000, BALL 1 x position]
type = VarSet
trigger1 = NumHelper(1754)
var(13) = Ceil(Helper(1754), screenpos x)
[State 1000, BALL 2 x position]
type = VarSet
trigger1 = NumHelper(1755)
var(14) = Ceil(Helper(1755), screenpos x)
[State 1000, BALL 3 x position]
type = VarSet
trigger1 = NumHelper(1756)
var(15) = Ceil(Helper(1756), screenpos x)

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = root, MoveType != A
trigger1 = 1
var(26) = Var(26)

[State 0, VarAdd]
type = ParentVarAdd
triggerall = !root, StateNo = 3411
triggerall = root,var(53) < 2100
trigger1 = NumHelper(1751)
trigger1 = helper(1751), MoveHit = 1
trigger2 = NumHelper(1752)
trigger2 = helper(1752), MoveHit = 1
trigger3 = NumHelper(1753)
trigger3 = helper(1753), MoveHit = 1
trigger4 = NumHelper(1754)
trigger4 = helper(1754), MoveHit = 1
trigger5 = NumHelper(1755)
trigger5 = helper(1755), MoveHit = 1
trigger6 = NumHelper(1756)
trigger6 = helper(1756), MoveHit = 1
var(53) = 4

;----------------------------------------------------
;BallMaker2000 continued HellZone Grenade
;----------------------------------------------------
[State 1740, Helper]
type = Helper
trigger1 = parent,StateNo = 3400
trigger1 = parent,AnimElem = 40
ID = 3420
name = "Super Ball1"
stateno = 3420
ownpal = 1
supermovetime = 150
[State 1740, Helper]
type = Helper
trigger1 = parent,StateNo = 3400
trigger1 = parent,AnimElem = 45
ID = 3421
name = "Super Ball2"
stateno = 3421
ownpal = 1
supermovetime = 150
[State 1740, Helper]
type = Helper
trigger1 = parent,StateNo = 3400
trigger1 = parent,AnimElem = 45
ID = 3422
name = "Super Ball3"
stateno = 3422
ownpal = 1
supermovetime = 150
[State 1740, Helper]
type = Helper
trigger1 = parent,StateNo = 3400
trigger1 = parent,AnimElem = 47
ID = 3423
name = "Super Ball4"
stateno = 3423
ownpal = 1
supermovetime = 150
[State 1740, Helper]
type = Helper
trigger1 = parent,StateNo = 3400
trigger1 = parent,AnimElem = 47
ID = 3424
name = "Super Ball5"
stateno = 3424
ownpal = 1
supermovetime = 150
[State 1740, Helper]
type = Helper
trigger1 = parent,StateNo = 3400
trigger1 = parent,AnimElem = 49
ID = 34251
name = "Super Ball6"
stateno = 3425
ownpal = 1
supermovetime = 150
[State 1740, Helper]
type = Helper
trigger1 = parent,StateNo = 3400
trigger1 = parent,AnimElem = 49
ID = 3426
name = "Super Ball7"
stateno = 3426
ownpal = 1
supermovetime = 150
[State 1740, Helper]
type = Helper
trigger1 = parent,StateNo = 3400
trigger1 = parent,AnimElem = 51
ID = 3427
name = "Super Ball8"
stateno = 3427
ownpal = 1
supermovetime = 150
[State 1740, Helper]
type = Helper
trigger1 = parent,StateNo = 3400
trigger1 = parent,AnimElem = 51
ID = 3428
name = "Super Ball9"
stateno = 3428
ownpal = 1
supermovetime = 150
[State 1740, Helper]
type = Helper
trigger1 = parent,StateNo = 3400
trigger1 = parent,AnimElem = 53
ID = 3429
name = "Super Ball10"
stateno = 3429
ownpal = 1
supermovetime = 150



[State 1740, Helper]
type = Helper
trigger1 = !NumHelper(3442)
trigger1 = Var(58) = 2
trigger2 = NumHelper(3442)<=1
trigger2 = Var(58) = 5
trigger3 = NumHelper(3442)<=1
trigger3 = Var(58) = 6
trigger4 = NumHelper(3442)<=1
trigger4 = Var(58) = 8
trigger5 = NumHelper(3442)<=1
trigger5 = Var(58) = 11
trigger6 = NumHelper(3442)<=1
trigger6 = Var(58) = 14
trigger7 = NumHelper(3442)<=1
trigger7 = Var(58) = 15
trigger8 = NumHelper(3442)<=1
trigger8 = Var(58) = 16
trigger9 = NumHelper(3442)<=1
trigger9 = Var(58) >= 17 && Var(58) <=35
ID = 3442
name = "OffScreen Ball"
stateno = 3450
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(1773)
trigger1 = Var(56) = 1
name = "Explosions2"
ID = 1773
stateno = 1773
pos = -100 +random%200,-100-random%100
postype = p2    ;p2,front,back,left,right
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(1774)
trigger1 = Var(56) = 2
name = "Explosions3"
ID = 1774
stateno = 1774
pos = -100 +random%200,-100-random%100
postype = p2    ;p2,front,back,left,right
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(1775)
trigger1 = Var(56) = 3
name = "ExplosionsFLASH"
ID = 1775
stateno = 1775
pos = 0,-200
postype = left    ;p2,front,back,left,right
ownpal = 1

[State 0, VarSet]
type = VarSet
triggerall = parent,StateNo = 3400
trigger1 = parent, Anim = 3400
trigger1 = parent,AnimElem = 100
var(55) = 1

[State 0, VarSet]
type = VarSet
trigger1 = parent,HitCount >= 200
trigger2 = root, StateNo = 3460
var(55) = 0

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = 1
var(42) = Var(55)
[State 0, VarSet]
type = VarSet
trigger1 = root, Var(42) = 0
var(37) = 0
[State 0, VarSet]
type = VarSet
trigger1 = root, Var(42) = 0
var(57) = 0
[State 0, VarSet]
type = VarSet
trigger1 = root, Var(42) = 0
var(58) = 0

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = 1
var(37) = Var(37)



;----------------------------------------------------
; Deploy Super Balls Ball 1
[Statedef 3420]
type    = A
movetype= I
physics = N
anim = 3422
sprpriority = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 1750,0
channel = 2
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, Near Ball Start Pos]
type = PosSet
trigger1 = !Time
x = root,Pos X + (30*facing)
y = root,Pos Y - 155

[State 0, Near Ball Move]
type = VelSet
trigger1 = !Time 
x = 3
y = -3

[State 0, Stop All Balls]
type = VelSet
trigger1 = Pos Y <= -160 - random%40
x = 0
y = 0

[State 0, Trans]
type = Trans
triggerall = root, MoveType = H
trigger1 = enemy, AnimExist(5939)
trigger1 = enemy, NumExplod(991901)
trigger2 = !enemy, AnimExist(5939)
trigger2 = root, Var(43)=1
trigger2 = root, NumExplod(3502)
trigger2 = root,var(48)-root,var(49)>=30
trigger3 = !enemy, AnimExist(5939)
trigger3 = root, Var(43)=2
trigger3 = root, NumExplod(3502)
trigger3 = root,var(48)-root,var(49)>=60
trigger4 = !enemy, AnimExist(5939)
trigger4 = root, Var(43)=3
trigger4 = root, NumExplod(3502)
trigger4 = root,var(48)-root,var(49)>=90
trigger5 = !enemy, AnimExist(5939)
trigger5 = root, Var(43)=4
trigger5 = root, NumExplod(3502)
trigger5 = root,var(48)-root,var(49)>=120
trigger6 = !enemy, AnimExist(5939)
trigger6 = root, Var(43)=5
trigger6 = root, NumExplod(3502)
trigger6 = root,var(48)-root,var(49)>=150
trigger7 = !enemy, AnimExist(5939)
trigger7 = root, NumExplod(3502)
trigger7 = root, Var(43)=6
trigger7 = root,var(48)-root,var(49)>=180
trans = addalpha
alpha = 0, 256

[State 0, ChangeState]
type = ChangeState
trigger1 = root, Var(40) = 1
value = 3450
ctrl = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = roundstate = 4
y = -.5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >=200
trigger1 = root, Var(42) = 0

;----------------------------------------------------
; Deploy Super Balls Ball 2
[Statedef 3421]
type    = A
movetype= I
physics = N
anim = 3422
sprpriority = 5


[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, Near Ball Start Pos]
type = PosSet
trigger1 = !Time
x = root,Pos X + (20*facing)
y = root,Pos Y - 165

[State 0, Near Ball Move]
type = VelSet
trigger1 = !Time 
x = -5 + random%15
y = -1 - random%10

[State 0, Stop All Balls]
type = VelSet
trigger1 = Pos Y <= -180 - random%40
x = 0
y = 0

[State 0, Trans]
type = Trans
triggerall = root, MoveType = H
trigger1 = enemy, AnimExist(5939)
trigger1 = enemy, NumExplod(991901)
trigger2 = !enemy, AnimExist(5939)
trigger2 = root, Var(43)=1
trigger2 = root, NumExplod(3502)
trigger2 = root,var(48)-root,var(49)>=30
trigger3 = !enemy, AnimExist(5939)
trigger3 = root, Var(43)=2
trigger3 = root, NumExplod(3502)
trigger3 = root,var(48)-root,var(49)>=60
trigger4 = !enemy, AnimExist(5939)
trigger4 = root, Var(43)=3
trigger4 = root, NumExplod(3502)
trigger4 = root,var(48)-root,var(49)>=90
trigger5 = !enemy, AnimExist(5939)
trigger5 = root, Var(43)=4
trigger5 = root, NumExplod(3502)
trigger5 = root,var(48)-root,var(49)>=120
trigger6 = !enemy, AnimExist(5939)
trigger6 = root, Var(43)=5
trigger6 = root, NumExplod(3502)
trigger6 = root,var(48)-root,var(49)>=150
trigger7 = !enemy, AnimExist(5939)
trigger7 = root, NumExplod(3502)
trigger7 = root, Var(43)=6
trigger7 = root,var(48)-root,var(49)>=180
trans = addalpha
alpha = 0, 256

[State 0, ChangeState]
type = ChangeState
trigger1 = parent, Var(58) >= 1
value = 3450
ctrl = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = roundstate = 4
y = -.5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >=200
trigger1 = root, Var(42) = 0

;----------------------------------------------------
; Deploy Super Balls Ball 3
[Statedef 3422]
type    = A
movetype= I
physics = N
anim = 3422
sprpriority = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 1750,0
channel = 3
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, Near Ball Start Pos]
type = PosSet
trigger1 = !Time
x = root,Pos X + (50*facing)
y = root,Pos Y - 145

[State 0, Near Ball Move]
type = VelSet
trigger1 = !Time 
x = -5 + random%15
y = -1 - random%10

[State 0, Stop All Balls]
type = VelSet
trigger1 = Pos Y <= -160 - random%40
x = 0
y = 0

[State 0, Trans]
type = Trans
triggerall = root, MoveType = H
trigger1 = enemy, AnimExist(5939)
trigger1 = enemy, NumExplod(991901)
trigger2 = !enemy, AnimExist(5939)
trigger2 = root, Var(43)=1
trigger2 = root, NumExplod(3502)
trigger2 = root,var(48)-root,var(49)>=30
trigger3 = !enemy, AnimExist(5939)
trigger3 = root, Var(43)=2
trigger3 = root, NumExplod(3502)
trigger3 = root,var(48)-root,var(49)>=60
trigger4 = !enemy, AnimExist(5939)
trigger4 = root, Var(43)=3
trigger4 = root, NumExplod(3502)
trigger4 = root,var(48)-root,var(49)>=90
trigger5 = !enemy, AnimExist(5939)
trigger5 = root, Var(43)=4
trigger5 = root, NumExplod(3502)
trigger5 = root,var(48)-root,var(49)>=120
trigger6 = !enemy, AnimExist(5939)
trigger6 = root, Var(43)=5
trigger6 = root, NumExplod(3502)
trigger6 = root,var(48)-root,var(49)>=150
trigger7 = !enemy, AnimExist(5939)
trigger7 = root, NumExplod(3502)
trigger7 = root, Var(43)=6
trigger7 = root,var(48)-root,var(49)>=180
trans = addalpha
alpha = 0, 256

[State 0, ChangeState]
type = ChangeState
trigger1 = parent, Var(58) >=3
value = 3450
ctrl = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = roundstate = 4
y = -.5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >=200
trigger1 = root, Var(42) = 0

;----------------------------------------------------
; Deploy Super Balls Ball 4
[Statedef 3423]
type    = A
movetype= I
physics = N
anim = 3422
sprpriority = 5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, Near Ball Start Pos]
type = PosSet
trigger1 = !Time
x = root,Pos X + (15*facing)
y = root,Pos Y -295

[State 0, Near Ball Move]
type = VelSet
trigger1 = !Time 
x = -5 + random%15
y = -1 - random%10

[State 0, Stop All Balls]
type = VelSet
trigger1 = Pos Y <= -190 - random%40
x = 0
y = 0

[State 0, Trans]
type = Trans
triggerall = root, MoveType = H
trigger1 = enemy, AnimExist(5939)
trigger1 = enemy, NumExplod(991901)
trigger2 = !enemy, AnimExist(5939)
trigger2 = root, Var(43)=1
trigger2 = root, NumExplod(3502)
trigger2 = root,var(48)-root,var(49)>=30
trigger3 = !enemy, AnimExist(5939)
trigger3 = root, Var(43)=2
trigger3 = root, NumExplod(3502)
trigger3 = root,var(48)-root,var(49)>=60
trigger4 = !enemy, AnimExist(5939)
trigger4 = root, Var(43)=3
trigger4 = root, NumExplod(3502)
trigger4 = root,var(48)-root,var(49)>=90
trigger5 = !enemy, AnimExist(5939)
trigger5 = root, Var(43)=4
trigger5 = root, NumExplod(3502)
trigger5 = root,var(48)-root,var(49)>=120
trigger6 = !enemy, AnimExist(5939)
trigger6 = root, Var(43)=5
trigger6 = root, NumExplod(3502)
trigger6 = root,var(48)-root,var(49)>=150
trigger7 = !enemy, AnimExist(5939)
trigger7 = root, NumExplod(3502)
trigger7 = root, Var(43)=6
trigger7 = root,var(48)-root,var(49)>=180
trans = addalpha
alpha = 0, 256

[State 0, ChangeState]
type = ChangeState
trigger1 = parent, Var(58) >=4
value = 3450
ctrl = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = roundstate = 4
y = -.5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >=200
trigger1 = root, Var(42) = 0

;----------------------------------------------------
; Deploy Super Balls Ball 5
[Statedef 3424]
type    = A
movetype= I
physics = N
anim = 3422
sprpriority = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 1750,0
channel = 4
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, Near Ball Start Pos]
type = PosSet
trigger1 = !Time
x = root,Pos X + (10*facing)
y = root,Pos Y - 155

[State 0, Near Ball Move]
type = VelSet
trigger1 = !Time 
x = -5 + random%15
y = -1 - random%10

[State 0, Stop All Balls]
type = VelSet
trigger1 = Pos Y <= -200 - random%40
x = 0
y = 0

[State 0, Trans]
type = Trans
triggerall = root, MoveType = H
trigger1 = enemy, AnimExist(5939)
trigger1 = enemy, NumExplod(991901)
trigger2 = !enemy, AnimExist(5939)
trigger2 = root, Var(43)=1
trigger2 = root, NumExplod(3502)
trigger2 = root,var(48)-root,var(49)>=30
trigger3 = !enemy, AnimExist(5939)
trigger3 = root, Var(43)=2
trigger3 = root, NumExplod(3502)
trigger3 = root,var(48)-root,var(49)>=60
trigger4 = !enemy, AnimExist(5939)
trigger4 = root, Var(43)=3
trigger4 = root, NumExplod(3502)
trigger4 = root,var(48)-root,var(49)>=90
trigger5 = !enemy, AnimExist(5939)
trigger5 = root, Var(43)=4
trigger5 = root, NumExplod(3502)
trigger5 = root,var(48)-root,var(49)>=120
trigger6 = !enemy, AnimExist(5939)
trigger6 = root, Var(43)=5
trigger6 = root, NumExplod(3502)
trigger6 = root,var(48)-root,var(49)>=150
trigger7 = !enemy, AnimExist(5939)
trigger7 = root, NumExplod(3502)
trigger7 = root, Var(43)=6
trigger7 = root,var(48)-root,var(49)>=180
trans = addalpha
alpha = 0, 256

[State 0, ChangeState]
type = ChangeState
trigger1 = parent, Var(58) >=7
value = 3450
ctrl = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = roundstate = 4
y = -.5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >=200
trigger1 = root, Var(42) = 0

;----------------------------------------------------
; Deploy Super Balls Ball 6
[Statedef 3425]
type    = A
movetype= I
physics = N
anim = 3422
sprpriority = 5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, Near Ball Start Pos]
type = PosSet
trigger1 = !Time
x = root,Pos X + (20*facing)
y = root,Pos Y - 165

[State 0, Near Ball Move]
type = VelSet
trigger1 = !Time 
x = -5 + random%15
y = -1 - random%10

[State 0, Stop All Balls]
type = VelSet
trigger1 = Pos Y <= -190 - random%40
x = 0
y = 0

[State 0, Trans]
type = Trans
triggerall = root, MoveType = H
trigger1 = enemy, AnimExist(5939)
trigger1 = enemy, NumExplod(991901)
trigger2 = !enemy, AnimExist(5939)
trigger2 = root, Var(43)=1
trigger2 = root, NumExplod(3502)
trigger2 = root,var(48)-root,var(49)>=30
trigger3 = !enemy, AnimExist(5939)
trigger3 = root, Var(43)=2
trigger3 = root, NumExplod(3502)
trigger3 = root,var(48)-root,var(49)>=60
trigger4 = !enemy, AnimExist(5939)
trigger4 = root, Var(43)=3
trigger4 = root, NumExplod(3502)
trigger4 = root,var(48)-root,var(49)>=90
trigger5 = !enemy, AnimExist(5939)
trigger5 = root, Var(43)=4
trigger5 = root, NumExplod(3502)
trigger5 = root,var(48)-root,var(49)>=120
trigger6 = !enemy, AnimExist(5939)
trigger6 = root, Var(43)=5
trigger6 = root, NumExplod(3502)
trigger6 = root,var(48)-root,var(49)>=150
trigger7 = !enemy, AnimExist(5939)
trigger7 = root, NumExplod(3502)
trigger7 = root, Var(43)=6
trigger7 = root,var(48)-root,var(49)>=180
trans = addalpha
alpha = 0, 256

[State 0, ChangeState]
type = ChangeState
trigger1 = parent, Var(58) >=9
value = 3450
ctrl = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = roundstate = 4
y = -.5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >=200
trigger1 = root, Var(42) = 0

;----------------------------------------------------
; Deploy Super Balls Ball 7
[Statedef 3426]
type    = A
movetype= I
physics = N
anim = 3422
sprpriority = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 1750,0
channel = 2
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, Near Ball Start Pos]
type = PosSet
trigger1 = !Time
x = root,Pos X + (50*facing)
y = root,Pos Y - 145

[State 0, Near Ball Move]
type = VelSet
trigger1 = !Time 
x = -5 + random%15
y = -1 - random%10

[State 0, Stop All Balls]
type = VelSet
trigger1 = Pos Y <= -180 - random%40
x = 0
y = 0

[State 0, Trans]
type = Trans
triggerall = root, MoveType = H
trigger1 = enemy, AnimExist(5939)
trigger1 = enemy, NumExplod(991901)
trigger2 = !enemy, AnimExist(5939)
trigger2 = root, Var(43)=1
trigger2 = root, NumExplod(3502)
trigger2 = root,var(48)-root,var(49)>=30
trigger3 = !enemy, AnimExist(5939)
trigger3 = root, Var(43)=2
trigger3 = root, NumExplod(3502)
trigger3 = root,var(48)-root,var(49)>=60
trigger4 = !enemy, AnimExist(5939)
trigger4 = root, Var(43)=3
trigger4 = root, NumExplod(3502)
trigger4 = root,var(48)-root,var(49)>=90
trigger5 = !enemy, AnimExist(5939)
trigger5 = root, Var(43)=4
trigger5 = root, NumExplod(3502)
trigger5 = root,var(48)-root,var(49)>=120
trigger6 = !enemy, AnimExist(5939)
trigger6 = root, Var(43)=5
trigger6 = root, NumExplod(3502)
trigger6 = root,var(48)-root,var(49)>=150
trigger7 = !enemy, AnimExist(5939)
trigger7 = root, NumExplod(3502)
trigger7 = root, Var(43)=6
trigger7 = root,var(48)-root,var(49)>=180
trans = addalpha
alpha = 0, 256

[State 0, ChangeState]
type = ChangeState
trigger1 = parent, Var(58) >=10
value = 3450
ctrl = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = roundstate = 4
y = -.5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >=200
trigger1 = root, Var(42) = 0

;----------------------------------------------------
; Deploy Super Balls Ball 8
[Statedef 3427]
type    = A
movetype= I
physics = N
anim = 3422
sprpriority = 5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, Near Ball Start Pos]
type = PosSet
trigger1 = !Time
x = root,Pos X + (15*facing)
y = root,Pos Y -295

[State 0, Near Ball Move]
type = VelSet
trigger1 = !Time 
x = -5 + random%15
y = -1 - random%10

[State 0, Stop All Balls]
type = VelSet
trigger1 = Pos Y <= -170 - random%40
x = 0
y = 0

[State 0, Trans]
type = Trans
triggerall = root, MoveType = H
trigger1 = enemy, AnimExist(5939)
trigger1 = enemy, NumExplod(991901)
trigger2 = !enemy, AnimExist(5939)
trigger2 = root, Var(43)=1
trigger2 = root, NumExplod(3502)
trigger2 = root,var(48)-root,var(49)>=30
trigger3 = !enemy, AnimExist(5939)
trigger3 = root, Var(43)=2
trigger3 = root, NumExplod(3502)
trigger3 = root,var(48)-root,var(49)>=60
trigger4 = !enemy, AnimExist(5939)
trigger4 = root, Var(43)=3
trigger4 = root, NumExplod(3502)
trigger4 = root,var(48)-root,var(49)>=90
trigger5 = !enemy, AnimExist(5939)
trigger5 = root, Var(43)=4
trigger5 = root, NumExplod(3502)
trigger5 = root,var(48)-root,var(49)>=120
trigger6 = !enemy, AnimExist(5939)
trigger6 = root, Var(43)=5
trigger6 = root, NumExplod(3502)
trigger6 = root,var(48)-root,var(49)>=150
trigger7 = !enemy, AnimExist(5939)
trigger7 = root, NumExplod(3502)
trigger7 = root, Var(43)=6
trigger7 = root,var(48)-root,var(49)>=180
trans = addalpha
alpha = 0, 256

[State 0, ChangeState]
type = ChangeState
trigger1 = parent, Var(58) >=12
value = 3450
ctrl = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = roundstate = 4
y = -.5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >=200
trigger1 = root, Var(42) = 0

;----------------------------------------------------
; Deploy Super Balls Ball 9
[Statedef 3428]
type    = A
movetype= I
physics = N
anim = 3422
sprpriority = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 1750,0
channel = 3
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, Near Ball Start Pos]
type = PosSet
trigger1 = !Time
x = root,Pos X + (10*facing)
y = root,Pos Y - 155

[State 0, Near Ball Move]
type = VelSet
trigger1 = !Time 
x = -5 + random%15
y = -1 - random%10

[State 0, Stop All Balls]
type = VelSet
trigger1 = Pos Y <= -180 - random%40
x = 0
y = 0

[State 0, Trans]
type = Trans
triggerall = root, MoveType = H
trigger1 = enemy, AnimExist(5939)
trigger1 = enemy, NumExplod(991901)
trigger2 = !enemy, AnimExist(5939)
trigger2 = root, Var(43)=1
trigger2 = root, NumExplod(3502)
trigger2 = root,var(48)-root,var(49)>=30
trigger3 = !enemy, AnimExist(5939)
trigger3 = root, Var(43)=2
trigger3 = root, NumExplod(3502)
trigger3 = root,var(48)-root,var(49)>=60
trigger4 = !enemy, AnimExist(5939)
trigger4 = root, Var(43)=3
trigger4 = root, NumExplod(3502)
trigger4 = root,var(48)-root,var(49)>=90
trigger5 = !enemy, AnimExist(5939)
trigger5 = root, Var(43)=4
trigger5 = root, NumExplod(3502)
trigger5 = root,var(48)-root,var(49)>=120
trigger6 = !enemy, AnimExist(5939)
trigger6 = root, Var(43)=5
trigger6 = root, NumExplod(3502)
trigger6 = root,var(48)-root,var(49)>=150
trigger7 = !enemy, AnimExist(5939)
trigger7 = root, NumExplod(3502)
trigger7 = root, Var(43)=6
trigger7 = root,var(48)-root,var(49)>=180
trans = addalpha
alpha = 0, 256

[State 0, ChangeState]
type = ChangeState
trigger1 = parent, Var(58) >=13
value = 3450
ctrl = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = roundstate = 4
y = -.5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >=200
trigger1 = root, Var(42) = 0


;----------------------------------------------------
; Deploy Super Balls Ball 10
[Statedef 3429]
type    = A
movetype= I
physics = N
anim = 3422
sprpriority = 5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, Near Ball Start Pos]
type = PosSet
trigger1 = !Time
x = root,Pos X + (20*facing)
y = root,Pos Y - 165

[State 0, Near Ball Move]
type = VelSet
trigger1 = !Time 
x = -5 + random%15
y = -1 - random%10

[State 0, Stop All Balls]
type = VelSet
trigger1 = Pos Y <= -190 - random%40
x = 0
y = 0

[State 0, Trans]
type = Trans
triggerall = root, MoveType = H
trigger1 = enemy, AnimExist(5939)
trigger1 = enemy, NumExplod(991901)
trigger2 = !enemy, AnimExist(5939)
trigger2 = root, Var(43)=1
trigger2 = root, NumExplod(3502)
trigger2 = root,var(48)-root,var(49)>=30
trigger3 = !enemy, AnimExist(5939)
trigger3 = root, Var(43)=2
trigger3 = root, NumExplod(3502)
trigger3 = root,var(48)-root,var(49)>=60
trigger4 = !enemy, AnimExist(5939)
trigger4 = root, Var(43)=3
trigger4 = root, NumExplod(3502)
trigger4 = root,var(48)-root,var(49)>=90
trigger5 = !enemy, AnimExist(5939)
trigger5 = root, Var(43)=4
trigger5 = root, NumExplod(3502)
trigger5 = root,var(48)-root,var(49)>=120
trigger6 = !enemy, AnimExist(5939)
trigger6 = root, Var(43)=5
trigger6 = root, NumExplod(3502)
trigger6 = root,var(48)-root,var(49)>=150
trigger7 = !enemy, AnimExist(5939)
trigger7 = root, NumExplod(3502)
trigger7 = root, Var(43)=6
trigger7 = root,var(48)-root,var(49)>=180
trans = addalpha
alpha = 0, 256

[State 0, ChangeState]
type = ChangeState
trigger1 = parent, Var(58) >=17
trigger2 = root, StateNo = 3413
value = 3450
ctrl = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = roundstate = 4
y = -.5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >=200
trigger1 = root, Var(42) = 0

;----------------------------------------------------
; The Grenades are attacking!!!
[Statedef 3450]
type    = A
movetype= A
physics = N
anim = 3450
sprpriority = 5

[State 0, PosSet]
type = PosSet
triggerall = !Time
trigger1 = parent, Var(58) = 2
trigger2 = parent, Var(58) = 5
trigger3 = parent, Var(58) = 6
trigger4 = parent, Var(58) = 8
trigger5 = parent, Var(58) = 11
trigger6 = parent, Var(58) = 14
trigger7 = parent, Var(58) = 15
trigger8 = parent, Var(58) = 16
trigger9 = Var(58) >= 17 && Var(58) <=35
x = enemy, Pos X - 150 + random%300
y = enemy, Const(size.head.pos.y) - 100

[State 0, VelSet]
type = VelSet
trigger1 = P2Dist x <= 0
x = -4 - parent, Var(58) -6

[State 0, VelSet]
type = null;VelAdd
trigger1 = P2Dist Y > 0
Y = 1 + parent, Var(58) ;+6

[State 0, VelAdd]
type = VelAdd
trigger1 = P2Dist Y - abs(EnemyNear, const(size.mid.pos.y)) > 0
Y = 1 + parent, Var(58)

[State 0, VelSet]
type = null;VelAdd
trigger1 = P2StateType = A
trigger1 = P2Dist X <=9
trigger1 = P2Dist Y <= 20
Y = -5 - parent, Var(58) ;+6

[State 0, VelSet]
type = null;VelSet
trigger1 = P2Dist Y < 0
Y = -5 - parent, Var(58) ;-6

[State 0, VelSet]
type = null;VelSet
trigger1 = Pos Y >= -30
Y = -5 - parent, Var(58) 

[State 0, VelSet]
type = VelSet
trigger1 = P2Dist Y - abs(EnemyNear, const(size.mid.pos.y)) < 0
Y = -5 - parent, Var(58) 

[State 0, VelSet]
type = VelSet
trigger1 = P2Dist x >= 0
x = 4 + parent, Var(58) +6

[State 0, HitDef]
type = HitDef
trigger1 = 1
attr = A,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF       ;HLAFD+-
guardflag = MA
animtype = Back
damage = 5,0
pausetime = 1 ,12
guard.pausetime = 6,12
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0, 0
hitsound   = S1750, 1
guardsound = S5,20
ground.type = High      ;Low,Trip,None
ground.slidetime = 12
guard.slidetime = 4
ground.hittime = 14
guard.hittime = 20
guard.dist = 0
yaccel = 0.5
ground.velocity = -2+random%4,-5
guard.velocity = -1
air.velocity = -2+random%4,-5
airguard.velocity = -3,-1
fall = 1
fall.recover = 0
kill = 0
givepower = 1,20
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
ID = 1760

[State 0, TargetState]
type = TargetState
triggerall = NumTarget(1760)
trigger1 = MoveHit = 1
trigger1 = !(target, ishelper)
trigger1 = parent, Var(58) >=4
value = 3460
ignorehitpause = 1

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1
var(57) = 1

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveGuarded
var(58) = 1

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = parent, Var(58) >= 36
trigger1 = P2MoveType != H
var(56) = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = !IsHelper(3429)
trigger1 = MoveContact
trigger2 = IsHelper(3429)
trigger2 = MoveHit
trigger3 = !IsHelper(3429)
trigger3 = Time >= 30
value = 1770
ctrl = 0

[State 0, ChangeState]
type = ChangeState
triggerall = IsHelper(3429)
trigger1 = MoveGuarded
trigger2 = Time >= 30
value = 1772
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = root, MoveType = H
trigger1 = enemy, MoveType = H
trigger2 = root, StateNo = 3413
value = 1772
ctrl = 0

;----------------------------------------------------
; Floating Balls!
[Statedef 3490]
type    = A
movetype= I
physics = N
anim = 3423
sprpriority = -3
velset = 1,1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, VelSet]
type = VelSet
trigger1 = GameTime%10 = 0
x = -3+random%7
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = Time = 20
y = 0

[State 0, DestroySelf]
type = DestroySelf
triggerall = root, MoveType = H
trigger1 = enemy, AnimExist(5939)
trigger1 = enemy, NumExplod(991901)
trigger2 = !enemy, AnimExist(5939)
trigger2 = root, Var(43)=1
trigger2 = root, NumExplod(3502)
trigger2 = root,var(48)-root,var(49)>=30
trigger3 = !enemy, AnimExist(5939)
trigger3 = root, Var(43)=2
trigger3 = root, NumExplod(3502)
trigger3 = root,var(48)-root,var(49)>=60
trigger4 = !enemy, AnimExist(5939)
trigger4 = root, Var(43)=3
trigger4 = root, NumExplod(3502)
trigger4 = root,var(48)-root,var(49)>=90
trigger5 = !enemy, AnimExist(5939)
trigger5 = root, Var(43)=4
trigger5 = root, NumExplod(3502)
trigger5 = root,var(48)-root,var(49)>=120
trigger6 = !enemy, AnimExist(5939)
trigger6 = root, Var(43)=5
trigger6 = root, NumExplod(3502)
trigger6 = root,var(48)-root,var(49)>=150
trigger7 = !enemy, AnimExist(5939)
trigger7 = root, NumExplod(3502)
trigger7 = root, Var(43)=6
trigger7 = root,var(48)-root,var(49)>=180

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = RoundState = 4
trigger1 = Anim != 1771
value = 1771

[State 0, PlaySnd]
type = PlaySnd
trigger1 = enemy,name != "Shin Satan Z2"
trigger1 = enemy, StateNo != 189
trigger1 = Anim = 1771
trigger1 = AnimElem = 2
value = 1760,0+random%7
channel = 2

[State 0, DestroySelf]
type = DestroySelf
trigger1 = (pos x!=[-240,240])
trigger2 = root, Var(42) = 0
trigger3 = Anim = 1771
trigger3 = !AnimTime

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = enemy,name = "Shin Satan Z2"
trigger1 = enemy, StateNo = 189
flag = invisible

;----------------------------------------------------
; Deploy Balls
[Statedef 1750]
type    = A
movetype= I
physics = N
anim = 1750
sprpriority = 5


[State 0, Null]
type = Null
trigger1 = root, Anim = 1700
trigger1 = Var(0) := 1
trigger2 = root, Anim = 1701
trigger2 = Var(1) := 1
trigger3 = root, Anim = 1702
trigger3 = Var(2) := 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 1750,0
channel = 2
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, Near Ball Start Pos]
type = PosSet
triggerall = !Time
trigger1 = root,anim = 1700 ;near version
x = root,Pos X + (30*facing)
y = root,Pos Y - 155
[State 0, Med Ball Start Pos]
type = PosSet
triggerall = !Time
trigger1 = root,anim = 1701 ;med version
x = root,Pos X + (50*facing)
y = root,Pos Y - 150
[State 0, Far Ball Start Pos]
type = PosSet
triggerall = !Time
trigger1 = root,anim = 1702 ;far version
x = root,Pos X + (60*facing)
y = root,Pos Y - 140

[State 0, Near Ball Move]
type = VelSet
triggerall = !Time 
trigger1 = root,anim = 1700 ;near version
trigger1 = Var(0) := 1
x = 1
y = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = Time >= 5
trigger1 = Var(0) = 1
y = -.1

[State 0, Med Ball Move]
type = VelSet
triggerall = !Time 
trigger1 = root,anim = 1701 ;med version
trigger1 = Var(1) := 1
x = 3
y = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = Time >= 5
trigger1 = Var(1) = 1
y = -.1

[State 0, Far Ball Move]
type = VelSet
triggerall = !Time 
trigger1 = root,anim = 1702 ;far version
trigger1 = Var(2) := 1
x = 5
y = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = Time >= 5
trigger1 = Var(2) = 1
y = -.1

[State 0, Stop All Balls]
type = VelSet
trigger1 = Pos Y <= -180 || ScreenPos Y <= 20
x = 0
y = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = Pos Y <= -180 || ScreenPos Y <= 20
value = 1760

;----------------------------------------------------
; Deploy Balls QCB
[Statedef 1759]
type    = A
movetype= I
physics = N
anim = 1750
sprpriority = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 1750,0
channel = 2
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, Near Ball Start Pos]
type = PosSet
triggerall = !Time
trigger1 = root,anim = 1700 ;near version
x = root,Pos X + (30*facing)
y = root,Pos Y - 155
[State 0, Med Ball Start Pos]
type = PosSet
triggerall = !Time
trigger1 = root,anim = 1701 ;med version
x = root,Pos X + (50*facing)
y = root,Pos Y - 150
[State 0, Far Ball Start Pos]
type = PosSet
triggerall = !Time
trigger1 = root,anim = 1702 ;far version
x = root,Pos X + (60*facing)
y = root,Pos Y - 140

[State 0, Near Ball Move]
type = VelSet
triggerall = !Time 
trigger1 = root,anim = 1700 ;near version
trigger1 = Var(0) := 1
x = 1
y = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = Time >= 5
trigger1 = Var(0) = 1
y = -.1

[State 0, Med Ball Move]
type = VelSet
triggerall = !Time 
trigger1 = root,anim = 1701 ;med version
trigger1 = Var(1) := 1
x = 3
y = 0

[State 0, VelAdd]
type = VelSet
trigger1 = GameTime%5 = 0
trigger1 = Var(1) = 1
y = -5


[State 0, VelAdd]
type = VelSet
trigger1 = GameTime%4 = 0
trigger1 = Var(1) = 1
y = 2

[State 0, Far Ball Move]
type = VelSet
triggerall = !Time 
trigger1 = root,anim = 1702 ;far version
trigger1 = Var(2) := 1
x = 5
y = 0

[State 0, VelAdd]
type = VelSet
trigger1 = GameTime%5 = 0
trigger1 = Var(2) = 1
y = -5


[State 0, VelAdd]
type = VelSet
trigger1 = GameTime%4 = 0
trigger1 = Var(2) = 1
y = 2

[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(26) = 1

[State 0, Stop All Balls]
type = VelSet
trigger1 = Pos Y <= -180 || ScreenPos Y <= 60
trigger1 = Var(0) = 1
trigger1 = Var(26) := 2
x = 0
y = 0

[State 0, Stop All Balls]
type = VelSet
trigger1 = P2Dist X < 3
trigger1 = Var(1) = 1
trigger1 = Var(26) := 2
x = 0
y = 0

[State 0, Stop All Balls]
type = VelSet
trigger1 = FrontEdgeDist < 20
trigger1 = Var(2) = 1
trigger1 = Var(26) := 2
x = 0
y = 0

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = 1
var(26) = Var(26)

[State 0, ChangeState]
type = ChangeState
trigger1 = Pos Y <= -180 || ScreenPos Y <= 60
trigger1 = Var(0) = 1
value = 1760

[State 0, ChangeState]
type = ChangeState
trigger1 = P2Dist X < 3
trigger1 = Var(1) = 1
value = 1760

[State 0, ChangeState]
type = ChangeState
trigger1 = Vel X = 0
trigger1 = Var(2) = 1
value = 1760

;----------------------------------------------------
; Balls at Rest
[Statedef 1760]
type    = A
movetype= A
physics = N
anim = 1760
sprpriority = 5

[State 0, VelAdd]
type = VelAdd
trigger1 = Pos Y >= -140
y = -2

[State 0, VelSet]
type = VelSet
trigger1 = Time >=3 || Pos Y <= -200
x = 0
y = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = IsHelper(1751)
var(20) = 1
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = IsHelper(1752)
var(21) = 1
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = IsHelper(1753)
var(22) = 1
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = IsHelper(1754)
var(23) = 1
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = IsHelper(1755)
var(24) = 1
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = IsHelper(1756)
var(25) = 1

  [State 1000, Collision detection +1]
type = VelSet
trigger1 = IsHelper(1751)
trigger1 = NumHelper(1752)
trigger1 = ScreenPos X > parent, Var(11) +32  
trigger2 = IsHelper(1751)
trigger2 = NumHelper(1753)
trigger2 = ScreenPos X > parent, Var(12) +32 
trigger3 = IsHelper(1752)
trigger3 = NumHelper(1751)
trigger3 = ScreenPos X > parent, Var(10) +32 
trigger4 = IsHelper(1752)
trigger4 = NumHelper(1753)
trigger4 = ScreenPos X > parent, Var(12) +32   
trigger5 = IsHelper(1753)
trigger5 = NumHelper(1751)
trigger5 = ScreenPos X > parent, Var(10) +32  
trigger6 = IsHelper(1753)
trigger6 = NumHelper(1752)
trigger6 = ScreenPos X > parent, Var(11) +32 
x = 0


[State 1000, Collision detection +1]
type = VelSet
trigger1 = IsHelper(1751)
trigger1 = NumHelper(1752)
trigger1 = ScreenPos X < parent, Var(11) -32 
trigger2 = IsHelper(1751)
trigger2 = NumHelper(1753)
trigger2 = ScreenPos X < parent, Var(12) -32 
trigger3 = IsHelper(1752)
trigger3 = NumHelper(1751)
trigger3 = ScreenPos X < parent, Var(10) -32 
trigger4 = IsHelper(1752)
trigger4 = NumHelper(1753)
trigger4 = ScreenPos X < parent, Var(12) -32 
trigger5 = IsHelper(1753)
trigger5 = NumHelper(1751)
trigger5 = ScreenPos X < parent, Var(10) -32 
trigger6 = IsHelper(1753)
trigger6 = NumHelper(1752)
trigger6 = ScreenPos X < parent, Var(11) -32  
x = 0

;------------------------------
  [State 1000, Collision detection +1]
type = VelSet
trigger1 = IsHelper(1754)
trigger1 = NumHelper(1755)
trigger1 = ScreenPos X > parent, Var(14) +32  
trigger2 = IsHelper(1754)
trigger2 = NumHelper(1756)
trigger2 = ScreenPos X > parent, Var(15) +32 
trigger3 = IsHelper(1755)
trigger3 = NumHelper(1754)
trigger3 = ScreenPos X > parent, Var(13) +32 
trigger4 = IsHelper(1755)
trigger4 = NumHelper(1756)
trigger4 = ScreenPos X > parent, Var(15) +32   
trigger5 = IsHelper(1756)
trigger5 = NumHelper(1754)
trigger5 = ScreenPos X > parent, Var(13) +32  
trigger6 = IsHelper(1756)
trigger6 = NumHelper(1755)
trigger6 = ScreenPos X > parent, Var(14) +32 
x = 0


[State 1000, Collision detection +1]
type = VelSet
trigger1 = IsHelper(1754)
trigger1 = NumHelper(1755)
trigger1 = ScreenPos X < parent, Var(14) -32 
trigger2 = IsHelper(1754)
trigger2 = NumHelper(1756)
trigger2 = ScreenPos X < parent, Var(15) -32 
trigger3 = IsHelper(1755)
trigger3 = NumHelper(1754)
trigger3 = ScreenPos X < parent, Var(13) -32 
trigger4 = IsHelper(1755)
trigger4 = NumHelper(1756)
trigger4 = ScreenPos X < parent, Var(15) -32 
trigger5 = IsHelper(1756)
trigger5 = NumHelper(1754)
trigger5 = ScreenPos X < parent, Var(13) -32 
trigger6 = IsHelper(1756)
trigger6 = NumHelper(1755)
trigger6 = ScreenPos X < parent, Var(14) -32  
x = 0

[State 1000, Collision detection 1751]
type = VelSet
triggerall = IsHelper(1751)
trigger1 = NumHelper(1752) && !NumHelper(1753)
trigger1 = parent, Var(21) = 1 || parent, Var(22) = 1
trigger1 = ScreenPos X > parent, Var(11) && ScreenPos X < parent, Var(11) +32
trigger2 = NumHelper(1752) && NumHelper(1753)
trigger2 = parent, Var(21) = 1 || parent, Var(22) = 1
trigger2 = ScreenPos X > parent, Var(11) && ScreenPos X < parent, Var(11) +32
trigger2 = ScreenPos X > parent, Var(12) +32  
trigger3 = NumHelper(1752) && NumHelper(1753)
trigger3 = parent, Var(21) = 1 || parent, Var(22) = 1
trigger3 = ScreenPos X > parent, Var(12) && ScreenPos X < parent, Var(12) +32
trigger3 = ScreenPos X > parent, Var(11) +32  
trigger4 = NumHelper(1752) && NumHelper(1753)
trigger4 = parent, Var(21) = 1 || parent, Var(22) = 1
trigger4 = ScreenPos X > parent, Var(11) && ScreenPos X < parent, Var(11) +32
trigger4 = ScreenPos X > parent, Var(12) && ScreenPos X < parent, Var(12) +32
x = Cond(Facing=1,.125 ,-.125)

[State 1000, Collision detection 1752]
type = VelSet
triggerall = IsHelper(1752)
trigger1 = NumHelper(1751) && !NumHelper(1753)
trigger1 = parent, Var(20) = 1 || parent, Var(22) = 1
trigger1 = ScreenPos X > parent, Var(10) && ScreenPos X < parent, Var(10) +32
trigger2 = NumHelper(1751) && NumHelper(1753)
trigger2 = parent, Var(20) = 1 || parent, Var(22) = 1
trigger2 = ScreenPos X > parent, Var(10) && ScreenPos X < parent, Var(10) +32
trigger2 = ScreenPos X > parent, Var(12) +32  
trigger3 = NumHelper(1751) && NumHelper(1753)
trigger3 = parent, Var(20) = 1 || parent, Var(22) = 1
trigger3 = ScreenPos X > parent, Var(12) && ScreenPos X < parent, Var(12) +32
trigger3 = ScreenPos X > parent, Var(10) +32  
trigger4 = NumHelper(1751) && NumHelper(1753)
trigger4 = parent, Var(20) = 1 || parent, Var(22) = 1
trigger4 = ScreenPos X > parent, Var(10) && ScreenPos X < parent, Var(10) +32
trigger4 = ScreenPos X > parent, Var(12) && ScreenPos X < parent, Var(12) +32
x = Cond(Facing=1,.125 ,-.125)

[State 1000, Collision detection 1753]
type = VelSet
triggerall = IsHelper(1753)
trigger1 = NumHelper(1752) && !NumHelper(1751)
trigger1 = parent, Var(21) = 1 || parent, Var(20) = 1
trigger1 = ScreenPos X > parent, Var(11) && ScreenPos X < parent, Var(11) +32
trigger2 = NumHelper(1753) && NumHelper(1751)
trigger2 = parent, Var(21) = 1 || parent, Var(20) = 1
trigger2 = ScreenPos X > parent, Var(11) && ScreenPos X < parent, Var(11) +32
trigger2 = ScreenPos X > parent, Var(10) +32  
trigger3 = NumHelper(1753) && NumHelper(1751)
trigger3 = parent, Var(21) = 1 || parent, Var(20) = 1
trigger3 = ScreenPos X > parent, Var(10) && ScreenPos X < parent, Var(10) +32
trigger3 = ScreenPos X > parent, Var(11) +32  
trigger4 = NumHelper(1753) && NumHelper(1751)
trigger4 = parent, Var(21) = 1 || parent, Var(20) = 1
trigger4 = ScreenPos X > parent, Var(11) && ScreenPos X < parent, Var(11) +32
trigger4 = ScreenPos X > parent, Var(10) && ScreenPos X < parent, Var(10) +32
x = Cond(Facing=1,.125 ,-.125)

[State 1000, Collision detection 1751]
type = VelSet
triggerall = IsHelper(1751)
trigger1 = NumHelper(1752) && !NumHelper(1753)
trigger1 = parent, Var(21) = 1 || parent, Var(22) = 1
trigger1 = ScreenPos X <= parent, Var(11) && ScreenPos X > parent, Var(11) -31
trigger2 = NumHelper(1752) && NumHelper(1753)
trigger2 = parent, Var(21) = 1 || parent, Var(22) = 1
trigger2 = ScreenPos X <= parent, Var(11) && ScreenPos X > parent, Var(11) -31
trigger2 =ScreenPos X < parent, Var(12) -32  
trigger3 = NumHelper(1752) && NumHelper(1753)
trigger3 = parent, Var(21) = 1 || parent, Var(22) = 1
trigger3 = ScreenPos X <= parent, Var(12) && ScreenPos X > parent, Var(12) -31
trigger3 = ScreenPos X < parent, Var(11) -32 
trigger4 = NumHelper(1752) && NumHelper(1753)
trigger4 = parent, Var(21) = 1 || parent, Var(22) = 1
trigger4 = ScreenPos X <= parent, Var(11) && ScreenPos X > parent, Var(11) -31
trigger4 = ScreenPos X <= parent, Var(12) && ScreenPos X > parent, Var(12) -31
x = Cond(Facing=1,-.125 ,.125)

[State 1000, Collision detection 1752]
type = VelSet
triggerall = IsHelper(1752)
trigger1 = NumHelper(1751) && !NumHelper(1753)
trigger1 = parent, Var(20) = 1 || parent, Var(22) = 1
trigger1 = ScreenPos X <= parent, Var(10) && ScreenPos X > parent, Var(10) -31
trigger2 = NumHelper(1751) && NumHelper(1753)
trigger2 = parent, Var(20) = 1 || parent, Var(22) = 1
trigger2 = ScreenPos X > parent, Var(10) && ScreenPos X < parent, Var(10) +32
trigger2 = ScreenPos X < parent, Var(12) -32 
trigger3 = NumHelper(1751) && NumHelper(1753)
trigger3 = parent, Var(20) = 1 || parent, Var(22) = 1
trigger3 = ScreenPos X <= parent, Var(12) && ScreenPos X > parent, Var(12) -31
trigger3 = ScreenPos X < parent, Var(10) -32 
trigger4 = NumHelper(1751) && NumHelper(1753)
trigger4 = parent, Var(20) = 1 || parent, Var(22) = 1
trigger4 = ScreenPos X <= parent, Var(10) && ScreenPos X > parent, Var(10) -31
trigger4 = ScreenPos X <= parent, Var(12) && ScreenPos X > parent, Var(12) -31
x = Cond(Facing=1,-.125 ,.125)

[State 1000, Collision detection 1753]
type = VelSet
triggerall = IsHelper(1753)
trigger1 = NumHelper(1752) && !NumHelper(1751)
trigger1 = parent, Var(21) = 1 || parent, Var(20) = 1
trigger1 = ScreenPos X <= parent, Var(11) && ScreenPos X > parent, Var(11) -31
trigger2 = NumHelper(1753) && NumHelper(1751)
trigger2 = parent, Var(21) = 1 || parent, Var(20) = 1
trigger2 = ScreenPos X <= parent, Var(11) && ScreenPos X > parent, Var(11) -31
trigger2 = ScreenPos X < parent, Var(10) -32 
trigger3 = NumHelper(1753) && NumHelper(1751)
trigger3 = parent, Var(21) = 1 || parent, Var(20) = 1
trigger3 = ScreenPos X <= parent, Var(10) && ScreenPos X > parent, Var(10) -31
trigger3 = ScreenPos X < parent, Var(11) -32  
trigger4 = NumHelper(1753) && NumHelper(1751)
trigger4 = parent, Var(21) = 1 || parent, Var(20) = 1
trigger4 = ScreenPos X <= parent, Var(11) && ScreenPos X > parent, Var(11) -31
trigger4 = ScreenPos X <= parent, Var(10) && ScreenPos X > parent, Var(10) -31
x = Cond(Facing=1,-.125 ,.125)

;--------------------------------
[State 1000, Collision detection 1754]
type = VelSet
triggerall = IsHelper(1754)
trigger1 = NumHelper(1755) && !NumHelper(1756)
trigger1 = parent, Var(24) = 1 || parent, Var(25) = 1
trigger1 = ScreenPos X > parent, Var(14) && ScreenPos X < parent, Var(14) +32
trigger2 = NumHelper(1755) && NumHelper(1756)
trigger2 = parent, Var(24) = 1 || parent, Var(25) = 1
trigger2 = ScreenPos X > parent, Var(14) && ScreenPos X < parent, Var(14) +32
trigger2 = ScreenPos X > parent, Var(15) +32  
trigger3 = NumHelper(1755) && NumHelper(1756)
trigger3 = parent, Var(24) = 1 || parent, Var(25) = 1
trigger3 = ScreenPos X > parent, Var(15) && ScreenPos X < parent, Var(15) +32
trigger3 = ScreenPos X > parent, Var(14) +32  
trigger4 = NumHelper(1755) && NumHelper(1756)
trigger4 = parent, Var(24) = 1 || parent, Var(25) = 1
trigger4 = ScreenPos X > parent, Var(14) && ScreenPos X < parent, Var(14) +32
trigger4 = ScreenPos X > parent, Var(15) && ScreenPos X < parent, Var(15) +32
x = Cond(Facing=1,.125 ,-.125)

[State 1000, Collision detection 1755]
type = VelSet
triggerall = IsHelper(1755)
trigger1 = NumHelper(1754) && !NumHelper(1756)
trigger1 = parent, Var(23) = 1 || parent, Var(25) = 1
trigger1 = ScreenPos X > parent, Var(13) && ScreenPos X < parent, Var(13) +32
trigger2 = NumHelper(1754) && NumHelper(1756)
trigger2 = parent, Var(23) = 1 || parent, Var(25) = 1
trigger2 = ScreenPos X > parent, Var(13) && ScreenPos X < parent, Var(13) +32
trigger2 = ScreenPos X > parent, Var(15) +32  
trigger3 = NumHelper(1754) && NumHelper(1756)
trigger3 = parent, Var(23) = 1 || parent, Var(25) = 1
trigger3 = ScreenPos X > parent, Var(15) && ScreenPos X < parent, Var(15) +32
trigger3 = ScreenPos X > parent, Var(13) +32  
trigger4 = NumHelper(1754) && NumHelper(1756)
trigger4 = parent, Var(23) = 1 || parent, Var(25) = 1
trigger4 = ScreenPos X > parent, Var(13) && ScreenPos X < parent, Var(13) +32
trigger4 = ScreenPos X > parent, Var(15) && ScreenPos X < parent, Var(15) +32
x = Cond(Facing=1,.125 ,-.125)

[State 1000, Collision detection 1756]
type = VelSet
triggerall = IsHelper(1756)
trigger1 = NumHelper(1755) && !NumHelper(1754)
trigger1 = parent, Var(24) = 1 || parent, Var(23) = 1
trigger1 = ScreenPos X > parent, Var(14) && ScreenPos X < parent, Var(14) +32
trigger2 = NumHelper(1756) && NumHelper(1754)
trigger2 = parent, Var(24) = 1 || parent, Var(23) = 1
trigger2 = ScreenPos X > parent, Var(14) && ScreenPos X < parent, Var(14) +32
trigger2 = ScreenPos X > parent, Var(13) +32  
trigger3 = NumHelper(1756) && NumHelper(1754)
trigger3 = parent, Var(24) = 1 || parent, Var(23) = 1
trigger3 = ScreenPos X > parent, Var(13) && ScreenPos X < parent, Var(13) +32
trigger3 = ScreenPos X > parent, Var(14) +32  
trigger4 = NumHelper(1756) && NumHelper(1754)
trigger4 = parent, Var(24) = 1 || parent, Var(23) = 1
trigger4 = ScreenPos X > parent, Var(14) && ScreenPos X < parent, Var(14) +32
trigger4 = ScreenPos X > parent, Var(13) && ScreenPos X < parent, Var(13) +32
x = Cond(Facing=1,.125 ,-.125)

[State 1000, Collision detection 1754]
type = VelSet
triggerall = IsHelper(1754)
trigger1 = NumHelper(1755) && !NumHelper(1756)
trigger1 = parent, Var(24) = 1 || parent, Var(25) = 1
trigger1 = ScreenPos X <= parent, Var(14) && ScreenPos X > parent, Var(14) -31
trigger2 = NumHelper(1755) && NumHelper(1756)
trigger2 = parent, Var(24) = 1 || parent, Var(25) = 1
trigger2 = ScreenPos X <= parent, Var(14) && ScreenPos X > parent, Var(14) -31
trigger2 =ScreenPos X < parent, Var(15) -32  
trigger3 = NumHelper(1755) && NumHelper(1756)
trigger3 = parent, Var(24) = 1 || parent, Var(25) = 1
trigger3 = ScreenPos X <= parent, Var(15) && ScreenPos X > parent, Var(15) -31
trigger3 = ScreenPos X < parent, Var(14) -32 
trigger4 = NumHelper(1755) && NumHelper(1756)
trigger4 = parent, Var(24) = 1 || parent, Var(25) = 1
trigger4 = ScreenPos X <= parent, Var(14) && ScreenPos X > parent, Var(14) -31
trigger4 = ScreenPos X <= parent, Var(15) && ScreenPos X > parent, Var(15) -31
x = Cond(Facing=1,-.125 ,.125)

[State 1000, Collision detection 1755]
type = VelSet
triggerall = IsHelper(1755)
trigger1 = NumHelper(1754) && !NumHelper(1756)
trigger1 = parent, Var(23) = 1 || parent, Var(25) = 1
trigger1 = ScreenPos X <= parent, Var(13) && ScreenPos X > parent, Var(13) -31
trigger2 = NumHelper(1754) && NumHelper(1756)
trigger2 = parent, Var(23) = 1 || parent, Var(25) = 1
trigger2 = ScreenPos X > parent, Var(13) && ScreenPos X < parent, Var(13) +32
trigger2 = ScreenPos X < parent, Var(15) -32 
trigger3 = NumHelper(1754) && NumHelper(1756)
trigger3 = parent, Var(23) = 1 || parent, Var(25) = 1
trigger3 = ScreenPos X <= parent, Var(15) && ScreenPos X > parent, Var(15) -31
trigger3 = ScreenPos X < parent, Var(13) -32 
trigger4 = NumHelper(1754) && NumHelper(1756)
trigger4 = parent, Var(23) = 1 || parent, Var(25) = 1
trigger4 = ScreenPos X <= parent, Var(13) && ScreenPos X > parent, Var(13) -31
trigger4 = ScreenPos X <= parent, Var(15) && ScreenPos X > parent, Var(15) -31
x = Cond(Facing=1,-.125 ,.125)

[State 1000, Collision detection 1756]
type = VelSet
triggerall = IsHelper(1756)
trigger1 = NumHelper(1755) && !NumHelper(1754)
trigger1 = parent, Var(24) = 1 || parent, Var(23) = 1
trigger1 = ScreenPos X <= parent, Var(14) && ScreenPos X > parent, Var(14) -31
trigger2 = NumHelper(1756) && NumHelper(1754)
trigger2 = parent, Var(24) = 1 || parent, Var(23) = 1
trigger2 = ScreenPos X <= parent, Var(14) && ScreenPos X > parent, Var(14) -31
trigger2 = ScreenPos X < parent, Var(13) -32 
trigger3 = NumHelper(1756) && NumHelper(1754)
trigger3 = parent, Var(24) = 1 || parent, Var(23) = 1
trigger3 = ScreenPos X <= parent, Var(13) && ScreenPos X > parent, Var(13) -31
trigger3 = ScreenPos X < parent, Var(14) -32  
trigger4 = NumHelper(1756) && NumHelper(1754)
trigger4 = parent, Var(24) = 1 || parent, Var(23) = 1
trigger4 = ScreenPos X <= parent, Var(14) && ScreenPos X > parent, Var(14) -31
trigger4 = ScreenPos X <= parent, Var(13) && ScreenPos X > parent, Var(13) -31
x = Cond(Facing=1,-.125 ,.125)



[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1770
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 0, HitDef]
type = HitDef
trigger1 = 1
attr = A,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
animtype = Back
damage = ceil(ifElse(root,fvar(11) * 40 < 7, 7, root,fvar(11) * 40)),10
pausetime = 1 ,12
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0, 0
hitsound   = S1750, 1
guardsound = S5,20
ground.type = High      ;Low,Trip,None
ground.slidetime = 12
guard.slidetime = 4
ground.hittime = 14
guard.hittime = 6
guard.dist = 0
yaccel = 0.5
ground.velocity = -6,-1
guard.velocity = -3
air.velocity = -4,-8
airguard.velocity = -3,-1
fall = 1
fall.recover = 0
;fall.recovertime = 32
kill = 1
getpower = 100,10
givepower = 30,10
ID = 1760

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 1760
projanim = 1606
projremovetime = 1
supermovetime = 0
pausemovetime = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = roundstate = 4
y = -.5

[State 0, ChangeState]
type = ChangeState
trigger1 = root,Var(42) = 1
value = 1771

[State 0, ChangeState]
type = ChangeState
trigger1 = MoveContact
value = 1770

[State 0, ChangeState]
type = ChangeState
triggerall = root, StateNo = 1800
triggerall = root, Anim = 1710 && root, AnimElem = 7
triggerall =  Var(0) = 1
trigger1 = IsHelper(1751)
trigger2 = IsHelper(1752)
trigger3 = IsHelper(1753)
value = 1770

[State 0, ChangeState]
type = ChangeState
triggerall = root, StateNo = 1801
triggerall = root, Anim = 1710 && root, AnimElem = 7
triggerall =  Var(1) = 1
trigger1 = IsHelper(1751)
trigger2 = IsHelper(1752)
trigger3 = IsHelper(1753)
value = 1770

[State 0, ChangeState]
type = ChangeState
triggerall = root, StateNo = 1802
triggerall = root, Anim = 1710 && root, AnimElem = 7
triggerall =  Var(2) = 1
trigger1 = IsHelper(1751)
trigger2 = IsHelper(1752)
trigger3 = IsHelper(1753)
value = 1770

[State 0, ChangeState]
type = ChangeState
triggerall = root, StateNo = 1803
triggerall = root, Anim = 1710 && root, AnimElem = 7
trigger1 = IsHelper(1751)
trigger2 = IsHelper(1752)
trigger3 = IsHelper(1753)
value = 1770

[State 0, ChangeState]
type = ChangeState
triggerall = root, StateNo = 1804
triggerall = root, Anim = 1710 && root, AnimElem = 7
triggerall =  Var(0) = 1
trigger1 = IsHelper(1754)
trigger2 = IsHelper(1755)
trigger3 = IsHelper(1756)
value = 1770

[State 0, ChangeState]
type = ChangeState
triggerall = root, StateNo = 1805
triggerall = root, Anim = 1710 && root, AnimElem = 7
triggerall =  Var(1) = 1
trigger1 = IsHelper(1754)
trigger2 = IsHelper(1755)
trigger3 = IsHelper(1756)
value = 1770

[State 0, ChangeState]
type = ChangeState
triggerall = root, StateNo = 1806
triggerall = root, Anim = 1710 && root, AnimElem = 7
triggerall =  Var(2) = 1
trigger1 = IsHelper(1754)
trigger2 = IsHelper(1755)
trigger3 = IsHelper(1756)
value = 1770

[State 0, ChangeState]
type = ChangeState
triggerall = root, StateNo = 1807
triggerall = root, Anim = 1710 && root, AnimElem = 7
trigger1 = IsHelper(1754)
trigger2 = IsHelper(1755)
trigger3 = IsHelper(1756)
value = 1770

[State 0, ChangeState]
type = ChangeState
trigger1 = root, Var(52) <=0
value = 1770

;Cinematic Super! Leave!
[State 0, ChangeState]
type = ChangeState
triggerall = root, MoveType = H
trigger1 = enemy, AnimExist(5939)
trigger1 = enemy, NumExplod(991901)
trigger2 = !enemy, AnimExist(5939)
trigger2 = root, Var(43)=1
trigger2 = root, NumExplod(3502)
trigger2 = root,var(48)-root,var(49)>=30
trigger3 = !enemy, AnimExist(5939)
trigger3 = root, Var(43)=2
trigger3 = root, NumExplod(3502)
trigger3 = root,var(48)-root,var(49)>=60
trigger4 = !enemy, AnimExist(5939)
trigger4 = root, Var(43)=3
trigger4 = root, NumExplod(3502)
trigger4 = root,var(48)-root,var(49)>=90
trigger5 = !enemy, AnimExist(5939)
trigger5 = root, Var(43)=4
trigger5 = root, NumExplod(3502)
trigger5 = root,var(48)-root,var(49)>=120
trigger6 = !enemy, AnimExist(5939)
trigger6 = root, Var(43)=5
trigger6 = root, NumExplod(3502)
trigger6 = root,var(48)-root,var(49)>=150
trigger7 = !enemy, AnimExist(5939)
trigger7 = root, NumExplod(3502)
trigger7 = root, Var(43)=6
trigger7 = root,var(48)-root,var(49)>=180
value = 1770
ctrl = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = enemy,name = "Shin Satan Z2"
trigger1 = enemy, StateNo = 189
flag = invisible

;----------------------------------------------------
; Trap Shot Orb Explodes
[Statedef 1770]
type    = A
movetype= A
physics = N
anim = 1770
sprpriority = 5
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 1760,0
channel = 2

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = root, Var(40) = 1
trigger1 = root, Var(42) = 1
trigger1 = Time = 12
var(58) = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, Null]
type = Null
trigger1 = IsHelper(1752)
trigger1 = Var(42) = 0
trigger2 = IsHelper(1753)
trigger2 = Var(43) = 0

[State 0, HitDef]
type = HitDef
trigger1 = !NumTarget(1760) 
trigger1 = root, Var(42) = 0
trigger1 = Time = 2
attr = A,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = Back
damage = ceil(ifElse(root,fvar(11) * 60 < 7, 7, root,fvar(11) * 60)),15
pausetime = 12 ,12
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0, 0
hitsound   = S1750, 1
guardsound = S5,20
ground.type = High      ;Low,Trip,None
ground.slidetime = 12
guard.slidetime = 4
ground.hittime = 14
guard.hittime = 6
yaccel = 0.5
ground.velocity = -6,-1
guard.velocity = -3
air.velocity = -2,-6
airguard.velocity = -3,-1
fall = 1
fall.recover = 0
kill = 1
getpower = 100,10
givepower = 30,10
ID = 1770

[State 1770, DestroySelf]
type = DestroySelf
trigger1 = root, Var(42) = 0
trigger1 = p2movetype != H
trigger1 = time >= 25
trigger2 = root, Var(42) = 1
trigger2 = time >= 85
trigger2 = parent, Var(58) >=5 && parent, Var(58) <=13
trigger3 = root, Var(42) = 1
trigger3 = root, Var(42) = 1
trigger3 = root, HitCount >= 1099
trigger3 = parent, Var(58) >=14

;----------------------------------------------------
; Trap Shot becomes dormant
[Statedef 1771]
type    = A
movetype= I
physics = N
anim = 1750
sprpriority = 5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, Trans]
type = Trans
triggerall = root, MoveType = H
trigger1 = enemy, AnimExist(5939)
trigger1 = enemy, NumExplod(991901)
trigger2 = !enemy, AnimExist(5939)
trigger2 = root, Var(43)=1
trigger2 = root, NumExplod(3502)
trigger2 = root,var(48)-root,var(49)>=30
trigger3 = !enemy, AnimExist(5939)
trigger3 = root, Var(43)=2
trigger3 = root, NumExplod(3502)
trigger3 = root,var(48)-root,var(49)>=60
trigger4 = !enemy, AnimExist(5939)
trigger4 = root, Var(43)=3
trigger4 = root, NumExplod(3502)
trigger4 = root,var(48)-root,var(49)>=90
trigger5 = !enemy, AnimExist(5939)
trigger5 = root, Var(43)=4
trigger5 = root, NumExplod(3502)
trigger5 = root,var(48)-root,var(49)>=120
trigger6 = !enemy, AnimExist(5939)
trigger6 = root, Var(43)=5
trigger6 = root, NumExplod(3502)
trigger6 = root,var(48)-root,var(49)>=150
trigger7 = !enemy, AnimExist(5939)
trigger7 = root, NumExplod(3502)
trigger7 = root, Var(43)=6
trigger7 = root,var(48)-root,var(49)>=180
trans = addalpha
alpha = 0, 256

[State 0, ChangeState]
type = ChangeState
trigger1 = root, Var(40) = 1
value = 3450
ctrl = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = roundstate = 4
y = -.5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >=200
trigger1 = root, Var(42) = 0

;----------------------------------------------------
; Big Explosions!
[Statedef 1772]
type    = A
movetype= A
physics = N
anim = 1772
sprpriority = 5
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 1760,0

[State 0, PosSet]
type = PosSet
trigger1 = !Time
x = enemy, Const(Size.Mid.Pos.X)
y = enemy, Const(Size.Mid.Pos.Y)

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, HitDef]
type = HitDef
trigger1 = AnimElemTime(1) >= 2 && AnimElemTime(27) < 0
attr = A,HA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = Back
damage = 7,1
pausetime = 1 ,20
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0, 0
hitsound   = S1750, 1
guardsound = S5,20
ground.type = High      ;Low,Trip,None
ground.slidetime = 12
guard.slidetime = 4
ground.hittime = 14
guard.hittime = 6
yaccel = 0.5
ground.velocity = -6,-1
guard.velocity = -3
air.velocity = -2,-6
airguard.velocity = -3,-1
fall = 1
fall.recover = 0
kill = 0

[State 0, Explod]
type = Explod
trigger1 = 1
anim = 1771
ID = 1771
pos = -220+random%440,-140+random%180
postype = p2  ;p2,front,back,left,right
removetime = -2
sprpriority = 9
ownpal = 1
ignorehitpause = 1
persistent = 6

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
var(37) = 1

[State 0, VarSet]
type = ParentVarSet
trigger1 = AnimElem = 22
var(56) = 1


[State 1770, DestroySelf]
type = DestroySelf
trigger1 = !AnimTime

;----------------------------------------------------
; Big Explosions2!
[Statedef 1773]
type    = A
movetype= A
physics = N
anim = 1773
sprpriority = 5
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 1760,0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, HitDef]
type = HitDef
trigger1 = AnimElemTime(1) >= 2 && AnimElemTime(12) < 0
attr = A,HA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = Back
damage = 10,1
pausetime = 1 ,20
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0, 0
hitsound   = S1750, 1
guardsound = S5,20
ground.type = High      ;Low,Trip,None
ground.slidetime = 12
guard.slidetime = 4
ground.hittime = 14
guard.hittime = 6
yaccel = 0.5
ground.velocity = -6,-1
guard.velocity = -3
air.velocity = -2,-6
airguard.velocity = -3,-1
fall = 1
fall.recover = 0
kill = 0

[State 0, Explod]
type = Explod
trigger1 = 1
anim = 1771
ID = 1771
pos = -220+random%440,-140+random%180
postype = p2  ;p2,front,back,left,right
removetime = -2
sprpriority = 9
ownpal = 1
ignorehitpause = 1
persistent = 6

[State 0, VarSet]
type = ParentVarSet
trigger1 = AnimElem = 8
var(56) = 2


[State 1770, DestroySelf]
type = DestroySelf
trigger1 = !AnimTime

;----------------------------------------------------
; Big Explosions3!
[Statedef 1774]
type    = A
movetype= A
physics = N
anim = 1773
sprpriority = 5
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 1760,0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, HitDef]
type = HitDef
trigger1 = AnimElemTime(1) >= 2 && AnimElemTime(12) < 0
attr = A,HA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = Back
damage = 7,1
pausetime = 1 ,20
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0, 0
hitsound   = S1750, 1
guardsound = S5,20
ground.type = High      ;Low,Trip,None
ground.slidetime = 12
guard.slidetime = 4
ground.hittime = 14
guard.hittime = 6
yaccel = 0.5
ground.velocity = -6,-1
guard.velocity = -3
air.velocity = -2,-6
airguard.velocity = -3,-1
fall = 1
fall.recover = 0
kill = 0

[State 0, Explod]
type = Explod
trigger1 = 1
anim = 1771
ID = 1771
pos = -220+random%440,-140+random%180
postype = p2  ;p2,front,back,left,right
removetime = -2
sprpriority = 9
ownpal = 1
ignorehitpause = 1
persistent = 6

[State 0, VarSet]
type = ParentVarSet
trigger1 = AnimElem = 3
var(56) = 3

[State 1770, DestroySelf]
type = DestroySelf
trigger1 = !AnimTime

;----------------------------------------------------
; Big ExplosionsFLASH!
[Statedef 1775]
type    = A
movetype= A
physics = N
anim = 1774
sprpriority = 5
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 1760,0

[State 0, VarSet]
type = ParentVarSet
trigger1 = !Time
var(56) = 0
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = AnimElem = 7
var(55) = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, HitDef]
type = HitDef
trigger1 = Time = 2
attr = A,HA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = Back
damage = 160,60
pausetime = 12 ,40
hitsound   = S1750, 1
guardsound = S5,20
ground.type = High      ;Low,Trip,None
ground.slidetime = 12
guard.slidetime = 4
ground.hittime = 14
guard.hittime = 6
yaccel = 0.5
ground.velocity = -2,-8
guard.velocity = -3
air.velocity = -2,-6
airguard.velocity = -3,-1
fall = 1
fall.recover = 0
kill = 1

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 1770, DestroySelf]
type = DestroySelf
trigger1 = !AnimTime


;===================================================
; Limit basics comboability
[Statedef 15999]
type    = S
movetype= A
physics = N
anim = 15999
sprpriority = -5

[State 2260, muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 2260, destroy]
type = DestroySelf
trigger1 = numenemy
trigger1 = enemynear, movetype != H || (enemynear, stateno = [120,155]) || enemynear, ctrl
trigger2 = time = 24


;---------------------------
; DEMON CHARGE AURA
[Statedef 2710]
type = A
movetype = I
physics = N
ctrl = 0
anim = 2710
velset = 0,0
sprpriority = -1


[State 905, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow


[State 905, BindToParent]
type = BindToParent
trigger1 = anim = 2700
pos = 0,3

[State 0, PalFX]
type = PalFX
trigger1 = Time = 0
time = 10
add = 0,0,0
mul = 0,0,0

[State 0, PalFX]
type = PalFX
trigger1 = Time >= 10
time = 1
add = 0 ,0,0
mul = (Time -10)*2,(Time -10)*2,(Time -10)*2

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 65
value = 2711

[State 905, DestroySelf]
type = DestroySelf
trigger1 = Anim = 2711
trigger1 = !AnimTime

;===================================================
; Fade in/out effects BLACK
[StateDef 2771] 
type = A
movetype = I
physics = N
anim = 15999
velset = 0,0

[State 13300, Expl]
type = Explod
trigger1 = Time = 30
anim = 2771
ID = 2771
postype = left
pos = -30,-30
bindtime = -1
removetime = 71
pausemovetime = 71
ontop = 1
scale = 2,2

[State 13300, Fadeout]
type = PalFX
trigger1 = Time = [30,100]
time = 1
add = 4*(Time-30),4*(Time-30),4*(Time-30)

[State 13001, End]
type = DestroySelf
trigger1 = time=101

;------------------------------------------------------------------------------;
;Dead End Helper States
;------------------------------------------------------------------------------;
[Statedef 3005]
type    = S
movetype= A
physics = N
sprpriority = 3
hitcountpersist = 1
movehitpersist = 1

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

[State 0, VarAdd]
type = ParentVarAdd
triggerall = !root, StateNo = 3411
triggerall = root,var(53) < 2100
trigger1 = MoveHit = 1
var(53) = 100

[State 0, VarAdd]
type = ParentVarAdd
triggerall = !root, StateNo = 3411
triggerall = root,var(53) < 2100
trigger1 = MoveGuarded = 1
var(53) = 50

[State 1061, gethit gut ?]
type = VarSet
trigger1 = !time
var(14) = root,var(14)
[State 1061, gethit gut ?]
type = VarSet
trigger1 = !time
var(41) = root,var(41)

[State 1320, ChangeAnim]
type = ChangeAnim
trigger1 = !time && !prevstateno
value = 3007

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = stateno+1
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 1305, BindToParent]
type = BindToParent
trigger1 = 1
time = 1
pos = 5,-90
ignorehitpause = 1

[State 193, Explod]
type = Explod
trigger1 = !time && !prevstateno
anim = 3009
ID = 3009
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 4
removeongethit = 1
supermovetime = 40
persistent = 0

[State 250, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 2,12
persistent = 0

[State 1061, Hitdef]
type = HitDef
trigger1 = !var(41) 
attr = S, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 66 < 30, 30, root,fvar(11) * 66)),20
priority  = 4,Hit
guardflag = M
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,0
hitsound   = s2,8
guardsound = S5,20
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 12
ground.velocity = -1,-11.5
guard.velocity = -7.5
air.velocity = -0,-11.5
airguard.velocity = -5, -4
envshake.time = 10
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 35,35
persistent = 0
ID = 3000
P2Facing = 1

[State 1062, Hitdef]
type = HitDef
trigger1 = var(41) = 1
attr = S, HP
animtype = hard
damage    = ceil(ifElse(root,fvar(11) * 150 < 75, 75, root,fvar(11) * 150)), 30
priority  = 4,Hit
guardflag = M
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,0
hitsound   = s2,8
guardsound = S5,20
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 12
ground.velocity = -1,-11.5
guard.velocity = -7.5
air.velocity = -0,-11.5
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 35,35
persistent = 0
ID = 3000
P2Facing = 1

[State 1063 Hitdef]
type = HitDef
trigger1 = animelemtime(2) >= 0
trigger1 = p2statetype = A
attr = S, HP
animtype = hard
damage    = ceil(ifElse(root,fvar(11) * 100 < 50, 50, root,fvar(11) * 100)), 40
priority  = 4,Hit
guardflag = M
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,0
hitsound   = s2,8
guardsound = S5,20
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 12
ground.velocity = -1,-11.5
guard.velocity = -7.5
air.velocity = -0,-11.5
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
id = 3001
getpower = 0,0
givepower = 35,35
persistent = 0
P2Facing = 1

[State 1064, Hitdef]
type = HitDef
trigger1 = animelemtime(3) >= 0
trigger1 = p2statetype = A
trigger1 = var(41) = 1
attr = S, HP
animtype = hard
damage    = ceil(ifElse(root,fvar(11) * 53 < 25, 25, root,fvar(11) * 53)), 30
priority  = 4,Hit
guardflag = M
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,0
hitsound   = s2,8
guardsound = S5,20
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 12
ground.velocity = -1,-11.5
guard.velocity = -7.5
air.velocity = -0,-11.5
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
id = 3000
getpower = 0,0
givepower = 35,35
persistent = 0
P2Facing = 1

[State 1061, Hitdef]
type = HitDef
trigger1 = var(41) = 2
attr = S, HP
animtype = hard
damage    = ceil(ifElse(root,fvar(11) * 150 < 75, 75, root,fvar(11) * 150)), 30
priority  = 4,Hit
guardflag = ;MA
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,0
hitsound   = s2,8
guardsound = S5,20
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 12
ground.velocity = -8,-8
guard.velocity = -7.5
air.velocity = -8,-6
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
p1sprpriority = 3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 35,35
persistent = 0
;p2stateno = 1360
P2Facing = 1
id = 1360

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 0, TargetState]  ;New state
type = TargetState
trigger1 = Numtarget(1360)
trigger1 = movehit = 1
value = 1360
ID = 1360
ignorehitpause = 1
persistent = 0

[State 1061, End]
type = destroyself
trigger1 = !animtime
trigger2 = root,stateno != [3000,3004]

[State 1061, Fade]
type = changestate
trigger1 = !numtarget(3001)
trigger1 = movecontact
value = stateno+1
ignorehitpause=1

;----------------------------------------------------
;Canceled
[Statedef 3006]
type    = A
movetype= A
physics = N
sprpriority = 3
movehitpersist = 1
velset = 0,0

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

[State 1305, BindToRoot]
type = BindToRoot
trigger1 = animelemtime(10+cond(var(41)=2,6,var(41)*4)) < 0
time = 1
pos = 36,8
ignorehitpause = 1
[State 1305, BindToRoot]
type = BindToRoot
trigger1 = animelemtime(10+cond(var(41)=2,6,var(41)*4)) >= 0 && animelemtime(14+cond(var(41)=2,6,var(41)*4)) < 0
time = 1
pos = 0,0
ignorehitpause = 1

[State 3006, Pause]
type = Pause
trigger1 = time < 20
trigger1 = Var(41) = 2
trigger1 = movehit
time = 1
persistent = 2

[State 1002, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1061, End]
type = destroyself
trigger1 = animtime = 0

;===================================================
;SBC Head LVL1
[Statedef 3223]
type = S
physics = N
movetype = A
velset = Cond(parent, Var(20) = 1, 40, 12), 0
anim = 3223
sprpriority = 2

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

;Head
[State 0, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 1606
ID = 3215
bindtime = 1
removetime = 150
sprpriority = 2
ownpal = 1
removeongethit = 1
vel = Cond(parent, Var(20) = 1, 40, 12),0
scale = 0.8, 0.8
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 1 
reversal.attr = SCA,SP,NP,HP;,NA,SA,HA,NT,ST;,AA,AT 
hitsound = s1620,0
sparkno = S1319
sparkxy = ceil(84 * const(size.xScale)), 0
p1stateno = 3223
p2stateno = 1605

[State 0, HitDef]
type = HitDef
triggerall = root, Var(18) <= 55
trigger1 = 1
trigger1 = !MoveHit
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = back
fall.animtype = Back
damage = Cond(parent, Var(15) > 20, ceil(ifElse(root,fvar(11) * 150 < 75, 75, root,fvar(11) * 150)), ceil(ifElse(root,fvar(11) * 125 < 70, 70, root,fvar(11) * 125))),10
pausetime = 0 ,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,-70
hitsound = s3200, 4
guardsound = S5,21
ground.type = High      ;Low,Trip,None
ground.slidetime = 24
guard.slidetime = 18
ground.hittime = 26
guard.hittime = 22
air.hittime = 26
ground.velocity = -2.5,0
guard.velocity = -1
air.velocity = -2,-.5
airguard.velocity = -1,-.5
fall = 0
fall.yvelocity = -4.5
fall.recover = 0
kill = 1
guard.kill = 1
getpower = 0
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ID = 3223

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 1061, End]
type = destroyself
trigger1 = NumExplod(3215) = 0
trigger2 = parent,IsHelper
trigger2 = StateNo = [3516,3599]

;===================================================
;SBC Tail LVL1
[Statedef 3229]
type = S
physics = N
movetype = A
velset = 0, 0
anim = 3229
sprpriority = 1

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 3221
ID = 3221
bindtime = -1
removetime = 20
sprpriority = -2
ownpal = 1
removeongethit = 1
scale = 0.8, 0.8
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 3222
ID = 3222
bindtime = -1
removetime = 20
sprpriority = -1
ownpal = 1
removeongethit = 1
scale = 0.8, 0.8
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

;Tail
[State 0, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 1606
ID = 3216
bindtime = -1
removetime = 20
sprpriority = 1
ownpal = 1
removeongethit = 1
scale = 0.8, 0.8
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 1 
reversal.attr = SCA,SP,NP,HP;,NA,SA,HA,NT,ST;,AA,AT 
hitsound = s1620,0
sparkno = S1319
sparkxy = ceil(84 * const(size.xScale)), 0
p1stateno = 3229
p2stateno = 1605

[State 0, HitDef]
type = HitDef
triggerall = root, Var(18) <= 55
trigger1 = AnimElem = 1
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = Back          ;light,medium,hard,back,up,diagup
air.animtype = back
fall.animtype = Back
damage = 10,10
pausetime = 0 ,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,-70
hitsound = s3200, 4
guardsound = S5,21
ground.type = High      ;Low,Trip,None
ground.slidetime = 24
guard.slidetime = 18
ground.hittime = 26
guard.hittime = 22
air.hittime = 26
ground.velocity = -5.5,-2
guard.velocity = -3.5
air.velocity = -5,-2
airguard.velocity = -3.5,-.5
fall = 1
fall.yvelocity = -4.5
fall.recover = 0
kill = 1
guard.kill = 1
getpower = 0
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 0, BindToparent]
type = BindToParent
trigger1 = 1
time = 91
pos = 10, -16
[State 1061, End]
type = destroyself
trigger1 = Time = 20
trigger2 = parent,IsHelper
trigger2 = StateNo = [3516,3599]

;===================================================
;SBC Beam LVL1
[Statedef 3226]
type = S
physics = N
movetype = A
velset = 0, 0
sprpriority = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
trigger1 = parent, Var(20) = 0
value = 3226

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
trigger1 = parent, Var(20) = 1
value = 3241

;Beam
[State 0, Explod]
type = Explod
trigger1 = AnimElem = 1 && parent, Var(20) = 0
anim = 1606
ID = 3219
bindtime = -1
removetime = 16
sprpriority = 1
ownpal = 1
removeongethit = 1
scale = 0.8, 0.8
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

;Cancelled Beam
[State 0, Explod]
type = Explod
trigger1 = AnimElem = 1 && parent, Var(20) = 1
anim = 3240
ID = 3240
bindtime = -1
removetime = 18
sprpriority = 1
ownpal = 1
removeongethit = 1
scale = 0.8, 0.8
ignorehitpause = 1

[State 960, ReversalDef]
type = ReversalDef
trigger1 = AnimElem = 1 
reversal.attr = SCA,SP,NP,HP;,NA,SA,HA,NT,ST;,AA,AT 
hitsound = s1620,0
sparkno = S1319
sparkxy = ceil(84 * const(size.xScale)), 0
p1stateno = 3226
p2stateno = 1605

[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(9) = 0

[State 0, VarSet]
type = VarSet
trigger1 = AnimElem = 9
var(9) = 1

[State 0, HitDef]
type = HitDef
triggerall = root, Var(18) <= 55
trigger1 = AnimElem = 1 && !MoveGuarded || AnimElem = 2 && !MoveGuarded || AnimElem = 3 || AnimElem = 4 && !MoveGuarded || AnimElem = 5 && !MoveGuarded
trigger2 = AnimElem = 6 && !MoveGuarded || AnimElem = 7 && !MoveGuarded || AnimElem = 8 && !MoveGuarded || AnimElem = 9 && !MoveGuarded 
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = back
fall.animtype = Back
damage = Cond(Hitcount > 7, 2, 5),2
pausetime = 0 ,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0 + random%15,-70 + random%15
hitsound = s3200, 4
guardsound = S5,21
ground.type = High      ;Low,Trip,None
ground.slidetime = 24
guard.slidetime = 18
ground.hittime = 26
guard.hittime = 22
air.hittime = 26
ground.velocity = Cond(var(9) = 1, -8, -2.5), Cond(var(9) = 1, -6, -0.1)
guard.velocity = -1
air.velocity = -2,-.5
airguard.velocity = -1,-.5
fall = var(9)
fall.yvelocity = -4.5
fall.recover = 0
kill = 1
guard.kill = 1
getpower = 0
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ID = 3223

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 0, HitDef]
type = HitDef
triggerall = enemy, MoveType !=H
triggerall = enemy, StateType = A
triggerall = root, Var(18) <= 55
trigger1 = AnimElem = 1 && !MoveGuarded || AnimElem = 2 && !MoveGuarded || AnimElem = 3 || AnimElem = 4 && !MoveGuarded || AnimElem = 5 && !MoveGuarded
trigger2 = AnimElem = 6 && !MoveGuarded || AnimElem = 7 && !MoveGuarded || AnimElem = 8 && !MoveGuarded || AnimElem = 9 && !MoveGuarded 
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = back
fall.animtype = Back
damage = 125,2
pausetime = 0 ,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0 + random%15,-70 + random%15
hitsound = s3200, 4
guardsound = S5,21
ground.type = High      ;Low,Trip,None
ground.slidetime = 24
guard.slidetime = 18
ground.hittime = 26
guard.hittime = 22
air.hittime = 26
ground.velocity = Cond(var(9) = 1, -8, -2.5), Cond(var(9) = 1, -6, -0.1)
guard.velocity = -1
air.velocity = -2,-.5
airguard.velocity = -1,-.5
fall = var(9)
fall.yvelocity = -4.5
fall.recover = 0
kill = 1
guard.kill = 1
getpower = 0
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ID = 3223

[State 0, BindToparent]
type = BindToparent
trigger1 = 1
time = 91
pos = 10, -16

[State 1061, End]
type = destroyself
trigger1 = time = 18
trigger2 = parent,IsHelper
trigger2 = StateNo = [3516,3599]


;===================================================
;SBC Head LVL2
[Statedef 3224]
type = S
physics = N
movetype = A
velset = 15, 0
anim = 3224
sprpriority = 2

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 1 
reversal.attr = SCA,SP,NP,HP;,NA,SA,HA,NT,ST;,AA,AT 
hitsound = s1620,0
sparkno = S1319
sparkxy = ceil(84 * const(size.xScale)), 0
p1stateno = 3224
p2stateno = 1605

[State 0, HitDef]
type = HitDef
triggerall = root, Var(18) <= 55
trigger1 = AnimElem = 1
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = back
fall.animtype = Back
damage = Cond(parent, Var(15) > 20, ceil(ifElse(root,fvar(11) * 200 < 100, 100, root,fvar(11) * 53)), ceil(ifElse(root,fvar(11) * 175 < 90, 90, root,fvar(11) * 175))),10
pausetime = 0 ,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,-70
hitsound = s3200, 4
guardsound = S5,21
ground.type = High      ;Low,Trip,None
ground.slidetime = 24
guard.slidetime = 18
ground.hittime = 26
guard.hittime = 22
air.hittime = 26
ground.velocity = -2.5,0
guard.velocity = -1
air.velocity = -2,-.5
airguard.velocity = -1,-.5
fall = 0
fall.yvelocity = -4.5
fall.recover = 0
kill = 1
guard.kill = 1
getpower = 0
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ID = 3224

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 1061, End]
type = destroyself
trigger1 = parent, NumExplod(3215) = 0
trigger2 = parent,IsHelper
trigger2 = StateNo = [3516,3599]

;===================================================
;SBC Tail LVL2
[Statedef 3230]
type = S
physics = N
movetype = A
velset = 0, 0
anim = 3230
sprpriority = 1

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 1 
reversal.attr = SCA,SP,NP,HP;,NA,SA,HA,NT,ST;,AA,AT 
hitsound = s1620,0
sparkno = S1319
sparkxy = ceil(84 * const(size.xScale)), 0
p1stateno = 3230
p2stateno = 1605

[State 0, HitDef]
type = HitDef
triggerall = root, Var(18) <= 55
trigger1 = AnimElem = 1
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
animtype = Back          ;light,medium,hard,back,up,diagup
air.animtype = back
fall.animtype = Back
damage = 20,10
pausetime = 0 ,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,-70
hitsound = s3200, 4
guardsound = S5,21
ground.type = High      ;Low,Trip,None
ground.slidetime = 24
guard.slidetime = 18
ground.hittime = 26
guard.hittime = 22
air.hittime = 26
ground.velocity = -5.5,-2
guard.velocity = -3.5
air.velocity = -5,-2
airguard.velocity = -3.5,-.5
fall = 1
fall.yvelocity = -4.5
fall.recover = 0
kill = 1
guard.kill = 1
getpower = 0
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 0, BindToparent]
type = BindToparent
trigger1 = 1
time = 91

[State 1061, End]
type = destroyself
trigger1 = parent, NumExplod(3216) = 0
trigger2 = parent,IsHelper
trigger2 = StateNo = [3516,3599]

;===================================================
;SBC Beam LVL2
[Statedef 3227]
type = S
physics = N
movetype = A
velset = 0, 0
sprpriority = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 3227

[State 960, ReversalDef]
type = ReversalDef
trigger1 = AnimElem = 1 
reversal.attr = SCA,SP,NP,HP;,NA,SA,HA,NT,ST;,AA,AT 
hitsound = s1620,0
sparkno = S1319
sparkxy = ceil(84 * const(size.xScale)), 0
p1stateno = 3227
p2stateno = 1605

[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(9) = 0

[State 0, VarSet]
type = VarSet
trigger1 = AnimElemTime(17) > 2
var(9) = 1

[State 0, HitDef]
type = HitDef
triggerall = root, Var(18) <= 55
trigger1 = AnimElem = 1 && !MoveGuarded || AnimElem = 2 && !MoveGuarded || AnimElem = 3 || AnimElem = 4 && !MoveGuarded || AnimElem = 5 && !MoveGuarded
trigger2 = AnimElem = 6 && !MoveGuarded || AnimElem = 7 && !MoveGuarded || AnimElem = 8 && !MoveGuarded || AnimElem = 9 && !MoveGuarded  || AnimElem = 10
trigger3 = AnimElem = 11 && !MoveGuarded || AnimElem = 12 && !MoveGuarded || AnimElem = 13 && !MoveGuarded || AnimElem = 14 && !MoveGuarded || AnimElem = 15
trigger4 = AnimElem = 16 && !MoveGuarded || AnimElem = 17 && !MoveGuarded || AnimElem = 18 && !MoveGuarded || AnimElem = 19 && !MoveGuarded || AnimElem = 20 && !MoveGuarded
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = back
fall.animtype = Back
damage = Cond(Hitcount > 15, 2, 15),10
pausetime = 0 ,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0 + random%15,-100 + random%15
hitsound = s3200, 4
guardsound = S5,21
ground.type = High      ;Low,Trip,None
ground.slidetime = 24
guard.slidetime = 18
ground.hittime = 26
guard.hittime = 22
air.hittime = 26
ground.velocity = Cond(var(9) = 1, -8, -2.5), Cond(var(9) = 1, -6, -0.1)
guard.velocity = -1
air.velocity = -2,-.5
airguard.velocity = -1,-.5
fall = var(9)
fall.yvelocity = -4.5
fall.recover = 0
kill = 1
guard.kill = 1
getpower = 0
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ID = 3224

[State 0, HitDef]
type = HitDef
triggerall = enemy, MoveType !=H
triggerall = enemy, StateType = A
triggerall = root, Var(18) <= 55
trigger1 = AnimElem = 1 && !MoveGuarded || AnimElem = 2 && !MoveGuarded || AnimElem = 3 || AnimElem = 4 && !MoveGuarded || AnimElem = 5 && !MoveGuarded
trigger2 = AnimElem = 6 && !MoveGuarded || AnimElem = 7 && !MoveGuarded || AnimElem = 8 && !MoveGuarded || AnimElem = 9 && !MoveGuarded  || AnimElem = 10
trigger3 = AnimElem = 11 && !MoveGuarded || AnimElem = 12 && !MoveGuarded || AnimElem = 13 && !MoveGuarded || AnimElem = 14 && !MoveGuarded || AnimElem = 15
trigger4 = AnimElem = 16 && !MoveGuarded || AnimElem = 17 && !MoveGuarded || AnimElem = 18 && !MoveGuarded || AnimElem = 19 && !MoveGuarded || AnimElem = 20 && !MoveGuarded
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = back
fall.animtype = Back
damage = 150,2
pausetime = 0 ,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0 + random%15,-100 + random%15
hitsound = s3200, 4
guardsound = S5,21
ground.type = High      ;Low,Trip,None
ground.slidetime = 24
guard.slidetime = 18
ground.hittime = 26
guard.hittime = 22
air.hittime = 26
ground.velocity = Cond(var(9) = 1, -8, -2.5), Cond(var(9) = 1, -6, -0.1)
guard.velocity = -1
air.velocity = -2,-.5
airguard.velocity = -1,-.5
fall = var(9)
fall.yvelocity = -4.5
fall.recover = 0
kill = 1
guard.kill = 1
getpower = 0
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ID = 3224

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 0, BindToparent]
type = BindToparent
trigger1 = 1
time = 91

[State 1061, End]
type = destroyself
trigger1 = parent, NumExplod(3219) = 0
trigger2 = parent,IsHelper
trigger2 = StateNo = [3516,3599]

;===================================================
;SBC Head LVL3
[Statedef 3225]
type = S
physics = N
movetype = A
velset = 15, 0
anim = 3225
sprpriority = 2

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 1 
reversal.attr = SCA,SP,NP,HP;,NA,SA,HA,NT,ST;,AA,AT 
hitsound = s1620,0
sparkno = S1319
sparkxy = ceil(84 * const(size.xScale)), 0
p1stateno = 3225
p2stateno = 1605

[State 0, HitDef]
type = HitDef
triggerall = !parent, IsHelper
triggerall = root, Var(18) <= 55
trigger1 = AnimElem = 1
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA 
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = back
fall.animtype = Back
damage = ceil(ifElse(root,fvar(11) * 250 < 125, 125, root,fvar(11) * 250)),10
pausetime = 0 ,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,-70
hitsound = s3200, 4
guardsound = S5,21
ground.type = High      ;Low,Trip,None
ground.slidetime = 24
guard.slidetime = 18
ground.hittime = 26
guard.hittime = 22
air.hittime = 26
ground.velocity = -2.5,0
guard.velocity = -1
air.velocity = -2,-.5
airguard.velocity = -1,-.5
fall = 0
fall.yvelocity = -4.5
fall.recover = 0
kill = 1
guard.kill = 1
getpower = 0
ID = 3225

[State 0, HitDef]
type = HitDef
triggerall = !parent, IsHelper
triggerall = root, Var(18) <= 55
trigger1 = AnimElem = 1 && parent, Var(15) > 1000
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = back
fall.animtype = Back
damage = ceil(ifElse(root,fvar(11) * 300 < 150, 150, root,fvar(11) * 300)), 10
pausetime = 0 ,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,-70
hitsound = s3200, 4
guardsound = S5,21
ground.type = High      ;Low,Trip,None
ground.slidetime = 24
guard.slidetime = 18
ground.hittime = 26
guard.hittime = 22
air.hittime = 26
ground.velocity = -2.5,0
guard.velocity = -1
air.velocity = -2,-.5
airguard.velocity = -1,-.5
fall = 0
fall.yvelocity = -4.5
fall.recover = 0
kill = 1
guard.kill = 1
getpower = 0
ID = 3225

[State 0, HitDef]
type = HitDef
triggerall = parent, IsHelper
triggerall = root, Var(18) <= 55
trigger1 = AnimElem = 1
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA 
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = back
fall.animtype = Back
damage = ceil(ifElse(root,fvar(11) * 125 < 55, 55, root,fvar(11) * 125)),10
pausetime = 0 ,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,-70
hitsound = s3200, 4
guardsound = S5,21
ground.type = High      ;Low,Trip,None
ground.slidetime = 24
guard.slidetime = 18
ground.hittime = 26
guard.hittime = 22
air.hittime = 26
ground.velocity = -2.5,0
guard.velocity = -1
air.velocity = -2,-.5
airguard.velocity = -1,-.5
fall = 0
fall.yvelocity = -4.5
fall.recover = 0
kill = 1
guard.kill = 1
getpower = 0
ID = 3225

[State 0, HitDef]
type = HitDef
triggerall = parent, IsHelper
triggerall = root, Var(18) <= 55
trigger1 = AnimElem = 1 && parent, Var(15) > 1000
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = back
fall.animtype = Back
damage = ceil(ifElse(root,fvar(11) * 150 < 75, 75, root,fvar(11) * 150)), 10
pausetime = 0 ,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,-70
hitsound = s3200, 4
guardsound = S5,21
ground.type = High      ;Low,Trip,None
ground.slidetime = 24
guard.slidetime = 18
ground.hittime = 26
guard.hittime = 22
air.hittime = 26
ground.velocity = -2.5,0
guard.velocity = -1
air.velocity = -2,-.5
airguard.velocity = -1,-.5
fall = 0
fall.yvelocity = -4.5
fall.recover = 0
kill = 1
guard.kill = 1
getpower = 0
ID = 3225

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 1061, End]
type = destroyself
trigger1 = parent, NumExplod(3215) = 0
trigger2 = parent,IsHelper
trigger2 = StateNo = [3516,3599]

;===================================================
;SBC Tail LVL3
[Statedef 3231]
type = S
physics = N
movetype = A
velset = 0, 0
anim = 3231
sprpriority = 1

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 1 
reversal.attr = SCA,SP,NP,HP;,NA,SA,HA,NT,ST;,AA,AT 
hitsound = s1620,0
sparkno = S1319
sparkxy = ceil(84 * const(size.xScale)), 0
p1stateno = 3231
p2stateno = 1605

[State 0, HitDef]
type = HitDef
triggerall = !parent, IsHelper
triggerall = root, Var(18) <= 55
trigger1 = AnimElem = 1
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
animtype = Back          ;light,medium,hard,back,up,diagup
air.animtype = back
fall.animtype = Back
damage = 30,10
pausetime = 0 ,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,-70
hitsound = s3200, 4
guardsound = S5,21
ground.type = High      ;Low,Trip,None
ground.slidetime = 24
guard.slidetime = 18
ground.hittime = 26
guard.hittime = 22
air.hittime = 26
ground.velocity = -5.5,-2
guard.velocity = -3.5
air.velocity = -5,-2
airguard.velocity = -3.5,-.5
fall = 1
fall.yvelocity = -4.5
fall.recover = 0
kill = 1
guard.kill = 1
getpower = 0
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5

[State 0, HitDef]
type = HitDef
triggerall = parent, IsHelper
triggerall = root, Var(18) <= 55
trigger1 = AnimElem = 1
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
animtype = Back          ;light,medium,hard,back,up,diagup
air.animtype = back
fall.animtype = Back
damage = 15,10
pausetime = 0 ,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0,-70
hitsound = s3200, 4
guardsound = S5,21
ground.type = High      ;Low,Trip,None
ground.slidetime = 24
guard.slidetime = 18
ground.hittime = 26
guard.hittime = 22
air.hittime = 26
ground.velocity = -5.5,-2
guard.velocity = -3.5
air.velocity = -5,-2
airguard.velocity = -3.5,-.5
fall = 1
fall.yvelocity = -4.5
fall.recover = 0
kill = 1
guard.kill = 1
getpower = 0
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5

[State 0, BindToparent]
type = BindToparent
trigger1 = 1
time = 91
pos = -10, 16

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 1061, End]
type = destroyself
trigger1 = parent, NumExplod(3216) = 0
trigger2 = parent,IsHelper
trigger2 = StateNo = [3516,3599]

;===================================================
;SBC Beam LVL3
[Statedef 3228]
type = S
physics = N
movetype = A
velset = 0, 0
sprpriority = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 3228

[State 960, ReversalDef]
type = ReversalDef
trigger1 = AnimElem = 1 
reversal.attr = SCA,SP,NP,HP;,NA,SA,HA,NT,ST;,AA,AT 
hitsound = s1620,0
sparkno = S1319
sparkxy = ceil(84 * const(size.xScale)), 0
p1stateno = 3228
p2stateno = 1605

[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(9) = 0

[State 0, VarSet]
type = VarSet
trigger1 = AnimElemTime(15) > 2
var(9) = 1

[State 0, HitDef]
type = HitDef
triggerall = !parent, IsHelper
triggerall = root, Var(18) <= 55
trigger1 = AnimElem = 1 || AnimElem = 2 || AnimElem = 3 || AnimElem = 4 || AnimElem = 5
trigger2 = AnimElem = 6 || AnimElem = 7 || AnimElem = 8 || AnimElem = 9 || AnimElem = 10
trigger3 = AnimElem = 11 || AnimElem = 12 || AnimElem = 13 || AnimElem = 14 || AnimElem = 15
trigger4 = AnimElem = 16 || AnimElem = 17 || AnimElem = 18 || AnimElem = 19 || AnimElem = 20
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = back
fall.animtype = Back
damage = Cond(Hitcount > 15, 2, 8),8
pausetime = 0 ,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0 + random%15,-100 + random%15
hitsound = s3200, 4
guardsound = S5,21
ground.type = High      ;Low,Trip,None
ground.slidetime = 24
guard.slidetime = 18
ground.hittime = 26
guard.hittime = 22
air.hittime = 26
ground.velocity = Cond(var(9) = 1, -8, -2.5), Cond(var(9) = 1, -6, -0.1)
guard.velocity = -1
air.velocity = -2,-.5
airguard.velocity = -1,-.5
fall = var(9)
fall.yvelocity = -4.5
fall.recover = 0
kill = 1
guard.kill = 1
getpower = 0
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ID = 3225

[State 0, HitDef]
type = HitDef
triggerall = parent, IsHelper
triggerall = root, Var(18) <= 55
trigger1 = AnimElem = 1 || AnimElem = 2 || AnimElem = 3 || AnimElem = 4 || AnimElem = 5
trigger2 = AnimElem = 6 || AnimElem = 7 || AnimElem = 8 || AnimElem = 9 || AnimElem = 10
trigger3 = AnimElem = 11 || AnimElem = 12 || AnimElem = 13 || AnimElem = 14 || AnimElem = 15
trigger4 = AnimElem = 16 || AnimElem = 17 || AnimElem = 18 || AnimElem = 19 || AnimElem = 20
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = back
fall.animtype = Back
damage = Cond(Hitcount > 15, 1, 4),4
pausetime = 0 ,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0 + random%15,-100 + random%15
hitsound = s3200, 4
guardsound = S5,21
ground.type = High      ;Low,Trip,None
ground.slidetime = 24
guard.slidetime = 18
ground.hittime = 26
guard.hittime = 22
air.hittime = 26
ground.velocity = Cond(var(9) = 1, -8, -2.5), Cond(var(9) = 1, -6, -0.1)
guard.velocity = -1
air.velocity = -2,-.5
airguard.velocity = -1,-.5
fall = var(9)
fall.yvelocity = -4.5
fall.recover = 0
kill = 1
guard.kill = 1
getpower = 0
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ID = 3225

[State 0, HitDef]
type = HitDef
triggerall = enemy, MoveType !=H
triggerall = enemy, StateType = A
triggerall = root, Var(18) <= 55
trigger1 = AnimElem = 1 || AnimElem = 2 || AnimElem = 3 || AnimElem = 4 || AnimElem = 5
trigger2 = AnimElem = 6 || AnimElem = 7 || AnimElem = 8 || AnimElem = 9 || AnimElem = 10
trigger3 = AnimElem = 11 || AnimElem = 12 || AnimElem = 13 || AnimElem = 14 || AnimElem = 15
trigger4 = AnimElem = 16 || AnimElem = 17 || AnimElem = 18 || AnimElem = 19 || AnimElem = 20
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = back
fall.animtype = Back
damage = 200,2
pausetime = 0 ,0
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0 + random%15,-100 + random%15
hitsound = s3200, 4
guardsound = S5,21
ground.type = High      ;Low,Trip,None
ground.slidetime = 24
guard.slidetime = 18
ground.hittime = 26
guard.hittime = 22
air.hittime = 26
ground.velocity = Cond(var(9) = 1, -8, -2.5), Cond(var(9) = 1, -6, -0.1)
guard.velocity = -1
air.velocity = -2,-.5
airguard.velocity = -1,-.5
fall = var(9)
fall.yvelocity = -4.5
fall.recover = 0
kill = 1
guard.kill = 1
getpower = 0
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ID = 3225

[State 0, BindToparent]
type = BindToparent
trigger1 = 1
time = 91
pos = -10, 16

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 1061, End]
type = destroyself
trigger1 = parent, NumExplod(3219) = 0
trigger2 = parent,IsHelper
trigger2 = StateNo = [3516,3599]

;===================================================
; Beam Dissipate When Hit LVL1
[Statedef 3232]
type    = S
movetype= A
physics = N
anim = 15999
sprpriority = -5

;Beam Dissipate
[State 0, Explod]
type = Explod
triggerall = !NumHelper(3232)
trigger1 = parent, PrevStateNo =[3211,3213]
trigger1 = parent, MoveType = H
trigger1 = !NumExplod(3220)
trigger2 = parent, StateNo = 3200
anim = 3220
ID = 3220
bindtime = 1
removetime = -2
sprpriority = 1
ownpal = 1
removeongethit = 0
scale = .8, .8
pos = 10,-16

[State 1061, End]
type = destroyself
trigger1 = parent, MoveType = I

;===================================================
; Beam Dissipate When Hit LVL2
[Statedef 3233]
type    = S
movetype= A
physics = N
anim = 15999
sprpriority = -5

;Beam Dissipate
[State 0, Explod]
type = Explod
triggerall = !NumHelper(3232)
trigger1 = parent, PrevStateNo =[3211,3213]
trigger1 = parent, MoveType = H
trigger1 = !NumExplod(3220)
trigger2 = parent, StateNo = 3200
anim = 3220
ID = 3220
bindtime = 1
removetime = -2
sprpriority = 1
ownpal = 1
removeongethit = 0
scale = 1, 1
pos = 0,0

[State 1061, End]
type = destroyself
trigger1 = parent, MoveType = I

;===================================================
; Beam Dissipate When Hit LVL3
[Statedef 3234]
type    = S
movetype= A
physics = N
anim = 15999
sprpriority = -5

;Beam Dissipate
[State 0, Explod]
type = Explod
triggerall = !NumHelper(3232)
trigger1 = parent, PrevStateNo =[3211,3213]
trigger1 = parent, MoveType = H
trigger1 = !NumExplod(3220)
trigger2 = parent, StateNo = 3200
anim = 3220
ID = 3220
bindtime = 1
removetime = -2
sprpriority = 1
ownpal = 1
removeongethit = 0
scale = 1.2, 1.2
pos = -10,16

[State 1061, End]
type = destroyself
trigger1 = parent, MoveType = I

;==========================================================
; BulletBill
[Statedef 3310]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 5

[State 3005, anim]
type = changeanim
trigger1 = !time && !prevstateno
value = 3310

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

[State 3005, hitvar]
type=varadd
trigger1= !time
var(2)=1

[State 13100, goes SND]
type = playsnd
trigger1 = !time && !prevstateno
value = 3310,1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = ifelse(var(2)<10,3310,3315)  ;1316)
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1061, Velocity]
type = VelSet
trigger1 = 1
x = ifelse((time<2 && var(2)>1),1,10)

[State 0, Explod]
type = Explod
trigger1 = !NumExplod(3311)
trigger1 = Cond(MoveContact,0,1)
anim = 3311
ID = 3311
pos = -90,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
pausemovetime = 99999
accel = 0,0
random = 0,0
removetime = -1
sprpriority = 4
ignorehitpause = 1
scale = 0.75, 0.75

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !Time && !PrevStateNo
id = 3311
ignorehitpause = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = MoveContact
id = 3311
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = !NumExplod(3318)
trigger1 = MoveContact
anim = 3318 + (Random%7)
ID = 3318
pos = -90,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
pausemovetime = 99999
accel = 0,0
random = 0,0
removetime = 12
sprpriority = 4
ignorehitpause = 1
scale = 0.75, 0.75

[State 3005, hit]
type = HitDef
trigger1 = Var(4) < 5 
trigger2 = Var(4) < 10 
trigger2 = NumTarget
trigger2 = target, IsHelper
attr = S,HP
hitflag = MAF
guardflag = MA
priority = 7,Hit
damage = ceil(ifElse(root,fvar(11) * 25 < 20, 20, root,fvar(11) * 25)), 4
getpower = 0,0
givepower = 35,35
pausetime = 12,6
guard.pausetime = 6,6
sparkno = s10030
guard.sparkno = s10000
sparkxy = 0 + random%15,-90 + random%15
hitsound = s3315, 0
guardsound = S5,21
animtype = Back
air.animtype = Hard
fall.animtype = Hard
ground.type = High
air.type = Low
ground.hittime = 16
ground.slidetime = 16
guard.hittime = 16
air.hittime = 13
airguard.ctrltime = 16
ground.velocity= -1,-4
guard.velocity = -9
air.velocity = -1,Cond(Var(4)>3,-13,-4)
airguard.velocity = -5.5, -1.5 
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel = .5
fall= 1
air.fall = 1
fall.recover = 0
fall.recovertime = 13
sparkno = -1
envshake.time = 16
envshake.ampl = 6
envshake.freq = 100
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 0, VarAdd]
type = VarAdd
trigger1 = MoveContact = 1
trigger1 = NumTarget
trigger1 = !(target, IsHelper)
var(4) = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = P2Dist X <= - 10
trigger2 = pos x!=[-300,300]
var(9) = ceil(P2Dist X)

[State 3005, end]
type = changestate
trigger1 = movecontact
value = ifelse(var(2)>9,3315,3310)

[State 3001, Guardshake]
type = envshake
trigger1 = movecontact=1 && numtarget
time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 13100, goes SND]
type = playsnd
trigger1 = P2Dist X <= - 10
value = 3310,2
channel = 3

[State 0, ChangeState]
type = ChangeState
trigger1 = P2Dist X <= - 100
trigger1 = enemy, MoveType = H
trigger2 = P2Dist X <= - 250
trigger2 = enemy, MoveType != H
trigger3 = pos x!=[-300,300]
value = 3313
ctrl = 0


;==========================================================
; I'm BACK!
[Statedef 3313]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 5


[State 3005, anim]
type = changeanim
trigger1 = !time 
value = 3313

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !Time
id = 3311

[State 3005, hitvar]
type=varadd
trigger1= !time
var(2)=1

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = ifelse(var(2)<10,3313,3316)   ;1316)
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = !Time && Var(5)=0
trigger1 = enemy, MoveType = H
x = Var(4)
y = P2Dist Y - 100

[State 0, PosAdd]
type = PosAdd
trigger1 = !Time && Var(5)=0
trigger1 = enemy, MoveType != H
x = Var(4) + 50
y = P2Dist Y - 350

[State 0, VarSet]
type = VarSet
trigger1 = Time = 2
var(5) = 1

[State 0, VarSet]
type = VarSet
trigger1 = !Time 
var(6) = 0

[State 0, VarSet]
type = VarSet
trigger1 = MoveHit = 1
var(6) = 1

[State 1061, Velocity]
type = VelSet
trigger1 = 1
x = ifelse((time<2 && var(2)>1),-1,-10)
y = ifelse((time<2 && var(2)>1),1,10)

[State 0, Explod]
type = Explod
trigger1 = !NumExplod(3314)
trigger1 = Cond(MoveContact,0,1)
anim = 3314
ID = 3314
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
pausemovetime = 99999
accel = 0,0
random = 0,0
removetime = -1
sprpriority = 4
ignorehitpause = 1
scale = 0.75, 0.75

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = MoveContact
id = 3314
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = !NumExplod(3325)
trigger1 = MoveContact
anim = 3325 + (Random%3)
ID = 3325
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
pausemovetime = 99999
accel = 0,0
random = 0,0
removetime = 12
sprpriority = 4
ignorehitpause = 1
scale = 0.75, 0.75

[State 3005, hit]
type = HitDef
trigger1 = Var(4) < 10
trigger2 = Var(4) < 11
trigger2 = NumTarget
trigger2 = target, IsHelper
attr = S,HP
hitflag = MAF
guardflag = MA
priority = 7,Hit
damage = ceil(ifElse(root,fvar(11) * 25 < 20, 20, root,fvar(11) * 25)), 4
getpower = 0,0
givepower = 35,35
pausetime = 12,6
guard.pausetime = 6,6
sparkno = s10030
guard.sparkno = s10000
sparkxy = -30,0
animtype = Back
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 16
ground.slidetime = 16
guard.hittime = 16
air.hittime = 13
airguard.ctrltime = 16
ground.velocity= 1,0
guard.velocity = -9
air.velocity = 4,0
airguard.velocity = -5.5, -1.5 
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel = .5
fall=Cond(Var(4)>8,1,0)
air.fall = 1
fall.recover = 0
fall.recovertime = 13
hitsound = s3315, 0
guardsound = S5,21
envshake.time = 16
envshake.ampl = 6
envshake.freq = 100
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
p2facing = -1

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = movecontact 
trigger1 = P2StateType = A
v = 18
value = 516

[State 0, VarAdd]
type = VarAdd
trigger1 = MoveContact = 1
trigger1 = NumTarget
trigger1 = !(target, IsHelper)
var(4) = 1

[State 3005, end]
type = changestate
trigger1 = movecontact
value = ifelse(var(2)>11,3316,3313)

[State 3001, Guardshake]
type = envshake
trigger1 = movecontact=1 && numtarget
time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = (Vel y > 0) && (Pos y >= 0)
id = 3314

[State 1061, then explode!]
type = changestate
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 3317

;-----------------------------------------
; bullet1 dies
[Statedef 3315]
type=A
physics=N
movetype=I
velset=0,0
ctrl=0
sprpriority=4
MoveHitPersist=1

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

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !Time
id = 3311


[State 3005, anim];Kmh horizontal
type = changeanim
trigger1 = !time
value = 3315

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1316, End]
type=destroyself
trigger1= !animtime

;-----------------------------------------
; bullet2 dies
[Statedef 3316]
type=A
physics=N
movetype=I
velset=0,0
ctrl=0
sprpriority=4
MoveHitPersist=1

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

[State 3005, anim];Kmh horizontal
type = changeanim
trigger1 = !time
value = 3316

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !Time
id = 3314

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1316, End]
type=destroyself
trigger1= !animtime

;==========================================================
; Floor Explodsion but with a helper instead
[Statedef 3317]
type = S
physics = S
movetype = A
ctrl = 0
sprpriority = 5
anim = 3317

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

[State 13100, goes SND]
type = playsnd
trigger1 = !time 
value = 3310,3

[State 0, VarAdd]
type = ParentVarAdd
;triggerall = P2StateType != A || P2StateType != L
trigger1 = MoveHit = 1
fvar(13) = 1
[State 0, VarAdd]
type = null;ParentVarAdd
triggerall = P2StateType != S || P2StateType != C
trigger1 = MoveHit = 1
fvar(13) = 2

[State 0, PosSet]
type = PosSet
trigger1 = 1
y = 0

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

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 0, HitDef]
type = HitDef
trigger1 = Time = 1
attr = S,HP       ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAFD        ;HLAFD+-
guardflag = MA         ;HLA
animtype = Back          ;light,medium,hard,back,up,diagup
air.animtype = Back
fall.animtype = Back
priority = 4,Hit
damage = ceil(ifElse(root,fvar(11) * 50 < 40, 40, root,fvar(11) * 40)),10
pausetime = 6,6
sparkno = s10030
guard.sparkno = s10000
sparkxy = 30 + random%15,-30 + random%15
ground.type = High
air.type = Low
ground.hittime = 16
ground.slidetime = 16
guard.hittime = 16
air.hittime = 13
ground.velocity= -4, -6
guard.velocity = -9
air.velocity = -4,-6
airguard.velocity = -5.5, -1.5 
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel = .5
fall= 1
air.fall = 1
fall.recover = 0
sparkno = -1
hitsound = s3315, 0
guardsound = S5,21
envshake.time = 16
envshake.ampl = 6
envshake.freq = 100
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
p2facing = -1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 18
value = 516

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 1316, End]
type=destroyself
trigger1= !animtime

;----------------------------------------
;Demon Pose
[Statedef 3416]
type = S
physics = S
movetype = I
anim = 3414
ctrl = 0
velset = 0,0
sprpriority = -1

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

[State 0, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
facing = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root, StateNo != 3414
trigger1 = enemy, Alive

;==========================================================
; Light Grenade
[Statedef 3615]
type = A
physics = N
movetype = I
ctrl = 0
sprpriority = 5
anim = 3615

[State 3010, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,1
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = Time = 130
value = 3616

;==========================================================
; Light Grenade Explodes
[Statedef 3616]
type = A
physics = N
movetype = I
ctrl = 0
sprpriority = 5
anim = 1606

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3618
ID = 3618
pos = 0,-40
postype = p2  ;p2,front,back,left,right
removetime = -2
pausemovetime = 99999999
sprpriority = 5
ownpal = 1
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = Time = 5
anim = 3619
ID = 3619
pos = 0,50
postype = p2  ;p2,front,back,left,right
removetime = -2
pausemovetime = 99999999
sprpriority = 6
ownpal = 1
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = Time >=5 && Time <= 81
anim = 3617
ID = 3617
pos = -30+random%60,0-random%100
postype = p2  ;p2,front,back,left,right
removetime = -2
pausemovetime = 99999999
sprpriority = 4
ownpal = 1
ignorehitpause = 1
persistent = 6

[State 0, HitAdd]
type = HitAdd
trigger1 = !Time
value = 11

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time 
value = 3601,3
volumescale = 200
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = 1
value = 1760,0
channel = 3
persistent = 10

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 60 

;==========================================================
; Mafuba Wave BG
[Statedef 3710]
type = A
physics = N
movetype = I
ctrl = 0
sprpriority = -5
anim = 3710
velset = -10,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 470
value = 3700,5

[State 0, VelSet]
type =VelSet
trigger1 = Time < 280
x = -10

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = root, Var(9) = 1
flag = invisible

[State 0, PosAdd]
type = PosAdd
trigger1 = Time <280
trigger1 = (pos x!=[-740,740])
x = 600
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Time = 280
x = Cond(Facing = 1, enemy,Pos X - 150, enemy,Pos X - 75)
y = 0

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 280
value = 3
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 281
value = 6
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 282
value = 9
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 283
value = 12
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 284
value = 15
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 285
value = 18
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 286
value = 21
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 287
value = 24
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 288
value = 27
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 289
value = 30
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 290
value = 33
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 291
value = 36
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 292
value = 39
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 293
value = 42
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 294
value = 45
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 295
value = 48
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 296
value = 51
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 297
value = 54
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 298
value = 57
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 299
value = 60
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 300
value = 63
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 301
value = 66
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 302
value = 69
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 303
value = 72
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 304
value = 75
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 305
value = 78
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 306
value = 81
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 307
value = 84
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 308
value = 87
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >= 309
value = 90

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >= 280 && Time <= 283
x = 93
y = 20
[State 0, PosAdd]
type = PosAdd
trigger1 = Time >= 284 && Time <= 303
x = 21
y = 10
persistent = 1

[State 0, VelSet]
type = VelSet
trigger1 = Time = 280
x = 0

[State 0, VelSet]
type = VelSet
trigger1 = Time >= 308
y = 10

[State 0, Trans]
type = Trans
trigger1 = Time >= 355 && Time < 360
trigger2 = Time >= 30 && Time < 45
trans = addalpha
alpha = 200,50
[State 0, Trans]
type = Trans
trigger1 = Time >= 360 && Time < 365
trigger2 = Time >= 25 && Time < 30
trans = addalpha
alpha = 150,100
[State 0, Trans]
type = Trans
trigger1 = Time >= 365 && Time < 370
trigger2 = Time >= 20 && Time < 25
trans = addalpha
alpha = 100,150
[State 0, Trans]
type = Trans
trigger1 = Time >= 370 && Time < 375
trigger2 = Time >= 15 && Time < 20
trans = addalpha
alpha = 75,175
[State 0, Trans]
type = Trans
trigger1 = Time >= 375 && Time < 380
trigger2 = Time >= 10 && Time < 15
trans = addalpha
alpha = 50,200
[State 0, Trans]
type = Trans
trigger1 = Time >= 380 && Time < 385
trigger2 = Time >= 5 && Time < 10
trans = addalpha
alpha = 25,225
[State 0, Trans]
type = Trans
trigger1 = Time >= 385 && Time < 470
trigger2 = Time < 5
trans = addalpha
alpha = 0,256

[State 0, PosSet]
type = PosSet
trigger1 = Time = 468
y = 200

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 500
scale = 1,0.95
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 501
scale = 1.1, 0.9
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 502
scale = 1.2,0.85
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 503
scale = 1.3,0.8
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 504
scale = 1.4,0.75
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 505
scale = 1.5,0.7
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 506
scale = 1.6,0.65
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 507
scale = 1.7,0.6
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 508
scale = 1.8,0.55
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 509
scale = 1.9,0.5
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 510
scale = 2,0.45
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 511
scale = 2.1,0.4
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 512
scale = 2.2,0.35
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 513
scale = 2.3,0.3
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 514
scale = 2.4,0.25
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 515
scale = 2.5,0.2
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 516
scale = 2.6,0.15
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 517
scale = 2.7,0.1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 518
scale = 2.8,0.05

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >= 500
x = Cond(Facing = 1,-6,-2)
persistent = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 519

;==========================================================
; Mafuba Wave FG
[Statedef 3711]
type = A
physics = N
movetype = I
ctrl = 0
sprpriority = 5
anim = 3711
velset = -10,0

[State 0, VelSet]
type =VelSet
trigger1 = Time < 280
x = -10

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = root, Var(9) = 1
flag = invisible

[State 0, PosAdd]
type = PosAdd
trigger1 = Time <280
trigger1 = (pos x!=[-740,740])
x = 600
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Time = 280
x = Cond(Facing = 1, enemy,Pos X - 150, enemy,Pos X - 75)
y = 0


[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 280
value = 3
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 281
value = 6
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 282
value = 9
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 283
value = 12
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 284
value = 15
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 285
value = 18
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 286
value = 21
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 287
value = 24
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 288
value = 27
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 289
value = 30
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 290
value = 33
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 291
value = 36
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 292
value = 39
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 293
value = 42
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 294
value = 45
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 295
value = 48
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 296
value = 51
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 297
value = 54
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 298
value = 57
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 299
value = 60
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 300
value = 63
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 301
value = 66
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 302
value = 69
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 303
value = 72
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 304
value = 75
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 305
value = 78
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 306
value = 81
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 307
value = 84
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 308
value = 87
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >= 309
value = 90

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >= 280 && Time <= 283
x = 93
y = 20
[State 0, PosAdd]
type = PosAdd
trigger1 = Time >= 284 && Time <= 303
x = 21
y = 10
persistent = 1

[State 0, VelSet]
type = VelSet
trigger1 = Time = 280
x = 0

[State 0, VelSet]
type = VelSet
trigger1 = Time >= 308
y = 10

[State 0, Trans]
type = Trans
trigger1 = Time >= 355 && Time < 360
trigger2 = Time >= 30 && Time < 45
trans = addalpha
alpha = 200,50
[State 0, Trans]
type = Trans
trigger1 = Time >= 360 && Time < 365
trigger2 = Time >= 25 && Time < 30
trans = addalpha
alpha = 150,100
[State 0, Trans]
type = Trans
trigger1 = Time >= 365 && Time < 370
trigger2 = Time >= 20 && Time < 25
trans = addalpha
alpha = 100,150
[State 0, Trans]
type = Trans
trigger1 = Time >= 370 && Time < 375
trigger2 = Time >= 15 && Time < 20
trans = addalpha
alpha = 75,175
[State 0, Trans]
type = Trans
trigger1 = Time >= 375 && Time < 380
trigger2 = Time >= 10 && Time < 15
trans = addalpha
alpha = 50,200
[State 0, Trans]
type = Trans
trigger1 = Time >= 380 && Time < 385
trigger2 = Time >= 5 && Time < 10
trans = addalpha
alpha = 25,225
[State 0, Trans]
type = Trans
trigger1 = Time >= 385 && Time < 470
trigger2 = Time < 5
trans = addalpha
alpha = 0,256

[State 0, PosSet]
type = PosSet
trigger1 = Time = 468
y = 200

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 500
scale = 1,0.95
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 501
scale = 1.1, 0.9
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 502
scale = 1.2,0.85
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 503
scale = 1.3,0.8
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 504
scale = 1.4,0.75
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 505
scale = 1.5,0.7
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 506
scale = 1.6,0.65
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 507
scale = 1.7,0.6
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 508
scale = 1.8,0.55
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 509
scale = 1.9,0.5
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 510
scale = 2,0.45
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 511
scale = 2.1,0.4
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 512
scale = 2.2,0.35
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 513
scale = 2.3,0.3
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 514
scale = 2.4,0.25
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 515
scale = 2.5,0.2
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 516
scale = 2.6,0.15
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 517
scale = 2.7,0.1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 518
scale = 2.8,0.05

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >= 500
x = Cond(Facing = 1,-6,-2)
persistent = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 519

;==========================================================
; FAR BG
[Statedef 3712]
type = A
physics = N
movetype = I
ctrl = 0
sprpriority = -9
anim = 3711

[State 0, VelSet]
type = VelSet
trigger1 = Time < 308
x = -6

[State 0, VelSet]
type = VelSet
trigger1 = Time = 308
x = 0

[State 0, VelSet]
type = VelSet
trigger1 = Time > 308
y = 6

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 0,100,50
mul = 20,120,24
sinadd = 85,110,55,1
invertall = 1
color = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Time <280
trigger1 = (pos x!=[-740,740])
x = 600
y = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Time >= 280 && Time <= 308
flag = invisible

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >= 309
value = 90

[State 0, PosSet]
type = PosSet
trigger1 = Time = 309
x = Cond(Facing = 1, enemy,Pos X + 150, enemy,Pos X - 200)
y = 1300

[State 0, Trans]
type = Trans
trigger1 = Time >= 465 && Time < 470
trans = addalpha
alpha = 200,50
[State 0, Trans]
type = Trans
trigger1 = Time >= 470 && Time < 475
trans = addalpha
alpha = 150,100
[State 0, Trans]
type = Trans
trigger1 = Time >= 475 && Time < 480
trans = addalpha
alpha = 100,150
[State 0, Trans]
type = Trans
trigger1 = Time >= 480 && Time < 485
trans = addalpha
alpha = 75,175
[State 0, Trans]
type = Trans
trigger1 = Time >= 485 && Time < 490
trans = addalpha
alpha = 50,200
[State 0, Trans]
type = Trans
trigger1 = Time >= 490 && Time < 495
trans = addalpha
alpha = 25,225
[State 0, Trans]
type = Trans
trigger1 = Time >= 495 && Time < 500
trans = addalpha
alpha = 0,256

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 500

;==========================================================
; Waiting Box
[Statedef 3722]
type = A
physics = N
movetype = I
ctrl = 0
sprpriority = 6
anim = 3720

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3720
trigger1 = AnimElem = 4
value = 3700,6

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3721
trigger1 = AnimElem = 4
trigger2 = Anim = 3722
trigger2 = AnimElem = 4
trigger3 = Anim = 3723
trigger3 = AnimElem = 4
trigger4 = Anim = 3724
trigger4 = AnimElem = 6
value = 3700,7

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

[State 0, PosSet]
type = PosSet
trigger1 = !Time 
x = enemy, Pos X 
y = 0

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 3712
ID = 3712
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
removetime = -1
sprpriority = -6
ownpal = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = AnimElem = 2
id = 3712

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = enemy, Alive
trigger1 = Time = 250
trigger2 = Anim = 3721
trigger2 = !AnimTime
trigger3 = Anim = 3722
trigger3 = !AnimTime
trigger4 = Anim = 3723
trigger4 = !AnimTime
trigger5 = Anim = 3724
trigger5 = !AnimTime
value = 3721 + random%4

[State 0, Explod]
type = Explod
trigger1 = enemy, Alive
trigger1 = Time = 345
anim = 1771
ID = 1771
pos = 0,-20
postype = p1  ;p2,front,back,left,right
removetime = -2
sprpriority = 9
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = enemy, Alive
trigger1 = Time = 345
value = 3700,8
channel = 2

[State 0, HitAdd]
type = HitAdd
trigger1 = enemy, Alive
trigger1 = Time = 345
value = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = enemy, Alive
trigger1 = Time >= 347
flag = invisible

[State 0, DestroySelf]
type = DestroySelf
trigger1 = enemy, Alive
trigger1 = Time = 349




;==========================================================
; DEMON GAUGE HELPER P1
[Statedef 2750]
physics = N
velset = 0, 0
sprpriority = 7
anim = 15999

[State 3033, Assert]
type = assertspecial
trigger1 = 1
flag = invisible
ignorehitpause = 1

;2750 = frame
;2751 = full rage (orange)
;27510 = full buffer (blue)
;2752 = grey
;27520 = grey kanji
;2753 = yellow kanji
;2754 = orange kanji
;2755 = red kanji
;2756, 0-5 = flames
;2757,2758,2759 = fades

[State -2, Explod];full bar blue (buffer)
type = null;Explod
trigger1 = !NumExplod(27610) && (root,var(52))>0
anim = 27610
pos = 243-(root,var(45)),230-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 27610
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Scale full bar
type = null;ModifyExplod
trigger1 = NumExplod(27610) && (root,var(52))>0
scale = 0.5*(root,var(52))/1000.0,0.5
id = 27610

[State -2, Explod];Empty bar rage (orange)
type = Explod
trigger1 = !NumExplod(2761) && (root,var(52))>0
anim = 2761
pos = 23+(root,var(45)),230-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 2761
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Scale full bar orange
type = ModifyExplod
trigger1 = NumExplod(2761) && (root,var(52))>0
scale = 0.5*ifelse(root,var(53)<700, (root,var(53))/700.0, ifelse(root,var(53)>=1400, (root,var(53)-1400)/700.0, (root,var(53)-700)/700.0)),0.5
id = 2761

[State -2, Explod];Max Bar Flashing
type = Explod
trigger1 = !NumExplod(27511) && (root,var(52))>0
trigger1 = root, var(53) >= 2100
anim = 27511
pos = 76+(root,var(45)),230-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 27511
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Frame
type = Explod
trigger1 = !NumExplod(2750) && (root,var(52))>0
anim = 2750
pos = 76+(root,var(45)),230-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 2750
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Grey Kanji
type = Explod
trigger1 = !NumExplod(27520) && (root,var(52))>0
anim = 27520
pos = 5 +(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 10
id = 27520
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Yellow Kanji
type = Explod
trigger1 = !NumExplod(2753) && (root,var(52))>0
trigger1 = (root,var(53))>=700 && (root,var(53))<1400
anim = 2753
pos = 5 +(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 10
id = 2753
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Orange Kanji
type = Explod
trigger1 = !NumExplod(2754) && (root,var(52))>0
trigger1 = (root,var(53))>=1400 && (root,var(53))<2100
anim = 2754
pos = 5 +(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 10
id = 2754
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Red Kanji
type = Explod
trigger1 = !NumExplod(2755) && (root,var(52))>0
trigger1 = (root,var(53))>=2100
anim = 2755
pos = 5 +(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 10
id = 2755
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Flames
type = Explod
trigger1 = !NumExplod(2756) && (root,var(52))>0
trigger1 = (root,var(53))>=2100
anim = 2756
pos = 5 +(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 11
id = 2756
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

;Demon Gauge
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0
id = 2750
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0
id = 2751
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0
id = 27510
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0
id = 2752
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0 || (root,var(53))>=700
id = 27520
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0 || (root,var(53))<700 || (root,var(53))>=1400
id = 2753
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0 || (root,var(53))<1400 || (root,var(53))>=2100
id = 2754
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0 || (root,var(53))<2100
id = 2755
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0 || (root,var(53))<2100
id = 2756
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0 || (root,var(53))<2100
id = 27511

[State -2, Explod];Grey bar fades
type = Explod
trigger1 = !NumExplod(2758) && (root,var(52))<=0
anim = 2758
pos = 5 +(root,var(45)),219-(root,var(46))
postype = left
removetime = 14
supermove = 1
scale = 0.5,0.5
sprpriority = 0
id = 2758
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
persistent = 0

[State -2, Explod];Rage Gauge fades
type = Explod
trigger1 = !NumExplod(2759) && (root,var(52))<=0
anim = 2759
pos = 5 +(root,var(45)),219-(root,var(46))
postype = left
removetime = 14
supermove = 1
scale = 0.5,0.5
sprpriority = 7
id = 2759
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
persistent = 0

[State -2, Explod];Yellow Kanji fades
type = Explod
trigger1 = !NumExplod(2757) && (root,var(52))<=0
anim = 2757
pos = 5 +(root,var(45)),219-(root,var(46))
postype = left
removetime = 14
supermove = 1
scale = 0.5,0.5
sprpriority = 8
id = 2757
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
persistent = 0

[State 3033, End]
type = destroyself
trigger1 = (root,var(52))<=0 && !numexplod(2759)

;==========================================================
; RAGE GAUGE HELPER P2

[Statedef 2760]
physics = N
velset = 0, 0
sprpriority = 7
anim = 15999

[State 3033, Assert]
type = assertspecial
trigger1 = 1
flag = invisible
ignorehitpause = 1

;2760 = frame
;2761 = full blue
;27610 = full orange
;2762 = grey
;27620 = black kanji
;2753 = yellow kanji
;2754 = orange kanji
;2755 = red kanji
;2756, 0-5 = flames
;2767,2768,2769 = fades

[State -2, Explod];Grey bar
type = null ;Explod
trigger1 = !NumExplod(2762) && (root,var(52))>0
anim = 2762
pos = 243-(root,var(45)),230-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 7
id = 2762
bindtime = -1
;ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];full bar blue (buffer)
type = null;Explod
trigger1 = !NumExplod(27610) && (root,var(52))>0
anim = 27610
pos = 243-(root,var(45)),230-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 27610
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Scale full bar
type = null;ModifyExplod
trigger1 = NumExplod(27610) && (root,var(52))>0
scale = 0.5*(root,var(52))/1000.0,0.5
id = 27610

[State -2, Explod];Empty bar rage (orange)
type = Explod
trigger1 = !NumExplod(2761) && (root,var(52))>0
anim = 2761
pos = 243-(root,var(45)),230-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 2761
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Max Bar Flashing
type = Explod
trigger1 = !NumExplod(27511) && (root,var(52))>0
trigger1 = root, var(53) >= 2100
anim = 27511
pos = 296-(root,var(45)),230-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 27511
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Scale full bar orange
type = ModifyExplod
trigger1 = NumExplod(2761) && (root,var(52))>0
scale = 0.5*ifelse(root,var(53)<700, (root,var(53))/700.0, ifelse(root,var(53)>=1400, (root,var(53)-1400)/700.0, (root,var(53)-700)/700.0)),0.5
id = 2761

[State -2, Explod];Frame
type = Explod
trigger1 = !NumExplod(2760) && (root,var(52))>0
anim = 2760
pos = 242-(root,var(45)),230-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 2760
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Grey Kanji
type = Explod
trigger1 = !NumExplod(27520) && (root,var(52))>0
anim = 27520
pos = 293-(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 10
id = 27520
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Yellow Kanji
type = Explod
trigger1 = !NumExplod(2753) && (root,var(52))>0
trigger1 = (root,var(53))>=700 && (root,var(53))<1400
anim = 2753
pos = 293-(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 10
id = 2753
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Orange Kanji
type = Explod
trigger1 = !NumExplod(2754) && (root,var(52))>0
trigger1 = (root,var(53))>=1400 && (root,var(53))<2100
anim = 2754
pos = 293-(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 10
id = 2754
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Red Kanji
type = Explod
trigger1 = !NumExplod(2755) && (root,var(52))>0
trigger1 = (root,var(53))>=2100
anim = 2755
pos = 293-(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 10
id = 2755
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Flames
type = Explod
trigger1 = !NumExplod(2756) && (root,var(52))>0
trigger1 = (root,var(53))>=2100
anim = 2756
pos = 293-(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 11
id = 2756
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

;Hope Gauge
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0
id = 2760
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0
id = 2761
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0
id = 27610
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0 || (root,var(53))>=700
id = 27520
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0
id = 2762
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0 || (root,var(53))<700 || (root,var(53))>=1400
id = 2753
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0 || (root,var(53))<1400 || (root,var(53))>=2100
id = 2754
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0 || (root,var(53))<2100
id = 2755
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0 || (root,var(53))<2100
id = 2756
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(52))<=0 || (root,var(53))<2100
id = 27511

[State -2, Explod];Grey bar fades
type = Explod
trigger1 = !NumExplod(2768) && (root,var(52))<=0
anim = 2768
pos = 242-(root,var(45)),228-(root,var(46))
postype = left
removetime = 14
supermove = 1
scale = 0.5,0.5
sprpriority = 0
id = 2768
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
persistent = 0

[State -2, Explod];Rage Gauge fades
type = Explod
trigger1 = !NumExplod(2769) && (root,var(52))<=0
anim = 2769
pos = 242-(root,var(45)),228-(root,var(46))
postype = left
removetime = 14
supermove = 1
scale = 0.5,0.5
sprpriority = 7
id = 2769
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
persistent = 0

[State -2, Explod];Yellow Kanji fades
type = Explod
trigger1 = !NumExplod(2767) && (root,var(52))<=0
anim = 2767
pos = 221-(root,var(45)),228-(root,var(46))
postype = left
removetime = 14
supermove = 1
scale = 0.5,0.5
sprpriority = 8
id = 2767
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
persistent = 0

[State 3033, End]
type = destroyself
trigger1 = (root,var(52))<=0 && !numexplod(2769)

;===================================================
; Limit basics comboability
[Statedef 15999]
type    = S
movetype= A
physics = N
anim = 15999
sprpriority = -5

[State 2260, muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 2260, destroy]
type = DestroySelf
trigger1 = numenemy
trigger1 = enemynear, movetype != H || (enemynear, stateno = [120,155]) || enemynear, ctrl
trigger2 = time = 24

[Statedef 17100]
type=A
movetype=I
physics=N
anim=15999
sprpriority=1
velset=0,0

[state 17100,bind]
type = bindtoparent
trigger1 = !time
pos = -11,0

[state 17100, Landing Effect]
type=explod
trigger1=!time
anim=17100
id=17100
pos=0,0
postype=P1
sprpriority=-3
ownpal=1
supermovetime=-1

[state 17100]
type=removeexplod
trigger1=time>10

[State 17100]
type=destroyself
trigger1=time>10

;----------------------------------------------------
; Win 2 Darkness my old friend
[Statedef 18300]
type    = S
movetype= I
physics = N
anim = 18300
sprpriority = 9

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 0,0,0
mul = 0,0,0
sinadd = 0,0,0,1
invertall = 0
color = 256

;----------------------------------------------------
; Intro 2 Dust
[Statedef 19200]
type    = S
movetype= I
physics = N
anim = 19200
sprpriority = 5

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

;----------------------------------------------------
; Intro 2 Demon Pose
[Statedef 19202]
type    = S
movetype= I
physics = N
anim = 19202
sprpriority = 1

[State 0, Trans]
type = Trans
trigger1 = Time >= 20 && Time < 85 
trans = addalpha
alpha = 256-time*10, 0+time*10

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

;----------------------------------------------------
; Faded Glory
[Statedef 19302]
type    = S
movetype= I
physics = N
anim = 19302
sprpriority = -9

[State 0, SprPriority]
type = SprPriority
trigger1 = root, StateNo = 188
value = 9

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 0,0,0
mul = 0,0,0
sinadd = 0,0,0,1
invertall = 0
color = 256

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

;----------------------------------------------------
; Intro 4 Dende
[Statedef 19400]
type    = S
movetype= I
physics = N
anim = 19400
sprpriority = 8

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 200
trigger1 = root, StateNo != 188
value = 194,10
channel = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 200
trigger1 = root, StateNo != 188
scale = 1.1,1.1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 201
trigger1 = root, StateNo != 188
scale = 1.2,1.2
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 202
trigger1 = root, StateNo != 188
scale = 1.3,1.3
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 203
trigger1 = root, StateNo != 188
scale = 1.4,1.4
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 204
trigger1 = root, StateNo != 188
scale = 1.5,1.5
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 205
trigger1 = root, StateNo != 188
scale = 1.6,1.6
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 206
trigger1 = root, StateNo != 188
scale = 1.7,1.7
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 207
trigger1 = root, StateNo != 188
scale = 1.8,1.8
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 208
trigger1 = root, StateNo != 188
scale = 1.9,1.9
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 209
trigger1 = root, StateNo != 188
scale = 2.0,2.0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 210
trigger1 = root, StateNo != 188
scale = 2.1,2.1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 211
trigger1 = root, StateNo != 188
scale = 2.2,2.2
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 212
trigger1 = root, StateNo != 188
scale = 2.3,2.3
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 213
trigger1 = root, StateNo != 188
scale = 2.4,2.4
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 214
trigger1 = root, StateNo != 188
scale = 2.5,2.5
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 215
trigger1 = root, StateNo != 188
scale = 2.6,2.6
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 216
trigger1 = root, StateNo != 188
scale = 2.7,2.7
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 217
trigger1 = root, StateNo != 188
scale = 2.8,2.8
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 218
trigger1 = root, StateNo != 188
scale = 2.9,2.9
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 219
trigger1 = root, StateNo != 188
scale = 3.0,3.0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 220
trigger1 = root, StateNo != 188
scale = 3.1,3.1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 221
trigger1 = root, StateNo != 188
scale = 3.2,3.2
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 222
trigger1 = root, StateNo != 188
scale = 3.3,3.3
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 223
trigger1 = root, StateNo != 188
scale = 3.4,3.4
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 224
trigger1 = root, StateNo != 188
scale = 3.5,3.5
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 225
trigger1 = root, StateNo != 188
scale = 3.6,3.6
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 226
trigger1 = root, StateNo != 188
scale = 3.7,3.7
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 227
trigger1 = root, StateNo != 188
scale = 3.8,3.8
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 228
trigger1 = root, StateNo != 188
scale = 3.9,3.9
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 229
trigger1 = root, StateNo != 188
scale = 4.0,4.0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 230
trigger1 = root, StateNo != 188
scale = 4.1,4.1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 231
trigger1 = root, StateNo != 188
scale = 4.2,4.2
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 232
trigger1 = root, StateNo != 188
scale = 4.3,4.3
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 233
trigger1 = root, StateNo != 188
scale = 4.4,4.4
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 234
trigger1 = root, StateNo != 188
scale = 4.5,4.5
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 235
trigger1 = root, StateNo != 188
scale = 4.6,4.6
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 236
trigger1 = root, StateNo != 188
scale = 4.7,4.7
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 237
trigger1 = root, StateNo != 188
scale = 4.8,4.8
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = 238
trigger1 = root, StateNo != 188
scale = 4.9,4.9
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >= 239
trigger1 = root, StateNo != 188
scale = 5.0,5.0

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >= 200
trigger1 = root, StateNo != 188
x = -5
y = 10
persistent = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 240
trigger1 = root, StateNo = 700
trigger2 = root, StateNo != 700
trigger2 = root, StateNo != 188

;----------------------------------------------------
; Daimao
[Statedef 18900]
type    = S
movetype= I
physics = N
anim = 18900
sprpriority = -2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, VelAdd]
type = VelAdd
trigger1 = Time = 90
x = -1
y = -.5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 90
value = 706,20
channel = 2

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 240

;----------------------------------------------------
; Nail
[Statedef 18901]
type    = S
movetype= I
physics = N
anim = 18901
sprpriority = -3

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, VelAdd]
type = VelAdd
trigger1 = Time = 110
x = 0
y = -.5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 110
value = 706,20
channel = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 240

;----------------------------------------------------
; Kami
[Statedef 18902]
type    = S
movetype= I
physics = N
anim = 18902
sprpriority = -1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, VelAdd]
type = VelAdd
trigger1 = Time = 130
x = 1
y = -.5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 130
value = 706,20
channel = 2

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 240

;DEMONS
;----------------------------------------

;Bowser
[Statedef 18220]
type = S
physics = S
movetype = I
anim = 18220
sprpriority = 0

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18320
ID = 18220
sprpriority = 9
ownpal = 0
removetime = 130

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Piccolo Evolution
[Statedef 18221]
type = S
physics = S
movetype = I
anim = 18221
sprpriority = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Power Ranger 
[Statedef 18222]
type = S
physics = S
movetype = I
anim = 18222
sprpriority = 0

[State 0, VarRandom]
type = VarRandom
trigger1 = !Time
v = 1
range = 0,1

[State 0, PalFXWiz]
type = PalFX
trigger1 = Var(1) = 0
trigger1 = AnimElem = 5
time = 10
add = 0,256,0
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, PalFXWiz]
type = PalFX
trigger1 = Var(1) = 1
trigger1 = AnimElem = 5
time = 10
add = 200,200,200
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, SprPriority]
type = SprPriority
trigger1 = !Time
value = -1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 4
anim = 18223
ID = 18223
pos = 0,0
postype = p1  ;p2,front,back,left,right
sprpriority = 0
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = Var(1) = 0
trigger1 = AnimElem = 6
anim = 18224
ID = 18224
pos = 0,0
postype = p1  ;p2,front,back,left,right
sprpriority = 0
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = Var(1) = 1
trigger1 = AnimElem = 6
anim = 18225
ID = 18225
pos = 0,0
postype = p1  ;p2,front,back,left,right
sprpriority = 0
ownpal = 1

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

;Stone Pig
[Statedef 18223]
type = S
physics = S
movetype = I
anim = 18244
sprpriority = 0

[State 0, Helper]
type = Helper
trigger1 = Time = 229
name = "Debris"
ID = 18345
stateno = 18345
pos = -10+random%60,0-random%30
postype = p1    ;p2,front,back,left,right
ownpal = 1
[State 0, Helper]
type = Helper
trigger1 = Time = 229
name = "Debris"
ID = 18345
stateno = 18346
pos = -10+random%60,0-random%30
postype = p1    ;p2,front,back,left,right
ownpal = 1
[State 0, Helper]
type = Helper
trigger1 = Time = 229
name = "Debris"
ID = 18345
stateno = 18347
pos = -10+random%60,0-random%30
postype = p1    ;p2,front,back,left,right
ownpal = 1
[State 0, Helper]
type = Helper
trigger1 = Time = 229
name = "Debris"
ID = 18345
stateno = 18348
pos = -10+random%60,0-random%30
postype = p1    ;p2,front,back,left,right
ownpal = 1
[State 0, Helper]
type = Helper
trigger1 = Time = 229
name = "Debris"
ID = 18345
stateno = 18349
pos = -10+random%60,0-random%30
postype = p1    ;p2,front,back,left,right
ownpal = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Debris
[Statedef 18345]
type = S
physics = S
movetype = I
anim = 18245
sprpriority = 0

[State 0, VelSet]
type = VelSet
trigger1 = !Time
x = -12+random%34
y = -3

[State 0, VelAdd]
type = VelAdd
trigger1 = Time >= 2
y = 1

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

;Debris
[Statedef 18346]
type = S
physics = S
movetype = I
anim = 18246
sprpriority = 0

[State 0, VelSet]
type = VelSet
trigger1 = !Time
x = -12+random%34
y = -3

[State 0, VelAdd]
type = VelAdd
trigger1 = Time >= 2
y = 1

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

;Debris
[Statedef 18347]
type = S
physics = S
movetype = I
anim = 18247
sprpriority = 0

[State 0, VelSet]
type = VelSet
trigger1 = !Time
x = -12+random%34
y = -3

[State 0, VelAdd]
type = VelAdd
trigger1 = Time >= 2
y = 1

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

;Debris
[Statedef 18348]
type = S
physics = S
movetype = I
anim = 18248
sprpriority = 0

[State 0, VelSet]
type = VelSet
trigger1 = !Time
x = -12+random%34
y = -3

[State 0, VelAdd]
type = VelAdd
trigger1 = Time >= 2
y = 1

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

;Debris
[Statedef 18349]
type = S
physics = S
movetype = I
anim = 18249
sprpriority = 0

[State 0, VelSet]
type = VelSet
trigger1 = !Time
x = -12+random%34
y = -3

[State 0, VelAdd]
type = VelAdd
trigger1 = Time >= 2
y = 1

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

;True Ogre
[Statedef 18224]
type = S
physics = S
movetype = I
anim = 18250
sprpriority = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Twi-Lek
[Statedef 18225]
type = S
physics = S
movetype = I
anim = 18251
sprpriority = 0

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18252
ID = 18252
pos = -5+random%10,0
postype = p1  ;p2,front,back,left,right
ownpal = 1
removetime = 230

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Alien
[Statedef 18226]
type = S
physics = S
movetype = I
anim = 18253
sprpriority = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Shared Alien
[Statedef 18227]
type = S
physics = S
movetype = I
anim = 18254
sprpriority = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Absalon
[Statedef 18228]
type = S
physics = S
movetype = I
anim = 18255
sprpriority = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Tail
[Statedef 18229]
type = S
physics = S
movetype = I
anim = 18256
sprpriority = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Jason
[Statedef 18230]
type = S
physics = S
movetype = I
anim = 18257
sprpriority = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Nemesis
[Statedef 18231]
type = S
physics = S
movetype = I
sprpriority = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 18258+random%2

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Pyramid Head
[Statedef 18232]
type = S
physics = S
movetype = I
anim = 18260
sprpriority = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Millenium Earl
[Statedef 18233]
type = S
physics = S
movetype = I
anim = 18263
sprpriority = 0

[State 0, SprPriority]
type = SprPriority
trigger1 = !Time
value = 9
[State 0, SprPriority]
type = SprPriority
trigger1 = Time=140
value = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Giant robot
[Statedef 18234]
type = S
physics = S
movetype = I
anim = 18267
sprpriority = -1

[State 0, Explod]
type = Explod
trigger1 = Time = 210
anim = 2301
ID = 2301
pos = -40,-70
postype = p1  ;p2,front,back,left,right
sprpriority = 0
ownpal = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Marshmallow Man
[Statedef 18235]
type = S
physics = S
movetype = I
anim = 18270
sprpriority = -1

[State 0, Explod]
type = Explod
trigger1 = Time = 210
anim = 2301
ID = 2301
pos = 0,-50
postype = p1  ;p2,front,back,left,right
sprpriority = 0
ownpal = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Sea King
[Statedef 18236]
type = S
physics = S
movetype = I
anim = 18274
sprpriority = -1

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230



;Iced
[Statedef 18250]
type = S
physics = S
movetype = I
anim = 18226
sprpriority = -1

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18227
ID = 18227
pos = 0,0
postype = p1  ;p2,front,back,left,right
removetime = -2
sprpriority = 0
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18228
ID = 18228
pos = 0,-3
postype = p1  ;p2,front,back,left,right
removetime = 72
sprpriority = -2
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = Time = 72
anim = 18228
ID = 18228
pos = 5,2
postype = p1  ;p2,front,back,left,right
removetime = 32
sprpriority = -1
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = Time = 104
anim = 18228
ID = 18228
pos = 0,-3
postype = p1  ;p2,front,back,left,right
removetime = 126
sprpriority = -2
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = Time = 210
anim = 18229
ID = 18227
pos = 0,-80
postype = p1  ;p2,front,back,left,right
removetime = -2
sprpriority = 9
ownpal = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Ragyo
[Statedef 18251]
type = S
physics = S
movetype = I
anim = 18230
sprpriority = 0

[State 0, Helper]
type = Helper
trigger1 = !Time
name = "LIGHT"
ID = 18371
stateno = 18371
pos = -60,0
postype = p1    ;p2,front,back,left,right
ownpal = 1
[State 0, Helper]
type = Helper
trigger1 = !Time
name = "LIGHT"
ID = 18371
stateno = 18372
pos = -60,-40
postype = p1    ;p2,front,back,left,right
ownpal = 1
[State 0, Helper]
type = Helper
trigger1 = !Time
name = "LIGHT"
ID = 18371
stateno = 18373
pos = -60,-40
postype = p1    ;p2,front,back,left,right
ownpal = 1
[State 0, Helper]
type = Helper
trigger1 = !Time
name = "LIGHT"
ID = 18371
stateno = 18374
pos = -60,-40
postype = p1    ;p2,front,back,left,right
ownpal = 1
[State 0, Helper]
type = Helper
trigger1 = !Time
name = "LIGHT"
ID = 18371
stateno = 18375
pos = -60,-40
postype = p1    ;p2,front,back,left,right
ownpal = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Time <= 175
flag = nomusic

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 85
value = 2302,0

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

;LIGHT
[Statedef 18371]
type = S
physics = S
movetype = I
anim = 18271
sprpriority = -1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 50,50,100
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=3
value = 0
scale = .5+random%2,1+random%3

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 171

;LIGHT
[Statedef 18372]
type = S
physics = S
movetype = I
anim = 18271
sprpriority = -2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 50,50,100
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=3
value = 90
scale = .5+random%1,.5+random%3

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 171

;LIGHT
[Statedef 18373]
type = S
physics = S
movetype = I
anim = 18271
sprpriority = -2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 50,50,100
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=3
value = 45
scale = .5+random%1,.5+random%3

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 171

;LIGHT
[Statedef 18374]
type = S
physics = S
movetype = I
anim = 18271
sprpriority = -2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 50,50,100
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=3
value = -45
scale = .5+random%1,.5+random%3

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 171

;LIGHT
[Statedef 18375]
type = S
physics = S
movetype = I
anim = 18271
sprpriority = -2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 50,50,100
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=3
value = -90
scale = .5+random%1,.5+random%3

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 171

;Ripper Roo
[Statedef 18252]
type = S
physics = S
movetype = I
anim = 18231
sprpriority = -2

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18233
ID = 18233
pos = 0,20
postype = p1  ;p2,front,back,left,right
sprpriority = -1
removetime = -1
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18234
ID = 18233
pos = 50,20
postype = p1  ;p2,front,back,left,right
sprpriority = -1
removetime = -1
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18234
ID = 18233
pos = 30,-10
postype = p1  ;p2,front,back,left,right
sprpriority = -3
removetime = -1
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = Time = 220
anim = 18232
ID = 18234
pos = 0,20
postype = p1  ;p2,front,back,left,right
sprpriority = 1
removetime = -2
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = Time = 220
anim = 18232
ID = 18234
pos = 50,20
postype = p1  ;p2,front,back,left,right
sprpriority = -2
removetime = -2
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = Time = 220
anim = 18232
ID = 18234
pos = 30,-10
postype = p1  ;p2,front,back,left,right
sprpriority = -3
removetime = -2
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = Time = 220
anim = 18235
ID = 18234
pos = 0,20
postype = p1  ;p2,front,back,left,right
sprpriority = 1
removetime = -2
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = Time = 220
anim = 18235
ID = 18234
pos = 50,20
postype = p1  ;p2,front,back,left,right
sprpriority = 1
removetime = -2
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = Time = 220
anim = 18235
ID = 18234
pos = 30,-10
postype = p1  ;p2,front,back,left,right
sprpriority = -2
removetime = -2
ownpal = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Time >= 230
id = 18233

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Slimes
[Statedef 18253]
type = S
physics = S
movetype = I
anim = 18236
sprpriority = -5

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 200
value = 18240

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18236
ID = 18233
pos = 10,20
postype = p1  ;p2,front,back,left,right
sprpriority = -1
removetime = -1
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18237
ID = 18233
pos = 20,0
postype = p1  ;p2,front,back,left,right
sprpriority = -1
removetime = -1
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18238
ID = 18233
pos = 40,0
postype = p1  ;p2,front,back,left,right
sprpriority = -1
removetime = -1
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18239
ID = 18233
pos = 60,0
postype = p1  ;p2,front,back,left,right
sprpriority = -1
removetime = -1
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18236
ID = 18233
pos = 70,-20
postype = p1  ;p2,front,back,left,right
sprpriority = -6
removetime = -1
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18237
ID = 18233
pos = -20,0
postype = p1  ;p2,front,back,left,right
sprpriority = -1
removetime = -1
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18238
ID = 18233
pos = -40,0
postype = p1  ;p2,front,back,left,right
sprpriority = -1
removetime = -1
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18239
ID = 18233
pos = -60,0
postype = p1  ;p2,front,back,left,right
sprpriority = -1
removetime = -1
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18236
ID = 18233
pos = 50,40
postype = p1  ;p2,front,back,left,right
sprpriority = -1
removetime = -1
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18237
ID = 18233
pos = 10,-20
postype = p1  ;p2,front,back,left,right
sprpriority = -6
removetime = -1
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18238
ID = 18233
pos = 30,-20
postype = p1  ;p2,front,back,left,right
sprpriority = -6
removetime = -1
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18239
ID = 18233
pos = 20,-40
postype = p1  ;p2,front,back,left,right
sprpriority = -7
removetime = -1
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 18239
ID = 18233
pos = -30,-20
postype = p1  ;p2,front,back,left,right
sprpriority = -6
removetime = -1
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = Time = 200
anim = 18240
ID = 18234
pos = 10,20
postype = p1  ;p2,front,back,left,right
sprpriority = -1
removetime = -2
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = Time = 200
anim = 18241
ID = 18234
pos = 20,0
postype = p1  ;p2,front,back,left,right
sprpriority = -1
removetime = -2
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = Time = 200
anim = 18242
ID = 18234
pos = 40,0
postype = p1  ;p2,front,back,left,right
sprpriority = -1
removetime = -2
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = Time = 200
anim = 18243
ID = 18234
pos = 60,0
postype = p1  ;p2,front,back,left,right
sprpriority = -1
removetime = -2
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = Time = 200
anim = 18240
ID = 18234
pos = 70,-20
postype = p1  ;p2,front,back,left,right
sprpriority = -6
removetime = -2
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = Time = 200
anim = 18241
ID = 18234
pos = -20,0
postype = p1  ;p2,front,back,left,right
sprpriority = -1
removetime = -2
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = Time = 200
anim = 18242
ID = 18234
pos = -40,0
postype = p1  ;p2,front,back,left,right
sprpriority = -1
removetime = -2
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = Time = 200
anim = 18243
ID = 18234
pos = -60,0
postype = p1  ;p2,front,back,left,right
sprpriority = -1
removetime = -2
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = Time = 200
anim = 18240
ID = 18234
pos = 50,40
postype = p1  ;p2,front,back,left,right
sprpriority = -1
removetime = -2
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = Time = 200
anim = 18241
ID = 18234
pos = 10,-20
postype = p1  ;p2,front,back,left,right
sprpriority = -6
removetime = -2
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = Time = 200
anim = 18242
ID = 18234
pos = 30,-20
postype = p1  ;p2,front,back,left,right
sprpriority = -6
removetime = -2
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = Time = 200
anim = 18243
ID = 18234
pos = 20,-40
postype = p1  ;p2,front,back,left,right
sprpriority = -7
removetime = -2
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = Time = 200
anim = 18243
ID = 18234
pos = -30,-20
postype = p1  ;p2,front,back,left,right
sprpriority = -6
removetime = -2
ownpal = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Time >= 200
id = 18233

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Anim = 18240
trigger1 = !AnimTime

;Ganon Hog?
[Statedef 18254]
type = S
physics = S
movetype = I
anim = 18261
sprpriority = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;VaccineMan
[Statedef 18255]
type = S
physics = S
movetype = I
anim = 18262
sprpriority = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Fenny Baker
[Statedef 18256]
type = S
physics = S
movetype = I
anim = 18264
sprpriority = 0

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 50
x = -2
y = -5

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

;Demon Kid
[Statedef 18257]
type = S
physics = S
movetype = I
anim = 18268
sprpriority = -1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 61
trigger2 = AnimElem = 62
trigger3 = AnimElem = 63
anim = 18272
ID = 18272
pos = 0,0
postype = p1  ;p2,front,back,left,right
sprpriority = -1
ownpal = 1

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

;Smurf
[Statedef 18258]
type = S
physics = S
movetype = I
anim = 18269
sprpriority = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Devil Satan
[Statedef 18259]
type = S
physics = S
movetype = I
anim = 18275
sprpriority = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Devil Satan
[Statedef 18260]
type = S
physics = S
movetype = I
anim = 18276
sprpriority = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 200
time = 1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 0
color = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 230

;Sans
[Statedef 18299]
type = S
physics = S
movetype = I
anim = 18266
sprpriority = 0

[State 0, Explod]
type = Explod
trigger1 = Time = 182
trigger2 = Time = 324
trigger3 = Time = 404
trigger4 = Time = 424
anim = 18273
ID = 18273
pos = 0,0
postype = p1  ;p2,front,back,left,right
sprpriority = 9
ontop = 1
[State 0, Explod]
type = Explod
trigger1 = AnimElem = 24
anim = 18273
ID = 18273
pos = 0,0
postype = p1  ;p2,front,back,left,right
sprpriority = -9
ontop = 0

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

;===================================================
;Pulse Effect during fall recovery (taken from Possessed Heita by The_None)
[Statedef 52100]
type    = S
movetype = I
physics = S
sprpriority = 4
anim = 15999
ctrl = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AP,AT

[State 0, PosAdd]
type = PosAdd
trigger1 = 1
x = ifelse(root,stateno=5201,ceil(parentdist x/3.0),parentdist x)
y = parentdist y

[State 0, VarSet]
type = VarSet
trigger1 = !time
var(0) = parent,anim

[State 0, VarSet]
type = VarSet
trigger1 = !time
var(1) = parent,animelemno(0)

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time
value = var(0)
elem = var(1)

[State 0, VarSet]
type = VarAdd
trigger1 = time
fvar(0) = 11.2

[State 0, VarSet]
type = VarAdd
trigger1 = time
fvar(1) = 0.015

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1+fvar(1),1+fvar(1)

[State 0, Trans]
type = Trans
trigger1 = 1
trans = add

[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = floor(0-fvar(0)),floor(0-fvar(0)),floor(0-fvar(0))

[State 0, ]
type = DestroySelf
trigger1 = root,stateno != 5201
trigger1 = root,stateno != 5210

[State 0, ]
type = DestroySelf
trigger1 = parent,stateno != 35201
trigger1 = parent,stateno != 35210

;==========================================================
; SUPER BG - Street Fighter 3
[Statedef 19875]
type = S
velset = 0,0
sprpriority = 0
anim = 15999
ctrl = 0

[State 10500, snd]
type = playsnd
trigger1 = !time
value = 9,0

[State 10000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noFG
flag2 = nomusic

[State 10000, Explod]; White BG
type = Explod
trigger1 = time = 0
anim = 19877
id = 19875
pos =  160,120
postype = left
sprpriority = -7
facing = 1
bindtime = -1
ownpal = 1
removetime = 99999999999999
pausemovetime = 99999999999999
supermovetime = 99999999999999
supermove = 1
scale = 1.20,1.20
ignorehitpause = 1
persistent = 0

[State 10000, Explod SF3]
type = Explod
trigger1 = time = 0
anim = 19875
id = 10000
pos =  160,120
postype = left
sprpriority = -7
facing = 1
bindtime = -1
ownpal = 1
removetime = 9999999999999
pausemovetime = 99999999999999
supermovetime = 99999999999999
supermove = 1
scale = 1.20*0.9,1.20*1.05
ignorehitpause = 1
persistent = 0

[State 10000, pause]
type = Pause
trigger1 = Time = 0
time = 40
movetime = 40

[State 10000, RemoveExplod]
type = RemoveExplod
trigger1 = time = 44
id = 10000

[State 10000, RemoveExplod]
type = RemoveExplod
trigger1 = time = 55
id = 10500

[State 8020, End]
type = destroyself
trigger1 = !(roundstate>2)
trigger2 = time=1000

;==========================================================
; SUPER BG - Super DBZ (Physics)
[Statedef 19885]
type = S
velset = 0,0
sprpriority = 0
anim = 15999
ctrl = 0

[State 1000, shake]
type = EnvShake
trigger1 = !(time%4) && time<150
time=4
freq=80
ampl=7

[State 10500, snd]
type = playsnd
trigger1 = !time
value = 9,0

[State 10000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noFG
flag2 = nokoslow
ignorehitpause = 1

[State 10000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nomusic
flag2 = nobardisplay
ignorehitpause = 1

[State 10000, Explod]; White BG
type = Explod
trigger1 = time = 0
anim = 19884
id = 19884
pos =  160,120
postype = left
sprpriority = -4
facing = 1
bindtime = -1
ownpal = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999
scale = 1.20,1.20
ignorehitpause = 1
persistent = 0
removetime = -2

[State 10000, Explod Krak]
type = Explod
trigger1 = time = 0
anim = 19885
id = 19885
pos =  160,120
postype = left
sprpriority = -7
facing = 1
bindtime = -1
ownpal = 1
removetime = 9999999999999
pausemovetime = 99999999999999
supermovetime = 99999999999999
supermove = 1
scale = 1,1
ignorehitpause = 1
persistent = 0

[State 10000, Scale Explod]
type = ModifyExplod
trigger1 = time>6
scale = 1+.01*time, 1+.01*time
id = 19885

[State 10000, RemoveExplod Krak]
type = RemoveExplod
trigger1 = time = 44
id = 19885

[State 10000, Explod Space BG]
type = Explod
trigger1 = time = 23
anim = 19886
id = 19886
pos =  160,120
postype = left
sprpriority = -7
facing = 1
bindtime = -1
ownpal = 1
removetime = 9999999999999
pausemovetime = 99999999999999
supermovetime = 99999999999999
scale = 1.3,1.3
ignorehitpause = 1
persistent = 0

[State 10000, Explod planet left]
type = Explod
trigger1 = time = 23
anim = 19887
id = 19886
pos =  0,240
postype = left
sprpriority = -6
facing = 1
ownpal = 1
removetime = 9999999999999
pausemovetime = 99999999999999
supermovetime = 99999999999999
scale = 1.2,1.2
ignorehitpause = 1
persistent = 0
;vel = -.2,0
bindtime = -1

[State 10000, Explod planet right]
type = Explod
trigger1 = time = 23
anim = 19888
id = 19886
pos =  320,240
postype = left
sprpriority = -6
facing = 1
ownpal = 1
removetime = 9999999999999
pausemovetime = 99999999999999
supermovetime = 99999999999999
scale = 1.2,1.2
ignorehitpause = 1
persistent = 0
;vel = .2,0
bindtime = -1

[State 1000, Helper]
type = Helper
trigger1 = time>=23 && time<70 && !(time%5) && numhelper(19890)<80 && numhelper(19891)<80
helpertype = Normal
name = "rocks"
id = 19890
pos = 160,20
postype = left
facing = 1
stateno = 19890
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999

[State 13300, black screen fade]
type = Explod
trigger1 = Time = 60
anim = 19883   ;2771
ID = 2771
postype = left
pos = 0,-50
bindtime = -1
removetime = 91
pausemovetime = 91
ontop = 1
scale = 2,3

[State 10000, RemoveExplod Krak]
type = RemoveExplod
trigger1 = time = 150
id = 19886

[State 8020, End]
type = destroyself
trigger1 = !(roundstate>2)
trigger2 = time=150  ;1000

;------------------------------------------------------
;Rocks going up
[Statedef 19890]
type = A
movetype = I
physics = N
anim = 15999

[State 1003, Helper]
type = Helper
trigger1 = !time
helpertype = Normal
name = "rocks"
id = 19891
pos = ((random%320)),10*(random%13)
postype = left
facing = 1
stateno = 19891
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1
size.xscale = .5
size.yscale = .5

[State 1003, Helper]
type = Helper
trigger1 = !time
helpertype = Normal
name = "rocks"
id = 19891
pos = ((random%320)+320),10*(random%13)
postype = left
facing = 1
stateno = 19891
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1
size.xscale = .5
size.yscale = .5

[State 1003, Helper]
type = Helper
trigger1 = !time
helpertype = Normal
name = "rocks"
id = 19891
pos = ((random%320)-320),10*(random%13)
postype = left
facing = 1
stateno = 19891
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1
size.xscale = .5
size.yscale = .5

[State 1003, DestroySelf]
type = DestroySelf
trigger1 = time=2

;-----------------
[Statedef 19891]
type = A
movetype = I
physics = N
anim = 19890 + random%6
sprpriority = -5

[State 1004, assert]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 1004, vel]
type = velset
trigger1 = !time
y = -3-random%7

[State 1004, vel]
type = varset
trigger1 = !time
var(10) = random%2

[State 1004, assert]
type = angledraw
trigger1 = 1
value = ifelse(var(10)=0,5*time,-5*time)

[State 1004, DestroySelf]
type = DestroySelf
trigger1 = time > 300
trigger2 = pos Y < -340
trigger3 = root,stateno = 180

;==========================================================
; SUPER BG - Super DBZ (Ki attacks)
[Statedef 19892]
type = S
velset = 0,0
sprpriority = 0
anim = 15999
ctrl = 0

[State 3001, screen]
type = PosSet
trigger1 = !time
x = 0
y = -ceil(screenpos Y)
ignorehitpause = 1

[State 3001, screen]
type = PosSet
trigger1 = 1
x = 0
ignorehitpause = 1

[State 1000, shake]
type = EnvShake
trigger1 = !(time%4) && time<150
time=4
freq=80
ampl=7

[State 10500, snd]
type = playsnd
trigger1 = !time
value = 9,0

[State 10000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noFG
flag2 = nokoslow
ignorehitpause = 1

[State 10000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nomusic
flag2 = nobardisplay
ignorehitpause = 1

[State 10000, Explod]; White BG
type = Explod
trigger1 = !time
anim = 957
id = 11111
pos =  0,-30
postype = left
sprpriority = -7
facing = 1
bindtime = -1
ownpal = 1
removetime = -1
supermovetime = -1
pausemovetime = -1
ignorehitpause = 1
scale = 2,2

[State 10000, Explod Zwang]
type = Explod
trigger1 = time = 0
anim = 19896
id = 19896
pos =  160,120
postype = left
sprpriority = -5
facing = 1
bindtime = -1
ownpal = 1
removetime = 9999999999999
pausemovetime = 99999999999999
supermovetime = 99999999999999
ignorehitpause = 1
scale = .9,1.2

[State 10000, Scale Explod]
type = ModifyExplod
trigger1 = time>50
scale = .9+.005*(time-50), 1.2+.005*(time-50)
id = 19896

[State 1003, Helper]
type = Helper
trigger1 = !time
helpertype = Normal
name = "yellow_BG"
id = 19897
pos = 0,0
postype = left
facing = 1
stateno = 19897
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1
persistent = 0

[State 13300, white screen fade]
type = Explod
trigger1 = Time = 60
anim = 19883
ID = 2771
postype = left
pos = 0,-50
bindtime = -1
removetime = 91
pausemovetime = 91
ontop = 1
scale = 2,3
ignorehitpause = 1

[State 10000, RemoveExplod zwang]
type = RemoveExplod
trigger1 = time = 140
id = 19896
[State 10000, RemoveExplod yellow BG]
type = RemoveExplod
trigger1 = time = 140
id = 19897
[State 10000, RemoveExplod white BG]
type = RemoveExplod
trigger1 = time = 140
id = 11111

[State 10000, pause]
type = Pause
trigger1 = !time
time = 20
movetime = 20
ignorehitpause = 1

[State 8020, End]
type = destroyself
trigger1 = !(roundstate>2)
trigger2 = time=150

;--------------------------------------
;Yellow Super BG Helper
[Statedef 19897]
type = S
movetype = I
physics = N
anim = 19897
sprpriority = -6

[State 1004, assert]
type = bindtoparent
trigger1 = 1
pos = 0,120
ignorehitpause = 1

[State 1004, assert]
type = assertspecial
trigger1 = 1
flag = noshadow
flag2 = noFG
ignorehitpause = 1

[State 1004, assert]
type = angledraw
trigger1 = time < 50
value = 10*time
scale = .7,.7
ignorehitpause = 1

[State 1004, assert]
type = angledraw
trigger1 = time >= 50
value = 10*time
scale = .7+.01*(time-50),.7+.01*(time-50)
ignorehitpause = 1

[State 1004, DestroySelf]
type = DestroySelf
trigger1 = time > 130

;==========================================================
; SUPER BG - Jojo's Bizarre Adventure
[Statedef 19900]
type    = A
movetype= I
physics = N
ctrl = 0
anim = 15999
sprpriority = -21

[State 1211, Exclamation]
type = Explod
trigger1 = Time = 0
anim = 19910
id = 8001
pos = 0,-10
postype = back
sprpriority = -21
bindtime = -1
scale = 0.83333333333333333333333333333333,1.0810810810810810810810810810811
removetime = -1
supermovetime = -1
pausemovetime = -1
ignorehitpause = 1

[State 1211, Exclamation]
type = Explod
trigger1 = Time = 0
anim = 19911
id = 8001
pos = 0,-10
postype = back
sprpriority = -21
bindtime = -1
scale = 0.83333333333333333333333333333333,1.0810810810810810810810810810811
removetime = -1
supermovetime = -1
pausemovetime = -1
ignorehitpause = 1

[State 1211, Exclamation]
type = Explod
trigger1 = Time = 0
anim = 19912
id = 8001
pos = 0,-10
postype = back
sprpriority = -21
bindtime = -1
scale = 0.83333333333333333333333333333333,1.0810810810810810810810810810811
removetime = -1
supermovetime = -1
pausemovetime = -1
ignorehitpause = 1

[State 1211, Exclamation]
type = Explod
trigger1 = Time = 0
anim = 19913
id = 8001
pos = 0,-10
postype = back
sprpriority = -21
bindtime = -1
scale = 0.83333333333333333333333333333333,1.0810810810810810810810810810811
removetime = -1
supermovetime = -1
pausemovetime = -1
ignorehitpause = 1

[State 1211, Exclamation]
type = Explod
trigger1 = Time = 0
anim = 19900
id = 19900
pos = 0,0
postype = back
sprpriority = 5
bindtime = -1
scale = .84, 1.07
supermovetime = -1
pausemovetime = -1
ignorehitpause = 1
persistent = 0
ontop = 1

[State 10500, snd]
type = playsnd
trigger1 = !time
value = 9,0

[state haha]
type = varset
trigger1 = time = 0
var(3) = 0

[state haha]
type = varadd
trigger1 = time >= 5
trigger1 = var(3) < 220
var(3) = 5

[State that starts the inverted effect]
type           = PalFX
trigger1       = time >= 5
add            = var(3),var(3),var(3)
time           = 1
ignorehitpause = 1

[State 2030, 0]
type = AssertSpecial
Trigger1 = Time < ifelse(matchover, 120, 50)
flag = nofg
flag2 = nobardisplay
ignorehitpause = 1

[State haha]
type = RemoveExplod
trigger1 = Time = ifelse(matchover, 120, 50)
id = 8001

[State ChangeState!]
type = DestroySelf
trigger1 = RoundState = 0



;====================================
; Broken Back - BG Arms + legs
[Statedef 245947]
type = S
movetype = H
physics = N
velset = 0,0
anim = 5947

[State 2260, bind]
type = bindtoroot
trigger1 = 1
pos = 0,0

[State 2260, muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 2260, destroy]
type = DestroySelf
trigger1 = time = 126

;====================================
; RE Broken Back - BG Arms + legs
[Statedef 355947]
type = S
movetype = H
physics = N
velset = 0,0
anim = 5947

[State 2260, bind]
type = bindtoroot
trigger1 = 1
pos = 0,0

[State 2260, muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 2260, destroy]
type = DestroySelf
trigger1 = time = 19

;====================================
; Clone1
[Statedef 3501]
type = S
movetype = A
physics = S
anim = 3501
sprpriority = 0
ctrl = 0



[State 0, Helper]
type = Helper
trigger1 = !Time
name = "Clone FX"
ID = 3503
stateno = 3503
keyctrl = 0

[State 0, LifeSet]
type = LifeSet
trigger1 = !Time
value = 200

[State 0, VarSet]
type = VarSet
trigger1 = !Time
trigger1 = !Var(1)
var(1) = root, Var(41) + 1

[State 0, ChangeState]
type = ChangeState
trigger1 = !AnimTime  && Var(1) = 3
trigger2 = !AnimTime  && Var(1) = 4
value = 35000
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = !AnimTime  && Var(1) = 2
value = 35100
ctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = root, Var(55) = 0
trigger1 = AnimElem = 4
value = 3500, Random%3 + 1
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = root, Var(55) = 1
trigger1 = AnimElem = 4
value = 3500, Random%3 + 10
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = root, Var(55) = 2
trigger1 = AnimElem = 4
value = 3500, Random%3 + 20
channel = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = !AnimTime  && Var(1) = 1
value = 35105
ctrl = 0

;====================================
; Clone2
[Statedef 3502]
type = S
movetype = A
physics = S
anim = 3501
sprpriority = 0

[State 0, Helper]
type = Helper
trigger1 = !Time
name = "Clone FX"
ID = 3504
stateno = 3504

[State 0, LifeSet]
type = LifeSet
trigger1 = !Time
value = 200

[State 0, VarSet]
type = VarSet
trigger1 = !Time
trigger1 = !Var(1)
var(1) = root, Var(41) + 1

[State 0, ChangeState]
type = ChangeState
trigger1 = !AnimTime  && Var(1) = 3
trigger2 = !AnimTime  && Var(1) = 4
value = 35000
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = !AnimTime  && Var(1) = 2
value = 35100
ctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = root, Var(55) = 0
trigger1 = AnimElem = 4
value = 3500, Random%3 + 1
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = root, Var(55) = 1
trigger1 = AnimElem = 4
value = 3500, Random%3 + 10
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = root, Var(55) = 2
trigger1 = AnimElem = 4
value = 3500, Random%3 + 20
channel = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = !AnimTime  && Var(1) = 1
value = 35105
ctrl = 0

;====================================
; Blood Drops
[Statedef 3506]
type = S
movetype = I
physics = N
anim = 3506
sprpriority = 1
velset = 1, 4

[State 0, VelSet]
type = VelSet
trigger1 = (Vel y > 0) && (Pos y >= 56)
x = 0
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = (Vel y > 0) && (Pos y >= 56)
y = 57


[State 0, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 56
value = 3507




;====================================
; Blood Pools
[Statedef 3507]
type = S
movetype = I
physics = N
anim = 3507
sprpriority = -2

[State 0, PosSet]
type = PosSet
trigger1 = !Time
y = 0

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

;==========================================
; Clones Common
;==========================================

;===========================================================================
; Stand
;===========================================================================
[Statedef 35000]
type = S
physics = S
sprpriority = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !Time
id = 3203
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !Time
id = 3207
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !Time
id = 3206
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !Time
id = 3204

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, VarSet]
type = VarSet
trigger1 = enemy, MoveType != H
var(18) = 0

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < Const(movement.stand.friction.threshold)
trigger2 = Time = 4
x = 0

[State 0, Turn]
type = Turn
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = Anim = 0
trigger1 = P2Dist X < -2

[State 0, ChangeState]
type = ChangeState
triggerall = Var(1) = 1
trigger1 = RootDist X > 30 && IsHelper(3501)
trigger2 = RootDist X < -30 && IsHelper(3501)
trigger3 = RootDist X > 10 && IsHelper(3502)
trigger4 = RootDist X < -10 && IsHelper(3502)
value = 35020
ctrl = 0

[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = Var(1) = 2
trigger1 = Anim = 0
trigger1 = P2BodyDist X > 60
trigger1 = random >= 960
value = 35100
ctrl = 0

[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = Var(1) = 2
triggerall = Anim = 0
trigger1 = random >= 180 && random < 182
trigger1 = P2BodyDist X >= 0 && P2BodyDist X <= 20
trigger1 = P2StateType != A
trigger1 = Time > 1 + Random%20
value = 200
ctrl = 0

[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = Var(1) = 2
triggerall = Anim = 0
trigger1 = random >= 200 && random < 202
trigger1 = P2BodyDist X >= 5 && P2BodyDist X <= 50
trigger1 = P2StateType != A
trigger1 = Time > 10
value = 210
ctrl = 0

[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = Var(1) = 2
triggerall = Anim = 0
trigger1 = random >= 230 && random < 232
trigger1 = P2BodyDist X >= 40 && P2BodyDist X <= 60
trigger1 = Time > 10
value = 220
ctrl = 0

[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = Var(1) = 2
triggerall = Anim = 0
trigger1 = random >= 260 && random < 262
trigger1 = P2BodyDist X >= 0 && P2BodyDist X <= 10
trigger1 = P2StateType != A
trigger1 = Time > 1 + Random%10
value = 230
ctrl = 0

[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = Var(1) = 2
triggerall = Anim = 0
trigger1 = random >= 290 && random < 292
trigger1 = P2BodyDist X >= 10 && P2BodyDist X <= 40
trigger1 = P2StateType != A
trigger1 = Time > 1 + Random%20
value = 240
ctrl = 0

; Taunt
[State -1, Taunt]
type = null;ChangeState
triggerall = IsHelper(3501) && root,NumHelper(3502)
triggerall = Var(1) = 2
triggerall = helper(3502), Var(1) = 2
triggerall = stateno!=195
triggerall = statetype != A
triggerall = MoveType != A
triggerall = MoveType != H
trigger1 = random = 65 || random = 75 
trigger2 = random = 61 || random = 71
trigger3 = random = 62 
value = 195

; Taunt
[State -1, Taunt]
type = null;ChangeState
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = Var(1) = 2
triggerall = stateno!=195
triggerall = statetype != A
triggerall = MoveType != A
triggerall = MoveType != H
triggerall = facing = enemy,facing
trigger1 = random = 60 || random = 70 
value = 195

[State 0, 4] 
type = ChangeState
triggerall = root, StateNo != [1600,1680]
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall =  Anim = 0
trigger1 = Var(1) = 3
trigger1 =  PrevStateNo = 3501 || PrevStateNo = 3502
trigger2 = Var(1) = 3
trigger2 = random > 960
value = 35040
ctrl = 0

[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = Var(1) = 3
triggerall = Anim = 0
trigger1 = random < 30
trigger1 = P2BodyDist X <= 40
trigger1 = Time > 10
trigger1 = P2StateType != A
value = 420
ctrl = 0

[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = Var(1) = 3
triggerall = Anim = 0
trigger1 = random < 30
trigger1 = P2BodyDist X <= 30
trigger1 = P2BodyDist Y >= -30 && P2BodyDist Y <= -10 
value = 450
ctrl = 0

[State 0, 4] ;Guard
type = ChangeState
triggerall = Var(1) = 1 || Var(1) = 4
trigger1 = InGuardDist
trigger1 = enemy, StateType != C
trigger1 = random >= 30 && random < 60
value = 120
ctrl = 0

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050
ctrl = 0

;---------------------------------------------------------------------------
; Crouching
[Statedef 35011]
type    = C
physics = C
anim = 11
sprpriority = 0



[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
trigger1 = Anim = 11
value = 12
ctrl = 0

[State 11, 1] ;Change from turning animation
type = ChangeAnim
trigger1 = Anim = 6 && AnimTime = 0
value = 11

[State 11, 2] ;Stop moving if low velocity
type = VelSet
trigger1 = abs(vel x) < Const(movement.crouch.friction.threshold)
x = 0

;---------------------------------------------------------------------------
; Crouch to Stand
[Statedef 35012]
type    = S
physics = S
anim = 12

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

;===========================================================================
; WALK - Sounds added
;===========================================================================
[Statedef 35020]
type    = S
physics = S
sprpriority = 0

[State 20, 1]
type =  VelSet
triggerall = Var(1) = 1
trigger1 = RootDist x > 30 && IsHelper(3501)
trigger2 = RootDist X > 10 && IsHelper(3502)
x = const(velocity.walk.fwd.x)

[State 20, 2]
type =  VelSet
triggerall = Var(1) = 1
trigger1 = RootDist X < -30 && IsHelper(3501)
trigger2 = RootDist X < -10 && IsHelper(3502)
x = const(velocity.walk.back.x)

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21

[State 100, steps]
type = playsnd
triggerall = anim = 20
trigger1 = animelemtime(6)=0 || !animtime
trigger2 = animelemtime(11)=0 
value = 40,0
volumescale = 200

[State 100, steps]
type = playsnd
triggerall = anim = 21
trigger1 = animelemtime(5)=0 
trigger2 = animelemtime(10)=0 
value = 40,0
volumescale = 200

[State 0, 4] ;Guard
type = ChangeState
triggerall = Var(1) = 1 || Var(1) = 4
triggerall = enemy, StateType != C
triggerall = InGuardDist
trigger1 = random >= 30 && random < 80
trigger2 = Anim = 21
value = 120
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = RootDist X >= -30 && RootDist X <= 30 && IsHelper(3501)
trigger2 = RootDist X >= -10 && RootDist X <= 10 && IsHelper(3502)
value = 35000
ctrl = 0

;===========================================================================
;JUMP START OVERRIDE
;===========================================================================
[Statedef 35040]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1
facep2 = 1

[State 100, jump SND]
type = playsnd
trigger1 = !time
value = 40,1

[State 40, 1]
type = VarSet
trigger1 = IsHelper(3501) || IsHelper(3502)
trigger1 = P2BodyDist X <= 50 
trigger1 = Var(1) = 3
sysvar(1) = 0

[State 40, 2]
type = VarSet
triggerall = IsHelper(3501) || IsHelper(3502)
trigger1 = P2BodyDist X > 50
trigger1 = Var(1) = 3
trigger2 = Var(1) = 1
trigger3 = Var(1) = 2
sysvar(1) = 1


[State 40, 4]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)


[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 35050
ctrl = 0

;===========================================================================
;JUMP UP OVERRIDE (taking into account super jump commands)
;===========================================================================

; Jump Up
[Statedef 35050]
type    = A
physics = A

[State 50, 1]
type = VarSet
trigger1 = Time = 0
trigger1 = Var(1) = 3
sysvar(1) = 0


[State 50, 2]
type = ChangeAnim
trigger1 = time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

;===========================================================================
;JUMP LAND NO FRICTION
;===========================================================================
[Statedef 35052]
type    = S
physics = S
ctrl = 0
anim = 47
velset = 0,0



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

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

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

;===========================================================================
; RUN
;===========================================================================
[Statedef 35100]
type    = S
physics = S
anim = 100
sprpriority = 1
ctrl = 0

[State 0, PlayerPush]
type = PlayerPush
triggerall = IsHelper(3501) || IsHelper(3502)
trigger1 = Var(1) = 1
trigger1 = P2StateType = L
trigger1 = P2MoveType = H
trigger2 = root, StateNo = 3510
value = 0

[state 1215, Smoke FX]
type = explod
trigger1 = !time
anim = 10100+(var(2)=0)
id = 10100
pos = -10,0
postype = P1
sprpriority = 3
ownpal = 1
removetime = -2
persistent = 0
ignorehitpause = 1
scale = .8,.8

[State 100, steps]
type = playsnd
trigger1 = animelem=2
value = 100,0

[State 100, steps]
type = playsnd
trigger1 = animelem=5
value = 100,1

[State 100, 1]
type = VelSet
trigger1 = time > 2
x = const(velocity.run.fwd.x)

[State 100, 2] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, 4]
type = ChangeState
trigger1 = time > 16
trigger1 = root, StateNo != 3510
trigger1 = Var(1) = 2
trigger1 = P2BodyDist X <= 40
trigger2 = time > 12
trigger2 = root, StateNo != 3510
trigger2 = Var(1) = 1
trigger2 = RootDist X < 30
trigger3 = root, PrevStateNo = 3510
trigger4 = root, MoveType = H
trigger5 = root, StateNo = 3510
trigger5 = RootDist X < 20 && RootDist X > -20
value = Cond(root, StateNo = 3510 ,3514,35101)

;RUN STOP
[Statedef 35101]
type    = S
physics = S
anim = 101
sprpriority = 1
ctrl = 0

[State 100, snd]
type = playsnd
trigger1 = time=0
value = 5,8
persistent = 0

[State 101, 1]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

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

[State 100, 1]
type = VelMul
trigger1 = 1
x = .9

[State 100, 1]
type = VelSet
trigger1 = animtime = 0
x = 0

[State 100, 4]
type = ChangeState
trigger1 = animtime = 0
value = 35000
ctrl = 0

;===========================================================================
;Backdash
;===========================================================================
[Statedef 35105]
type    = S
physics = N
ctrl = 0
anim = 105
sprpriority = 1

;Let's set him to be airborne
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 4
statetype = A

[State 105, Helper]
type = Helper
trigger1 = animelem = 4
name = "Vanish"
ID = 105
stateno = 107 
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0

[State 100, snd]
type = playsnd
trigger1 = animelem = 4
value = 5,8
persistent = 0

[State 1402, VelSet]
type = VelSet
trigger1 = animelemtime(4) >= 0
x = (const(velocity.run.back.x)*exp((-0.133)*(time-8)))

[State 105, NotHitBy]
type = NotHitBy
trigger1 = animelemtime(2) >= 0 
value = SCA
time = 1

[State 105, 3]; to landing
type = ChangeState
trigger1 = !animtime
value = stateno+1

;---------------------------
;Land
[Statedef 35106]
type = S
movetype = I
physics = S
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 1

[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 106

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 40,0
channel = -1

[State 1402, VelSet]
type = VelSet
trigger1 = animelemtime(2) < 0
x = (const(velocity.run.back.x)*exp((-0.133)*(time+10)))
[State 1402, VelSet]
type = VelSet
trigger1 = animelem = 2
x = 0

[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0

;-------------------
;These are landing effects
[state 17100, Landing Effect]
type = explod
trigger1 = animelem = 2
anim = 17100
id = 17100
pos = 0,0
postype = P1
sprpriority = -3
ownpal = 1
supermovetime = -1

[State 17100, Landing Sound]
type = PlaySnd
trigger1 = animelem = 2
value = 40, 0
persistent = 0
;-------------------

[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 35000
ctrl = 0

; HIT_FALLRECOVER (on the ground)
[Statedef 35201]
type    = A
movetype= H
physics = N
anim = 5200
velset = 0,0
facep2 = 1

[State 100, run stop SFX]
type = playsnd
trigger1 = time=0
value = 5,9
persistent = 0

[State 5201, 1] ;Turn if not facing opponent
type = Turn
trigger1 = Time = 0
trigger1 = p2dist X < -5

[State 5201, 3]
type = VelSet
trigger1 = Time = 0
x = 0

[State 5201, 3]
type = PosSet
trigger1 = Time = 0
trigger2 = Pos Y > -5
y = 0

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

[State 5201, 5] ;Blink white
type = PalFX
trigger1 = Time = 0
time = 3
add = 128,128,128

[State 5100, 12]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 35000


;air recovery
[Statedef 35210]
type    = A
movetype= I
physics = N
anim = 5210
ctrl = 0

[State 0, ]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "recoverpulser"
ID = 52100
stateno = 52100
ownpal = 1
supermovetime = 99999
pausemovetime = 99999

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 5052,0

[State 0, PlaySnd]
type = PlaySnd
triggerall = var(55)=0		;Voice=English
trigger1 = time = 0
value = 3,3+2*(var(1)=2)
channel = 0

[State 0, PlaySnd]
type = PlaySnd
triggerall = var(55)=1		;Voice=Japan
trigger1 = time = 0
value = 4,2
channel = 0

[State 0, PlaySnd]
type = PlaySnd
triggerall = var(55)=2		;Voice=Eng Sabbat
trigger1 = time = 0
value = 3,53
channel = 0

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

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

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

[State 5210, 1] 
type = VelMul
trigger1 = Time = 4
x = .8
y = .8

[State 5210, 1]
type = VelAdd
trigger1 = Time = 4
y = -4.5

[State 5210, 1] 
type = VelMul
trigger1 = Time = 4
trigger1 = Vel Y > 0
y = .5

[State 5210, 1]
type = VelAdd
trigger1 = Time = 4
trigger1 = Vel Y > -3
y = -2

[State 5210, 1]
type = VelAdd
trigger1 = Time = 4
trigger1 = Vel Y > -2
y = -1

[State 5210, 2] 
type = VelAdd
trigger1 = Time = 4
y = 2-random%2

[State 5210, 2] 
type = VelMul
trigger1 = Time = 4
x = 1-random%2

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

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

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


;----------------------------------------
;Clone connects
[Statedef 3514]
type = S
physics = S
movetype = I
anim = 3514
ctrl = 0
velset = 4,0
sprpriority = 1
poweradd = 0

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 3

[State 0, Pause]
type = Pause
trigger1 = RootDist X <= 10
time = 6
pausebg = 0

[State 0, Explod]
type = Explod
trigger1 = RootDist X <= 10
anim = 3512
ID = 3512
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 40
supermovetime = 40
scale = 1,1
sprpriority = 10
ontop = 1
ownpal = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = Time >= 2
trigger1 = RootDist X <= 1
value = 1606

;----------------------------------------
;Clone Destroyed
[Statedef 3516]
type = S
physics = S
movetype = I
anim = 1606
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = 0


[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >= 10

;----------------------------------------
;Clone TeleportDestroyed
[Statedef 3517]
type = S
physics = S
movetype = I
anim = 3517
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = 0


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

;----------------------------------------
;Clone SuperDestroyed
[Statedef 3520]
type = S
physics = S
movetype = I
anim = 3520
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 3520,0

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

;----------------------------------------
;Cinematic Super! Leave!
[Statedef 3521]
type = S
physics = S
movetype = I
anim = 3517
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 2302,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = IsHelper(3501)
trigger1 = !Time
value = 3521,0

[State 0, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 3522
ctrl = 0

;----------------------------------------
;Cinematic Super! Not here
[Statedef 3522]
type = S
physics = S
movetype = I
anim = 15999
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = 0



[State 0, ChangeState]
type = ChangeState
trigger1 = !root, NumExplod(991901)
trigger1 = root, MoveType != H
trigger1 = enemy, AnimExist(5939)
trigger1 = !enemy, NumExplod(991901)
trigger2 = root, MoveType != H
trigger2 = !enemy, AnimExist(5939)
trigger2 = root,var(48) <= root,var(49) +29
trigger2 = root, Var(43)=[1,6] 
trigger3 = Lose
;trigger4 = root, StateNo = 3417 || root, StateNo = 3413 || root, StateNo = 0
value = 3523
ctrl = 0

;----------------------------------------
;Cinematic Super! Come Back!
[Statedef 3523]
type = S
physics = S
movetype = I
anim = 3518
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = 0

[State 0, PosSet]
type = PosSet
trigger1 = !Time
trigger1 = IsHelper(3501)
x = Cond(root, Facing = 1,root,Pos X - 30,root,Pos X +30)
y = 0
[State 0, PosSet]
type = PosSet
trigger1 = !Time
trigger1 = IsHelper(3502)
x = Cond(root, Facing = 1,root,Pos X - 60,root,Pos X +60)
y = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 2302,0

[State 0, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 35000
ctrl = 0

; Lose 
[Statedef 3590]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 170,0
volumescale = 200
channel = -1

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

; Lose 2
[Statedef 3591]
type = S
ctrl = 0
anim = 20

[State 0, Turn]
type = Turn
trigger1 = P2Dist X>0

[State 0, VelSet]
type = VelSet
trigger1 = Time = 2
x = const(velocity.walk.fwd.x)
y = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 250,0
volumescale = 200
channel = -1

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

;----------------------------------------
;Lose 3 Clone SuperDestroyed
[Statedef 3592]
type = S
physics = S
movetype = I
anim = 3520
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 3520,0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 3520
trigger1 = !AnimTime
value = 1606

;----------------------------------------
;Lose 4 FacePalm
[Statedef 3593]
type = S
physics = S
movetype = I
ctrl = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 171

;---------------------------------------------------------------------------
; Win 1
[Statedef 3550]
type = S
ctrl = 0
anim = 3550
velset = 0,0
sprpriority = 1

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

;---------------------------------------------------------------------------
; Win 2
[Statedef 3551]
type = S
ctrl = 0
anim = 181
velset = 0,0
sprpriority = 1

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

[State 181, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = 181,0


;---------------------------------------------------------------------------
; Win 3
[Statedef 3552]
type = S
ctrl = 0
anim = 183
velset = 0,0
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 182,0

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

[State 0, Explod]
type = Explod
trigger1 = Time = 50
anim = 18301
ID = 18301
sprpriority = 5
ownpal = 1
removetime = -1
bindtime = -1

;---------------------------------------------------------------------------
; Win 4 Meditate
[Statedef 3553]
type = S
ctrl = 0
anim = 184
velset = 0,0
sprpriority = 1

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

[State 0, PalFXWiz]
type = PalFX
trigger1 = Anim = 184
trigger1 = AnimElemTime(4)=27
trigger2 = Anim = 18403
trigger2 = AnimElemTime(2)=3
trigger3 = Anim = 18404
trigger3 = AnimElemTime(2)=3
time = 2
add = 180,180,180
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256
[State 0, PalFXWiz]
type = PalFX
trigger1 = Anim = 184
trigger1 = AnimElemTime(4)=29
trigger2 = Anim = 18403
trigger2 = AnimElemTime(2)=1
trigger3 = Anim = 18404
trigger3 = AnimElemTime(2)=1
time = 2
add = 230,230,230
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, PosSet]
type = PosSet
triggerall = IsHelper(3501)
trigger1 = Anim = 18403
trigger2 = Anim = 18404
x = 0+50

[State 0, PosSet]
type = PosSet
triggerall = IsHelper(3502)
trigger1 = Anim = 18403
trigger2 = Anim = 18404
x = 0-50

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 18403
trigger1 = AnimElemTime(1)=1
x = 0
y = 10

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 184
trigger1 = AnimElemTime(4)=27
value = 183,0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 18404
trigger1 = AnimElem = 2
value = 183,1
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 18403
trigger1 = AnimElem = 5
value = 183,2
channel = -1

[State 0, Explod]
type = Explod
trigger1 = Anim = 184
trigger1 = AnimElemTime(4)=27
anim = 18401
ID = 18401
sprpriority = 5
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = Anim = 18403
trigger1 = AnimElemTime(1)=5
trigger2 = Anim = 18404
trigger2 = AnimElemTime(1)=5
anim = 18402
ID = 18402
sprpriority = 5
ownpal = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 184
trigger1 = !AnimTime
value = 18403+random%2

;---------------------------------------------------------------------------
; Win 5 JoJo
[Statedef 3554]
type = S
ctrl = 0
anim = 185
velset = 0,0
sprpriority = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 185+random%2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 184,0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 186
trigger1 = Time = 14
value = 184,1
channel = -1

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


;---------------------------------------------------------------------------
; Win 6 Nail
[Statedef 3555]
type = S
ctrl = 0
anim = 18600
velset = 0,0
sprpriority = 1

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

;---------------------------------------------------------------------------
; Win 7 Cool Cape
[Statedef 3556]
type = S
ctrl = 0
anim = 196
velset = 0,0
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 11
value = 189,0
channel = 1
loop = 0

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