; Nyololin's constants and state file.
; Written by Mature4evr.
; Edited by HelloMyNameIsAAA

[Data]
life = 700
attack = 100
defence = 100
fall.defence_up = 50
liedown.time = 60
airjuggle = 15
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = 0
IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = 3     
yscale = 3          
ground.back = 10     
ground.front = 10   
air.back = 10        
air.front = 10      
height = 60	     
attack.dist = 160    
proj.attack.dist = 90
proj.doscale = 0       
head.pos = -5, -90  
mid.pos = -5, -60   
shadowoffset = 0     
draw.offset = 0,0    

[Velocity]
walk.fwd  = 2.9      
walk.back = -2.9     
run.fwd  = 4.9, 0    
run.back = -4, -3.6 
jump.neu = 0,-8.4    
jump.back = -2.55   
jump.fwd = 2.5       
runjump.back = -2.55,-8.1
runjump.fwd = 4,-8.1      
airjump.neu = 0,-8.1      
airjump.back = -2.55      
airjump.fwd = 2.5         

[Movement]
airjump.num = 0      
airjump.height = 35  
yaccel = .44         
stand.friction = .85  
crouch.friction = .82 

;-----------------------------------------
; Lose (dead animation)
[Statedef 5150]
type = S
ctrl = 0
anim = 5151
velset = 0,0

[State 5150, 1]
type = Playsnd
trigger1 = AnimElem = 2
value = S0,3

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


[State 5150, 2]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 5150, 3]
type = Changeanim
trigger1 = animelem = 16
value = 9998

;-------------------------------------------------
; Forward Diagonal Fireball
;-------------------------------------------------
[Statedef 200]
type = S
movetype= A
physics = S
poweradd = 0
ctrl = 0
anim = 200
velset = 0

[State 200, 1]
type = Playsnd
trigger1 = AnimElem = 1
value = S0,1

[State 200, 2]
type = velset
trigger1 = time >= 0
trigger1 = time <= 20
x = 0
y = 0

[State 200, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 201
ctrl = 0

; Fireball itself
[statedef 201]
type = S
movetype = A
physics = S
anim = 201

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time = 0
value = 50

[State 201, 1]
type = Projectile
trigger1 = AnimElem = 1
projanim = 202
projheightbound = -240, 70
projscale = 3,3
offset = 17,-24
velocity = 5,0
attr = S, SP
damage = 50, 6
animtype = light
guardflag = MA
hitflag = MAF
pausetime = 5,5
;hitsound = s2,4
;guardsound = s2,3
guard.sparkno = 40
sparkno = 0                      
sparkxy = -10,0  
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5,0
air.velocity = -5,0
air.juggle = 5
air.fall = 0
down.velocity = -4,-6
down.hittime = 10
down.bounce = 0

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

;-------------------------------------------------
; Forward Diagonal Fireball
;-------------------------------------------------
[Statedef 205]
type = S
movetype= A
physics = S
poweradd = 0
ctrl = 0
anim = 200
velset = 0

[State 200, 1]
type = Playsnd
trigger1 = AnimElem = 1
value = S0,1

[State 200, 2]
type = velset
trigger1 = time >= 0
trigger1 = time <= 20
x = 0
y = 0

[State 200, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 206
ctrl = 0

; Fireball itself
[statedef 206]
type = S
movetype = A
physics = S
anim = 201
Velset = 0,0

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time = 0
value = 50

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 1
helpertype = normal ;player
name = "BallCrits"
ID = 207
stateno = 207
pos = 17,-24
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 3
size.yscale = 3

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

; Fireball itself
[statedef 207]
type = S
movetype = A
physics = S
anim = 202

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

[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 0,0,256
mul = 256,256,256
invertall = 0
color = 256

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = S,AA,AP,AT       
slot = 1
stateno = 9999
time = 1
forceair = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S9500,0
volume = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SP
damage = 150, 0
animtype = hard
guardflag =
hitflag = MAF
pausetime = 0,0
;hitsound = s2,4
;guardsound = s2,3
sparkno = 2                    
sparkxy = -10,0 
hitsound = S9500, 1   
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5,0
air.velocity = -5,0
air.juggle = 5
air.fall = 0
down.velocity = -4,-6
down.hittime = 10
down.bounce = 0
getpower = 0,0

[State 0, PowerAdd]
type = PowerAdd
trigger1 = movehit = 1
value = 250

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "CriticalHit"
ID = 9500
stateno = 9500
pos = -15,-30+floor(Enemy,Const(Size.Head.Pos.Y))
postype = p2    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 0.1 
size.yscale = 0.1
persistent = 0

[State 0, ChangeState]
type = DestroySelf
trigger1 = movehit
trigger2 = moveguarded 
trigger3 = FrontEdgeDist <= -20
trigger4 = BackEdgeDist <= -20


;-------------------------------------------------
; Forward Up Horizontal Fireball
;-------------------------------------------------
[Statedef 210]
type = S
movetype= A
physics = S
poweradd = 0
ctrl = 0
anim = 210
velset = 0

[State 230, 1]
type = Playsnd
trigger1 = AnimElem = 1
value = S0,1

[State 230, 2]
type = velset
trigger1 = time >= 0
trigger1 = time <= 20
x = 0
y = 0

[State 230, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 211
ctrl = 0

; Fireball itself
[statedef 211]
type = S
movetype = A
physics = S
anim = 211

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time = 0
value = 50

[State 211, 1]
type = Projectile
trigger1 = AnimElem = 1
projanim = 212
projheightbound = -240, 70
projscale = 3,3
offset = 17,-24
velocity = 4,-1.5
attr = S, SP
damage = 50,6
animtype = light
guardflag = MA
hitflag = MAF
pausetime = 5,5
;hitsound = s2,4
;guardsound = s2,3
guard.sparkno = 40
sparkno = 0                      
sparkxy = -10,0 
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -4,-0.2
air.velocity = -4,-3
air.juggle = 5
air.fall = 0
down.velocity = -4,-3
down.hittime = 10
down.bounce = 0

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

;-------------------------------------------------
; Forward Up Diagonal Fireball
;-------------------------------------------------
[Statedef 215]
type = S
movetype= A
physics = S
poweradd = 0
ctrl = 0
anim = 210
velset = 0

[State 200, 1]
type = Playsnd
trigger1 = AnimElem = 1
value = S0,1

[State 200, 2]
type = velset
trigger1 = time >= 0
trigger1 = time <= 20
x = 0
y = 0

[State 200, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 216
ctrl = 0

; Fireball itself
[statedef 216]
type = S
movetype = A
physics = S
anim = 210
Velset = 0,0

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time = 0
value = 50

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 1
helpertype = normal ;player
name = "BallCrits"
ID = 217
stateno = 217
pos = 17,-24
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 3
size.yscale = 3

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

; Fireball itself
[statedef 217]
type = S
movetype = A
physics = S
anim = 212

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

[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 0,0,256
mul = 256,256,256
invertall = 0
color = 256

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = S,AA,AP,AT       
slot = 1
stateno = 9999
time = 1
forceair = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S9500,0
volume = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SP
damage = 150, 0
animtype = hard
guardflag =
hitflag = MAF
pausetime = 0,0
;hitsound = s2,4
;guardsound = s2,3
sparkno = 2                    
sparkxy = -10,0 
hitsound = S9500, 1   
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -4,-0.2
air.velocity = -4,-3
air.juggle = 5
air.fall = 0
down.velocity = -4,-3
down.hittime = 10
down.bounce = 0
getpower = 0,0

[State 0, PowerAdd]
type = PowerAdd
trigger1 = movehit = 1
value = 250

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "CriticalHit"
ID = 9500
stateno = 9500
pos = -15,-30+floor(Enemy,Const(Size.Head.Pos.Y))
postype = p2    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 0.1 
size.yscale = 0.1
persistent = 0

[State 0, ChangeState]
type = DestroySelf
trigger1 = movehit
trigger2 = moveguarded 
trigger3 = FrontEdgeDist <= -20
trigger4 = BackEdgeDist <= -20

;-------------------------------------------------
; Forward Up Diagonal Fireball
;-------------------------------------------------
[Statedef 220]
type = S
movetype= A
physics = S
poweradd = 0
ctrl = 0
anim = 220
velset = 0

[State 230, 1]
type = Playsnd
trigger1 = AnimElem = 1
value = S0,1

[State 230, 2]
type = velset
trigger1 = time >= 0
trigger1 = time <= 20
x = 0
y = 0

[State 230, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 221
ctrl = 0

; Fireball itself
[statedef 221]
type = S
movetype = A
physics = S
anim = 221

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time = 0
value = 50

[State 221, 1]
type = Projectile
trigger1 = AnimElem = 1
projanim = 222
projheightbound = -240, 70
projscale = 3,3
offset = 17,-24
velocity = 3,-3
attr = S, SP
damage = 50,6
animtype = light
guardflag = MA
hitflag = MAF
pausetime = 5,5
;hitsound = s2,4
;guardsound = s2,3
guard.sparkno = 40
sparkno = 0                      
sparkxy = -10,0 
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3,-1
air.velocity = -3,-6
air.juggle = 5
air.fall = 0
down.velocity = -3,-7
down.hittime = 10
down.bounce = 0

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

;-------------------------------------------------
; Forward Up Diagonal Fireball
;-------------------------------------------------
[Statedef 225]
type = S
movetype= A
physics = S
poweradd = 0
ctrl = 0
anim = 220
velset = 0

[State 200, 1]
type = Playsnd
trigger1 = AnimElem = 1
value = S0,1

[State 200, 2]
type = velset
trigger1 = time >= 0
trigger1 = time <= 20
x = 0
y = 0

[State 200, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 226
ctrl = 0

; Fireball itself
[statedef 226]
type = S
movetype = A
physics = S
anim = 221
Velset = 0,0

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time = 0
value = 50

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 1
helpertype = normal ;player
name = "BallCrits"
ID = 227
stateno = 227
pos = 17,-24
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 3
size.yscale = 3

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

; Fireball itself
[statedef 227]
type = S
movetype = A
physics = S
anim = 222

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

[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 0,0,256
mul = 256,256,256
invertall = 0
color = 256

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = S,AA,AP,AT       
slot = 1
stateno = 9999
time = 1
forceair = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S9500,0
volume = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SP
damage = 150, 0
animtype = hard
guardflag =
hitflag = MAF
pausetime = 0,0
;hitsound = s2,4
;guardsound = s2,3
sparkno = 2                    
sparkxy = -10,0 
hitsound = S9500, 1   
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3,-1
air.velocity = -3,-6
air.juggle = 5
air.fall = 0
down.velocity = -3,-7
down.hittime = 10
down.bounce = 0
getpower = 0,0

[State 0, PowerAdd]
type = PowerAdd
trigger1 = movehit = 1
value = 250

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "CriticalHit"
ID = 9500
stateno = 9500
pos = -15,-30+floor(Enemy,Const(Size.Head.Pos.Y))
postype = p2    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 0.1 
size.yscale = 0.1
persistent = 0

[State 0, ChangeState]
type = DestroySelf
trigger1 = movehit
trigger2 = moveguarded 
trigger3 = FrontEdgeDist <= -20
trigger4 = BackEdgeDist <= -20

;-------------------------------------------------
; Forward Diagonal Fireball
;-------------------------------------------------
[Statedef 300]
type = S
movetype= A
physics = S
poweradd = 0
ctrl = 0
anim = 300
velset = 0

[State 200, 1]
type = Playsnd
trigger1 = AnimElem = 1
value = S0,1

[State 200, 2]
type = velset
trigger1 = time >= 0
trigger1 = time <= 20
x = 0
y = 0

[State 200, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 301
ctrl = 0

; Fireball itself
[statedef 301]
type = S
movetype = A
physics = S
anim = 301

[State 201, 1]
type = Projectile
trigger1 = AnimElem = 1
projanim = 202
projheightbound = -240, 70
projscale = 3,3
offset = 17,-24
velocity = 5,0
attr = S, SP
damage = 50,6
animtype = light
guardflag = MA
hitflag = MAF
pausetime = 5,5
;hitsound = s2,4
;guardsound = s2,3
guard.sparkno = 40
sparkno = 0                      
sparkxy = -10,0 
ground.type = Low
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -5,0
air.velocity = -5,0
air.juggle = 5
air.fall = 0
down.velocity = -4,-6
down.hittime = 10
down.bounce = 0
getpower = 0,0

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

;-------------------------------------------------
; Forward Diagonal Fireball
;-------------------------------------------------
[Statedef 305]
type = S
movetype= A
physics = S
poweradd = 0
ctrl = 0
anim = 300
velset = 0

[State 200, 1]
type = Playsnd
trigger1 = AnimElem = 1
value = S0,1

[State 200, 2]
type = velset
trigger1 = time >= 0
trigger1 = time <= 20
x = 0
y = 0

[State 200, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 306
ctrl = 0

; Fireball itself
[statedef 306]
type = S
movetype = A
physics = S
anim = 301
Velset = 0,0

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 1
helpertype = normal ;player
name = "BallCrits"
ID = 307
stateno = 307
pos = 17,-24
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 3
size.yscale = 3

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

; Fireball itself
[statedef 307]
type = S
movetype = A
physics = S
anim = 302

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

[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 0,0,256
mul = 256,256,256
invertall = 0
color = 256

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = S,AA,AP,AT       
slot = 1
stateno = 9999
time = 1
forceair = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S9500,0
volume = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SP
damage = 150,
animtype = hard
guardflag =
hitflag = MAF
pausetime = 0,0
;hitsound = s2,4
;guardsound = s2,3
sparkno = 2                    
sparkxy = -10,0 
hitsound = S9500, 1   
ground.type = Low
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -5,0
air.velocity = -5,0
air.juggle = 5
air.fall = 0
down.velocity = -4,-6
down.hittime = 10
down.bounce = 0
getpower = 0,0

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "CriticalHit"
ID = 9500
stateno = 9500
pos = -15,-30+floor(Enemy,Const(Size.Head.Pos.Y))
postype = p2    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 0.1 
size.yscale = 0.1
persistent = 0

[State 0, ChangeState]
type = DestroySelf
trigger1 = movehit
trigger2 = moveguarded 
trigger3 = FrontEdgeDist <= -20
trigger4 = BackEdgeDist <= -20

;-------------------------------------------------
; Forward Up Horizontal Fireball
;-------------------------------------------------
[Statedef 310]
type = S
movetype= A
physics = S
poweradd = 0
ctrl = 0
anim = 300
velset = 0

[State 230, 1]
type = Playsnd
trigger1 = AnimElem = 1
value = S0,1

[State 230, 2]
type = velset
trigger1 = time >= 0
trigger1 = time <= 20
x = 0
y = 0

[State 230, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 311
ctrl = 0

; Fireball itself
[statedef 311]
type = S
movetype = A
physics = S
anim = 301

[State 211, 1]
type = Projectile
trigger1 = AnimElem = 1
projanim = 302
projheightbound = -240, 70
projscale = 3,3
offset = 17,-24
velocity = 4,-1.5
attr = S, SP
damage = 50,6
animtype = light
guardflag = MA
hitflag = MAF
pausetime = 5,5
;hitsound = s2,4
;guardsound = s2,3
guard.sparkno = 40
sparkno = 0                      
sparkxy = -10,0 
ground.type = Low
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -4,-0.2
air.velocity = -4,-3
air.juggle = 5
air.fall = 0
down.velocity = -4,-3
down.hittime = 10
down.bounce = 0
getpower = 0,0

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

;-------------------------------------------------
; Forward Up Diagonal Fireball
;-------------------------------------------------
[Statedef 315]
type = S
movetype= A
physics = S
poweradd = 0
ctrl = 0
anim = 300
velset = 0

[State 200, 1]
type = Playsnd
trigger1 = AnimElem = 1
value = S0,1

[State 200, 2]
type = velset
trigger1 = time >= 0
trigger1 = time <= 20
x = 0
y = 0

[State 200, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 316
ctrl = 0

; Fireball itself
[statedef 316]
type = S
movetype = A
physics = S
anim = 301
Velset = 0,0

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 1
helpertype = normal ;player
name = "BallCrits"
ID = 317
stateno = 317
pos = 17,-24
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 3
size.yscale = 3

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

; Fireball itself
[statedef 317]
type = S
movetype = A
physics = S
anim = 302

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

[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 0,0,256
mul = 256,256,256
invertall = 0
color = 256

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = S,AA,AP,AT       
slot = 1
stateno = 9999
time = 1
forceair = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S9500,0
volume = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SP
damage = 150, 0
animtype = hard
guardflag =
hitflag = MAF
pausetime = 0,0
;hitsound = s2,4
;guardsound = s2,3
sparkno = 2                    
sparkxy = -10,0 
hitsound = S9500, 1   
ground.type = Low
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -4,-0.2
air.velocity = -4,-3
air.juggle = 5
air.fall = 0
down.velocity = -4,-3
down.hittime = 10
down.bounce = 0

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "CriticalHit"
ID = 9500
stateno = 9500
pos = -15,-30+floor(Enemy,Const(Size.Head.Pos.Y))
postype = p2    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 0.1 
size.yscale = 0.1
persistent = 0

[State 0, ChangeState]
type = DestroySelf
trigger1 = movehit
trigger2 = moveguarded 
trigger3 = FrontEdgeDist <= -20
trigger4 = BackEdgeDist <= -20

;-------------------------------------------------
; Forward Up Diagonal Fireball
;-------------------------------------------------
[Statedef 320]
type = S
movetype= A
physics = S
poweradd = 0
ctrl = 0
anim = 300
velset = 0

[State 230, 1]
type = Playsnd
trigger1 = AnimElem = 1
value = S0,1

[State 230, 2]
type = velset
trigger1 = time >= 0
trigger1 = time <= 20
x = 0
y = 0

[State 230, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 321
ctrl = 0

; Fireball itself
[statedef 321]
type = S
movetype = A
physics = S
anim = 301

[State 221, 1]
type = Projectile
trigger1 = AnimElem = 1
projanim = 302
projheightbound = -240, 70
projscale = 3,3
offset = 17,-24
velocity = 3,-3
attr = S, SP
damage = 50,6
animtype = light
guardflag = MA
hitflag = MAF
pausetime = 5,5
;hitsound = s2,4
;guardsound = s2,3
guard.sparkno = 40
sparkno = 0                      
sparkxy = -10,0 
ground.type = Low
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -3,-1
air.velocity = -3,-6
air.juggle = 5
air.fall = 0
down.velocity = -3,-7
down.hittime = 10
down.bounce = 0

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

;-------------------------------------------------
; Forward Up Diagonal Fireball
;-------------------------------------------------
[Statedef 325]
type = S
movetype= A
physics = S
poweradd = 0
ctrl = 0
anim = 300
velset = 0

[State 200, 1]
type = Playsnd
trigger1 = AnimElem = 1
value = S0,1

[State 200, 2]
type = velset
trigger1 = time >= 0
trigger1 = time <= 20
x = 0
y = 0

[State 200, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 326
ctrl = 0

; Fireball itself
[statedef 326]
type = S
movetype = A
physics = S
anim = 301
Velset = 0,0

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 1
helpertype = normal ;player
name = "BallCrits"
ID = 327
stateno = 327
pos = 17,-24
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 3
size.yscale = 3

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

; Fireball itself
[statedef 327]
type = S
movetype = A
physics = S
anim = 302

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

[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 0,0,256
mul = 256,256,256
invertall = 0
color = 256

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = S,AA,AP,AT       
slot = 1
stateno = 9999
time = 1
forceair = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S9500,0
volume = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SP
damage = 150, 0
animtype = hard
guardflag =
hitflag = MAF
pausetime = 0,0
;hitsound = s2,4
;guardsound = s2,3
sparkno = 2                    
sparkxy = -10,0 
hitsound = S9500, 1   
ground.type = Low
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -3,-1
air.velocity = -3,-6
air.juggle = 5
air.fall = 0
down.velocity = -3,-7
down.hittime = 10
down.bounce = 0

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "CriticalHit"
ID = 9500
stateno = 9500
pos = -15,-30+floor(Enemy,Const(Size.Head.Pos.Y))
postype = p2    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 0.1 
size.yscale = 0.1
persistent = 0

[State 0, ChangeState]
type = DestroySelf
trigger1 = movehit
trigger2 = moveguarded 
trigger3 = FrontEdgeDist <= -20
trigger4 = BackEdgeDist <= -20

;-------------------------------------------------
; Triple Fireball
;-------------------------------------------------
[Statedef 400]
type = S
movetype= A
physics = S
poweradd = 0
ctrl = 0
anim = 400
velset = 0

[State 200, 1]
type = Playsnd
trigger1 = AnimElem = 1
value = S0,1

[State 200, 2]
type = velset
trigger1 = time >= 0
trigger1 = time <= 20
x = 0
y = 0

[State 200, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 401
ctrl = 0

; Fireball itself
[statedef 401]
type = S
movetype = A
physics = S
anim = 401

[State 201, 1]
type = Projectile
Triggerall = var(30) = [3280,65536]
trigger1 = AnimElem = 1
projanim = 402
projheightbound = -240, 70
projscale = 3,3
offset = 17,-24
velocity = 5,0
attr = S, SP
damage = 50, 6
animtype = light
guardflag = MA
hitflag = MAF
pausetime = 5,5
;hitsound = s2,4
;guardsound = s2,3
guard.sparkno = 40
sparkno = 0                      
sparkxy = -10,0  
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5,0
air.velocity = -5,0
air.juggle = 5
air.fall = 0
down.velocity = -4,-6
down.hittime = 10
down.bounce = 0
getpower = 0,0

[State 211, 1]
type = Projectile
Triggerall = var(20) = [3280,65536]
trigger1 = AnimElem = 1
projanim = 402
projheightbound = -240, 70
projscale = 3,3
offset = 17,-24
velocity = 4,-1.5
attr = S, SP
damage = 50,6
animtype = light
guardflag = MA
hitflag = MAF
pausetime = 5,5
;hitsound = s2,4
;guardsound = s2,3
guard.sparkno = 40
sparkno = 0                      
sparkxy = -10,0 
ground.type = Low
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -4,-0.2
air.velocity = -4,-3
air.juggle = 5
air.fall = 0
down.velocity = -4,-3
down.hittime = 10
down.bounce = 0
getpower = 0,0

[State 221, 1]
type = Projectile
Triggerall = var(10) = [3280,65536]
trigger1 = AnimElem = 1
projanim = 402
projheightbound = -240, 70
projscale = 3,3
offset = 17,-24
velocity = 3,-3
attr = S, SP
damage = 50,6
animtype = light
guardflag = MA
hitflag = MAF
pausetime = 5,5
;hitsound = s2,4
;guardsound = s2,3
guard.sparkno = 40
sparkno = 0                      
sparkxy = -10,0 
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3,-1
air.velocity = -3,-6
air.juggle = 5
air.fall = 0
down.velocity = -3,-7
down.hittime = 10
down.bounce = 0
getpower = 0,0

[State 0, Helper]
type = Helper
Triggerall = var(30) = [0,3279]
trigger1 = AnimElem = 1
helpertype = normal ;player
name = "BallCrits"
ID = 407
stateno = 407
pos = 17,-24
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 3
size.yscale = 3

[State 0, Helper]
type = Helper
Triggerall = var(20) = [0,3279]
trigger1 = AnimElem = 1
helpertype = normal ;player
name = "BallCrits"
ID = 417
stateno = 417
pos = 17,-24
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 3
size.yscale = 3

[State 0, Helper]
type = Helper
Triggerall = var(10) = [0,3279]
trigger1 = AnimElem = 1
helpertype = normal ;player
name = "BallCrits"
ID = 427
stateno = 427
pos = 17,-24
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 3
size.yscale = 3

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

; Fireball itself
[statedef 407]
type = S
movetype = A
physics = S
anim = 402

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

[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 0,0,256
mul = 256,256,256
invertall = 0
color = 256

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = S,AA,AP,AT       
slot = 1
stateno = 9999
time = 1
forceair = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S9500,0
volume = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SP
damage = 150, 0
animtype = hard
guardflag =
hitflag = MAF
pausetime = 0,0
;hitsound = s2,4
;guardsound = s2,3
sparkno = 2                    
sparkxy = -10,0 
hitsound = S9500, 1   
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5,0
air.velocity = -5,0
air.juggle = 5
air.fall = 0
down.velocity = -4,-6
down.hittime = 10
down.bounce = 0
getpower = 0,0

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "CriticalHit"
ID = 9500
stateno = 9500
pos = -15,-30+floor(Enemy,Const(Size.Head.Pos.Y))
postype = p2    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 0.1 
size.yscale = 0.1
persistent = 0

[State 0, ChangeState]
type = DestroySelf
trigger1 = movehit
trigger2 = moveguarded 
trigger3 = FrontEdgeDist <= -20
trigger4 = BackEdgeDist <= -20

; Fireball itself
[statedef 417]
type = S
movetype = A
physics = S
anim = 402

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

[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 0,0,256
mul = 256,256,256
invertall = 0
color = 256

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = S,AA,AP,AT       
slot = 1
stateno = 9999
time = 1
forceair = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S9500,0
volume = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SP
damage = 150, 0
animtype = hard
guardflag =
hitflag = MAF
pausetime = 0,0
;hitsound = s2,4
;guardsound = s2,3
sparkno = 2                    
sparkxy = -10,0 
hitsound = S9500, 1   
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -4,-0.2
air.velocity = -4,-3
air.juggle = 5
air.fall = 0
down.velocity = -4,-3
down.hittime = 10
down.bounce = 0
getpower = 0,0


[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "CriticalHit"
ID = 9500
stateno = 9500
pos = -15,-30+floor(Enemy,Const(Size.Head.Pos.Y))
postype = p2    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 0.1 
size.yscale = 0.1
persistent = 0

[State 0, ChangeState]
type = DestroySelf
trigger1 = movehit
trigger2 = moveguarded 
trigger3 = FrontEdgeDist <= -20
trigger4 = BackEdgeDist <= -20

; Fireball itself
[statedef 427]
type = S
movetype = A
physics = S
anim = 402

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

[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 0,0,256
mul = 256,256,256
invertall = 0
color = 256

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = S,AA,AP,AT       
slot = 1
stateno = 9999
time = 1
forceair = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S9500,0
volume = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SP
damage = 150, 0
animtype = hard
guardflag =
hitflag = MAF
pausetime = 0,0
;hitsound = s2,4
;guardsound = s2,3
sparkno = 2                    
sparkxy = -10,0 
hitsound = S9500, 1   
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3,-1
air.velocity = -3,-6
air.juggle = 5
air.fall = 0
down.velocity = -3,-7
down.hittime = 10
down.bounce = 0
getpower = 0,0

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "CriticalHit"
ID = 9500
stateno = 9500
pos = -15,-30+floor(Enemy,Const(Size.Head.Pos.Y))
postype = p2    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 0.1 
size.yscale = 0.1
persistent = 0

[State 0, ChangeState]
type = DestroySelf
trigger1 = movehit
trigger2 = moveguarded 
trigger3 = FrontEdgeDist <= -20
trigger4 = BackEdgeDist <= -20

;-------------------------------------------------
; Triple Fast Fireball
;-------------------------------------------------
[Statedef 500]
type = S
movetype= A
physics = S
poweradd = 0
ctrl = 0
anim = 300
velset = 0

[State 200, 1]
type = Playsnd
trigger1 = AnimElem = 1
value = S0,1

[State 200, 2]
type = velset
trigger1 = time >= 0
trigger1 = time <= 20
x = 0
y = 0

[State 200, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 501
ctrl = 0

; Fireball itself
[statedef 501]
type = S
movetype = A
physics = S
anim = 301

[State 201, 1]
type = Projectile
Triggerall = var(30) = [3280,65536]
trigger1 = AnimElem = 1
projanim = 302
projheightbound = -240, 70
projscale = 3,3
offset = 17,-24
velocity = 5,0
attr = S, SP
damage = 50, 6
animtype = light
guardflag = MA
hitflag = MAF
pausetime = 5,5
;hitsound = s2,4
;guardsound = s2,3
guard.sparkno = 40
sparkno = 0                      
sparkxy = -10,0  
ground.type = Low
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -5,0
air.velocity = -5,0
air.juggle = 5
air.fall = 0
down.velocity = -4,-6
down.hittime = 10
down.bounce = 0
getpower = 0,0

[State 211, 1]
type = Projectile
Triggerall = var(20) = [3280,65536]
trigger1 = AnimElem = 1
projanim = 302
projheightbound = -240, 70
projscale = 3,3
offset = 17,-24
velocity = 4,-1.5
attr = S, SP
damage = 50,6
animtype = light
guardflag = MA
hitflag = MAF
pausetime = 5,5
;hitsound = s2,4
;guardsound = s2,3
guard.sparkno = 40
sparkno = 0                      
sparkxy = -10,0 
ground.type = Low
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -4,-0.2
air.velocity = -4,-3
air.juggle = 5
air.fall = 0
down.velocity = -4,-3
down.hittime = 10
down.bounce = 0
getpower = 0,0

[State 221, 1]
type = Projectile
Triggerall = var(10) = [3280,65536]
trigger1 = AnimElem = 1
projanim = 302
projheightbound = -240, 70
projscale = 3,3
offset = 17,-24
velocity = 3,-3
attr = S, SP
damage = 50,6
animtype = light
guardflag = MA
hitflag = MAF
pausetime = 5,5
;hitsound = s2,4
;guardsound = s2,3
guard.sparkno = 40
sparkno = 0                      
sparkxy = -10,0 
ground.type = Low
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -3,-1
air.velocity = -3,-6
air.juggle = 5
air.fall = 0
down.velocity = -3,-7
down.hittime = 10
down.bounce = 0
getpower = 0,0


[State 0, Helper]
type = Helper
Triggerall = var(30) = [0,3279]
trigger1 = AnimElem = 1
helpertype = normal ;player
name = "BallCrits"
ID = 507
stateno = 507
pos = 17,-24
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 3
size.yscale = 3

[State 0, Helper]
type = Helper
Triggerall = var(20) = [0,3279]
trigger1 = AnimElem = 1
helpertype = normal ;player
name = "BallCrits"
ID = 517
stateno = 517
pos = 17,-24
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 3
size.yscale = 3

[State 0, Helper]
type = Helper
Triggerall = var(10) = [0,3279]
trigger1 = AnimElem = 1
helpertype = normal ;player
name = "BallCrits"
ID = 527
stateno = 527
pos = 17,-24
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 3
size.yscale = 3

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

; Fireball itself
[statedef 507]
type = S
movetype = A
physics = S
anim = 302

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

[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 0,0,256
mul = 256,256,256
invertall = 0
color = 256

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = S,AA,AP,AT       
slot = 1
stateno = 9999
time = 1
forceair = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S9500,0
volume = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SP
damage = 150, 0
animtype = hard
guardflag =
hitflag = MAF
pausetime = 0,0
;hitsound = s2,4
;guardsound = s2,3
sparkno = 2                    
sparkxy = -10,0 
hitsound = S9500, 1   
ground.type = Low
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -5,0
air.velocity = -5,0
air.juggle = 5
air.fall = 0
down.velocity = -4,-6
down.hittime = 10
down.bounce = 0
getpower = 0,0

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "CriticalHit"
ID = 9500
stateno = 9500
pos = -15,-30+floor(Enemy,Const(Size.Head.Pos.Y))
postype = p2    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 0.1 
size.yscale = 0.1
persistent = 0

[State 0, ChangeState]
type = DestroySelf
trigger1 = movehit
trigger2 = moveguarded 
trigger3 = FrontEdgeDist <= -20
trigger4 = BackEdgeDist <= -20

; Fireball itself
[statedef 517]
type = S
movetype = A
physics = S
anim = 302

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

[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 0,0,256
mul = 256,256,256
invertall = 0
color = 256

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = S,AA,AP,AT       
slot = 1
stateno = 9999
time = 1
forceair = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S9500,0
volume = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SP
damage = 150, 0
animtype = hard
guardflag =
hitflag = MAF
pausetime = 0,0
;hitsound = s2,4
;guardsound = s2,3
sparkno = 2                    
sparkxy = -10,0 
hitsound = S9500, 1   
ground.type = Low
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -4,-0.2
air.velocity = -4,-3
air.juggle = 5
air.fall = 0
down.velocity = -4,-3
down.hittime = 10
down.bounce = 0
getpower = 0,0


[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "CriticalHit"
ID = 9500
stateno = 9500
pos = -15,-30+floor(Enemy,Const(Size.Head.Pos.Y))
postype = p2    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 0.1 
size.yscale = 0.1
persistent = 0

[State 0, ChangeState]
type = DestroySelf
trigger1 = movehit
trigger2 = moveguarded 
trigger3 = FrontEdgeDist <= -20
trigger4 = BackEdgeDist <= -20

; Fireball itself
[statedef 527]
type = S
movetype = A
physics = S
anim = 302

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

[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 0,0,256
mul = 256,256,256
invertall = 0
color = 256

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = S,AA,AP,AT       
slot = 1
stateno = 9999
time = 1
forceair = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S9500,0
volume = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SP
damage = 150, 0
animtype = hard
guardflag =
hitflag = MAF
pausetime = 0,0
;hitsound = s2,4
;guardsound = s2,3
sparkno = 2                    
sparkxy = -10,0 
hitsound = S9500, 1   
ground.type = Low
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -3,-1
air.velocity = -3,-6
air.juggle = 5
air.fall = 0
down.velocity = -3,-7
down.hittime = 10
down.bounce = 0
getpower = 0,0

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "CriticalHit"
ID = 9500
stateno = 9500
pos = -15,-30+floor(Enemy,Const(Size.Head.Pos.Y))
postype = p2    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 0.1 
size.yscale = 0.1
persistent = 0

[State 0, ChangeState]
type = DestroySelf
trigger1 = movehit
trigger2 = moveguarded 
trigger3 = FrontEdgeDist <= -20
trigger4 = BackEdgeDist <= -20

[Statedef 9500]
type    = S
movetype= I
physics = S
ctrl = 0
anim = 9500
velset = 0,-0.5
sprpriority = 3

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

[State 0, Trans]
type = Trans
trigger1 = time >= 31
trigger1 = time%2 = 0
trans = add
alpha = 256-13,256

[State 0, Turn]
type = Turn
trigger1 = facing != 1

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

[statedef 9999]
type = S
movetype = I
physics = S
anim = 9999

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

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


[statedef 1000]
type = S
movetype = I
physics = S
anim = 0
poweradd = -1000

[State 200, 1]
type = varadd
trigger1 = Time = 0
var(1) = 360

[State 0, ChangeState]
type = ChangeState
trigger1 = time >= 2
value = 0
ctrl = 1

[statedef 1100]
type = S
movetype = I
physics = S
anim = 0
poweradd = -1000

[State 200, 1]
type = varadd
trigger1 = Time = 0
var(2) = 360

[State 0, ChangeState]
type = ChangeState
trigger1 = time >= 2
value = 0
ctrl = 1

[statedef 1200]
type = S
movetype = I
physics = S
anim = 0
poweradd = -1000

[State 200, 1]
type = varadd
trigger1 = Time = 0
var(3) = 360

[State 0, Helper]
type = Helper
trigger1 = time = 0
trigger1 = numhelper(1006) = 0 ;You don't want more than one of these.
helpertype = normal ;player
name = "Super Armor"
ID = 1006
stateno = 1006 
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 9999999
pausemovetime = 9999999

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1200,0
volume = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1200,0
volume = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = time >= 1
value = 10000
ctrl = 1



;------------------------------------------------------------------------------
[Statedef -2]

[State -2, Null]
type = Null
trigger1 = var(30) = -1
trigger1 = var(30) := (random+1)*(random+1)*(random+1) || 1
trigger1 = 0
;msws
trigger2 = var(30) := var(30) * var(30) 	|| 1
trigger2 = var(34) := var(34) -635641175 	|| 1  
trigger2 = var(30) := var(30) + var(34) 	|| 1
trigger2 = var(31) := 0			|| 1
trigger2 = var(31) := var(31) + ((var(30) & 256) / 256)	|| 1
trigger2 = var(31) := var(31) + ((var(30) & 512) / 256)	|| 1
trigger2 = var(31) := var(31) + ((var(30) & 1024) / 256)	|| 1
trigger2 = var(31) := var(31) + ((var(30) & 2048) / 256)	|| 1
trigger2 = var(31) := var(31) + ((var(30) & 4096) / 256)	|| 1
trigger2 = var(31) := var(31) + ((var(30) & 8192) / 256)	|| 1
trigger2 = var(31) := var(31) + ((var(30) & 16385) / 256)	|| 1
trigger2 = var(31) := var(31) + ((var(30) & 32768) / 256)	|| 1
trigger2 = var(31) := var(31) + ((var(30) & 65536) / 256)	|| 1
trigger2 = var(31) := var(31) + ((var(30) & 131072) / 256)	|| 1
trigger2 = var(31) := var(31) + ((var(30) & 262144) / 256)	|| 1
trigger2 = var(31) := var(31) + ((var(30) & 524288) / 256)	|| 1
trigger2 = var(31) := var(31) + ((var(30) & 1048576) / 256)	|| 1
trigger2 = var(31) := var(31) + ((var(30) & 2097152) / 256)	|| 1
trigger2 = var(31) := var(31) + ((var(30) & 4194304) / 256)	|| 1
trigger2 = var(31) := var(31) + ((var(30) & 8388608) / 256)	|| 1
trigger2 = var(30) := var(31)
ignorehitpause = 1

[State -2, Null]
type = Null
Triggerall = gametime%2 = 0
trigger1 = var(20) = -1
trigger1 = var(20) := (random+1)*(random+1)*(random+1) || 1
trigger1 = 0
;msws
trigger2 = var(20) := var(20) * var(20) 	|| 1
trigger2 = var(24) := var(24) -635641175 	|| 1  
trigger2 = var(20) := var(20) + var(24) 	|| 1
trigger2 = var(21) := 0			|| 1
trigger2 = var(21) := var(21) + ((var(20) & 256) / 256)	|| 1
trigger2 = var(21) := var(21) + ((var(20) & 512) / 256)	|| 1
trigger2 = var(21) := var(21) + ((var(20) & 1024) / 256)	|| 1
trigger2 = var(21) := var(21) + ((var(20) & 2048) / 256)	|| 1
trigger2 = var(21) := var(21) + ((var(20) & 4096) / 256)	|| 1
trigger2 = var(21) := var(21) + ((var(20) & 8192) / 256)	|| 1
trigger2 = var(21) := var(21) + ((var(20) & 16385) / 256)	|| 1
trigger2 = var(21) := var(21) + ((var(20) & 32768) / 256)	|| 1
trigger2 = var(21) := var(21) + ((var(20) & 65536) / 256)	|| 1
trigger2 = var(21) := var(21) + ((var(20) & 131072) / 256)	|| 1
trigger2 = var(21) := var(21) + ((var(20) & 262144) / 256)	|| 1
trigger2 = var(21) := var(21) + ((var(20) & 524288) / 256)	|| 1
trigger2 = var(21) := var(21) + ((var(20) & 1048576) / 256)	|| 1
trigger2 = var(21) := var(21) + ((var(20) & 2097152) / 256)	|| 1
trigger2 = var(21) := var(21) + ((var(20) & 4194304) / 256)	|| 1
trigger2 = var(21) := var(21) + ((var(20) & 8388608) / 256)	|| 1
trigger2 = var(20) := var(21)
ignorehitpause = 1

[State -2, Null]
type = Null
Triggerall = gametime%3 = 0
trigger1 = var(10) = -1
trigger1 = var(10) := (random+1)*(random+1)*(random+1) || 1
trigger1 = 0
;msws
trigger2 = var(10) := var(10) * var(10) 	|| 1
trigger2 = var(14) := var(14) -635641175 	|| 1  
trigger2 = var(10) := var(10) + var(14) 	|| 1
trigger2 = var(11) := 0			|| 1
trigger2 = var(11) := var(11) + ((var(10) & 256) / 256)	|| 1
trigger2 = var(11) := var(11) + ((var(10) & 512) / 256)	|| 1
trigger2 = var(11) := var(11) + ((var(10) & 1024) / 256)	|| 1
trigger2 = var(11) := var(11) + ((var(10) & 2048) / 256)	|| 1
trigger2 = var(11) := var(11) + ((var(10) & 4096) / 256)	|| 1
trigger2 = var(11) := var(11) + ((var(10) & 8192) / 256)	|| 1
trigger2 = var(11) := var(11) + ((var(10) & 16385) / 256)	|| 1
trigger2 = var(11) := var(11) + ((var(10) & 32768) / 256)	|| 1
trigger2 = var(11) := var(11) + ((var(10) & 65536) / 256)	|| 1
trigger2 = var(11) := var(11) + ((var(10) & 131072) / 256)	|| 1
trigger2 = var(11) := var(11) + ((var(10) & 262144) / 256)	|| 1
trigger2 = var(11) := var(11) + ((var(10) & 524288) / 256)	|| 1
trigger2 = var(11) := var(11) + ((var(10) & 1048576) / 256)	|| 1
trigger2 = var(11) := var(11) + ((var(10) & 2097152) / 256)	|| 1
trigger2 = var(11) := var(11) + ((var(10) & 4194304) / 256)	|| 1
trigger2 = var(11) := var(11) + ((var(10) & 8388608) / 256)	|| 1
trigger2 = var(10) := var(11)
ignorehitpause = 1


[State -2, 1]
type = AssertSpecial
trigger1 = 1
flag = NoStandGuard

[State -2, 1]
type = AssertSpecial
trigger1 = 1
flag = NoCrouchGuard

[State -2, 1]
type = AssertSpecial
trigger1 = 1
flag = NoAirGuard

[State -2, 2]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State -2, 3]
type = PlaySnd
trigger1 = Time = 0
triggerall = stateno = 5000
value = 0,2

[State -2, 4.11]
type = Varadd
trigger1 = var(1) != 0
var(1) = -1
ignorehitpause = 1

[State 0, PalFX]
type = PalFX
trigger1 = var(1) > 0
trigger1 = var(2) = 0
trigger1 = var(3) = 0
time = 1
add = 200,0,0
mul = 256,256,256
invertall = 0
color = 256

[State -2, 4.11]
type = Varadd
trigger1 = var(2) != 0
var(2) = -1
ignorehitpause = 1

[State 0, PalFX]
type = PalFX
trigger1 = var(1) = 0
trigger1 = var(2) > 0
trigger1 = var(3) = 0
time = 1
add = 0,150,0
mul = 256,256,256
invertall = 0
color = 256

[State -2, 4.11]
type = Varadd
trigger1 = var(3) != 0
var(3) = -1
ignorehitpause = 1

[State 0, PalFX]
type = PalFX
trigger1 = var(1) > 0
trigger1 = var(2) > 0
trigger1 = var(3) = 0
time = 1
add = 150,150,0
mul = 256,256,256
invertall = 0
color = 256

[State 0, PalFX]
type = PalFX
triggerall = var(2) = 0
triggerall = var(1) = 0
trigger1 = var(3) > 0
time = 1
add = 100,100,100
mul = 90,90,90
invertall = 0
color = 256

[State 0, PalFX]
type = PalFX
triggerall = var(2) = 0
triggerall = var(1) > 0
trigger1 = var(3) > 0
time = 1
add = 200,0,0
mul = 90,90,90
invertall = 0
color = 256

[State 0, PalFX]
type = PalFX
triggerall = var(2) > 0
triggerall = var(1) = 0
trigger1 = var(3) > 0
time = 1
add = 0,200,0
mul = 90,90,90
invertall = 0
color = 256

[State 0, PalFX]
type = PalFX
triggerall = var(2) > 0
triggerall = var(1) > 0
trigger1 = var(3) > 0
time = 1
add = 200,200,0
mul = 90,90,90
invertall = 0
color = 256

[State 0, PalFX]
type = PalFX
trigger1 = alive = 0
time = 1
add = 0,0,0
mul = 256,256,256
invertall = 0
color = 256

