; Constants and state file.
; There are comments scattered through this file, so you may like to
; take a look if would like to learn more about the cns.

[Data]
life = 1000			;Amount of life to start with
power = 3000		;Amount of maximum power
attack = 100		;attack power (more is stronger)
defence = 100		;defensive power (more is stronger)
fall.defence_up = 50	;Percentage to increase defense everytime player is knocked down
liedown.time = 60		;Time which player lies down for, before getting up
airjuggle = 30		;Number of points for juggling
sparkno = 2			;Default hit spark number for HitDefs
guard.sparkno = 40	;Default guard spark number
KO.echo = 0			;1 to enable echo on KO
volume = 0			;Volume offset (negative for softer)
IntPersistIndex = 60	;Variables with this index and above will not have their values
FloatPersistIndex = 40  ;reset to 0 between rounds or matches. There are 60 int variables,
  				;indexed from 0 to 59, and 40 float variables, indexed from 0 to 39.
  				;If omitted, then it defaults to 60 and 40 for integer and float
  				;variables repectively, meaning that none are persistent, i.e. all
  				;are reset. If you want your variables to persist between matches,
  				;you need to override state 5900 from common1.cns.


[Size]
xscale = .5			;Horizontal scaling factor.
yscale = .5			;Vertical scaling factor.
ground.back = 15		;Player width (back, ground)
ground.front = 16		;Player width (front, ground)
air.back = 12		;Player width (back, air)
air.front = 12		;Player width (front, air)
height = 50			;Height of player (for opponent to jump over)
attack.dist = 160		;Default attack distance
proj.attack.dist = 90	;Default attack distance for projectiles
proj.doscale = 0		;Set to 1 to scale projectiles too   
head.pos = -5, -90	;Approximate position of head
mid.pos = -5, -60		;Approximate position of midsection
shadowoffset = 0		;Number of pixels to vertically offset the shadow
draw.offset = 0,0		;Player drawing offset in pixels (x, y)

[Velocity]
walk.fwd  = 2.4		;Walk forward
walk.back = -2.2		;Walk backward
run.fwd  = 4.5,-4.5		;Run forward (x, y)
run.back = -4.5,-4.5	;Hop backward (x, y)
jump.neu = 0,-7.7		;Neutral jumping velocity (x, y)
jump.back = -2.55		;Jump back Speed (x, y)
jump.fwd = 2.5		;Jump forward Speed (x, y)
runjump.back = -2.55,-8.1;Running jump speeds (opt)
runjump.fwd = 4,-7.5	;.
airjump.neu = 0,-7.5	;.
airjump.back = -2.55	;Air jump speeds (opt)
airjump.fwd = 2.5		;.

[Movement]
airjump.num = 0		;Number of air jumps allowed (opt)
airjump.height = 35	;Minimum distance from ground before you can air jump (opt)
yaccel = .22		;Vertical acceleration
stand.friction = .85	;Friction coefficient when standing
crouch.friction = .82	;Friction coefficient when crouching

;---------------------------------------------------------------------------
; Format:
; [Statedef STATENO]
; type = ?      S/C/A/L  stand/crouch/air/liedown
; movetype = ?  I/A/H    idle/attack/gethit
; physics = ?   S/C/A/N  stand/crouch/air/none
; juggle = ?             air juggle points move requires
;
; [State STATENO, ?]     ? - any number you choose
; type = ?
; ...

;---------------------------------------------------------------------------
; Lose by Time Over
; CNS difficulty: basic
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

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

;---------------------------------------------------------------------------
; Win state decider
; CNS difficulty: basic
[Statedef 180]
type = S

[State 180, 1]
type = ChangeState
trigger1 = Time = 0
value = 181

;---------------------------------------------------------------------------
; Win pose 1
; CNS difficulty: basic
[Statedef 181]
type = S
ctrl = 0
anim = 180+random%2
velset = 0,0

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

;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
[Statedef 190]
type = S
ctrl = 0
anim = 190
velset = 0,0

[State 190, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 190, 3]
type = VelAdd
trigger1 = AnimElem = 15
y = -4

[State 190, 4]
type = Gravity
trigger1 = AnimElemTime(16) >= 2
y = .2

[State 190, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 191

;----------------------------
[Statedef 191]
type = S
ctrl = 0
anim = 47
velset = 0,0

[State 191, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; Taunt
; CNS difficulty: easy
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

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

;---------------------------------------------------------------------------
; Punch
[StateDef 200]
type = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 200
velset = 0,0
poweradd = 30
sprpriority = 1

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 30
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 2, 2
sparkno = 9999
sparkxy = -9999, -9999
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -2
airguard.velocity = -.5,-.2
air.type = High
air.velocity = -.5,-.2
air.hittime = 12

[State 200, 2]
type = VelAdd
trigger1 = AnimElem = 2
x = 3

[State 200, 3]
type = Explod
trigger1 = Movehit = 1
anim = 8000
ID = 8000
pos = 0,-33
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = .5,.5
ontop = 1

[State 200, 4]
type = PlaySnd
trigger1 = AnimElem = 2
value = S200,4
volume = 300

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

;---------------------------------------------------------------------------
; Strong Attack 1
[StateDef 210]
type = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 210
velset = 0,0
sprpriority = 1

[State 210, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 50
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 2, 2
sparkno = 9999
sparkxy = -9999, -9999
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 24
ground.velocity = -4
airguard.velocity = -.5,-.2
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 210, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8100
ID = 8100
pos = -13,-43
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 4
removetime = -2
scale = .5,.5
ontop = 1

[State 210, 3]
type = PlaySnd
trigger1 = AnimElem = 2
value = S200,1
volume = 300

[State 210, 4]
type = PlaySnd
trigger1 = AnimElem = 7
value = S200,3
volume = 300

[State 210, 5]
type = PowerAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 7
value = 30

[State 210, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Kick
; CNS difficulty: easy
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 220
sprpriority = 1
poweradd= 30
velset = 0,0

[State 210, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 30
animtype = Medium
guardflag = L
hitflag = MAFLD
priority = 4, Hit
pausetime = 2, 2
sparkno = 9999
sparkxy = -9999, -9999
hitsound = 5, 0
guardsound = 6, 0
ground.type = Low
ground.slidetime = 5
ground.hittime  = 16
ground.velocity = -4
airguard.velocity = -.5,-.2
air.type = High
air.velocity = -.5,-.2
air.hittime = 12

[State 210, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8000
ID = 8000
pos = 0,-13
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 4
removetime = -2
scale = .5,.5
ontop = 1

[State 210, 4]
type = PlaySnd
trigger1 = AnimElem = 2
value = S200,4
volume = 300

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

;---------------------------------------------------------------------------
; Strong Attack 2
; CNS difficulty: easy
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 230
sprpriority = 1
poweradd= 60
velset = 0,0

[State 230, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 50
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 4, Hit
pausetime = 2, 2
sparkno = 9999
sparkxy = -9999, -9999
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -4
airguard.velocity = -.5,-.2
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 230, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8000
ID = 8000
pos = 0,-33
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 4
removetime = -2
scale = .5,.5
ontop = 1

[State 230, 4]
type = PlaySnd
trigger1 = AnimElem = 2
value = S200,0
volume = 300

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

;---------------------------------------------------------------------------
; Standing Medium Kick
; CNS difficulty: easy
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 5
ctrl = 0
anim = 240
poweradd = 30
velset = 0,0
poweradd= 65

[State 230, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 40
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 2, 2
sparkno = 9999
sparkxy = -9999, -9999
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -2.5
airguard.velocity = -.5,-.2
air.type = High
air.velocity = -.5,-.2
air.hittime = 12

[State 230, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8000
ID = 8000
pos = 0,-33
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 4
removetime = -2
scale = .5,.5
ontop = 1

[State 230, 4]
type = PlaySnd
trigger1 = AnimElem = 2
value = S200,2
volume = 300

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

;---------------------------------------------------------------------------
; Crouching Punch
; CNS difficulty: easy
; Description: Simple crouching attack. The HitDef's guardflag parameter
;     is set to "L", meaning that the move can only be guarded low
;     (crouching), and not by standing or jumping opponents.
;     Like for all light attacks, it's a good idea to keep the slidetime
;     and hittime parameters at a smaller number, so the opponent isn't
;     stunned for too long. For all crouching attacks you have to
;     remember to set the attr parameter to indicate that it is crouching
;     attack. In this case, "C, NA" stands for "crouching, normal attack".
;     The HitDef's priority is set at 3, instead of the default of 4,
;     so this attack has a lower priority than most others, meaning the
;     player will get hit instead of trading hits with the opponent if
;     their attack collision boxes (Clsn1) intersect each other's Clsn2
;     boxes at the same time.
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 5
ctrl = 0
anim = 400
poweradd= 30

[State 400, 1]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 30
animtype = Light
guardflag = L
hitflag = MAFLD
priority = 3, Hit
pausetime = 2, 2
sparkno = 9999
sparkxy = -9999, -9999
hitsound = 5, 0
guardsound = 6, 0
ground.type = Low
ground.slidetime = 5
ground.hittime  = 14
ground.velocity = -2
airguard.velocity = -.5,-.2
air.type = High
air.velocity = -.5,-.2
air.hittime = 12

[State 400, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8000
ID = 8000
pos = 0,-13
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 4
removetime = -2
scale = .5,.5
ontop = 1

[State 400, 3]
type = PlaySnd
trigger1 = AnimElem = 2
value = S200,4
volume = 300

[State 400, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Crouching Fwd Punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
ctrl = 0
anim = 410
poweradd= 30

[State 410, 1]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 30
animtype = Medium
guardflag = L
hitflag = MAFLD
priority = 3, Hit
pausetime = 2, 2
sparkno = 9999
sparkxy = -9999, -9999
hitsound = 5, 0
guardsound = 6, 0
ground.type = Low
ground.slidetime = 5
ground.hittime  = 14
ground.velocity = -2
airguard.velocity = -.5,-.2
air.type = High
air.velocity = -.5,-.2
air.hittime = 12

[State 410, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8000
ID = 8000
pos = 0,-13
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 4
removetime = -2
scale = .5,.5
ontop = 1

[State 410, 3]
type = VelAdd
trigger1 = AnimElem = 2
x = 3

[State 410, 4]
type = PlaySnd
trigger1 = AnimElem = 2
value = S200,4
volume = 300

[State 410, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Crouching Lick
[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 420

[State 420, 1]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 30
animtype = Medium
guardflag = L
hitflag = MAFLD
priority = 3, Hit
pausetime = 2, 2
sparkno = 9999
sparkxy = -9999, -9999
hitsound = 5, 0
guardsound = 6, 0
ground.type = Low
ground.slidetime = 5
ground.hittime  = 14
ground.velocity = -3
airguard.velocity = -.5,-.2
air.type = High
air.velocity = -.5,-.2
air.hittime = 12

[State 420, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8000
ID = 8000
pos = 0,-13
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 4
removetime = -2
scale = .5,.5
ontop = 1

[State 420, 4]
type = PlaySnd
trigger1 = AnimElem = 2
value = S200,2
volume = 300

[State 420, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Strong Lick
; CNS difficulty: easy
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 5
ctrl = 0
anim = 430
poweradd = 60

[State 430, 1]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 30
animtype = Heavy
guardflag = L
hitflag = MAFLD
priority = 3, Hit
pausetime = 2, 2
sparkno = 9999
sparkxy = -9999, -9999
hitsound = 5, 0
guardsound = 6, 0
ground.type = Trip
ground.slidetime = 5
ground.hittime  = 14
ground.velocity = -3
airguard.velocity = -.5,-.2
air.type = High
air.velocity = -.5,-.2
air.hittime = 12
fall = 1

[State 430, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8000
ID = 8000
pos = 0,-13
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 4
removetime = -2
scale = .5,.5
ontop = 1

[State 430, VelSet]
type = VelSet
trigger1 = AnimElemTime(2) >= 2 && AnimElemTime(15) < 1
x = 1.5

[State 430, 4]
type = PlaySnd
trigger1 = AnimElem = 2
value = S200,0
volume = 300

[State 430, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Strong Lick
; CNS difficulty: easy
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 5
ctrl = 0
anim = 440
poweradd = 60

[State 440, 1]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 30
animtype = Heavy
guardflag = L
hitflag = MAFLD
priority = 3, Hit
pausetime = 2, 2
sparkno = 9999
sparkxy = -9999, -9999
hitsound = 5, 0
guardsound = 6, 0
ground.type = Trip
ground.slidetime = 5
ground.hittime  = 14
ground.velocity = -3, -5
airguard.velocity = -.5,-.2
air.type = High
air.velocity = -.5,-.2
air.hittime = 12
fall = 1

[State 440, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8000
ID = 8000
pos = 0,-13
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 4
removetime = -2
scale = .5,.5
ontop = 1

[State 440, VelSet]
type = VelSet
trigger1 = AnimElemTime(4) >= 1
x = 3

[State 630, 3]
type = PlaySnd
trigger1 = AnimElem = 5
value = S200,4
volume = 100

[State 440, 5]
type = ChangeState
trigger1 = Time >= 30
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Jump Light Punch
; CNS difficulty: easy
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 600

[State 600, 1]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 30
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 2, 2
sparkno = 9999
sparkxy = -9999, -9999
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -2
airguard.velocity = -.5,-.2
air.type = High
air.velocity = -.5,-.2
air.hittime = 12

[State 610, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8000
ID = 8000
pos = 0,-43
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = .5,.5
ontop = 1

[State 610, 3]
type = PlaySnd
trigger1 = AnimElem = 2
value = S200,4
volume = 300

[State 610, 4]
type = CtrlSet
trigger1 = Time = 20
value = 1

[State 600, 5]
type = ChangeState
trigger1 = IfElse(PrevStateno = 40 || PrevStateNo = 50, AnimTime = 0, AnimElem = 100)
value = 50
ctrl = 1
;---------------------------------------------------------------------------
; Jump Medium Punch
; CNS difficulty: easy
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 65
ctrl = 0
anim = 610

[State 610, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 50
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 2, 2
sparkno = 9999
sparkxy = -9999, -9999
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 24
ground.velocity = -4
airguard.velocity = -.5,-.2
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 610, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8100
ID = 8100
pos = -13,-43
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 4
removetime = -2
scale = .5,.5
ontop = 1

[State 610, 3]
type = PlaySnd
trigger1 = AnimElem = 2
value = S200,1
volume = 300

[State 2610, 4]
type = PlaySnd
trigger1 = AnimElem = 7
value = S200,3
volume = 300

[State 610, 5]
type = PowerAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 7
value = 30

[State 610, 6]
type = CtrlSet
trigger1 = Time = 20
value = 1

[State 600, 7]
type = ChangeState
trigger1 = IfElse(PrevStateno = 40 || PrevStateNo = 50, AnimTime = 0, AnimElem = 100)
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; Jump Strong Punch
; CNS difficulty: easy
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 70
ctrl = 0
anim = 620

[State 620, 1]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 40
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 2, 2
sparkno = 9999
sparkxy = -9999, -9999
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -2
airguard.velocity = -.5,-.2
air.type = High
air.velocity = -.5,-.2
air.hittime = 12

[State 620, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8000
ID = 8000
pos = 0,-43
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = .5,.5
ontop = 1

[State 620, 3]
type = PlaySnd
trigger1 = AnimElem = 2
value = S200,4
volume = 300

[State 620, 4]
type = CtrlSet
trigger1 = Time = 20
value = 1

[State 600, 5]
type = ChangeState
trigger1 = IfElse(PrevStateno = 40 || PrevStateNo = 50, AnimTime = 0, AnimElem = 100)
value = 50
ctrl = 1
;---------------------------------------------------------------------------
; Jump Light Kick
; CNS difficulty: easy
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 20
ctrl = 0
anim = 630

[State 630, 1]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 50
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 2, 2
sparkno = 9999
sparkxy = -9999, -9999
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 500
ground.velocity = -1, 6
airguard.velocity = -.5,-.2
air.type = High
air.velocity = -1.4,-3
air.hittime = 500
fall = 1

[State 630, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8100
ID = 8100
pos = -13,-43
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 4
removetime = -2
scale = .5,.5
ontop = 1

[State 630, 3]
type = PlaySnd
trigger1 = AnimElem = 1
value = S200,4
volume = 300

[State 630, 4]
type = PlaySnd
trigger1 = AnimElem = 4
value = S200,3
volume = 300

[State 630, 5]
type = PowerAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 7
value = 30

[State 630, 6]
type = CtrlSet
trigger1 = Time = 20
value = 1

[State 630, 7]
type = ChangeState
trigger1 = IfElse(PrevStateno = 40 || PrevStateNo = 50, AnimTime = 0, AnimElem = 100)
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; Jump Lick
; CNS difficulty: easy
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 20
ctrl = 0
anim = 640

[State 630, 1]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 50
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 2, 2
sparkno = 9999
sparkxy = -9999, -9999
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 15
ground.velocity = -3, 0
airguard.velocity = -.5,-.2
air.type = High
air.velocity = -1.4,-3
air.hittime = 15

[State 630, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8000
ID = 8000
pos = -13,-43
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 4
removetime = -2
scale = .5,.5
ontop = 1

[State 630, 3]
type = PlaySnd
trigger1 = AnimElem = 2
value = S200,4
volume = 300

[State 630, 6]
type = CtrlSet
trigger1 = Time = 20
value = 1
;-------------------------------------------------------------------------
[Statedef 800]
type = S
movetype= A
physics = S
juggle = 0
velset = 0,0
ctrl = 0
anim = 800

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = ifelse (command = "holdfwd", 1, 1)
p2facing = 1
p1stateno = 810
p2stateno = 820
fall = 1

[State 800, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8000
ID = 8000
pos = 0,-33
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = .5,.5
ontop = 1

[State 800, 3]
type = PlaySnd
trigger1 = AnimElem = 2
value = S200,4
volume = 300

[State 800, 4]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------
[Statedef 810]
type = S
movetype= A
physics = N
anim = 810
poweradd = 60
Sprpriority = 1

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 59, 4

[State 810, Bind 3]
type = TargetBind
trigger1 = AnimElem = 2
pos = -20, -0

[State 810, Bind 5]
type = TargetBind
trigger1 = AnimElem = 3
pos = -25, 4

[State 810, Bind 6]
type = TargetBind
trigger1 = AnimElem = 4
pos = -44, -7

[State 810, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem = 6
value = -78

[State 810, Throw]
type = TargetState
trigger1 = AnimElem = 5
value = 821

[State 810, Gravity]
type = VelAdd
Trigger1 = AnimElemTime(3) >= 1
y = .4

[State 810, Jump]
type = VelSet
trigger1 = AnimElem = 3
x = -2
y = -9

[State 810, Land]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 106

[State 810, Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = S200,0
volume = 300

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1


;----------------------------------------------------------------------
[Statedef 820]
type = A
movetype = H
physics = N
velset = 0,0

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 820

;----------------------------------------------------------------------
[Statedef 821]
type = A
movetype = H
physics = N
velset = 5,-5
poweradd = 40
Sprpriority = 1

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4

[State 821, 2] ; Recover near ground (use ChangeState)
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 821, 3] ; Recover in mid air (use SelfState)
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

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

;-------------------------------------------------------------------------
; Go Threw Solid Object Fwd
[StateDef 900]
type = S
movetype= A
physics = S
ctrl = 0
anim = 900
velset = 0,0
sprpriority = 0

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

[State 900, 2]
type = VelSet
trigger1 = 1
x = 5

[State 900, 3]
type = Explod
trigger1 = IfElse((PrevStateNO = 40 || PrevStateNO = 50), (AnimElem = 10000), !time)
anim = 6000
ID = 6000
pos = 10,2
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = .5,.5
sprpriority = 1

[State 900, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;-------------------------------------------------------------------------
; Go Threw Solid Object Bwd
[StateDef 910]
type = S
movetype= A
physics = S
ctrl = 0
anim = 910
velset = 0,0
sprpriority = 0

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

[State 910, 2]
type = VelSet
trigger1 = 1
x = -5

[State 910, 3]
type = Explod
trigger1 = IfElse((PrevStateNO = 40 || PrevStateNO = 50), (AnimElem = 10000), !time)
anim = 6000
ID = 6000
pos = 10,2
postype = p1  ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = 1
removetime = -2
scale = .5,.5
sprpriority = 1

[State 910, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1
;-------------------------------------------------------------------------
; Night Shade
[StateDef 1000]
type = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 1000
velset = 0,0
sprpriority = 2
poweradd = 0

[State 1000, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 75
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 5, 3
sparkno = 9999
sparkxy = -9999, -999
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 40
ground.velocity = -5.7
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 40
palfx.time = 40
palfx.add = 0,-200,0
palfx.mul = 256,256,256
palfx.sinadd = 40,80,40,10
palfx.invertall = 1
palfx.color = 0
EnvShake.time = 12
EnvShake.freq = 30
EnvShake.ampl = -2
EnvShake.phase = 45
air.fall = 1
persistent = 1
ignorehitpause = 1

[State 1000, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8110
ID = 8110
pos = -10,-43
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = .5,.5
ontop = 1

[State 1000, 3]
type = Helper
trigger1 = MoveHit = 1 && NumHelper(7200) < 1
helpertype = normal ;player
name = "darkflames"
ID = 7200
stateno = 7200
postype = p2    ;p2,front,back,left,right
facing = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S1000,0
volume = 300

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

;------------------------------------------------------------------------
; Shadow Ball
[StateDef 1100]
type = S
movetype= I
physics = S
juggle  = 1
ctrl = 0
anim = 1100
velset = 0,0
sprpriority = 1
poweradd = 80

[State 1100, 1]
type = Helper
trigger1 = AnimElem = 3
helpertype = normal ;player
name = "Shadow Ball"
ID = 1110
stateno = 1110
pos = 30,-30
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.xscale = .5
size.yscale = .5

[State 1100, 2]
type = Explod
trigger1 = AnimElem = 1
anim = 6100
ID = 6100
pos = 3, -23
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = .5,.5
sprpriority = 2

[State 1100, 3]
type = Explod
trigger1 = Animelem = 3
anim = 6000
ID = 6000
pos = -5, 2
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = .5,.5
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S1100,0
volume = 400

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

;------------------------------------------------------------------------
[StateDef 1110]
type = S
movetype= A
physics = S
anim = 2000
SprPriority = 2

[State 1110, 1]
type = VelSet
trigger1 = StateNo = 1110
x = 8

[State 1110, 2]
type = afterimage
trigger1 = Time = 0
time = 1000000
length = 5
palbright = 0,0,0
palcontrast = 150,150,150
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
trans = add1

[State 1100, 3]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 75
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 5, 3
sparkno = 9999
sparkxy = -9999, -999
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 40
ground.velocity = -5.7
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 40
palfx.time = 40
palfx.add = 0,-200,0
palfx.mul = 256,256,256
palfx.sinadd = 40,80,40,10
palfx.invertall = 1
palfx.color = 0
EnvShake.time = 12
EnvShake.freq = 30
EnvShake.ampl = -2
EnvShake.phase = 45
air.fall = 1
persistent = 1
ignorehitpause = 1

[State 1100, 4]
type = Explod
trigger1 = Movehit = 1
anim = 8110
ID = 8110
pos = -10,-43
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = .5,.5
SprPriority = 2
ontop = 1

[State 1100, 5]
type = Helper
trigger1 = MoveHit = 1 && NumHelper(7200) < 1
helpertype = normal ;player
name = "darkflames"
ID = 7200
stateno = 7200
postype = p2    ;p2,front,back,left,right
facing = 1

[State 1110, 6]
type = DestroySelf
trigger1 = Time >= 400
trigger2 = MoveContact

;-------------------------------------------------------------------------
; Hypnosis
[StateDef 1200]
type = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 1200
velset = 0,0
sprpriority = 1
poweradd = 50

[State 1200, 1]
type = Explod
trigger1 = AnimElem = 5
anim = 2100
ID = 2100
pos = 10,-37
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 2
removetime = -2
scale = .5,.5
SprPriority = 2
ontop = 1

[State 1200, 1]
type = Explod
trigger1 = AnimElem = 5
anim = 2110
ID = 2110
pos = 30,-37
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 2
removetime = -2
scale = .5,.5
SprPriority = 2
ontop = 1

[State 1200, 1]
type = Explod
trigger1 = AnimElem = 5
anim = 2120
ID = 2120
pos = 50,-37
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 2
removetime = -2
scale = .5,.5
SprPriority = 2
ontop = 1

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 0
animtype = Heavy
guardflag = MA
hitflag = M
priority = 4, Hit
pausetime = 2, 200
sparkno = 9999
sparkxy = -9999, -9999
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 200
ground.velocity = 0

[State 1200, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = unguardable

[State 1200, 1]
type = Explod
trigger1 = MoveHit = 1
anim = 2200
ID = 2200
pos = -40,-100
postype = p2  ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = 1
removetime = -1
scale = .5,.5
SprPriority = 2
ontop = 1

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

;------------------------------------------------------------------------
; Super Taunt
[StateDef 1300]
type = S
movetype= I
physics = S
ctrl = 0
anim = 1300
velset = 0,0
sprpriority = 1
poweradd = 0

[State 1300, 1]
type = HitOverride
trigger1 = Stateno = 1300
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
stateno = 1301

[State 1200, end]
type = ChangeState
trigger1 = Time >= 150
value = 0
ctrl = 1

;----------------------
[StateDef 1301]
type = S
movetype= A
physics = S
ctrl = 0
anim = 210
velset = 0,0
sprpriority = 1
poweradd = 0

[State 1301, 1]
type = LifeAdd
trigger1 = AnimElem = 1
value = 70

[State 1301, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 50
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 2, 2
sparkno = 9999
sparkxy = -9999, -9999
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 24
ground.velocity = -7, -5
airguard.velocity = -7, -5
air.type = High
air.velocity = -1.4,-3
air.hittime = 12
EnvShake.time = 12
EnvShake.freq = 30
EnvShake.ampl = -2
EnvShake.phase = 45
EnvColor.time = 3
EnvColor.value = 255,255,255
EnvColor.under = 1
fall = 1
fall.damage = 30

[State 1301, 3]
type = Explod
trigger1 = Movehit = 1
anim = 8100
ID = 8100
pos = -13,-43
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 4
removetime = -2
scale = .5,.5
ontop = 1

[State 1301, 4]
type = PlaySnd
trigger1 = AnimElem = 2
value = S200,1
volume = 300

[State 1301, 5]
type = PlaySnd
trigger1 = AnimElem = 7
value = S200,3
volume = 300

[State 1301, 6]
type = PowerAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 7
value = 30

[State 1301, 7]
type = VelAdd
trigger1 = AnimElem = 7
x = 8

[State 1301, 8]
type = afterimage
trigger1 = Time = 0
time = 28
length = 5
palbright = 0,0,0
palcontrast = 150,150,150
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
trans = Sub

[State 1301, 9]
type = AssertSpecial
trigger1 = 1
flag = unguardable
flag2 = timerfreeze

[State 1301, 10]
type = EnvColor
trigger1 = Time = 0
value = 255,255,255
time = 3
under = 1

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

;-----------------------------------------------------------------------
; Super Hammer
[StateDef 1400]
type = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 1400
velset = 0,0
sprpriority = 1
poweradd = -30

[State 1301, 3]
type = Explod
trigger1 = AnimElem = 1
anim = 6010
ID = 6010
pos = -12,4
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 4
removetime = -2
scale = .5,.5
ontop = 1

[State 1301, 3]
type = Explod
trigger1 = AnimElem = 5
anim = 6030
ID = 6030
pos = 79,4
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 4
removetime = -2
scale = .5,.5
ontop = 0

[State 1301, 3]
type = Explod
trigger1 = AnimElem = 5
anim = 6040
ID = 6040
pos = 79,4
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 4
removetime = -2
scale = .5,.5
ontop = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S200,0
volume = 300

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = S1400,0
volume = 300

[State 0, EnvShake]
type = EnvShake
trigger1 = AnimElem = 5
time = 12
freq = 60
ampl = -4
phase = 90

[State 210, 1]
type = HitDef
trigger1 = Time = 0
attr = S, SA
damage = 90
animtype = Heavy
guardflag = MA
hitflag = MAFLD
priority = 4, Hit
pausetime = 2, 2
sparkno = 9999
sparkxy = -9999, -9999
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 35
ground.velocity = 0, 15
airguard.velocity = 0,-.2
air.type = High
air.velocity = 0,15
air.hittime = 35
fall = 1

[State 210, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8100
ID = 8100
pos = -13,-43
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 4
removetime = -2
scale = .5,.5
ontop = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Power >= 1000
flag = unguardable

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

;-------------------------------------------------------------------------
; Toxic Tackle
[StateDef 1500]
type = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 40
velset = 0,0
sprpriority = 1
poweradd = 0

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

[State 1500, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 1501
ctrl = 1

;--------------------------------------------------------------------------
[Statedef 1501]
type    = A
movetype= A
physics = A
ctrl = 0
anim = 1500
sprpriority = 1
poweradd = -30

[State 1501, 1]
type = VelSet
trigger1 = Time = 0
x = 6
y = const(velocity.run.fwd.y)

[State 1501, 2]
type = CtrlSet
trigger1 = Time = 2
value = 1

[State 1501, 3]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 85
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 5, 3
sparkno = 9999
sparkxy = -9999, -999
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 40
ground.velocity = -5.7, -6
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 40
palfx.time = 50
palfx.add = 0,100,50
palfx.mul = 20,120,24
palfx.sinadd = 85,110,55,10
palfx.invertall = 1
palfx.color = 0
EnvShake.time = 12
EnvShake.freq = 30
EnvShake.ampl = -2
EnvShake.phase = 45
fall = 1
fall. damage = 1
air.fall = 1
persistent = 1
ignorehitpause = 1

[State 1110, 2]
type = afterimage
trigger1 = Time = 0
time = 35
length = 10
palbright = 0,0,0
palcontrast = 150,150,150
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
trans = add1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 6010
ID = 6010
pos = 15,4
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = .5,.5
sprpriority = 2

[State 210, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8100
ID = 8100
pos = -13,-43
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 25
removetime = -2
scale = .5,.5
ontop = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Power >= 1000
flag = unguardable

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S200,0
volume = 300

[State 100, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 106

;------------------------------------------------------------------------
; Night Shade In Air
[StateDef 2000]
type = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 1000
sprpriority = 2
poweradd = 0

[State 1000, 1]
type = HitDef
trigger1 = Time = 0
attr = A, SA
damage = 75
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 5, 3
sparkno = 9999
sparkxy = -9999, -999
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 40
ground.velocity = -5.7
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 40
palfx.time = 40
palfx.add = 0,-200,0
palfx.mul = 256,256,256
palfx.sinadd = 40,80,40,10
palfx.invertall = 1
palfx.color = 0
EnvShake.time = 12
EnvShake.freq = 30
EnvShake.ampl = -2
EnvShake.phase = 45
air.fall = 1
persistent = 1
ignorehitpause = 1

[State 2000, 2]
type = Explod
trigger1 = Movehit = 1
anim = 8110
ID = 8110
pos = -10,-43
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = .5,.5
ontop = 1

[State 2000, 3]
type = Helper
trigger1 = MoveHit = 1 && NumHelper(7200) < 1
helpertype = normal ;player
name = "darkflames"
ID = 7200
stateno = 7200
postype = p2    ;p2,front,back,left,right
facing = 1

[State 2000, 4]
type = PlaySnd
trigger1 = AnimElem = 6
value = S1000,0
volume = 300

[State 2000, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1
;------------------------------------------------------------------------
; Shadow Ball
[StateDef 2500]
type = A
movetype= I
physics = A
juggle  = 1
ctrl = 0
anim = 2500
sprpriority = 1
poweradd = 80

[State 2500, 1]
type = Helper
trigger1 = AnimElem = 2
helpertype = normal ;player
name = "Shadow Ball"
ID = 2510
stateno = 2510
pos = 30,-30
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.xscale = .5
size.yscale = .5

[State 2500, 2]
type = Explod
trigger1 = AnimElem = 1
anim = 6100
ID = 6100
pos = 35, -57
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 100
removetime = -2
scale = .5,.5
sprpriority = 2

[State 2500, 2]
type = Explod
trigger1 = AnimElem = 1
anim = 2000
ID = 2000
pos = 35, -57
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 100
removetime = -2
scale = .5,.5
sprpriority = 2


[State 2500, 4]
type = PlaySnd
trigger1 = AnimElem = 1
value = S1100,0
volume = 400

[State 2500, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;------------------------------------------------------------------------
[StateDef 2510]
type = S
movetype= A
physics = S
anim = 2000
SprPriority = 2

[State 2510, 1]
type = VelSet
trigger1 = StateNo = 2510
x = 8
y = 5

[State 2510, 2]
type = afterimage
trigger1 = Time = 0
time = 1000000
length = 5
palbright = 0,0,0
palcontrast = 150,150,150
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
trans = add1

[State 2510, 3]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 75
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 5, 3
sparkno = 9999
sparkxy = -9999, -999
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 40
ground.velocity = -5.7
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 40
palfx.time = 40
palfx.add = 0,-200,0
palfx.mul = 256,256,256
palfx.sinadd = 40,80,40,10
palfx.invertall = 1
palfx.color = 0
EnvShake.time = 12
EnvShake.freq = 30
EnvShake.ampl = -2
EnvShake.phase = 45
air.fall = 1
persistent = 1
ignorehitpause = 1

[State 2510, 4]
type = Explod
trigger1 = Movehit = 1
anim = 8110
ID = 8110
pos = -10,-43
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = .5,.5
SprPriority = 2
ontop = 1

[State 2510, 5]
type = Helper
trigger1 = MoveHit = 1 && NumHelper(7200) < 1
helpertype = normal ;player
name = "darkflames"
ID = 7200
stateno = 7200
postype = p2    ;p2,front,back,left,right
facing = 1

[State 2510, 6]
type = DestroySelf
trigger1 = Time >= 400
trigger2 = MoveContact

; =======================================================================
;--------- Helpers --------------     ------------------------------
; =======================================================================
;------------------------------------------------------------------------
[StateDef 7000, Super Portrait 1]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 7000
poweradd = 0
sprpriority = 1

[State 7000, 1]
type = PosSet
trigger1 = !time
y = 249-ceil(screenpos Y)

[State 7000, 2]
type = Posadd
trigger1 = !time
x = -140

[State 7000, 3]
type = AssertSpecial
trigger1 = 1
flag = noBG
flag2 = noFG
flag3 = noshadow

[State 7000, 4]
type = VelSet
trigger1 = time < 15
x = 6
[State 7000, 5]
type = VelSet
trigger1 = time > 30
x = 9

[State 7000, 6]
type = VarSet
trigger1 = !time
fvar(1) = 1

[State 7000, 7]
type = Varadd
trigger1 = time%2 && time >= 30
fvar(1) = 0.14

[State 7000, 8]
type = AngleDraw
trigger1 = time < 30
scale = 1,1

[State 7000, 9]
type = AngleDraw
trigger1 = time >= 30
scale = fvar(1),fvar(1)

[State 7000, 10]
type = Trans
trigger1 = time >= 30
trans = add1
alpha = ceil(256-fvar(1)*50)

[State 7000, 11]
type = destroyself
trigger1 = time = 50

;------------------------------------------------------------------------
[StateDef 7100, Super Portrait 2]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 7100
poweradd = 0
sprpriority = 1

[State 7100, 1]
type = PosSet
trigger1 = !time
y = 249-ceil(screenpos Y)

[State 7100, 2]
type = Posadd
trigger1 = !time
x = -140

[State 7100, 3]
type = AssertSpecial
trigger1 = 1
flag = noBG
flag2 = noFG
flag3 = noshadow

[State 7100, 4]
type = VelSet
trigger1 = time < 15
x = 6
[State 7100, 5]
type = VelSet
trigger1 = time > 30
x = 9

[State 7100, 6]
type = VarSet
trigger1 = !time
fvar(1) = 1

[State 7100, 7]
type = Varadd
trigger1 = time%2 && time >= 30
fvar(1) = 0.14

[State 7100, 8]
type = AngleDraw
trigger1 = time < 30
scale = 1,1

[State 7100, 9]
type = AngleDraw
trigger1 = time >= 30
scale = fvar(1),fvar(1)

[State 7100, 10]
type = Trans
trigger1 = time >= 30
trans = add1
alpha = ceil(256-fvar(1)*50)

[State 7100, 11]
type = destroyself
trigger1 = time = 50

;--------------------------------------------------------------------------
[Statedef 7200, fire]
physics=N
velset=0,0
Anim = 9989
sprpriority=4

[State 7200, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 2,2

[State 7200, Trans]
type = Trans
trigger1 = 1
trans = Sub

[State 7200, assert]
type=assertspecial
trigger1= 1
flag=noshadow
ignorehitpause=1

[State 7200, flames]
type=explod
trigger1= 1
anim=7200
ID=7200
sprpriority=3
postype=p2
vel=-.2,-.75
pos=(enemynear,const(size.mid.pos.x)),(enemynear,const(size.mid.pos.y))
random=40,60
removetime=-2
scale=0.5,0.5
ownpal=1

[State 7200, flames]
type=explod
trigger1= 1
anim=7200
ID=7200
sprpriority=3
postype=p2
vel=-.2,-.75
pos=(enemynear,const(size.mid.pos.x)),(enemynear,const(size.mid.pos.y))
random=40,60
removetime=-2
scale=0.5,0.5
ownpal=1

[State 7200, pos]
type=posadd
trigger1= 1
x= ceil(p2dist x)
y=ceil(p2dist y)-20

[State 7200, end]
type=destroyself
trigger1= (enemynear,ctrl || (enemynear,movetype!=H) || (enemynear,statetype=L)) && time >= 30
;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

;This controller plays a sound everytime the player lands from a jump, or
;from a back-dash.
[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
trigger3 = stateno = 191
value = 40, 0

[State -3, Running Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 100 ; Run Fwd
trigger2 = stateno = 105 ; Run Back
value = 100, 0

[State -3, Dashing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 900 ; Dash Fwd
trigger2 = stateno = 910 ; Dash Back
value = 900, 0

[State 100, 5]
type = Explod
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back
trigger3 = stateno = 191
trigger4 = stateno = 1500
anim = 6020
ID = 6020
pos = -2, 2
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = .5,.5
ontop = 0
sprpriority = -1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = P2MoveType != H
id = 2200
