;------------------------------------------------------------------------
;Seru Bullet Aura
[Statedef 1005]
physics = N
anim = 1012
sprpriority = 3
ctrl = 0

[State 1005, Bind]
type = bindtoroot
trigger1 = 1
pos = 100, -65

[State 1005, Turn]
type = turn
trigger1 = facing != (root, facing)

[State 1005, Assert]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 1005, End]
type = destroyself
trigger1 = (root, stateno != [1010,1012]) || (root, anim != 1010)
trigger2 = (root, stateno = 1010) && root, animelemtime(6) < 0

;-------------------------------------------------------------------------
;ki blast
[StateDef 1310]
type = A
movetype= A
physics = N
juggle  = 1
velset = 7+(random%2),4-(random%8)
ctrl = 0
anim = 8330
poweradd = 0;0
sprpriority = 5

[State 0, VelMul]
type = VelMul
trigger1 = 1
x = 1
y = .7
;ignorehitpause =
;persistent =


[State 0, ]
type = Explod
trigger1 = (time%6)=0
anim = 8100
ID = 8100
pos = 0,0-ceil(pos Y)
facing = 1
scale = .7,.3
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 1


[State 0, Explod]
type = Explod
trigger1 = !time
anim = 8310
ID = 8310
pos = -17,-3
postype = p1  ;p2,front,back,left,right
removetime = -2
bindtime = 1
scale = .4,.4
sprpriority = 6
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 0, PalFXWiz]
type =  PalFX
trigger1 = Parent, Var(27) = 1
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Parent, Var(6) = 0
trigger1 = time = [0,1]
flag = invisible
ignorehitpause = 1

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NP,SP,HP
slot = 0
stateno = 1311
time = 1

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

[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0

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

[State 0, HitDef]
type = HitDef
trigger1 = !time
attr = A,NP        ;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 = Hard
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil((25-(parent, var(13)*2))*parent, fvar(13)),ceil(5*parent, fvar(13))
pausetime = 0,15
;guard.pause,0
sparkno = -1
guard.sparkno = -1
sparkxy = -20,0
hitsound = S1000,3
guardsound = S300,2
ground.type = High      ;Low,Trip,None
ground.slidetime = 20
ground.hittime = 20
air.hittime = 20
ground.velocity = -7,0
air.velocity = -4,-3
sprpriority = 3
palfx.time = 15
palfx.add = -100,-100,-100
palfx.mul = 350,350,256
palfx.sinadd = 100,100,0,15
envshake.time = 15
envshake.freq = 120
envshake.ampl = 6
getpower = 0;0

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

[State 0, ChangeState]
type = ChangeState
trigger1 = Movecontact
value = 1311
ctrl = 0
ignorehitpause = 1
;persistent =

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 30
value = 1312
ctrl = 0
ignorehitpause = 1
;persistent =

;--------------------------------------------------------------------------
;Ki blast destroy
[StateDef 1311]
type = S
movetype= A
physics = N
velset = 0,0
Anim = 1
ctrl = 0
sprpriority = 5


[State 9050]
type 			= trans
trigger1 		= time = 0
trans 		= add

[State 9051:	End]
type			= Destroyself
trigger1		=  numtarget = 0
;--------------------------------------------------------------------------
;Kiblast fade away
[StateDef 1312]
type = S
movetype= A
physics = N
ctrl = 0
sprpriority = 5

[State 0, ]
type = Explod
triggerall = time<10
trigger1 = (time%6)=0
anim = 8100
ID = 8100
pos = 0,0-ceil(pos Y)
facing = 1
scale = .7-(time*.1),.3-(time*.05)
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 1

[State 0, PalFXWiz]
type =  PalFX
trigger1 = Parent, Var(27) = 1
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Parent, Var(6) = 0
trigger1 = time = [0,1]
flag = invisible
ignorehitpause = 1

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

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

[State 0, VelMul]
type = VelMul
trigger1 = 1
x = .9
y = .9

[State 0, Trans]
type = Trans
trigger1 = 1
trans = Add

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1-(time*.05),1-(time*.05)

[State 0, PalFX]
type = PalFX
trigger1 = !time
time = 20
sinadd = -255,-255,-255,80
invertall = 0
color = 256

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 20
;--------------------------------------------------------------------------
;ki blast - AIR
[StateDef 1315]
type = A
movetype= A
physics = N
juggle  = 0
velset = 7,7
ctrl = 0
anim = 8334
poweradd = 0;0
sprpriority = 5

[State 0, VelMul]
type = null;VelMul
trigger1 = 1
x = 1
y = .7
;ignorehitpause =
;persistent =






[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Parent, Var(6) = 0
trigger1 = time = [0,1]
flag = invisible
ignorehitpause = 1

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NP,SP,HP
slot = 0
stateno = 1311
time = 1

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

[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0

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

[State 0: Helper]
type                    = Helper
triggerall              = !NumHelper(8101)
trigger1                =  MoveHit ||  Movecontact
trigger2                = Pos Y >=0
id                      = 8102
pos                     = 20,0
postype                 = p1
stateno                 = 8101
ownpal                  = 1
size.xscale             = ifelse (pos y>=0,.8,.5)
size.yscale             = ifelse (pos y>=0,.8,.5)
ignorehitpause          = 1
persistent              = 0

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

[State 0, HitDef]
type = HitDef
trigger1 = !time
attr = A,NP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAFD        ;HLAFD+-
guardflag = MA         ;HLA
animtype = Hard         ;light,medium,hard,back,up,diagup
air.animtype = Hard
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil((125-(parent, var(13))*2)*parent, fvar(13)),ceil(5*parent, fvar(13))
pausetime = 0,15
;guard.pause,0
sparkno = -1
guard.sparkno = -1
sparkxy = -20,0
;hitsound = S1000,3
guardsound = S1000,3
ground.type = High      ;Low,Trip,None
Air.type = Low      ;Low,Trip,None
ground.slidetime = 20
ground.hittime = 20
air.hittime = 20
ground.velocity = -7,0
air.velocity = -4,4
sprpriority = 3
palfx.time = 15
palfx.add = -100,-100,-100
palfx.mul = 350,350,256
palfx.sinadd = 100,100,0,15
envshake.time = 15
envshake.freq = 120
envshake.ampl = 6
getpower = 0;0

[State 0]
type                    = AfterImageTime
trigger1                = 1
time                    = 3
ignorehitpause          = 1


[State 0, ChangeState]
type = ChangeState
trigger1 = Movecontact
value = 1311
ctrl = 0
ignorehitpause = 1
;persistent =

[State 0:    End]
type                    = DestroySelf
trigger1                = ((frontedgedist <= -75) || (backedgedist <= -75))



;--------------------------------------------------------------------------
;Ki blast destroy hitting ground
[StateDef 1316]
type = S
movetype= A
physics = N
velset = 0,0
;Anim = 8340
ctrl = 0
sprpriority = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S1000,3
channel = 1
ignorehitpause = 1
;persistent =

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 8335
ID = 8340
pos = 0,0
postype = p1  ;p2,front,back,left,right
removetime = -2
bindtime = 1
scale = .35,.35
sprpriority = 5
ontop = 0
ownpal = 1


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

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

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

;--------------------------------------------------------------------------
;ki blast hard -charge effect
[StateDef 1320]
type = S
movetype= I
physics = N
velset = 0,0
Anim = 8460
ctrl = 0
sprpriority = 5

[State 0, PosSet]
type = PosSet
trigger1 = 1
x = parent, pos x-10*facing
y = parent, pos y-96

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S3003,0
volume = 255
channel = 2

[State 0, PalFXWiz]
type = PalFX
trigger1 = !Var(6)
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1

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

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, stateno != 1350
trigger2 = (parent, stateno = 1350) && (parent, Anim = 1351)
ignorehitpause = 1

;--------------------------------------------------------------------------
;ki blast hard
[StateDef 1330]
type = A
movetype= A
physics = N
juggle  = 0
velset = 10,0
ctrl = 0
anim = 8330
poweradd = 0;0
sprpriority = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S3003,1
volume = 255
channel = 2

[State 0, ]
type = Explod
trigger1 = (time%6)=0
anim = 8100
ID = 8100
pos = 0,0-ceil(pos Y)
facing = 1
scale = 1,.5
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 1


[State 0, PalFXWiz]
type = PalFX
trigger1 = !Var(6)
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,SP,HP
slot = 0
stateno = 1311
time = -1

[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,SP,HP
time = 1

[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0

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

[State 0, HitDef]
type = HitDef
trigger1 = !time
attr = A,SP        ;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 = Hard
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil((90+parent,var(20))*parent, fvar(13)),ceil((18+parent,var(20))*parent, fvar(13))
pausetime = 0,10
;guard.pause,0
sparkno = -1
guard.sparkno = -1
sparkxy = -20,0
hitsound = S815,0
guardsound = S1000,3
ground.type = Low      ;Low,Trip,None
ground.slidetime = 25
ground.hittime = 25
air.hittime = 25
ground.velocity = -7,-2
fall = 1
air.velocity = -7,-2
sprpriority = 3
palfx.time = 15
palfx.add = -104,-104,7
palfx.mul = 256,256,512
palfx.sinadd = 56,56,0,10
envshake.time = 15
envshake.freq = 120
envshake.ampl = 6
getpower = 0;0

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

[State 0, ChangeState]
type = ChangeState
trigger1 = Movecontact
value = 1331
ctrl = 0
ignorehitpause = 1
;persistent =

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 35
value = 1332
ctrl = 0
ignorehitpause = 1
;persistent =

;--------------------------------------------------------------------------
;ki blast hard destroy
[StateDef 1331]
type = S
movetype= A
physics = N
velset = 0,0
Anim = 8331
ctrl = 0
sprpriority = 5

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 8331
ID = 8310
pos = 27,-5
postype = p1  ;p2,front,back,left,right
removetime = -2
bindtime = 1
scale = .55,.55
sprpriority = 6
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0


[State 0, PalFXWiz]
type = null; PalFX
trigger1 = !Var(6)
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1

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

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible
ignorehitpause = 1

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 45


;--------------------------------------------------------------------------
;ki blast hard fade away
[StateDef 1332]
type = S
movetype= A
physics = N
ctrl = 0
sprpriority = 5

[State 0, ]
type = Explod
triggerall = time<10
trigger1 = (time%6)=0
anim = 8100
ID = 8100
pos = 0,0-ceil(pos Y)
facing = 1
scale = 1-(time*.1),.5-(time*.05)
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = !var(6)
trigger1 = time = [0,1]
flag = invisible

[State 0, PalFXWiz]
type = null; PalFX
trigger1 = !var(6)
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1

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

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

[State 0, VelMul]
type = VelMul
trigger1 = 1
x = .9

[State 0, Trans]
type = Trans
trigger1 = 1
trans = Add

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1-(time*.05),1-(time*.05)

[State 0, PalFX]
type = null; PalFX
trigger1 = !time
time = 20
sinadd = -255,-255,-255,80
invertall = 0
color = 256

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 20
 ;--------------------------------------------------------------------------
;Cell jr High
[StateDef 1545]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0
ctrl = 0
anim = 1345
poweradd = 40;0
sprpriority = 5


[State ReMapPal]
type =  RemapPal
trigger1 = time = 0
source = 20000,1
dest = 20000,root, palno 

;-----------
; Cell jr fly up
;-----------

[State 0: PosSet]
type                    = PosSet
trigger1                = !Time
y                       = 100

[State 0: VelSet]
type                    = VelSet
trigger1                = !Time
y                       = -9.1

;-------------
; Cell jr low
;-------------

[State 0, VelSet]
type =  VelSet
triggerall = time = 17
trigger1 = animelemtime(1)>2
x = 12
y = 0
;ignorehitpause = 
;persistent = 


[State 0, VelMul]
type = VelMul
triggerall = time = 17
trigger1 = animelemtime(2)>5
x = .8
;ignorehitpause =
;persistent =




[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NP,SP,HP
slot = 0
stateno = 1356
time = 1

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

[State 0, ChangeAnim]
type =  ChangeAnim
trigger1 =  time = 18
value = 1346
;elem = 1
;ignorehitpause = 
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 1346
trigger1 = animelem = 1
value = S1045,1



[State 0, Explod]
type = Explod
triggerall = anim = 1346
trigger1 = (time%4)=0
anim =8221
ID = 8100
pos = -15,-15
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 1346
trigger1 = (time%6)=0
anim =8221
ID = 8101
pos = -5,-30
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 1346
trigger1 = (time%3)=0
anim =8221
ID = 8102
pos = 5,-45
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 1346
trigger1 = (time%5)=0
anim =8221
ID = 8103
pos = 15,-60
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1


[State 1000, width]
type = width
trigger1 =movehit
value = 20
ignorehitpause = 1

[State 1000, Push]
type = playerpush
trigger1 = movehit
value = 0
ignorehitpause = 1


[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0

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

[State 0, HitDef]
type = HitDef
trigger1 = !time 
attr = A,SA        ;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 = Hard
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil((95-(parent, var(13)*2))*parent, fvar(13)),ceil(5*parent, fvar(13))
pausetime = 0,10
;guard.pause,0
sparkno = -1
guard.sparkno = -1
sparkxy = -20,0
hitsound = S3001,2
guardsound = S300,2
ground.type = High      ;Low,Trip,None
ground.slidetime = 20
ground.hittime = 20
air.hittime = 20
ground.velocity = -5,-5
air.velocity = -4,-3
ground.cornerpush.veloff = 0
sprpriority = 3
getpower = 0;0
fall = 1
envshake.time = 10
envshake.freq = 110
envshake.ampl = 3
fall.envshake.time = 10
fall.envshake.freq = 190
fall.envshake.ampl = 6

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 60
;ignorehitpause = 
;persistent = 


[State 0, ChangeState]
type = ChangeState
trigger1 = Movecontact
value =1355
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 

;------------------------------------------------------------------------
;Cell jr 
[Statedef 1550]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0
ctrl = 0
anim = 1345
poweradd = 40;0
sprpriority = 5


[State ReMapPal]
type =  RemapPal
trigger1 = time = 0
source = 20000,1
dest = 20000,(root, palno)


;---------------------
;-|Cell jr Variations
;---------------------

[State 0, VarSet]
type = VarSet
trigger1 = root, command = "x"  && time >= 27 && anim = 1345
v = 30    ;fv = 10
value = 8

[State 0, VarSet]
type = VarSet
trigger1 = root, command = "y"  && time >= 27 && anim = 1345
v = 30    ;fv = 10
value = 9


[State 0, VarSet]
type = VarSet
trigger1 = (root,command = "a" ||root, command = "b") && time >= 27 && anim = 1345
v = 40    ;fv = 10
value = 1



[State 0, VelSet]
type = VelSet
trigger1 = time = 18
y = 0

;---------------------------
;-|Cell Jr fly up and stop
;---------------------------

[State 0: PosSet]
type                    = PosSet
trigger1                = !Time
y                       = 100

[State 0: VelSet]
type                    = VelSet
trigger1                = !Time
y                       = -5.1

;---------------------------
;-|Cell Jr Low
;---------------------------

[State 0, VelSet]
type =  VelSet
triggerall = var(30)= 8 && time >= 27
trigger1 = animelemtime(1)>2
x = 12
y = 0
;ignorehitpause = 
;persistent = 

[State 0, VelMul]
type = VelMul
triggerall = var(30)= 8 && time >= 27
trigger1 = animelemtime(2)>5
x = .8
;ignorehitpause =
;persistent =

[State 0, ChangeAnim]
type =  ChangeAnim
trigger1 = var(30)= 8 && time >= 27
value = 1347
;elem = 1
;ignorehitpause = 
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 1347
trigger1 = animelem = 1
value = S1045,0



;---------------------------
;-|Cell Jr High
;---------------------------

[State 0, VelSet]
type =  VelSet
triggerall = var(30)= 9 && time >= 27
trigger1 = animelemtime(1)>2
x = 12
y = -5
;ignorehitpause = 
;persistent = 


[State 0, VelMul]
type = VelMul
triggerall = var(30)= 9 && time >= 27
trigger1 = animelemtime(2)>5
x = .8
;ignorehitpause =
;persistent =

[State 0, ChangeAnim]
type =  ChangeAnim
trigger1 = var(30)= 9 && time >= 27
value = 1348
;elem = 1
;ignorehitpause = 
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 1348
trigger1 = animelem = 1
value = S1045,1


;---------------------------
;-|Cell Jr Khh
;---------------------------

[State 0, ChangeAnim]
type =  ChangeAnim
trigger1 = var(40)= 1 && time >= 27
value = 1355
;elem = 1
;ignorehitpause = 
persistent = 0

[State 0: Helper]
type                    = Helper
triggerall                = Anim = 1355
trigger1                = animelem = 2
helpertype              = normal
ID                      = 70312
pos                     = 60, -30
stateno                 = 70313
ownpal                  = 1
size.xscale             = .5
size.yscale             = .5




[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NP,SP,HP,SA
slot = 0
stateno = 1356
time = 1

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



[state 1030]
type = makedust
trigger1 = vel X> 0
pos = -10,0
spacing = 3

[State 0, Explod]
type = Explod
triggerall = anim = 1346
trigger1 = (time%4)=0
anim =8221
ID = 8100
pos = -15,-5
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 1346
trigger1 = (time%6)=0
anim =8221
ID = 8101
pos = -5,0
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 1346
trigger1 = (time%3)=0
anim =8221
ID = 8102
pos = 5,-5
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 1346
trigger1 = (time%5)=0
anim =8221
ID = 8103
pos = 15,-6
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1



[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 1347 || anim = 1346
trigger1 = animelem = 2 
value = S20,2

[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0


[State 640, 3]
type = HitDef
trigger1 = var(30) = 0 && time < 5
attr = C, SA
damage    = ceil((86-(parent, var(13)*2))*parent, fvar(13)),ceil(5*parent, fvar(13))
hitflag = MA
guardflag       = L
priority = 4,hit ; = 4
pausetime = 2,10
sparkno   = S8000+(random%2)
guard.sparkno = S6014
sparkxy = -10,-5
hitsound = S3001,2
guardsound = S400, Ifelse (Random < 500, 0, Ifelse (Random < 500, 1, 2))
animtype = hard
ground.type = low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -7,-6
air.velocity = -1,-5
fall = 1
envshake.time = 10
envshake.freq = 110
envshake.ampl = 3
fall.envshake.time = 10
fall.envshake.freq = 190
fall.envshake.ampl = 6
yaccel = 0.2



[State 640, 3]
type = HitDef
trigger1 = var(30) = 8
attr = C, SA
damage    = ceil((86-(parent, var(13)*2))*parent, fvar(13)),ceil(5*parent, fvar(13))
hitflag = MAF
guardflag       = L
priority = 4,hit ; = 4
pausetime = 2,10
sparkno   = S8000+(random%2)
guard.sparkno = S6014
sparkxy = -10,-5
hitsound = S3001,2
guardsound = S400, Ifelse (Random < 500, 0, Ifelse (Random < 500, 1, 2))
animtype = hard
ground.type = low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -7,-6
air.velocity = -1,-5
fall = 1
envshake.time = 10
envshake.freq = 110
envshake.ampl = 3
fall.envshake.time = 10
fall.envshake.freq = 190
fall.envshake.ampl = 6
yaccel = 0.2


[State 0, HitDef]
type = HitDef
trigger1 = var(30) = 9
attr = A,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = H         ;HLA
animtype = Hard         ;light,medium,hard,back,up,diagup
air.animtype = Hard
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil((95-(parent, var(13)*2))*parent, fvar(13)),ceil(5*parent, fvar(13))
pausetime = 0,10
;guard.pause,0
sparkno = -1
guard.sparkno = -1
sparkxy = -20,0
hitsound = S3001,2
guardsound = S300,2
ground.type = High      ;Low,Trip,None
ground.slidetime = 20
ground.hittime = 20
air.hittime = 20
ground.velocity = -5,-5
air.velocity = -4,-3
ground.cornerpush.veloff = 0
sprpriority = 3
getpower = 0;0
fall = 1
envshake.time = 10
envshake.freq = 110
envshake.ampl = 3
fall.envshake.time = 10
fall.envshake.freq = 190
fall.envshake.ampl = 6



[State 0, DestroySelf]
type = DestroySelf
trigger1 = frontedgebodydist < -20
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = Movecontact
trigger2 = root, movetype = H
trigger3 = (anim = 1346 || anim = 1347) && time = 100 
trigger4 = (anim = 1355) && time = 80 
trigger5 = anim = 1345 && time = 80
trigger6 = var(40) = 1
value =1355
ctrl = 0

;-------------------------------------------------------------------------
;Cell jr - Anti Air
[Statedef 1555]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0
ctrl = 0
anim = 1345
poweradd = 50;0
sprpriority = 5


[State 0, VelSet]
type =  VelSet
triggerall = time = 25
trigger1 = animelemtime(1)>2
x = 12
y = -4
;ignorehitpause = 
;persistent = 

[State 0, VelMul]
type = VelMul
triggerall = time = 25
trigger1 = animelemtime(2)>5
x = .8
;ignorehitpause =
;persistent =

[State 0, ChangeAnim]
type =  ChangeAnim
trigger1 =  time = 25
value = 1348
;elem = 1
;ignorehitpause = 
persistent = 0


[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 1348
trigger1 = animelem = 1
value = S1045,1
volumescale = 255



[State 0: PosSet]
type                    = PosSet
trigger1                = !Time
y                       = 100

[State 0: VelSet]
type                    = VelSet
trigger1                = !Time
y                       = -7.1



[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NP,SP,HP
slot = 0
stateno = 1356
time = 1

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


[State 0, Explod]
type = Explod
triggerall = anim = 1346
trigger1 = (time%4)=0
anim =8221
ID = 8100
pos = -15,-5
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 1346
trigger1 = (time%6)=0
anim =8221
ID = 8101
pos = -5,0
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 1346
trigger1 = (time%3)=0
anim =8221
ID = 8102
pos = 5,-5
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 1346
trigger1 = (time%5)=0
anim =8221
ID = 8103
pos = 15,-6
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1


[State 640, 3]
type = HitDef
trigger1 = animelem = 2
attr = A, SA
damage    = 120,12
hitflag = MAF
guardflag       = MA
priority = 4,hit ; = 4
pausetime = 7,14
sparkno   = S8030+(random%5)
guard.sparkno = S6014
sparkxy = -10,-5
hitsound = S3001,2
guardsound = S400, Ifelse (Random < 500, 0, Ifelse (Random < 500, 1, 2))
animtype = Med
ground.type = trip
ground.slidetime = 15
ground.hittime  = 15
yaccel = 0.2
ground.velocity = -1,-5
air.velocity = -1,-2
fall = 1
envshake.time = 10
envshake.freq = 110
envshake.ampl = 3
fall.envshake.time = 10
fall.envshake.freq = 190
fall.envshake.ampl = 6



[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 60
;ignorehitpause = 
;persistent = 


[State 0, ChangeState]
type = ChangeState
trigger1 = movehit
value =1355
ctrl = 0

;-------------------------------------------------------------------------
;cell jr blow up
[StateDef 1355]
type = S
movetype= A
physics = N
velset = 0,0
Anim = 1
ctrl = 0
sprpriority = 2


[State 0, Explod]
type = Explod
trigger1 = !time
anim = 8700
ID = 8310
pos = 27,-25
postype = p1  ;p2,front,back,left,right
removetime = -2
bindtime = 1
scale = 1,1
sprpriority = 6
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0


[State 9051:	End]
type			= Destroyself
trigger1		=  numtarget = 0
trigger2            = time = 15
;--------------------------------------------------------------------------
;cell jr blow up (hit)
[StateDef 1356]
type = S
movetype= A
physics = N
velset = 0,0
Anim = 1
ctrl = 0
sprpriority = 2


[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S1045,2


[State 0, PalFXWiz]
type = PalFX
trigger1 = !time
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 1370
ID = 8310
pos = 27,-25
postype = p1  ;p2,front,back,left,right
removetime = -2
bindtime = 1
scale = 1.1,1.1
sprpriority = 2
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 0, Explod]
type = Explod
trigger1 = time = 4
anim = 8700
ID = 8310
pos = 27,-25
postype = p1  ;p2,front,back,left,right
removetime = -2
bindtime = 1
scale = 1,1
sprpriority = 6
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0


[State 9051:	End]
type			= Destroyself
trigger1            = time = 40
;-------------------------------------------------------------------------
; Shoulder Effect
[Statedef 7032]
type                    = S
movetype                = I
physics                 = N
anim                    = 7032
ctrl                    = 0
poweradd                = 0
juggle                  = 0
facep2                  = 1
hitdefpersist           = 0
movehitpersist          = 0
hitcountpersist         = 0
sprpriority             = 1
;---------------

[State 0: SprPriority]
type                    = SprPriority
trigger1                = 1
value                   = 1

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

[State 0: BindToParent]
type                    = BindToParent
trigger1                = 1
time                    = 1
pos                     = 55, -50

[State 0: 	AfterImage]
type 			        = AfterImage
trigger1 		        = (!Time)
time 			        = 9999999
framegap 		        = 2
length 		            = 10
paladd 		            = 0, 0, 0
palmul 		            = .60, .60, .60
palcontrast 	        = 100, 100, 100
trans 		            = add

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

[State 0: 	DestroySelf]
type 			        = DestroySelf
trigger1 		        = parent,stateno != 3000 || !AnimTime

;---------------------------------------------------------------------------
; Shoulder Effect
[Statedef 7033]
type                    = S
movetype                = I
physics                 = N
anim                    = 7032
ctrl                    = 0
poweradd                = 0
juggle                  = 0
facep2                  = 1
hitdefpersist           = 0
movehitpersist          = 0
hitcountpersist         = 0
sprpriority             = -1
;---------------

[State 0: SprPriority]
type                    = SprPriority
trigger1                = 1
value                   = 1

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

[State 0: BindToParent]
type                    = BindToParent
trigger1                = 1
time                    = 1
pos                     = 55, -50

[State 0: 	AfterImage]
type 			        = AfterImage
trigger1 		        = (!Time)
time 			        = 9999999
framegap 		        = 2
length 		            = 10
paladd 		            = 0, 0, 0
palmul 		            = .60, .60, .60
palcontrast 	        = 100, 100, 100
trans 		            = add

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

[State 0: 	DestroySelf]
type 			        = DestroySelf
trigger1 		        = parent,stateno != 300 || !AnimTime

;---------------------------------------------------------------------------
; Aura Top
[Statedef 8000]
type                    = U
movetype                = U
physics                 = N
anim                    = 1;ifelse(random>500,8056,ifelse(random>500,8055,8057))
ctrl                    = 0
poweradd                = 0
juggle                  = 0
facep2                  = 1
hitdefpersist           = 0
movehitpersist          = 0
hitcountpersist         = 0
sprpriority             = 4
 
[State AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
;time = 1
;facing = 0
pos = 0,0



 
[State Explod]
type = Explod
trigger1 = time%4= 2
anim = ifelse(random>500,8056,ifelse(random>500,8055,8057))
ID = 8000
pos = ifelse(random>500,3,ifelse(random>500,-5,15)),0
postype = p1
removeongethit = 1
bindtime = 1
removetime = -2
sprpriority = 4
ownpal = 0
scale = 0.7,0.7
shadow = 0,0,0
facing = 1
pausemovetime = 999
vel = ifelse(random>500,ifelse(random>500,0,-1), ifelse(random>500,-2,2)),ifelse(random>500,-6,-8)
 
[State Explod]
type = Explod
trigger1 = time%2= 2
anim = ifelse(random>500,8056,ifelse(random>500,8055,8057))
ID = 8001
pos = ifelse(random>500,0,3),0
postype = p1
removeongethit = 1
bindtime = 1
removetime = -2
sprpriority = -1
ownpal = 1
scale = 0.8,0.8
shadow = 0,0,0
facing = 1
pausemovetime = 999
vel = ifelse(random>500,-1, 1),-9
 
[State Explod]
type = Explod
trigger1 = time%4= 3
anim = ifelse(random>500,8055,ifelse(random>500,8059,8054))
ID = 8001
pos = ifelse(random>500,-7,-5),0
postype = p1
removeongethit = 1
bindtime = 1
removetime = -2
sprpriority = -1
ownpal = 1
scale = 0.9,0.9
shadow = 0,0,0
facing = 1
pausemovetime = 999
vel = ifelse(random>500,-2, -1), ifelse(random>500,-5,-7)
 

[State Explod]
type = Explod
trigger1 = time%4= 5
anim = ifelse(random>500,8055,ifelse(random>500,8059,8054))
ID = 8001
pos = ifelse(random>500,-7,-5),0
postype = p1
removeongethit = 1
bindtime = 1
removetime = -2
sprpriority = -1
ownpal = 1
scale = 0.9,0.9
shadow = 0,0,0
facing = 1
pausemovetime = 999
vel = ifelse(random>500,-2, -1), ifelse(random>500,-5,-7)


 
[State Explod]
type = Explod
trigger1 = time%4= 3
anim = ifelse(random>500,8057,ifelse(random>500,8058,8060))
ID = 8001
pos = ifelse(random>500,15,10),0
postype = p1
removeongethit = 1
bindtime = 1
removetime = -2
sprpriority = -1
ownpal = 1
scale = 0.9,0.9
shadow = 0,0,0
facing = 1
pausemovetime = 999
vel = ifelse(random>500,2, 1), ifelse(random>500,-5,-7)
 
[State PalFx]
type =  PalFX
trigger1 = 1
time = 1
add = -132,-132,-132
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256
 
[State DestroySelf]
type = DestroySelf
trigger1 = parent, movetype = I && parent, ctrl
trigger2 = parent, movetype = H
trigger3 = parent, stateno = 0
trigger4 = parent, stateno = 50
trigger5 = parent, stateno = 3000 && parent, animelem = 3
;-------------------------------------------------------------
;Aura Side
[Statedef 8001]
type                    = U
movetype                = U
physics                 = N
anim                    = 1;ifelse(random>500,8056,ifelse(random>500,8055,8057))
ctrl                    = 0
poweradd                = 0
juggle                  = 0
facep2                  = 1
hitdefpersist           = 0
movehitpersist          = 0
hitcountpersist         = 0
sprpriority             = 4
 
[State AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
;time = 1
;facing = 0
pos      = 0,0

[State 0, PalFXWiz]
type =  PalFX
trigger1 = parent, var(27) = 1
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1
 
[State Explod]
type = Explod
trigger1 = time%4= 2
anim = ifelse(random>500,8056,ifelse(random>500,8055,8057))
ID = 8000
pos = ifelse(random>500,3,ifelse(random>500,-5,15)),0
postype = p1
removeongethit = 1
bindtime = 1
removetime = -2
sprpriority = 4
ownpal = 0
scale = 0.7,0.7
shadow = 0,0,0
facing = 1
pausemovetime = 999
vel = ifelse(random>500,ifelse(random>500,0,-1), ifelse(random>500,-2,2)),ifelse(random>500,-6,-8)

[State Explod]
type = Explod
trigger1 = time%4= 2
anim = ifelse(random>500,8061,ifelse(random>500,8059,8062))
ID = 8000
pos = ifelse(random>500,3,ifelse(random>500,-5,15)),0
postype = p1
removeongethit = 1
bindtime = 1
removetime = -2
sprpriority = 4
ownpal = 0
scale = 0.7,0.7
shadow = 0,0,0
facing = 1
pausemovetime = 999
vel = ifelse(random>500,ifelse(random>500,0,-1), ifelse(random>500,-2,2)),ifelse(random>500,-6,-8)
 
[State Explod]
type = Explod
trigger1 = time%2= 2
anim = ifelse(random>500,8056,ifelse(random>500,8055,8057))
ID = 8001
pos = ifelse(random>500,0,3),0
postype = p1
removeongethit = 1
bindtime = 1
removetime = -2
sprpriority = -1
ownpal = 1
scale = 0.8,0.8
shadow = 0,0,0
facing = 1
pausemovetime = 999
vel = ifelse(random>500,-1, 1),-9

[State Explod]
type = Explod
trigger1 = time%2= 2
anim = ifelse(random>500,8061,ifelse(random>500,8059,8062))
ID = 8001
pos = ifelse(random>500,0,3),0
postype = p1
removeongethit = 1
bindtime = 1
removetime = -2
sprpriority = -1
ownpal = 1
scale = 0.8,0.8
shadow = 0,0,0
facing = 1
pausemovetime = 999
vel = ifelse(random>500,-1, 1),-9
 
[State Explod]
type = Explod
trigger1 = time%4= 3
anim = ifelse(random>500,8055,ifelse(random>500,8059,8054))
ID = 8001
pos = ifelse(random>500,-7,-5),0
postype = p1
removeongethit = 1
bindtime = 1
removetime = -2
sprpriority = -1
ownpal = 1
scale = 0.9,0.9
shadow = 0,0,0
facing = 1
pausemovetime = 999
vel = ifelse(random>500,-2, -1), ifelse(random>500,-5,-7)
 

[State Explod]
type = Explod
trigger1 = time%4= 5
anim = ifelse(random>500,8055,ifelse(random>500,8059,8054))
ID = 8001
pos = ifelse(random>500,-7,-5),0
postype = p1
removeongethit = 1
bindtime = 1
removetime = -2
sprpriority = -1
ownpal = 1
scale = 0.9,0.9
shadow = 0,0,0
facing = 1
pausemovetime = 999
vel = ifelse(random>500,-2, -1), ifelse(random>500,-5,-7)


 
[State Explod]
type = Explod
trigger1 = time%4= 3
anim = ifelse(random>500,8057,ifelse(random>500,8058,8060))
ID = 8001
pos = ifelse(random>500,15,10),0
postype = p1
removeongethit = 1
bindtime = 1
removetime = -2
sprpriority = -1
ownpal = 1
scale = 0.9,0.9
shadow = 0,0,0
facing = 1
pausemovetime = 999
vel = ifelse(random>500,2, 1), ifelse(random>500,-5,-7)
 
[State PalFx]
type = PalFX
trigger1 = 1
time = 1
add = -132,-132,-132
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256
 
[State DestroySelf]
type = DestroySelf
trigger1 = parent, movetype = I && parent, ctrl
trigger2 = parent, movetype = H
trigger3 = parent, stateno = 0
trigger4 = parent, stateno = 50
trigger5 = parent, stateno = 3000 && parent, animelem = 3
;-------------------------------------------------------------
; Explode
[Statedef 8101]
type                    = U
movetype                = U
physics                 = U
anim                    = 8349
velset                  = 0,0
ctrl                    = 0
poweradd                = 0
juggle                  = 0
facep2                  = 0
hitdefpersist           = 0
movehitpersist          = 0
hitcountpersist         = 0
sprpriority             = 5
;---------------

[State 0:    No Shadow]
Type                    = AssertSpecial
Trigger1                = 1
Flag                    = NoShadow


[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S3001,2


;---------------
;Effects
;---------------

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

[State 0:    Done]
type                    = DestroySelf
trigger1                = !AnimTime

;-------------------------------------------------------------------------
;line effect
[StateDef 8210]
type = S
movetype= I
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = -1
poweradd = 0;0
sprpriority = 2

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

[State 0, PosSet]
type = PosSet
trigger1 = !time
x = parent, pos X
y = parent, pos Y


[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 8220
ID =   8210
pos = 0,0
postype = p1
bindtime = -1
sprpriority = 10
ownpal = 1
removetime = 5
supermove = 1
pausemovetime = 15
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = 1
ID = 8210
scale = .5-(0.1*time), 1-(0.2*time)
ignorehitpause = 1
persistent = 1

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 8220
ID =   8211
pos = 0,-20
postype = p1
bindtime = -1
sprpriority = 10
ownpal = 1
removetime = 5
supermove = 1
pausemovetime = 15
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = 1
ID = 8211
scale = .5-(0.1*time), 1-(0.2*time)
ignorehitpause = 1
persistent = 1


[State 0, Explod]
type = Explod
trigger1 = !time
anim = 8220
ID =   8212
pos = 0,-30
postype = p1
bindtime = -1
sprpriority = 10
ownpal = 1
removetime = 5
supermove = 1
pausemovetime = 15
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = 1
ID = 8212
scale = .5-(0.1*time), 1-(0.2*time)
ignorehitpause = 1
persistent = 1

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 8220
ID =   8213
pos = 0,-45
postype = p1
bindtime = -1
sprpriority = 10
ownpal = 1
removetime = 5
supermove = 1
pausemovetime = 15
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = 1
ID = 8213
scale = .5-(0.1*time), 1-(0.2*time)
ignorehitpause = 1
persistent = 1

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 8220
ID =   8214
pos = 0,-60
postype = p1
bindtime = -1
sprpriority = 10
ownpal = 1
removetime = 5
supermove = 1
pausemovetime = 15
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = 1
ID = 8214
scale = .5-(0.1*time), 1-(0.2*time)
ignorehitpause = 1
persistent = 1

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 8220
ID =   8215
pos = 0,-75
postype = p1
bindtime = -1
sprpriority = 10
ownpal = 1
removetime = 5
supermove = 1
pausemovetime = 15
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = 1
ID = 8215
scale = .5-(0.1*time), 1-(0.2*time)
ignorehitpause = 1
persistent = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 6
;--------------------------------------------------------------------------
;Afterimage Effect
[StateDef 8211]
type = S
movetype= I
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
;anim = parent, Anim
poweradd = 0;0
sprpriority = 2

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


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = parent, Anim
elem = parent, AnimElemNo(0)
ignorehitpause = 1
;persistent =

[State 0, Trans]
type = Trans
trigger1 = time <= 10
trans = addalpha
alpha = 256-(time*25),256

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 10
;--------------------------------------------------------------------------
;Shockwave
[StateDef 8200]
type = S
movetype= I
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = -1
poweradd = 0;0
sprpriority = 2

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

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible
ignorehitpause = 1

[State 0, EnvColor]
type = EnvColor
trigger1 = !time
value = 255,255,255
time = 3

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 8210
ID =   8210
pos = 0,0
scale = 1, 1
postype = p1
bindtime = -1
sprpriority = 10
ownpal = 1
removetime = 9
supermove = 1
pausemovetime = 999
ontop = 1

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 8200+(random%8)
ID =   8200
pos = 0,0
postype = p1
bindtime = -1
sprpriority = 10
ownpal = 1
removetime = 14
supermove = 1
pausemovetime = 999
ontop = 1
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = 1
ID = 8200
scale = .6+(0.2*time), .6+(0.2*time)
ignorehitpause = 1
persistent = 1
supermove = 1
pausemovetime = 999

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 8200+(random%8)
ID =   8201
pos = 0,0
postype = p1
bindtime = -1
sprpriority = 10
ownpal = 1
removetime = 14
supermove = 1
pausemovetime = 999
ontop = 1
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = 1
ID = 8201
scale = .2+(0.1*time), .2+(0.1*time)
ignorehitpause = 1
persistent = 1
supermove = 1
pausemovetime = 999

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 8200+(random%8)
ID =   8202
pos = 0,0
postype = p1
bindtime = -1
sprpriority = 10
ownpal = 1
removetime = 14
supermove = 1
pausemovetime = 999
ontop = 1
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = 1
ID = 8202
scale = .1+(0.09*time), .1+(0.09*time)
ignorehitpause = 1
persistent = 1
supermove = 1
pausemovetime = 999

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 30

;--------------------------------------------------------------------------
;Rock
[Statedef 8201]
type 			        = S
movetype		        = I
physics		            = N
anim			        = 8331
ctrl			        = 0
poweradd		        = 0
juggle		            = 0
facep2		            = 0
hitdefpersist	        = 0
movehitpersist	        = 0
hitcountpersist	        = 0
sprpriority		        = 0

[State 0:	SprPriority]
type			        = SprPriority
trigger1		        = (!Time)
value			        = (IfElse(Random <= 499,3,-3))

[State 0: Spinning the Rocks]
type                    = VelAdd
trigger1                = (vel y < 50)
x                       = ifelse(parentdist x<=0,-3,3)
y                       = ifelse(random>500,-0.05,ifelse(random>500,-0.04,ifelse(random>500,-0.03,-0.02)))

[State 0:	VarRandom]
type			        =  VarRandom
trigger1		        = (!Time)
v			            = 0
range			        = -200,200

[State 0:	VarSet]
type			        =  VarSet
trigger1		        = (!Time)
var(1)		            = (Parent, StateNo)

[State 0:	PosSet]
type			        = PosSet
trigger1		        = (!Time)
x			            = var(0)
y			            = 0

[State 0:	VelSet]
type			        = VelSet
trigger1		        = (Time = 1)
x			            = (IfElse(Random <= 799,0,IfElse((Random = [800,900]),-0.2,0.2)))
y			            = (IfElse(Random <= 499,-.5,-1))

[State 0:	VelAdd]
type			        = VelAdd
trigger1		        = (Parent, StateNo != Var(1))
y			            = .5

[State 0:	VelSet]
type			        = VelSet
trigger1		        = (Parent, StateNo != Var(1))
x			            = 0

[State 0:	PlaySnd]
type			        = PlaySnd
trigger1		        = (!Time) && (Const(Size.XScale) <= 1)
value			        = S8200,3

[State 0:	PlaySnd]
type			        = PlaySnd
trigger1		        = (!Time) && (Const(Size.XScale) > 1)
value			        = S8200,1

[State 0:	PlaySnd]
type			        = PlaySnd
trigger1		        = (Pos Y >= 1)
value			        = S8200,2

[State 0:	AfterImage]
type			        = AfterImage
trigger1 		        = (!Time)
time 			        = 15
timegap		            = 1
framegap 		        = 2
length 		            = 10
paladd 		            = 0, 0, 0
palmul 		            = .50, .50, .50
palcontrast 	        = 110,110,110
trans 		            = add

[State 0:	DestroySelf]
type			        = DestroySelf
trigger1		        = (Pos Y < -210) || (Pos Y >= 1) || (!AnimTime)

;---------------------------------------------------------------------------
;Rock 1
[Statedef 8202]
type 			        = S
movetype		        = I
physics		            = N
anim			        = 8332
ctrl			        = 0
poweradd		        = 0
juggle		            = 0
facep2		            = 0
hitdefpersist	        = 0
movehitpersist	        = 0
hitcountpersist	        = 0
sprpriority		        = 0

[State 0:	SprPriority]
type			        = SprPriority
trigger1		        = (!Time)
value			        = (IfElse(Random <= 499,3,-3))

[State 0: Spinning the Rocks]
type                    = VelAdd
trigger1                = (vel y < 50)
x                       = ifelse(parentdist x<=0,-3,3)
y                       = ifelse(random>500,-0.05,ifelse(random>500,-0.04,ifelse(random>500,-0.03,-0.02)))

[State 0:	VarRandom]
type			        =  VarRandom
trigger1		        = (!Time)
v			            = 0
range			        = -200,200

[State 0:	VarSet]
type			        =  VarSet
trigger1		        = (!Time)
var(1)		            = (Parent, StateNo)

[State 0:	PosSet]
type			        = PosSet
trigger1		        = (!Time)
x			            = var(0)
y			            = 0

[State 0:	VelSet]
type			        = VelSet
trigger1		        = (Time = 1)
x			            = (IfElse(Random <= 799,0,IfElse((Random = [800,900]),-0.2,0.2)))
y			            = (IfElse(Random <= 499,-1.5,-2.5))

[State 0:	VelAdd]
type			        = VelAdd
trigger1		        = (Parent, StateNo != Var(1))
y			            = .1

[State 0:	VelSet]
type			        = VelSet
trigger1		        = (Parent, StateNo != Var(1))
x			            = 0

[State 0:	AfterImage]
type			        = AfterImage
trigger1 		        = (!Time)
time 			        = 15
timegap		            = 1
framegap 		        = 2
length 		            = 10
paladd 		            = 0, 0, 0
palmul 		            = .50, .50, .50
palcontrast 	        = 110,110,110
trans 		            = add

[State 0:	PlaySnd]
type			        = PlaySnd
trigger1		        = (!Time)
value			        = S8200,1

[State 0:	PlaySnd]
type			        = PlaySnd
trigger1		        = (Pos Y >= 1)
value			        = S8200,2

[State 0:	DestroySelf]
type			        = DestroySelf
trigger1		        = (Pos Y < -210) || (Pos Y >= 1) || (!AnimTime)

;---------------------------------------------------------------------------
;Rock 2
[Statedef 8220]
type 			        = S
movetype		        = I
physics		            = N
anim			        = 8333
ctrl			        = 0
poweradd		        = 0
juggle		            = 0
facep2		            = 0
hitdefpersist	        = 0
movehitpersist	        = 0
hitcountpersist	        = 0
sprpriority		        = 0

[State 0:	SprPriority]
type			        = SprPriority
trigger1		        = (!Time)
value			        = (IfElse(Random <= 499,3,-3))

[State 0: Spinning the Rocks]
type                    = VelAdd
trigger1                = (vel y < 50)
x                       = ifelse(parentdist x<=0,-3,3)
y                       = ifelse(random>500,-0.05,ifelse(random>500,-0.04,ifelse(random>500,-0.03,-0.02)))

[State 0:	VarRandom]
type			        =  VarRandom
trigger1		        = (!Time)
v			            = 0
range			        = -200,200

[State 0:	VarSet]
type			        =  VarSet
trigger1		        = (!Time)
var(1)		            = (Parent, StateNo)

[State 0:	PosSet]
type			        = PosSet
trigger1		        = (!Time)
x			            = var(0)
y			            = 0

[State 0:	PosSet]
type			        = PosSet
trigger1		        = (!Time)
y			            = 0

[State 0:	VelSet]
type			        = VelSet
trigger1		        = (Time = 1)
x			            = (IfElse(Random <= 799,0,IfElse((Random = [800,900]),-0.2,0.2)))
y			            = (IfElse(Random <= 499,-2,-3))

[State 0:	VelAdd]
type			        = VelAdd
trigger1		        = (Parent, StateNo != Var(1))
y			            = .1

[State 0:	VelSet]
type			        = VelSet
trigger1		        = (Parent, StateNo != Var(1))
x			            = 0

[State 0:	PlaySnd]
type			        = PlaySnd
trigger1		        = (!Time)
value			        = S8200,1

[State 0:	PlaySnd]
type			        = PlaySnd
trigger1		        = (Pos Y >= 1)
value			        = S8200,2

[State 0:	AfterImage]
type			        = AfterImage
trigger1 		        = (!Time)
time 			        = 15
timegap		            = 1
framegap 		        = 2
length 		            = 10
paladd 		            = 0, 0, 0
palmul 		            = .50, .50, .50
palcontrast 	        = 110,110,110
trans 		            = add

[State 0:	DestroySelf]
type			        = DestroySelf
trigger1		        = (Pos Y < -210) || (Pos Y >= 1) || (!AnimTime) 

;---------------------------------------------------------------------------
;Aura up
[StateDef 8300]
type = S
movetype= I
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = -1
poweradd = 0;0
sprpriority = 2

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 999
ignorehitpause = 1
;persistent =

[State 0, PosSet]
type = PosSet
trigger1 = 1
x = parent, pos x
y = parent, pos y

[State 0, PalFXWiz]
type = PalFX
trigger1 = parent, Var(6) = 0
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1

[State 0, VarRandom]
type = VarRandom
trigger1 = 1
v = 0
range = 5,10

[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 0
value = .1*var(0)

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

[State 0, ]
type = Explod
trigger1 = random < 200
anim = 8300
ID = 8300
pos = 0-(random%20),-20-(random%60)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,3)
ownpal = 0
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random < 200
anim = 8301
ID = 8301
pos = 0+(random%20),-10-(random%60)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,3)
ownpal = 0
envshake.time = 15
envshake.freq = 120
envshake.ampl = 6
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random < 200
anim = 8302
ID = 8302
pos = 0-(random%10),0-(random%40)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,3)
ownpal = 0
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random < 200
anim = 8303
ID = 8303
pos = 10-(random%20),0-(random%50)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,3)
ownpal = 0
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random < 200
anim = 8304
ID = 8304
pos = 0+(random%20),-20-(random%60)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,3)
ownpal = 0
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random < 200
anim = 8305
ID = 8305
pos = 0-(random%20),-10-(random%60)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,3)
ownpal = 0
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random < 200
anim = 8306
ID = 8306
pos = 0+(random%10),0-(random%40)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,3)
ownpal = 0
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random < 200
anim = 8307
ID = 8307
pos = 15-(random%30),0-(random%50)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,3)
ownpal = 0
ignorehitpause= 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, stateno != 2001
ignorehitpause = 1

;--------------------------------------------------------------------------
;Aura side
[StateDef 8301]
type = S
movetype= I
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = -1
poweradd = 0;0
sprpriority = 2

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 999
ignorehitpause = 1
;persistent =

[State 0, PosSet]
type = PosSet
trigger1 = 1
x = parent, pos x
y = parent, pos y



[State 0, VarRandom]
type = VarRandom
trigger1 = 1
v = 0
range = 5,10

[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 0
value = .1*var(0)

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


[State 0, ]
type = Explod
trigger1 = random < 300
anim = 8059
ID = 8302
pos = floor(30+parent, vel X)-(random%50),0-(random%50)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,0)
ownpal = 0
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random < 300
anim = 8054
ID = 8305
pos = floor(30+parent, vel X)-(random%50),-10-(random%50)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,0)
ownpal = 0
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random < 300
anim = 8059
ID = 8308
pos = floor(30+parent, vel X)-(random%50),0-(random%50)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,0)
ownpal = 0
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random > 700
anim = 8055
ID = 8309
pos = floor(30+parent, vel X)-(random%50),-30-(random%50)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,0)
ownpal = 0
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random > 700
anim = 8062
ID = 8308
pos = floor(-30+parent, vel X)-(random%50),-20-(random%20)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0)*.7,Fvar(0)*.7
sprpriority = ifelse(random<500,-3,0)
ownpal = 0
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random = [200,300]
anim = 8062
ID = 8308
pos = floor(-50+parent, vel X)-(random%50),-20-(random%20)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0)*.7,Fvar(0)*.7
sprpriority = ifelse(random<500,-3,0)
ownpal = 0
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random < 300
anim = 8061
ID = 8309
pos = floor(-10+parent, vel X)-(random%50),-20-(random%40)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0)*.7,Fvar(0)*.7
sprpriority = ifelse(random<500,-3,0)
ownpal = 0
ignorehitpause= 1


[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, stateno != 300
trigger1 = parent, stateno != 304
trigger1 = parent, stateno != 1100
ignorehitpause = 1

;--------------------------------------------------------------------------
;Aura up
[StateDef 8302]
type = S
movetype= I
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = -1
poweradd = 0;0
sprpriority = 2

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 999
ignorehitpause = 1
;persistent =

[State 0, PosSet]
type = PosSet
trigger1 = 1
x = parent, pos x
y = parent, pos y

[State 0, PalFXWiz]
type =  PalFX
trigger1 = Parent, Var(27) = 1
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1

[State 0, VarRandom]
type = VarRandom
trigger1 = 1
v = 0
range = 5,10

[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 0
value = .1*var(0)

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

[State 0, Horiz, top]
type = Explod
trigger1 = random > 700
anim = 8308
ID = 8308
pos = floor(0+parent, vel X)-(random%50),floor(-100+parent, vel Y)+(random%40)
postype = p1
facing = -1
vfacing = -1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,0)
ownpal = 0
ignorehitpause= 1

[State 0, Diagdown, top]
type = Explod
trigger1 = random < 200
anim = 8302
ID = 8302
pos = floor(0+parent, vel X)-(random%50),floor(-80+parent, vel Y)+(random%30)
postype = p1
facing = -1
vfacing = -1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,0)
ownpal = 0
ignorehitpause= 1

[State 0, down, top]
type = Explod
trigger1 = random < 400
anim = 8303
ID = 8303
pos = floor(0+parent, vel X)-(random%50),floor(-80+parent, vel Y)+(random%50)
postype = p1
facing = -1
vfacing = -1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,0)
ownpal = 0
ignorehitpause= 1

[State 0, down 2, mid]
type = Explod
trigger1 = random > 700
anim = 8304
ID = 8304
pos = floor(0+parent, vel X)-(random%40),floor(-60+parent, vel Y)+(random%50)
postype = p1
facing = -1
vfacing = -1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,0)
ownpal = 0
ignorehitpause= 1

[State 0, diagdown, mid]
type = Explod
trigger1 = random > 700
anim = 8306
ID = 8306
pos = floor(0+parent, vel X)-(random%40),floor(-60+parent, vel Y)+(random%50)
postype = p1
facing = -1
vfacing = -1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,0)
ownpal = 0
ignorehitpause= 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, stateno != 302
ignorehitpause = 1


;--------------------------------------------------------------------------------
; Chou Kamehameha Beam
[Statedef 8305]
movetype		        = A
ctrl			        = 0
anim                    = 8305
SprPriority             = 4

[State 0: PlayerPush]
type                    = PlayerPush
trigger1                = (1)
value                   = 0
persistent              = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S3001,1

[State 0, ]
type                    = BindToParent
trigger1                = 1
time                    = 1
pos		                = 31, -81

[State 0:    No Shadow]
Type                    = AssertSpecial
Trigger1                = 1
Flag                    = NoShadow
Flag2                   = Invisible

[State 0: Explod]
type                    = Explod
trigger1                = !Time
anim                    = 8305
ID                      = 8305
bindtime                = -1
sprpriority             = 5
ownpal                  = 1

[State 0: 	AfterImage]
type 			        = AfterImage
trigger1 		        = (!Time)
time 			        = 9999999
framegap 		        = 4
length 		            = 20
paladd 		            = 0, 0, 0
palmul 		            = .60, .60, .60
palcontrast 	        = 100, 100, 100
trans 		            = add

[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0

[State 0, ]
type                    = HitDef
trigger1                = animelem = 2 || animelem = 4 || animelem = 6 || animelem = 9 || animelem = 12
attr                    = S, HP
damage                  = ceil((25-(parent, var(13)*2))*parent, fvar(13)),ceil(5*parent, fvar(13))
animtype                = Heavy
guardflag               = M
hitflag                 = MAF
priority                = 7, Hit
pausetime               = 0, 12
sparkno                 = S10035
guard.sparkno           = S7113
sparkxy                 = -40, 0
hitsound                = S300,2
;guardsound              = S3001, 2
ground.type             = high
ground.slidetime        = 20
ground.hittime          = 20
ground.velocity         = -14, -8
airguard.velocity       = -14, -7
air.type                = high
air.velocity            = -14, -8
air.hittime             = 12
getpower                = 0
givepower		        = 0
Fall                    = 1
Fall.recover            = 0
yaccel		            = 0.5
envshake.time           = 10
envshake.freq           = 20
envshake.ampl           = 10
id                      = 8305






[State 0:        DestroySelf]
type 			        = DestroySelf
trigger1 		        = !AnimTime
trigger2 		        = parent,stateno != 3001 
trigger3 		        = parent,movetype = H

;---------------------------------------------------------------------------
; Makankosappo Beam Rings
[Statedef 8306]
type 			        = U
movetype		        = A
physics		            = U
juggle	    	        = 1
anim    			    = 8473
velset		            = 0,0
ctrl			        = 0
poweradd		        = 0
facep2		            = 0
hitdefpersist	        = 0
movehitpersist	        = 0
hitcountpersist	        = 0
sprpriority		        = 3

[State 0:    No Shadow]
Type                    = AssertSpecial
Trigger1                = 1
Flag                    = NoShadow

[State 0, ]
type                    = BindToParent
trigger1                = !Time
time                    = 1
pos		                = 110,-81

[State 0: VelSet]
type                    = VelSet
trigger1                = 1
x                       = 15

[State 0: VarSet]
type 			        = VarSet
trigger1 		        = (!Time)
fv 			            = 1
value 		            = 1

[State 0: VarAdd]
type 			        = VarAdd
trigger1 		        = !Time
fv 			            = 1
value 		            = -0.07

[State 0: AngleDraw]
type                    = AngleDraw
trigger1                = 1
scale                   = fvar(1), fvar(1)

[State 0: AngleSet]
type                    = AngleSet
trigger1                = 1
value                   = -20

[State 0: Trans]
type                    = Trans
trigger1 			    = 1
trans                   = add



[State 0:        DestroySelf]
type 			        = DestroySelf
trigger1 		        = ((frontedgedist <= -75) || (backedgedist <= -75))
trigger2 		        = parent,AnimElem = 13


;---------------------------------------------------------------------------
;Charge Effect
[StateDef 8307]
type = S
movetype= I
physics = N
velset = 0,0
Anim = 8460
ctrl = 0
sprpriority = 5

[State 0, PosSet]
type = PosSet
trigger1 = 1
x = parent, pos x-20*facing
y = parent, pos y-90

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S3003,0
volume = 255
channel = 2

[State 0, PalFXWiz]
type =null; PalFX
trigger1 = !Var(6)
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1

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

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, stateno != 2021
ignorehitpause = 1

;-------------------------------------------------------------------------
; Cell Death Beam
[Statedef 8312]
type 			        = U
movetype		        = A
physics		            = U
juggle	    	        = 1
anim    			    = 8322
velset		            = 0,0
ctrl			        = 0
poweradd		        = 0
facep2		            = 0
hitdefpersist	        = 0
movehitpersist	        = 0
hitcountpersist	        = 0
sprpriority		        = 3

[State 0, ]
type                    = BindToParent
trigger1                = 1
time                    = 1
pos		                = 57,-75

[State 0:    No Shadow]
Type                    = AssertSpecial
Trigger1                = 1
Flag                    = NoShadow

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

[State 0: HitOverride]
type                    = HitOverride
trigger1                = 1
slot                    = 0
attr                    = SCA, NP, SP, HP
stateno                 = -1
time                    = -1

[State 0: 	AfterImage]
type 			        = AfterImage
trigger1 		        = (!Time)
time 			        = 9999999
framegap 		        = 4
length 		            = 20
paladd 		            = 0, 0, 0
palmul 		            = .60, .60, .60
palcontrast 	        = 100, 100, 100
trans 		            = add




[State 220, Explod]
type = Explod
trigger1 = Movehit && NumTarget
anim = 17007
pos = -10, -45 
postype = p2  
facing = -1
bindtime = 1
removetime = -2
sprpriority = 7
ownpal = 1
removeongethit = 0
ignorehitpause = 1
persistent = 0

[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0

[State 0, ]
type                    = HitDef
trigger1                = !Time
attr                    = S, HP
damage                  = ceil((185-(parent, var(13))*2)*parent, fvar(13)),ceil(5*parent, fvar(13))
animtype                = Heavy
guardflag               = M
hitflag                 = MAF
priority                = 5, Hit
pausetime               = 0, 25
sparkno                 = S IfElse(random<500,IfElse(random<500,7108,7109),IfElse(random<500,7110,7111))
guard.sparkno           = S8020+(random%3)
sparkxy                 = 0, 0
hitsound                = S1000, 4
guardsound              = S400, 0
ground.type             = high
ground.slidetime        = 20
ground.hittime          = 20
ground.velocity         = -5, -5
airguard.velocity       = -5, -5
air.type                = high
air.velocity            = -5, -5
air.hittime             = 12
getpower                = 0
givepower		        = 0
Fall                    = 1
Fall.recover            = 0
yaccel		            = 0.5
envshake.time           = 20
envshake.freq           = 70
envshake.ampl           = 7
id                      = 8312

[State 0: Explod]
type                    = Explod
trigger1                = NumTarget(8312) && MoveHit
anim                    = 6000
pos                     = 0,-50
postype                 = p2
sprpriority             = 3
ownpal                  = 1
ignorehitpause          = 1
persistent              = 0

[State 0:       Blood Red]
type                    = BGPalFX
trigger1                = movehit
time                    = 2
add                     = 175,15,80
invertall               = 0

[State 0:       Blood Red]
type                    = BGPalFX
trigger1                = movehit
time                    = 2
mul                     = 256,50,120
invertall               = 0

[State 0:        DestroySelf]
type 			        = DestroySelf
trigger1 		        = !AnimTime
trigger2 		        = parent,stateno != 2200
trigger3 		        = parent,movetype = H

;---------------------------------------------------------------------------
;Star Death Beam
[Statedef 8310]
type                    = U
movetype                = U
physics                 = U
anim                    = 8310
velset                  = 0,0
ctrl                    = 0
poweradd                = 0
juggle                  = 0
facep2                  = 0
hitdefpersist           = 0
movehitpersist          = 0
hitcountpersist         = 0
sprpriority             = 5
;---------------



[State 0, ]
type                    = BindToParent
trigger1                = 1
time                    = 1
pos		                = 57,-75

[State 0: VarSet]
type 			        = VarSet
trigger1 		        = (!Time)
fv 			            = 1
value 		            = 1

[State 0: VarAdd]
type 			        = VarAdd
trigger1 		        = (TimeMod = 5,0)
fv 			            = 1
value 		            = -0.07

[State 0: AngleDraw]
type                    = AngleDraw
trigger1                = 1
scale                   = fvar(1), fvar(1)

[State 0: AngleAdd]
type                    = AngleAdd
trigger1                = 1
value                   = -10

[State 0: Trans]
type                    = Trans
trigger1 			    = 1
trans                   = add

[State 0:     Turn]
type                    = Turn
trigger1                = (P2BodyDist X < 0)

[State 0:    No Shadow]
Type                    = AssertSpecial
Trigger1                = 1
Flag                    = NoShadow

[State 0: 	AfterImage]
type 			        = AfterImage
trigger1 		        = (!Time)
time 			        = 9999999
framegap 		        = 4
length 		            = 20
paladd 		            = 0, 0, 0
palmul 		            = .60, .60, .60
palcontrast 	        = 100, 100, 100
trans 		            = add

[State 0:        DestroySelf]
type 			        = DestroySelf
trigger1 		        = Time = 65
trigger2 		        = parent,stateno != 2200
trigger3 		        = parent,movetype = H

;---------------------------------------------------------------------------
;slo mo
[Statedef 8313]
type                    = U
movetype                = U
physics                 = U
anim                    = 90
velset                  = 0,0
ctrl                    = 0
poweradd                = 0
juggle                  = 0
facep2                  = 0
hitdefpersist           = 0
movehitpersist          = 0
hitcountpersist         = 0
sprpriority             = 5
;---------------

[State 0: Pause]
type                    = Pause
triggerall              = 1
trigger1                = gametime%2 = 0
time                    = 1

[State 0:        DestroySelf]
type 			        = DestroySelf
trigger1 		        = Time = 45
trigger2 		        = parent,stateno != [2020,2200]
trigger3 		        = parent,movetype = H

;---------------------------------------------------------------------------
;Energy Shield - (counter)
[Statedef 8330]
movetype		    = A
ctrl		    = 0
anim                    = 8530
SprPriority             = 6

[State 0: PlayerPush]
type                    = PlayerPush
trigger1                = (1)
value                   = 0
persistent              = 1

[State 0: AssertSpecial]
type                    = AssertSpecial
trigger1                = 1
flag                    = NoShadow

[State 0: AfterImage]
type 		    = AfterImage
trigger1 		    = !time
time 	              = 99999
TimeGap                 = 1
FrameGap                = 2
length                  = 60
paladd 		    = 0, 0, 0
palmul 		    = .5,.5,.5
palcontrast 	    = 50,50,50
trans 		    = add
persistent              = 0

[State 0, AfterImage]
type                    = AfterImageTime
trigger1                = 1
time                    = 2

[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0



[State 0, ]
type                    = HitDef
trigger1                = !time
attr                    = S, HA
damage                  = ceil((95-(parent, var(13)*2))*parent, fvar(13)),ceil(5*parent, fvar(13))
animtype                = UP
guardflag               = M
hitflag                 = MAF, NP, SP, HP, NT, ST, HT
priority                = 7, Hit
pausetime               = 0, 12
sparkno                 = s8000+(random%2)
guard.sparkno           = S7113
sparkxy                 = 0, -50
hitsound                = S300, 3
guardsound              = S400, 0
ground.type             = High
ground.slidetime        = 20
ground.hittime          = 20
ground.velocity         = -5, -14
airguard.velocity       = -5,-5
air.type                = High
air.velocity            = -5, -14
air.hittime             = 12
getpower                = 0
givepower		        = 0
Fall                    = 1
Fall.recover            = 0
down.bounce             = 0
yaccel		            = 0.5
p1sprpriority           = 6
ground.cornerpush.veloff = 0
air.cornerpush.veloff   = 0
down.cornerpush.veloff  = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 0: 	DestroySelf]
type 			        = DestroySelf
trigger1 		        = Time = 55
trigger2 		        = parent,stateno != 1023
trigger3 		        = parent,movetype = H

;--------------------------------------------------------------------------
;Energy Shield - Super
[Statedef 8331]
movetype		    = A
ctrl		    = 0
anim                    = 8530
SprPriority             = 6

[State 0: PlayerPush]
type                    = PlayerPush
trigger1                = (1)
value                   = 0
persistent              = 1

[State 0: AssertSpecial]
type                    = AssertSpecial
trigger1                = 1
flag                    = NoShadow

[State 0: AfterImage]
type 		    = AfterImage
trigger1 		    = !time
time 	              = 99999
TimeGap                 = 1
FrameGap                = 2
length                  = 60
paladd 		    = 0, 0, 0
palmul 		    = .5,.5,.5
palcontrast 	    = 50,50,50
trans 		    = add
persistent              = 0

[State 0, AfterImage]
type                    = AfterImageTime
trigger1                = 1
time                    = 2


[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0

[State 8331, Combo]
type = VarAdd
trigger1 = MoveHit || moveguarded
var(51) = 1
ignorehitpause = 1

[State 8331, MoveHitReset]
type = MoveHitReset
trigger1 = moveContact 
ignorehitpause = 1



[State 0, ]
type                    = HitDef
trigger1              =  Var(51)< 10 
attr                    = SCA,NP,SP,HP,HA
damage                  = ceil((23-(parent, var(13))*2)*parent, fvar(13)),5
animtype                = UP
guardflag               = M
hitflag                 = MAF, NP, SP, HP, NT, ST, HT
priority                = 7, Hit
pausetime               = 0, 12
sparkno                 = s8000+(random%2)
guard.sparkno           = S8020+(random%3)
sparkxy                 = 0, -50
hitsound                = S300, 3
guardsound              = S400, 0
ground.type             = High
ground.slidetime        = 20
ground.hittime          = 20
ground.velocity         = -5, -14
airguard.velocity       = -5,-5
air.type                = High
air.velocity            = -5, -14
air.hittime             = 12
getpower                = 0
givepower		        = 0
Fall                    = 1
Fall.recover            = 0
down.bounce             = 0
yaccel		            = 0.5
p1sprpriority           = 6
ground.cornerpush.veloff = 0
air.cornerpush.veloff   = 0
down.cornerpush.veloff  = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
ID                         = 8331

[State 0: 	DestroySelf]
type 			        = DestroySelf
trigger1 		        = Time = 98
trigger2 		        = parent,movetype = H

;--------------------------------------------------------------------------
;Energy Shield - Launcher
[Statedef 8332]
movetype		    = A
ctrl		    = 0
anim                    = 8531
SprPriority             = 6

[State 0: PlayerPush]
type                    = PlayerPush
trigger1                = (1)
value                   = 0
persistent              = 1

[State 0: AssertSpecial]
type                    = AssertSpecial
trigger1                = 1
flag                    = NoShadow

[State 0: AfterImage]
type 		    = AfterImage
trigger1 		    = !time
time 	              = 99999
TimeGap                 = 1
FrameGap                = 2
length                  = 60
paladd 		    = 0, 0, 0
palmul 		    = .5,.5,.5
palcontrast 	    = 50,50,50
trans 		    = add
persistent              = 0

[State 0, AfterImage]
type                    = AfterImageTime
trigger1                = 1
time                    = 2


[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0

[State 0, ]
type                    = HitDef
trigger1                = !time
attr                    = S, NA    
damage                  = ceil((60-(parent, var(13))*2)*parent, fvar(13)),ceil(5*parent, fvar(13))
animtype                = Heavy
guardflag               = MA
hitflag                 = MA
priority                = 3, Hit
pausetime               = 0, 12
sparkno                 = S8000+(random%2)
guard.sparkno           = S8020+(random%2)
sparkxy                 = 0, -70
hitsound                = S300, 3
guardsound              = S400, Ifelse (Random < 500, 0, Ifelse (Random < 500, 1, 2))
ground.type             = High
ground.slidetime        = 12
ground.hittime          = 12
ground.velocity         = 0, -10
airguard.velocity       = -3, -5
air.type                = High
air.velocity            = 0, -12
air.hittime             = 22
getpower                = 95
givepower		        = 0
yaccel		            = 0.5

[State 0: 	DestroySelf]
type 			        = DestroySelf
trigger1 		        = Time = 12
trigger3 		        = parent,movetype = H

;--------------------------------------------------------------------------
;Flare
[Statedef 8336]
type                    = U
movetype                = A
physics                 = U
anim                    = 7035
velset                  = 0,0
ctrl                    = 0
poweradd                = 0
juggle                  = 0
facep2                  = 0
hitdefpersist           = 0
movehitpersist          = 0
hitcountpersist         = 0
sprpriority             = 5
;---------------


[State 0, Trans]
type = Trans
trigger1 = 1 
trans = default ;none, add, addalpha, add1, sub
;alpha = 256,256
;ignorehitpause = 
;persistent = 

[State 0, PosSet]
type = PosSet
trigger1 = 1
x = parent, pos x+27*facing
y = parent, pos y-85



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

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


[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S25,0
volumescale = 255


[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 999
add = -80,0,0
mul = 340,300,425
sinadd = 0,0,0,10
invertall = 0
color = 5



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

[State 0:    HitBy]
type                    = HitBy
trigger1                = 1
value                   = SCA,AP
time                    = 2






;---------------
;Hit Details
;---------------

[State 0, ]
type                    = HitDef
trigger1                = !time
attr                    = C, NA
damage                  = 40
animtype                = back
guardflag               = MA
hitflag                 = MAF
priority                = 3, Hit
pausetime               = 0, 5
sparkno                 = S8000+(random%2)
guard.sparkno           = S8020+(random%2)
sparkxy                 = -19, 10
hitsound                = S815, 0
guardsound              = S400, Ifelse (Random < 500, 0, Ifelse (Random < 500, 1, 2))
ground.type             = high
ground.slidetime        = 20
ground.hittime          = 20
ground.velocity         = -9,-6
airguard.velocity       = -4, -4
air.type                = High
air.velocity            = -8,-3
air.hittime             = 12
getpower                = 27
givepower		        = 0
Fall                    = 1
Fall.recover            = 0
yaccel		            = 0.5
down.bounce = 1
envshake.time = 14
envshake.freq = 140
envshake.ampl = 3
fall.envshake.time = 10
fall.envshake.freq = 190
fall.envshake.ampl = 9
id                      = 8336
down.bounce             = 1



[State 0, DestroySelf]
type = DestroySelf
trigger1 = !animtime
;---------------------------------------------------------------------------
;KameHameHa - Charge
[StateDef 8506]
type = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 8506
poweradd = 0;0
sprpriority = 5

[State 0, PosSet]
type = PosSet
trigger1 = 1
x = parent, pos x-17*facing
y = parent, pos y-66

[State 0, PalFXWiz]
type = PalFX
trigger1 = !Var(6)
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S3001,0
volume = 0
channel = 3

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

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, stateno != 3000
ignorehitpause = 1
;persistent =

;--------------------------------------------------------------------------
;KameHameHa - Fire!
[StateDef 8516]
type = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 8516
poweradd = 0
sprpriority = 5
juggle = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = !Var(6)
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1




[state 8516, Juggle Set for Basics]
type =  parentvarset
trigger1 = numtarget
trigger1 = movehit = 1
v = 14
value = 10 


[State 0, PosSet]
type = PosSet
trigger1 = 1
x = parent, pos x+35*facing
y = parent, pos y-64

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S3001,1

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

[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0

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

[State 0, HitDef]
type = HitDef
trigger1 = !time
ID = 8516
nochainID = 8516
nochainid = 1365
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
getpower = 0;0,0
givepower = 0,0
;affectteam = E          ;B,E,F
animtype = Hard         ;light,medium,hard,back,up,diagup
air.animtype = Hard
;fall.animtype = Back
priority = 5,Hit   ;Hit,Miss,Dodge
damage = ceil(225*parent, fvar(13)),ceil(45*parent, fvar(13))
pausetime = 0,20
;guard.pause,0
air.juggle = 1
sparkno = -1
guard.sparkno = S8345+(random%4)
sparkxy = -20,0
;hitsound = S3001,2
;guardsound = S3001,2
ground.type = Low      ;Low,Trip,None
ground.slidetime = 20
ground.hit = 35
air.hittime = 35
Fall = 1
p2stateno = 6000
ground.velocity = -15,-4
air.velocity = -15,-4
sprpriority = 5
palfx.time = 55
palfx.add = -104,-104,7
palfx.mul = 256,256,512
palfx.sinadd = 56,56,0,10
envshake.time = 35
envshake.freq = 120
envshake.ampl = 8




[State 0, ChangeState]
type = ChangeState
trigger1 = !AnimTime || Moveguarded
value = 8317
ctrl = 0
ignorehitpause = 1
;persistent =

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, stateno != 3001 && time = 34
ignorehitpause = 1
;--------------------------------------------------------------------------
;-Kamehameha - Destroy
[StateDef 8317]
type = S
movetype= A
physics = N
velset = 0,0
Anim = -1
ctrl = 0
sprpriority = 5


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

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

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 10

[State 0, ChangeState]
type = ChangeState
trigger1 = Pos Y >=0
value = 2516
ctrl = 0
ignorehitpause = 1
;--------------------------------------------------------------------------
;KameHameHa (Kamekaze code thanks!)
[Statedef 8318]
physics = N
velset = 0,0
anim = 5333
ctrl = 0

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = 30

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

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,AT        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
slot = 0
stateno = 161

[State 0, VelMul]
type = VelMul
trigger1 = time > 20
x = .85

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

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

[State 4003, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
ignorehitpause = 1
persistent = 1

[State 911, Destroy]
type = destroyself
trigger1 = time >= 35
;--------------------------------------------------------------------------
;Aura up
[StateDef 8020]
type = S
movetype= I
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = -1
poweradd = 0;0
sprpriority = 2

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 999
ignorehitpause = 1
;persistent =

[State 0, PosSet]
type = PosSet
trigger1 = 1
x = parent, pos x
y = parent, pos y

[State 0, PalFXWiz]
type =null; PalFX
trigger1 = parent, Var(6) = 0
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1

[State 0, VarRandom]
type = VarRandom
trigger1 = 1
v = 0
range = 5,10

[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 0
value = .1*var(0)

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

[State 0, ]
type = Explod
trigger1 = random < 200
anim = 8300
ID = 8300
pos = 0-(random%20),-20-(random%60)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,3)
ownpal = 0
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random < 200
anim = 8301
ID = 8301
pos = 0+(random%20),-10-(random%60)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,3)
ownpal = 0
envshake.time = 15
envshake.freq = 120
envshake.ampl = 6
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random < 200
anim = 8302
ID = 8302
pos = 0-(random%10),0-(random%40)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,3)
ownpal = 0
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random < 200
anim = 8303
ID = 8303
pos = 10-(random%20),0-(random%50)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,3)
ownpal = 0
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random < 200
anim = 8304
ID = 8304
pos = 0+(random%20),-20-(random%60)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,3)
ownpal = 0
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random < 200
anim = 8305
ID = 8305
pos = 0-(random%20),-10-(random%60)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,3)
ownpal = 0
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random < 200
anim = 8306
ID = 8306
pos = 0+(random%10),0-(random%40)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,3)
ownpal = 0
ignorehitpause= 1

[State 0, ]
type = Explod
trigger1 = random < 200
anim = 8307
ID = 8307
pos = 15-(random%30),0-(random%50)
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = 1
scale = Fvar(0),Fvar(0)
sprpriority = ifelse(random<500,-3,3)
ownpal = 0
ignorehitpause= 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, stateno != [2020,2023]
ignorehitpause = 1

;-------------------------------------------------------------------------
;Cell jr 1 dashing Kick (Mid)
[StateDef 9000]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0
ctrl = 0
anim = 1345
sprpriority = 5


[State 0, VelSet]
type = VelSet
trigger1 = time = 18
y = 0


[State 0: PosSet]
type                    = PosSet
trigger1                = !Time
y                       = 100

[State 0: VelSet]
type                    = VelSet
trigger1                = !Time
y                       = -8.1


[State 0, VarSet]
type = VarSet
trigger1 = root,command = "x" 
v = 30    ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
trigger1 = root,command = "FF" 
v = 30    ;fv = 10
value = 8


[State ChangeAnim]
type = ChangeAnim
trigger1 = Var(30) = 1 && time >= 18 || var(30) = 8 && time>=18
value = 1349
persistent = 0

[State VelSet]
type = VelSet
trigger1 = Var(30) = 1&& time >= 18 || var(30) = 8 && time>=18
x = 10



[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NP,SP,HP
slot = 0
stateno = 1356
time = 1

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



[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 1349
value = S25,0
persistent = 0



[State 0, PalFXWiz]
type = null;  PalFX
trigger1 = Parent, Var(27) = 1
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1

[State ReMapPal]
type =  RemapPal
trigger1 = time = 0
source = 20000,1
dest = 20000,(root, palno)

[State 1200,6	Fading Afterimage]
type		= null; helper
trigger1 		= movehit = 1
stateno 		= 1355
ID 		= 1003
pos 		= 0,0
ownpal 		= 1
keyctrl		= 0
pausemovetime 	= 99
ignorehitpause	= 1

[State 0, Explod]
type = Explod
triggerall = anim = 1349
trigger1 = (time%4)=0
anim =8221
ID = 8100
pos = -15,-15
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 1349
trigger1 = (time%6)=0
anim =8221
ID = 8101
pos = -5,-30
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 1349
trigger1 = (time%3)=0
anim =8221
ID = 8102
pos = 5,-45
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 1349
trigger1 = (time%5)=0
anim =8221
ID = 8103
pos = 15,-60
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1


[State 1000, width]
type = width
trigger1 =movehit
value = 20
ignorehitpause = 1

[State 1000, Push]
type = playerpush
trigger1 = movehit
value = 0
ignorehitpause = 1


[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0

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



[State 0, HitDef]
type = HitDef
trigger1 = !time 
attr = A,SA        ;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 = Hard
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil((75-(parent, var(13))*2)*parent, fvar(13)),ceil(5*parent, fvar(13))
pausetime = 0,10
;guard.pause,0
sparkno = -1
guard.sparkno = -1
sparkxy = -20,0
hitsound = S3001,2
guardsound = S3001,2
ground.type = High      ;Low,Trip,None
ground.slidetime = 20
ground.hittime = 20
air.hittime = 20
ground.velocity = -5,-5
air.velocity = -4,-3
ground.cornerpush.veloff = 0
sprpriority = 3
getpower = 0;0
fall = 1
envshake.time = 10
envshake.freq = 110
envshake.ampl = 3
fall.envshake.time = 10
fall.envshake.freq = 190
fall.envshake.ampl = 6
yaccel = 0.3



[State 0, DestroySelf]
type = DestroySelf
trigger1 = frontedgebodydist < -20
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = Movecontact
trigger2 = root, movetype = H
trigger3 = time = 500 
value =1355
ctrl = 0

;------------------------------------------------------------------------
;Cell jr 2 fly up 2 (High)
[StateDef 9001]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0
ctrl = 0
anim = 1345
sprpriority = 5


[State 0, VelSet]
type = VelSet
trigger1 = time = 12
y = 0


[State 0: PosSet]
type                    = PosSet
trigger1                = !Time
y                       = 100

[State 0: VelSet]
type                    = VelSet
trigger1                = !Time
y                       = -7.1


[State 0, VarSet]
type = VarSet
trigger1 = root,command = "y" 
v = 30    ;fv = 10
value = 2

[State 0, VarSet]
type = VarSet
trigger1 = root,command = "FF" 
v = 30    ;fv = 10
value = 8


[State 0, ChangeAnim]
type =  ChangeAnim
trigger1 = Var(30) = 2 && time >= 18 || var(30) = 8 && time>=18
value = 1350
;elem = 1
;ignorehitpause = 
persistent = 0

[State 0, VelSet]
type =  VelSet
trigger1 = Var(30) = 2 && time >= 18 || var(30) = 8 && time>=18
x = 12
y = -6

[State PosAdd]
type = null;PosAdd
trigger1 = Var(30) = 2 && time >= 18 
x = floor(p2dist X) - 100
y = -10


[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NP,SP,HP
slot = 0
stateno = 1356
time = 1

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



[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 1350
value = s25,0
persistent = 0



[State 0, PalFXWiz]
type = null;  PalFX
trigger1 = Parent, Var(27) = 1
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1



[State 1200,6	Fading Afterimage]
type		= null; helper
trigger1 		= movehit = 1
stateno 		= 1355
ID 		= 1003
pos 		= 0,0
ownpal 		= 1
keyctrl		= 0
pausemovetime 	= 99
ignorehitpause	= 1

[State 0, Explod]
type = Explod
triggerall = anim = 1350
trigger1 = (time%4)=0
anim =8221
ID = 8100
pos = -15,-15
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 1350
trigger1 = (time%6)=0
anim =8221
ID = 8101
pos = -5,-30
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 1350
trigger1 = (time%3)=0
anim =8221
ID = 8102
pos = 5,-45
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 1350
trigger1 = (time%5)=0
anim =8221
ID = 8103
pos = 15,-60
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State ReMapPal]
type =  RemapPal
trigger1 = time = 0
source = 20000,1
dest = 20000,(root, palno)

[State 1000, width]
type = width
trigger1 =movehit
value = 20
ignorehitpause = 1

[State 1000, Push]
type = playerpush
trigger1 = movehit
value = 0
ignorehitpause = 1


[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0

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

[State 0, HitDef]
type = HitDef
trigger1 = !time 
attr = A,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = HA         ;HLA
animtype = Hard         ;light,medium,hard,back,up,diagup
air.animtype = Hard
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil((76-(parent, var(13))*2)*parent, fvar(13)),ceil(5*parent, fvar(13))
pausetime = 0,10
;guard.pause,0
sparkno = -1
guard.sparkno = -1
sparkxy = -20,0
hitsound = S3001,2
guardsound = S3001,2
ground.type = High      ;Low,Trip,None
ground.slidetime = 20
ground.hittime = 20
air.hittime = 20
ground.velocity = -5,-5
air.velocity = -4,-3
ground.cornerpush.veloff = 0
sprpriority = 3
getpower = 0;0
fall = 1
envshake.time = 10
envshake.freq = 110
envshake.ampl = 3
fall.envshake.time = 10
fall.envshake.freq = 190
fall.envshake.ampl = 6


[State 0, DestroySelf]
type = DestroySelf
trigger1 = frontedgebodydist < -20
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = Movecontact
trigger2 = root, movetype = H
trigger3 = time = 500 
value =1355
ctrl = 0
;------------------------------------------------------------------------
;Cell jr 3 Fly up (High)
[StateDef 9002]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0
ctrl = 0
anim = 1345
sprpriority = 5

[State ReMapPal]
type =  RemapPal
trigger1 = time = 0
source = 20000,1
dest = 20000,(root, palno)

[State 0, ChangeAnim]
type =  ChangeAnim
trigger1 = Var(30) = 3 && time >= 18 || var(30) = 8 && time>=18
value = 1348
;elem = 1
;ignorehitpause = 
persistent = 0

[State 0, VarSet]
type = VarSet
trigger1 = root,command = "z" 
v = 30    ;fv = 10
value = 3

[State 0, VarSet]
type = VarSet
trigger1 = root,command = "FF" 
v = 30    ;fv = 10
value = 8


[State 0, VelSet]
type =  VelSet
trigger1 = Var(30) = 3 && time >= 18 || var(30) = 8 && time>=18
x = 12
y = -6

[State PosAdd]
type = null; PosAdd
trigger1 = Var(30) = 3 && time >= 18 || var(30) = 8 && time>=18
x = floor(p2dist X) - 100
y = -10

[State 0, VelSet]
type = VelSet
trigger1 = time = 18 
y = 0

[State 0: PosSet]
type                    = PosSet
trigger1                = !Time
y                       = 100

[State 0: VelSet]
type                    = VelSet
trigger1                = !Time
y                       = -6.1

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NP,SP,HP
slot = 0
stateno = 1356
time = 1

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 1348
value = S25,0
persistent = 0

[State 0, PalFXWiz]
type = null;  PalFX
trigger1 = Parent, Var(27) = 1
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1

[State 1200,6	Fading Afterimage]
type		= null; helper
trigger1 		= movehit = 1
stateno 		= 1355
ID 		= 1003
pos 		= 0,0
ownpal 		= 1
keyctrl		= 0
pausemovetime 	= 99
ignorehitpause	= 1

[State 0, Explod]
type = Explod
triggerall = anim = 1348
trigger1 = (time%4)=0
anim =8221
ID = 8100
pos = -15,-15
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 1348
trigger1 = (time%6)=0
anim =8221
ID = 8101
pos = -5,-30
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 1348
trigger1 = (time%3)=0
anim =8221
ID = 8102
pos = 5,-45
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 1348
trigger1 = (time%5)=0
anim =8221
ID = 8103
pos = 15,-60
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 1000, width]
type = width
trigger1 =movehit
value = 20
ignorehitpause = 1

[State 1000, Push]
type = playerpush
trigger1 = movehit
value = 0
ignorehitpause = 1





[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0

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

[State 0, HitDef]
type = HitDef
trigger1 = !time 
attr = A,SA
hitflag = MAF    
guardflag = HA     
animtype = Hard      
air.animtype = Hard
priority = 4,Hit 
damage = ceil((80-(parent, var(13))*2)*parent, fvar(13)),ceil(5*parent, fvar(13))
pausetime = 0,10
;guard.pause,0
sparkno = -1
guard.sparkno = -1
sparkxy = -20,0
hitsound = S3001,2
guardsound = S3001,2
ground.type = trip
ground.slidetime = 20
ground.hittime = 20
air.hittime = 20
ground.velocity = 0,-6
air.velocity = 0,-6
ground.cornerpush.veloff = 0
p1sprpriority = 3
getpower = 0;0
fall = 1
fall.recover = 0
envshake.time = 10
envshake.freq = 110
envshake.ampl = 3
fall.envshake.time = 10
fall.envshake.freq = 190
fall.envshake.ampl = 6


[State 0, DestroySelf]
type = DestroySelf
trigger1 = frontedgebodydist < -20
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = Movecontact
trigger2 = root, movetype = H
trigger3 = time = 500 
value =1355
ctrl = 0

;------------------------------------------------------------------------
;Cell jr 4 Sliding (Low)
[StateDef 9003]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0
ctrl = 0
anim = 1345
sprpriority = 5


[State ReMapPal]
type =  RemapPal
trigger1 = time = 0
source = 20000,1
dest = 20000,(root, palno)

[State 0, VelSet]
type = VelSet
trigger1 = time = 10
y = 0

[State 0: PosSet]
type                    = PosSet
trigger1                = !Time
y                       = 100

[State 0: VelSet]
type                    = VelSet
trigger1                = !Time
y                       = -7.1

[State 0, VarSet]
type = VarSet
trigger1 = root,command = "a" 
v = 30    ;fv = 10
value = 4

[State 0, VarSet]
type = VarSet
trigger1 = root,command = "FF" 
v = 30    ;fv = 10
value = 8


[State ChangeAnim]
type = ChangeAnim
trigger1 = var(30) = 4 && time >= 18 || var(30) = 8 && time>=18
value = 20410
persistent = 0

[State PosAdd]
type = null; PosAdd
trigger1 = var(30) = 4 && time >= 18 || var(30) = 8 && time>=18
y = -15

[State VelSet]
type = VelSet
trigger1 = var(30) = 4 && time >= 18 || var(30) = 8 && time>=18
x = 10
y = 0



[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NP,SP,HP
slot = 0
stateno = 1356
time = 1

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 20410
value = S25,0
persistent = 0



[State 0, Explod]
type = Explod
triggerall = anim = 20410
trigger1 = (time%4)=0
anim =8221
ID = 8100
pos = -15,-15
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 20410
trigger1 = (time%6)=0
anim =8221
ID = 8101
pos = -5,-30
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 20410
trigger1 = (time%3)=0
anim =8221
ID = 8102
pos = 5,-45
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 20410
trigger1 = (time%5)=0
anim =8221
ID = 8103
pos = 15,-60
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 1000, width]
type = width
trigger1 =movehit
value = 20
ignorehitpause = 1

[State 1000, Push]
type = playerpush
trigger1 = movehit
value = 0
ignorehitpause = 1


[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0

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



[State 0, HitDef]
type = HitDef
trigger1 = !time 
attr = C,HA
hitflag = MAFD        
guardflag = L  
animtype = Hard   
air.animtype = Hard
priority = 4,Hit  
damage = ceil((90-(parent, var(13))*2)*parent, fvar(13)),ceil(5*parent, fvar(13))
pausetime = 0,10
;guard.pause,0
sparkno = -1
guard.sparkno = -1
sparkxy = -20,0
hitsound = S3001,2
guardsound = S3001,2
ground.type = trip 
ground.slidetime = 20
ground.hittime = 20
air.hittime = 20
ground.velocity = 0,-6
air.velocity = 0,-6
ground.cornerpush.veloff = 0
p1sprpriority = 3
getpower = 0
fall = 1
envshake.time = 10
envshake.freq = 110
envshake.ampl = 3
fall.envshake.time = 10
fall.envshake.freq = 190
fall.envshake.ampl = 6
yaccel      = 0.3

[State 0, DestroySelf]
type = DestroySelf
trigger1 = frontedgebodydist < -20
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = Movecontact
trigger2 = root, movetype = H
trigger3 = time = 500 
value =1355
ctrl = 0

;------------------------------------------------------------------------
;Cell jr 5 Flying High (High)
[StateDef 9004]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0
ctrl = 0
anim = 1345
sprpriority = 5


[State ReMapPal]
type =  RemapPal
trigger1 = time = 0
source = 20000,1
dest = 20000,(root, palno)

[State 0, VelSet]
type = VelSet
trigger1 = time = 24
y = 0


[State 0: PosSet]
type                    = PosSet
trigger1                = !Time
y                       = 100

[State 0: VelSet]
type                    = VelSet
trigger1                = !Time
y                       = -7.1

[State 0, VarSet]
type = VarSet
trigger1 = root,command = "b" 
v = 30    ;fv = 10
value = 5

[State 0, VarSet]
type = VarSet
trigger1 = root,command = "FF" 
v = 30    ;fv = 10
value = 8


[State 0, ChangeAnim]
type =  ChangeAnim
trigger1 =  var(30) = 5 && time >= 18 || var(30) = 8 && time>=18
value = 21015
;elem = 1
;ignorehitpause = 
persistent = 0

[State 0, VelSet]
type =  VelSet
trigger1 =  var(30) = 5 && time >= 18 || var(30) = 8 && time>=18
x = 12



[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NP,SP,HP
slot = 0
stateno = 1356
time = 1

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



[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 21015
value = S25,0
persistent = 0



[State 0, PalFXWiz]
type = null;  PalFX
trigger1 = Parent, Var(27) = 1
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1



[State 1200,6	Fading Afterimage]
type		= null; helper
trigger1 		= movehit = 1
stateno 		= 1355
ID 		= 1003
pos 		= 0,0
ownpal 		= 1
keyctrl		= 0
pausemovetime 	= 99
ignorehitpause	= 1

[State 0, Explod]
type = Explod
triggerall = anim = 21015
trigger1 = (time%4)=0
anim =8221
ID = 8100
pos = -15,-15
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 21015
trigger1 = (time%6)=0
anim =8221
ID = 8101
pos = -5,-30
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 21015
trigger1 = (time%3)=0
anim =8221
ID = 8102
pos = 5,-45
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 21015
trigger1 = (time%5)=0
anim =8221
ID = 8103
pos = 15,-60
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1


[State 1000, width]
type = width
trigger1 =movehit
value = 20
ignorehitpause = 1

[State 1000, Push]
type = playerpush
trigger1 = movehit
value = 0
ignorehitpause = 1


[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0

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

[State 0, HitDef]
type = HitDef
trigger1 = !time 
attr = A,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = H         ;HLA
animtype = Hard         ;light,medium,hard,back,up,diagup
air.animtype = Hard
fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil((80-(parent, var(13))*2)*parent, fvar(13)),ceil(5*parent, fvar(13))
pausetime = 0,10
;guard.pause,0
sparkno = -1
guard.sparkno = -1
sparkxy = -20,0
hitsound = S3001,2
guardsound = S3001,2
ground.type = High      ;Low,Trip,None
ground.slidetime = 20
ground.hittime = 20
air.hittime = 20
ground.velocity = -5,-5
air.velocity = -6,-3
ground.cornerpush.veloff = 0
sprpriority = 3
getpower = 0;0
fall = 1
fall.recover = 1
envshake.time = 10
envshake.freq = 110
envshake.ampl = 3
fall.envshake.time = 10
fall.envshake.freq = 190
fall.envshake.ampl = 6


[State 0, DestroySelf]
type = DestroySelf
trigger1 = frontedgebodydist < -20
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = Movecontact
trigger2 = root, movetype = H
trigger3 = time = 500 
value =1355
ctrl = 0

;----------------------------------------------
;Cell jr 6 diving knee (Low)
[StateDef 9005]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0
ctrl = 0
anim = 1345
sprpriority = 5



[State ReMapPal]
type =  RemapPal
trigger1 = time = 0
source = 20000,1
dest = 20000,(root, palno)




[State 0, VarSet]
type = VarSet
trigger1 = root,command = "c" 
v = 30    ;fv = 10
value = 6

[State 0, VarSet]
type = VarSet
trigger1 = root,command = "FF" 
v = 30    ;fv = 10
value = 8


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

[State PosAdd]
type = PosAdd
trigger1 = var(30) = 6 && time = 22 || var(30) = 8 && time = 22
x = floor(p2dist X) - 100
y = -20

[State ChangeAnim]
type = ChangeAnim
trigger1 = var(30) = 6 && time >= 18 || var(30) = 8 && time>=18
value = 21010
persistent = 0

[State VelSet]
type = VelSet
trigger1 = var(30) = 6 && time >= 18  || var(30) = 8 && time>=18
x = 10
y = 3


[State 0: PosSet]
type                    = PosSet
trigger1                = !Time
y                       = 100

[State 0: VelSet]
type                    = VelSet
trigger1                = !Time
y                       = -8.7

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NP,SP,HP
slot = 0
stateno = 1356
time = 1

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 21010
value = S25,0
persistent = 0

[State 0, PalFXWiz]
type = null;  PalFX
trigger1 = Parent, Var(27) = 1
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1

[State 1200,6	Fading Afterimage]
type		= null; helper
trigger1 		= movehit = 1
stateno 		= 1355
ID 		= 1003
pos 		= 0,0
ownpal 		= 1
keyctrl		= 0
pausemovetime 	= 99
ignorehitpause	= 1

[State 0, Explod]
type = Explod
triggerall = anim = 21010
trigger1 = (time%4)=0
anim =8221
ID = 8100
pos = -15,-15
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 21010
trigger1 = (time%6)=0
anim =8221
ID = 8101
pos = -5,-30
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 21010
trigger1 = (time%3)=0
anim =8221
ID = 8102
pos = 5,-45
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 21010
trigger1 = (time%5)=0
anim =8221
ID = 8103
pos = 15,-60
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 1000, width]
type = width
trigger1 =movehit
value = 20
ignorehitpause = 1

[State 1000, Push]
type = playerpush
trigger1 = movehit
value = 0
ignorehitpause = 1

[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0

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


[State 0, HitDef]
type = HitDef
trigger1 = !time 
attr = A,SA   
hitflag = MAF     
guardflag = L     
animtype = back      
air.animtype = back
priority = 4,Hit  
damage = ceil((70-(parent, var(13))*2)*parent, fvar(13)),ceil(5*parent, fvar(13))
pausetime = 0,10
;guard.pause,0
sparkno = -1
guard.sparkno = -1
sparkxy = -20,0
hitsound = S3001,2
guardsound = S3001,2
ground.type = High      ;Low,Trip,None
ground.slidetime = 20
ground.hittime = 20
air.hittime = 20
ground.velocity = 0,-2
air.velocity = 0,-2
ground.cornerpush.veloff = 0
p1sprpriority = 3
getpower = 0;0
fall = 1
envshake.time = 10
envshake.freq = 110
envshake.ampl = 3
fall.envshake.time = 10
fall.envshake.freq = 190
fall.envshake.ampl = 6


[State 0, DestroySelf]
type = DestroySelf
trigger1 = frontedgebodydist < -20
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = Movecontact
trigger2 = root, movetype = H
trigger3 = time = 500 
value =1355
ctrl = 0

;------------------------------------------------------------------------
;Cell jr 7 Flying splosion (Mid)
[StateDef 9006]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0
ctrl = 0
anim = 1345
sprpriority = 5

[State ReMapPal]
type =  RemapPal
trigger1 = time = 0
source = 20000,1
dest = 20000,(root, palno)


[State 0, VarSet]
type = VarSet
trigger1 = root,command = "start" 
v = 30    ;fv = 10
value = 7

[State 0, VarSet]
type = VarSet
trigger1 = root,command = "FF" 
v = 30    ;fv = 10
value = 8


[State 0, VelSet]
type = VelSet
trigger1 = time = 12
y = 0


[State 0: PosSet]
type                    = PosSet
trigger1                = !Time
y                       = 100

[State 0: VelSet]
type                    = VelSet
trigger1                = !Time
y                       = -10.1

[State ChangeAnim]
type = ChangeAnim
trigger1 = var(30) = 7 && time >= 18 || var(30) = 8 && time>=18
value = 21015
persistent = 0

[State VelSet]
type = VelSet
trigger1 = var(30) = 7 && time >= 18 || var(30) = 8 && time>=18
x = 10


[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NP,SP,HP
slot = 0
stateno = 1356
time = 1

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 21015
value = S25,0
persistent = 0

[State 0, PalFXWiz]
type = null;  PalFX
trigger1 = Parent, Var(27) = 1
time = 999
add = 0,0,0
mul = 256,256,512
sinadd = 0,0,0,1
invertall = 0
color = 1

[State 1200,6	Fading Afterimage]
type		= null; helper
trigger1 		= movehit = 1
stateno 		= 1355
ID 		= 1003
pos 		= 0,0
ownpal 		= 1
keyctrl		= 0
pausemovetime 	= 99
ignorehitpause	= 1

[State 0, Explod]
type = Explod
triggerall = anim = 21015
trigger1 = (time%4)=0
anim =8221
ID = 8100
pos = -15,-15
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 21015
trigger1 = (time%6)=0
anim =8221
ID = 8101
pos = -5,-30
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 21015
trigger1 = (time%3)=0
anim =8221
ID = 8102
pos = 5,-45
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = anim = 21015
trigger1 = (time%5)=0
anim =8221
ID = 8103
pos = 15,-60
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),.5
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 1000, width]
type = width
trigger1 =movehit
value = 20
ignorehitpause = 1

[State 1000, Push]
type = playerpush
trigger1 = movehit
value = 0
ignorehitpause = 1



[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0

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

[State 0, HitDef]
type = HitDef
trigger1 = !time 
attr = A,HA  
hitflag = MAFD   
guardflag = MA     
animtype = Hard    
air.animtype = Hard
priority = 4,Hit  
damage = ceil((90-(parent, var(13))*2)*parent, fvar(13)),ceil(5*parent, fvar(13))
pausetime = 0,0
;guard.pause,0
sparkno = -1
guard.sparkno = -1
sparkxy = -20,0
hitsound = S3001,2
guardsound = S3001,2
ground.type = High      ;Low,Trip,None
ground.slidetime = 20
ground.hittime = 20
air.hittime = 20
ground.velocity = -9,-5
air.velocity = -9,-5
ground.cornerpush.veloff = 0
sprpriority = 3
getpower = 0;0
fall = 1
envshake.time = 10
envshake.freq = 110
envshake.ampl = 3
fall.envshake.time = 10
fall.envshake.freq = 190
fall.envshake.ampl = 6

[State TargetState]
type = TargetState
trigger1 = movehit
value = 6000
ID = -1
persistent = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = frontedgebodydist < -20
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = Movecontact
trigger2 = root, movetype = H
trigger3 = time = 500 
value =1355
ctrl = 0

;------------------------------------------------------------------------
;Throw stuff
[Statedef 820]
type = S
movetype = H
physics = N
ctrl = 0
velset = 0,0

[State ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 820

[State PosAdd]
type = PosAdd
trigger1 = gethitvar(isbound) = 0
y = -const(size.mid.pos.y)

[State SelfState]
type = SelfState
trigger1 = gethitvar(isbound) = 0
value = 5050

;-----------------------------------------------------
; Cell Jr Kamehameha
[Statedef 70313]
type                    = U
movetype                = A
physics                 = U
anim                    = 70312
velset                  = 0,0
ctrl                    = 0
poweradd                = 0
juggle                  = 0
facep2                  = 0
hitdefpersist           = 0
movehitpersist          = 0
hitcountpersist         = 0
sprpriority             = 8
;---------------



[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S3003,1
channel = -1





[State 0:	VelSet]
type			        = VelSet
trigger1		        = 1
x			            = ifelse(p2movetype = H,9,9.2)

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

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

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NP,SP,HP
slot = 0
stateno = 8101
time = 1

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

[State 0:    HitBy]
type                    = HitBy
trigger1                = 1
value                   = SCA,AP
time                    = 2

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 999
add = -80,-11,108
mul = 256,256,256
sinadd = 0,0,0,10
invertall = 0
color = 0


[State -2, ComboDampener-Increase]
type = ParentVarAdd
trigger1 = MoveType = A
trigger1 = MoveHit = 1
trigger1 = FVar(10) < 31
trigger1 = NumTarget
fv = 10
value = 1
persistent = 0

[State 0: Pause]
type                    = Pause
triggerall              = AnimElem = 1,>  0 && AnimElem = 4,<  0
trigger1                = gametime%1 = 0
time                    = 1
movetime                = 1

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

[State 0: Dust]
type                    = MakeDust
trigger1                = (1)
pos                     = 20,floor(-pos y)
spacing                 = 2



[State 0]
type                    = AfterImageTime
trigger1                = 1
time                    = 3
ignorehitpause          = 1

;---------------
;Hit Details
;---------------

[State 0, ]
type                    = HitDef
trigger1                = !time
attr                    = S, SP
damage                  = 90
animtype                = Heavy
guardflag               = MAFD
hitflag                 = MA
priority                = 4, Hit
pausetime               = 0, 8
sparkno                 = S8000+(random%2)
guard.sparkno           = S7113
sparkxy                 = -30, 0
hitsound                = S3001, 2
guardsound              = S3001, 2
guard.sparkno           = S8020+(random%2)
ground.type             = High
ground.slidetime        = 20
ground.hittime          = 20
ground.velocity         = -5
airguard.velocity       = -5, -5
air.type                = High
air.velocity            = -8, 5
air.hittime             = 12
getpower                = 27
givepower		        = 0
Fall                    = 0
Fall.recover            = 0
yaccel		            = 0.5
envshake.time           = 3
envshake.freq           = 10
envshake.ampl           = 10
envshake.phase          = 10
id                      = 73012

[State 0: Helper]
type                    = Helper
triggerall              = !NumHelper(8101)
trigger1                = NumTarget(73012) && MoveHit || NumTarget(73012) && Movecontact
id                      = 8102
pos                     = 20,0
postype                 = p1
stateno                 = 8101
ownpal                  = 1
size.xscale             = .5
size.yscale             = .5
ignorehitpause          = 1
persistent              = 0

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

[State 0, ChangeState]
type = ChangeState
trigger1 = Movecontact
value = 1311
ctrl = 0
ignorehitpause = 1
;persistent =

[State 0:    End]
type                    = DestroySelf
trigger1                = ((frontedgedist <= -75) || (backedgedist <= -75))

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



