; 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 = 15		;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 = 255			;Volume offset (negative for softer)
IntPersistIndex = 30,32,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 = 1			;Horizontal scaling factor.
yscale = 1			;Vertical scaling factor.
ground.back = 15		;Player width (back, ground)
ground.front = 16		;Player width (front, ground)
air.back = 10		;Player width (back, air)
air.front = 10		;Player width (front, air)
height = 80			;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  = 3		;Walk forward
walk.back = -3		;Walk backward
run.fwd  = 5, 0		;Run forward (x, y)
run.back = -5,-2	;Hop backward (x, y)
jump.neu = 0,-8		;Neutral jumping velocity (x, y)
jump.back = -2		;Jump back Speed (x, y)
jump.fwd = 2.5		;Jump forward Speed (x, y)
runjump.back = -3,-8;Running jump speeds (opt)
runjump.fwd = 3,-8	;.
airjump.neu = 0,-6	;.
airjump.back = -2.55	;Air jump speeds (opt)
airjump.fwd = 2.5		;.

[Movement]
airjump.num = 0		;Number of air jumps allowed (opt)
airjump.height = 30	;Minimum distance from ground before you can air jump (opt)
yaccel = .35		;Vertical acceleration
stand.friction = .85	;Friction coefficient when standing
crouch.friction = .85	;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 match won]
type=changestate
value=182
triggerall=matchover
trigger1=teammode=single
trigger2=teammode=simul
trigger2=id<partner,id

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

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

[State 181, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S180,0
channel = 0

[State 181, PlaySnd]
type = PlaySnd
trigger1 = time = 24
trigger2 = time = 33
trigger3 = time = 42
trigger4 = time = 51
trigger5 = time = 60
trigger6 = time = 69
trigger7 = time = 78
value = S100,0

[State 181, ChangeAnim]
type = ChangeAnim
trigger1 = time = 80
value = 181

[State 181, PlaySnd]
type = PlaySnd
trigger1 = time = 88
value = S100,2

[State 181, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,160]
flag = roundnotover

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

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

[State 190, PlaySnd]
type = PlaySnd
trigger1 = time = 100
value = S0,2

[State 190]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 190, Helper]
type = Helper
trigger1 = time = 90
ID = 191
pos = 100,-150
postype = front
stateno = 191
helpertype = normal
name = "Intro"
keyctrl = 0
ownpal = 1
supermovetime = 1

[State 190, end]
type = ChangeState
trigger1 = Time = 223
value = 0

[Statedef 191]
type = A
movetype = A
physics = N
anim = 190
ctrl = 0
velset = 0,0
sprpriority = 2

[State 191]
type = varrandom
trigger1 = 1
v = 1
range = -30, 15

[State 191]
type = varrandom
trigger1 = 1
v = 2
range = 70, 110

[State 191]
type = varset
trigger1 = 1
fvar(3) = 1.2 + 0.01*ceil(Random%21)

[State 191]
type = Explod
trigger1 = 1
trigger1 = Random%2 = 0
anim = 1104 + Random%4
ID = 1104
pos = -6+Random%25,-48+Random%25
postype = p1
bindtime = 1
removetime = 20
ownpal = 1
sprpriority = 5
facing = IfElse(Random%2 = 0, 1,-1)
vfacing = IfElse(Random%2 = 0, 1,-1)
scale = fvar(3), fvar(3)
vel=-vel x*(.25+random*.001),-vel y*(.25+random*.001)
accel=-vel x*.001,-vel y*.001
;vel = 0.1*var(1), 0.1*var(2)
;accel = 0.01*var(1), 0.01*var(2)
ignorehitpause = 1
trans = add

[State 191]
type = VelSet
trigger1 = time
x = -15

[State 191]
type = Veladd
trigger1 = time > 1
y = 0.44

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

[State 191, ChangetState]
type = ChangeState
trigger1 = (parentDist X > -10)
value = 192

[StateDef 192]
type = A
movetype = I
physics = N
anim = 191
ctrl = 0
velset = 0,0
sprpriority = 2

[State 192, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S100,2

[State 192]
type = VelSet
trigger1 = AnimElem = 2
Y = -6

[State 191]
type = Veladd
trigger1 = AnimElemTime(3) > 0
y = 0.44

[State 192, ChangeState]
Type = ChangeState
Trigger1 = Pos Y >= 0
Trigger1 = Vel Y >= 0
Value = 193

[StateDef 193]
Type = S
MoveType= A
Physics	= S
Anim = 192
Ctrl = 0
Sprpriority = 2

[State 193, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S190,0+Random%2
channel = 0

[State 193, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,0

[State 193]
type = velset
trigger1 = time = 0
Y = 0

[State 193]
type = posset
trigger1 = time = 0
Y = 0

[State 193]
type = DestroySelf
trigger1 = AnimTime = 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

;---------------------------------------------------------------------------
; Standing Light Punch
; CNS difficulty: easy
[Statedef 200]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 1				;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0				;Set ctrl (Def: no change)
anim = 200				;Change animation (Def: no change)
poweradd = 14			;Power to add (Def: 0)
sprpriority = 2			;Set layering priority to 2 (in front)

[State 200, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 650
trigger1 = time = 1
value = S400,0+Random%2
channel = 0

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA			;Attribute: Standing, Normal Attack
damage = 8			;Damage that move inflicts, guard damage
animtype = Light			;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA			;Flags on how move is to be guarded against
hitflag = MAF			;Flags of conditions that move can hit
priority = 3, Hit			;Attack priority: 0 (least) to 7 (most), 4 default
					;Hit/Miss/Dodge type (Def: Hit)
pausetime = 7,7			;Time attacker pauses, time opponent shakes
sparkno = S8050*10**(random%4)				;Spark anim no (Def: set above)
sparkxy = -10, -76		;X-offset for the "hit spark" rel. to p2,
guard.sparkno = S9000					;Y-offset for the spark rel. to p1
hitsound = S200,0			;Sound to play on hit
guardsound = S300, 4			;Sound to play on guard
ground.type = High		;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5		;Time that the opponent slides back
ground.hittime  = 12		;Time opponent is in hit state
ground.velocity = -2.6		;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8	;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High			;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.4,-3		;X-velocity at which opponent is pushed,
					;Y-velocity at which opponent is pushed
air.hittime = 12			;Time before opponent regains control in air

[State 200, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S100,0

[State 200, 3]
type = CtrlSet
trigger1 = Time = 11
value = 1

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

;---------------------------------------------------------------------------
; Standing Medium Punch
; CNS difficulty: easy
[Statedef 210]
type    = S
movetype= A
physics = S
poweradd= 25
ctrl = 0
velset = 0,0
anim = 210

[State 210, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 500
trigger1 = time = 1
value = S400,2+Random%2
channel = 0

[State 210, VelSet]
type = VelSet
trigger1 = AnimElem = 5
x = 6
ignorehitpause = 0

[State 210, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = S100,1

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 5
attr = S, NA
animtype  = Medium
damage = 15
guardflag = MA
pausetime = 8,8
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -20,-70
hitsound   = S200,1
guardsound = S300,4
ground.type = Low
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -3.4
air.velocity = -2,-3
envshake.time = 5
envshake.freq = 60
envshake.ampl = -3

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

[StateDef 215]
type = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 215
poweradd = 30
sprpriority = 2

[State 215, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 500
trigger1 = time = 1
value = S400,2+Random%2
channel = 0

[State 215, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = S100,2

[State 215, VelSet]
type = VelSet
trigger1 = AnimElem = 5
x = 6
ignorehitpause = 0

[State 215, 1]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
damage = 24
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 7, 10
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -20, -76
hitsound = S200,6
guardsound = S300,4
ground.type = Low
ground.slidetime = 10
ground.hittime  = 13
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = Low
air.velocity = -4,-2
air.hittime = 12
envshake.time = 5
envshake.freq = 60
envshake.ampl = -3

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

;---------------------------------------------------------------------------
; Standing Strong Punch
; CNS difficulty: easy
[Statedef 220]
type    = S
movetype= A
physics = S
poweradd= 65
ctrl = 0
velset = 0,0
anim = 220

[State 220, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 500
trigger1 = time = 1
value = S400,3+Random%2
channel = 0

[State 220, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = S100,2

[State 220, VelSet]
type = VelSet
trigger1 = AnimElem = 5
x = 5
ignorehitpause = 0

[State 220, 2]
type = HitDef
trigger1 = AnimElem = 6
attr = S, NA
animtype = Heavy
damage = 30
guardflag = MA
pausetime = 9,9
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -20,-70
hitsound = S200,6
guardsound = S300,4
ground.type = High
ground.slidetime = 14
ground.hittime  = 18
ground.velocity = -4
air.velocity = -4.5,-1.6
envshake.time = 10
envshake.freq = 80
envshake.ampl = -4

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

[StateDef 225]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 225
poweradd = 35
sprpriority = 2

[State 225, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 500
trigger1 = time = 1
value = S400,3+Random%2
channel = 0

[State 225, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 8
value = S100,4

[State 225, 1]
type = HitDef
trigger1 = AnimElem = 8
attr = A, NA
damage = 35
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10,10
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -20, -76
hitsound = S200,6
guardsound = S300, 4
ground.type = Low
ground.slidetime = 8
ground.hittime  = 14
ground.velocity = -7,-2
airguard.velocity = -3,-1
air.type = Low
air.velocity = -6,-3
air.hittime = 12
fall = 1
fall.recovertime = 26
envshake.time = 10
envshake.freq = 80
envshake.ampl = -4

[State 225]
type = velset
trigger1 = AnimElem = 8
X = 6.5
Y = -4

[State 225]
type = veladd
trigger1 = AnimElemTime(8) > 0
Y = 0.27

[State 225, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 8
statetype = A       ;S,A,C,L
movetype = A        ;I,A,H
physics = N        ;A,C,S,N

[State 225, Gravity]
type = Gravity
trigger1 = AnimElem = 9

[State 225]
type = ChangeState
Trigger1 = Vel Y > 0
trigger1 = Pos Y > 0
value = 226

[StateDef 226]
type = C
movetype= I
physics = C
velset = 0,0
ctrl = 0
anim = 226
sprpriority = 2

[State 226, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S100,25

[state 226]
type=posset
y=0
trigger1=!time

[State 226]
type = StateTypeSet
trigger1 = AnimElem = 9
StateType = S
Physics = S

[State 226]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
Ctrl = 1

;---------------------------------------------------------------------------
; Crouching Light 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
poweradd= 15
ctrl = 0
anim = 400

[State 400, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 650
trigger1 = time = 1
value = S400,0+Random%2
channel = 0

[State 400, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S100,0

[State 400, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = C, NA
damage = 12
priority  = 3
animtype = Light
hitflag = MAF
guardflag = L
pausetime = 8,10
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-42
hitsound  = S200,0
guardsound = S300,4
ground.type = Low
ground.slidetime = 4
ground.hittime  = 10
ground.velocity = -5
air.velocity = -1,-2

[State 400, 3]
type = CtrlSet
trigger1 = Time = 10
value = 1

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

;---------------------------------------------------------------------------
; Crouching Medium Punch
[Statedef 410]
type    = C
movetype= A
physics = C
poweradd = 23
ctrl = 0
anim = 410

[State 410, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 500
trigger1 = time = 1
value = S400,2+Random%2
channel = 0

[State 410, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S300,1

[State 410, Explod]
type = Explod
trigger1 = AnimElem = 6
anim = 411
ID = 411
pos = 30,-32
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 4
removeongethit = 1

[State 410, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S100,1

[State 410, 2]
type = HitDef
trigger1 = AnimElem = 6
attr = C, NA
damage = 17
priority  = 3,Hit
animtype  = Medium
hitflag = MAF
guardflag = MA
pausetime = 8,9
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-22
hitsound   = S200,1
guardsound = S300,4
ground.type = High
ground.slidetime = 4
ground.hittime  = 10
ground.velocity = -4
air.velocity = -1.5,-4
envshake.time = 5
envshake.freq = 60
envshake.ampl = -3

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

;---------------------------------------------------------------------------
; Crouching Strong Punch
[Statedef 420]
type    = C
movetype= A
physics = C
poweradd= 30
ctrl = 0
anim = 420

[State 420, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 500
trigger1 = time = 1
value = S400,3+Random%2
channel = 0

[State 420, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S100,2

[State 420, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = C, NA
damage  = 45
priority  = 3
animtype  = Up
hitflag = M
guardflag = MA
hitflag = MAFD
pausetime = 8,9
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
pausetime = 15,16
sparkxy = -10,-42
hitsound  = S200,2
guardsound = S300,4
ground.type = High
ground.slidetime = 13
ground.hittime  = 26
ground.velocity = -1,-7
airguard.velocity = -2.9,-1.6
air.type = High
air.velocity = -1,-7
down.velocity = -3,-3
air.hittime = 26
fall = 1
fall.recovertime = 42
envshake.time = 10
envshake.freq = 80
envshake.ampl = -4

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

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

[State 600, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 650
trigger1 = time = 1
value = S400,0+Random%2
channel = 0

[State 600, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S100,0

[State 600, 2]
type = HitDef
trigger1 = animelem = 3
attr = A, NA
damage = 10
hitflag = MAFD
guardflag = HA
priority = 4,Hit
pausetime = 8,8
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-45
hitsound   = S200,0
guardsound = s300,4
animtype = light
ground.type = Low
ground.slidetime = 9
ground.hittime  = 9
fall.recovertime = 19
ground.velocity = -3
air.velocity = -1,-4.3
air.fall = 1

[State 600, 5]
type = CtrlSet
trigger1 = Time = 12
value = 1

;---------------------------------------------------------------------------
; Jump Medium Punch
; CNS difficulty: easy
[Statedef 610]
type    = A
movetype= A
physics = A
poweradd= 25
ctrl = 0
anim = 610

[State 610, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 500
trigger1 = time = 1
value = S400,2+Random%2
channel = 0

[State 610, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S300,1

[State 610, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S100,1

[State 610, Helper]
type = Helper
trigger1 = AnimElem = 6
helpertype = normal
name = "Burst"
ID = 611
stateno = 611
pos = 20,-25
postype = p1
facing = 1

[State 610, 2]
type = HitDef
trigger1 = animelem = 6
attr = A, NA
damage = 20
hitflag = MAFD
guardflag = HA
priority = 6,Hit
pausetime = 10,10
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-45
hitsound  = S200,1
guardsound = S300,4
animtype = Medium
ground.type = High
ground.slidetime = 10
ground.hittime  = 11
fall.recovertime = 30
ground.velocity = -5
air.velocity = -2,-2.5
air.fall = 1
envshake.time = 5
envshake.freq = 60
envshake.ampl = -3

[StateDef 611]
type = A
physics = A
ctrl = 0
anim = 411
sprpriority = 4

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

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

[State 611, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 315

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

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

[State 620, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 500
trigger1 = time = 1
value = S400,3+Random%2
channel = 0

[State 620, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S100,2

[State 620, 1]
type = HitDef
trigger1 = animelem = 7
attr = A, NA
damage = 44
hitflag = MAFD
guardflag = HA
priority = 7,Hit
pausetime = 9,9
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-45
hitsound  = S200,2
guardsound = S300,4
animtype = Heavy
ground.type = High
ground.slidetime = 9
ground.hittime  = 9
fall.recover = 0
ground.velocity = -6
air.velocity = -3,15
air.fall = 1
yaccel = .44
envshake.time = 10
envshake.freq = 80
envshake.ampl = -4

;---------------------------------------------------------------------------
; Throw - Attempt
; CNS difficulty: medium-advanced
; Description: Throws are not difficult to make, although then can be
;     tedious at times. Throw attempt states have a HitDef of a
;     special format. The key parameters in a throw are p1stateno
;     and p2stateno. If the HitDef successfully connects, then
;     the attacker will change to the state number specified by
;     p1stateno, and the opponent will be change to the state
;     number assigned to p2stateno. The special thing about p2stateno
;     is that the opponent will be temporarily brought into the
;     attacker's state file. In this case, no matter who the
;     opponent is, he will be taken to state 820 of this file (kfm.cns)
;     and remain here until the end of the throw (look at his debug
;     information when he is being thrown; the text changes to yellow
;     to mean that he is in another player's state file).
[StateDef 800]
type = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

; Notes: The '-' symbol in the hitflag field means that it only affects
;   players who are not in a hit state. This prevents the player from combo-ing
;   into the throw. The priority should be set to a low number, such as
;   1 or 2, so that the throw does not take precedence over normal attacks.
;   The type of priority must always be set to "Miss" or "Dodge" for throws,
;   otherwise strange behavior can result.
[State 800]
type = HitDef
trigger1 = AnimElem = 6
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
p1sprpriority = -1
p1facing = 1
p2facing = 1
p1stateno = 801
p2stateno = 802
guard.dist = 0
fall = 1
fall.recover = 0

[State 800]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Throwing the opponent
; Description: In this state, the player throws the opponent by binding him to
;     various offsets based on his current frame of animation. For
;     example, [State 810, Bind 1] binds the opponent to an offset of
;     28 pixels in front of the player. That puts him around where the hand
;     is at. Is is important to keep the opponent bound using a
;     TargetBind controller at all times, until you let him go. This
;     is especially important if your player has a Clsn2 box that
;     allows him to get hit while throwing someone. Each time a player
;     gets hit, all his bound targets will be set to a fall state. If
;     the opponent is not bound, then he might get stuck in his thrown
;     state when his attacker is knocked out of the throw halfway.
; Notes: There is a TargetLifeAdd controller to decrease the opponent's
;     life, and a TargetState controller to change his state to a
;     falling state when KFM lets go of him.
[StateDef 801]
Type = S
MoveType = A
Physics = N
Anim = 801

[State 801, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S200,0

[State 801]
type = VarSet
trigger1 = Time = 0
var(2) = command = "holdback"

[State 801]
Type = TargetBind
trigger1 = AnimElemTime(2) < 0
pos = 0*const(size.xscale), -5*const(size.yscale)

[State 801]
type = Turn
trigger1 = var(2)
trigger1 = AnimElem = 1

[State 801]
Type = TargetBind
trigger1 = AnimElem = 2
pos = -20*const(size.xscale), -5*const(size.yscale)

[State 801]
type = Width
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(9) < 0
edge = 60,0

[State 801]
type = TargetFacing
trigger1 = var(2)
trigger1 = AnimElem = 2
value = -1

[State 801]
Type = TargetBind
trigger1 = AnimElem = 3
pos = ceil(0*const(size.xscale)), -5*const(size.yscale)

[State 801]
Type = TargetBind
trigger1 = AnimElem = 4
pos = ceil(-20*const(size.xscale)), -5*const(size.yscale)

[State 801]
Type = TargetBind
trigger1 = AnimElem = 5
pos = ceil(0*const(size.xscale)), -25*const(size.yscale)

[State 801]
Type = TargetBind
trigger1 = AnimElem = 6
pos = ceil(30*const(size.xscale)), -30*const(size.yscale)

[State 801]
Type = TargetBind
trigger1 = AnimElem = 7
pos = ceil(60*const(size.xscale)), -80*const(size.yscale)

[State 801]
type = TargetLifeAdd
trigger1 = AnimElem = 9
value = -60

[State 801]
type = TargetState
trigger1 = AnimElem = 7
value = 803

[State 801, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S100,2

[State 801]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

;---------------------------------------------------------------------------
; Opponent Thrown
; (a custom gethit state)
; Description: This is the state that the opponent changes to after being
;     hit by the throw HitDef. The important thing here is to use a
;     ChangeAnim2 controller. The difference between ChangeAnim2 and
;     ChangeAnim is that ChangeAnim2 changes the player's animation to
;     an action in the AIR file of the attacker (in this case, kfm.air),
;     whereas ChangeAnim always changes the player to an action in his
;     own AIR file. Look at Action 820 in kfm.air for some extra
;     comments.
[StateDef 802]
type = U
movetype= H
physics = N
VelSet = 0, 0
ctrl = 0
sprpriority = 1

[State 802]
type = ChangeAnim2
trigger1 = Time = 0
value = 802

[State 802]
type = SelfState
trigger1 = !GetHitVar(IsBound)
value = 5050


;---------------------------------------------------------------------------
; Opponent thrown into the air
; (a custom gethit state)
; Description: This state has the opponent flying through the air and
;     falling down onto the ground. The SelfState controller sets the
;     opponent back using to his own state file when he his the ground.
;     Controllers 821,2 and 821,3 allow the opponent to recover by
;     hitting his recovery command when he is falling.
[StateDef 803]
Type = A
MoveType = H
Physics = N
ctrl = 0
velset = -3,-6

[State 803, Vel]
type = VelAdd
trigger1 = 1
x = -0.1
y = 0.6

[State 803]
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200

[State 803]
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210

[State 803]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

[StateDef 804]
type = U
movetype = I
physics = N
anim = 803
ctrl = 0

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

[State 804]
type = PlayerPush
trigger1 = 1
value = 1
IgnoreHitPause = 1
Persistent = 1

[State 804]
type = VelSet
trigger1 = Time = 1
x = -2

[State 804]
type = TargetState
trigger1 = Time = 1
value = 805

[StateDef 805]
type = U
movetype = H
physics = N
ctrl = 0
facing = (Enemy,Facing)

[State 805]
type = StateTypeSet
trigger1 = (Time > 0)
MoveType = I
IgnoreHitPause = 1
Persistent = 1

[State 805]
type = ChangeAnim
triggerall = SelfAnimExist(5005)
trigger1 = Time = 0
value = 5005

[State 805]
type = ChangeAnim2
triggerall = !SelfAnimExist(5005)
trigger1 = Time = 0
value = 5002

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

[State 805]
type = PlayerPush
trigger1 = 1
value = 1
IgnoreHitPause = 1
Persistent = 1

[State 805]
type = PosSet
triggerall = (StateType = A)
trigger1 = (Pos Y >= 0)
y = 0

[State 805]
type = VelSet
trigger1 = Time = 0
x = -2

[State 805]
type = VelSet
triggerall = (StateType = A)
trigger1 = (Pos Y >= 0)
y = 0

[State 805]
type = VelAdd
triggerall = (StateType = A)
trigger1 = (Time > 0)
y = 0.25

[State 805]
type = SelfState
trigger1 = (Time > 20)
value = ifelse(StateType=A,5040,0)
ctrl = 1

[StateDef 1000]
Type = S
Movetype= A
Physics = S
Anim = 1000
Velset = 0, 0
Ctrl = 0
Poweradd = 30

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S400,7
channel = 0

[State 1000]
type = Helper
trigger1 = AnimElem = 7
name = "Starburst"
ID = 1001
postype = p1
pos = 28,-48
Stateno = 1001
ownpal = 1
ignorehitpause = 1

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

[StateDef 1001]
Type = A
Movetype= A
Physics = N
Anim = 1001
Ctrl = 0
Sprpriority = 5

[State 1001, PlaySnd]
type = Playsnd
trigger1 = Time = 0
value = S100,24

[State 1001]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1001]
type = AngleDraw
trigger1 = 1
scale = 1.5,1.5
ignorehitpause = 1

[State 1001]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

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

[State 1001, hitby]
type = hitby
trigger1 = 1
value = SCA,AP
time = -1

[State 1001, var]
type = varset
trigger1 = movecontact
var(0) = 1+(moveguarded!=0)

[State 1001]
type = veladd
trigger1 = 1
X = 0.2 * cos(var(0)*Pi/180)
Y = -0.1 * sin(var(0)*Pi/180)

[State 1001]
type= HitDef
trigger1 = !Movecontact
attr = A, SP
hitflag	= MAF
guardflag = MA
damage = ceil(57*(root,fvar(14))), 7
animtype = Medium
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 0, 1
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%10,-28+random%10
hitsound = -1
guardsound = S300, 0
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity	= -8, 0
guard.velocity = -8
air.velocity = -4,-5
airguard.velocity= -4,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 0
fall.recover = 1
fall.recovertime = 39
air.fall = 1
yaccel = 0.4
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 1001, ChangeState]
type = changestate
trigger1 = var(0)
value = 1002

[State 1001]
type = DestroySelf
trigger1 = FrontEdgeBodyDist <= -42

[StateDef 1002]
Type = A
Movetype= I
Physics = N
Anim = 1003
Velset = 0, 0
Ctrl = 0
Sprpriority = 4

[State 1002]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1002]
type = PlaySnd
trigger1 = time = 0
value = S200, 13

[State 1002]
type = Explod
trigger1 = time = 0
anim = 1002
ID = 1002
pos = 0, 0
postype = p1
bindtime = -1
removetime = -2
ownpal = 1
ontop = 1
sprpriority = 5
facing = IfElse(Random%2 = 0, 1,-1)
vfacing = IfElse(Random%2 = 0, 1,-1)
scale = 1.5, 1.5
ignorehitpause = 1

[State 1002]
type = AngleDraw
trigger1 = 1
scale = 1+0.1*time, 1+0.1*time
ignorehitpause = 1

[State 1002]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256-(256/11)*time, 256
ignorehitpause = 1

[State 1002]
type = DestroySelf
trigger1 = time >= 11

[StateDef 1003]
Type = S
Movetype= A
Physics = S
Anim = 1000
Velset = 0, 0
Ctrl = 0
Poweradd = 30

[State 1003, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S400,7
channel = 0

[State 1003]
type = Playsnd
trigger1 = AnimElem = 7
value = S100,24

[State 1003]
type = Helper
trigger1 = AnimElem = 7
name = "Starburst"
ID = 1004
postype = p1
pos = 28,-48
Stateno = 1004
ownpal = 1
ignorehitpause = 1

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

[StateDef 1004]
Type = A
Movetype= A
Physics = N
Anim = 1001
Ctrl = 0
Sprpriority = 5

[State 1004, PlaySnd]
type = Playsnd
trigger1 = Time = 0
value = S100,24

[State 1004]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1004]
type = AngleDraw
trigger1 = 1
scale = 1.5,1.5
ignorehitpause = 1

[State 1004]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

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

[State 1004, hitby]
type = hitby
trigger1 = 1
value = SCA,AP
time = -1

[State 1004, var]
type = varset
trigger1 = movecontact
var(0) = 1+(moveguarded!=0)

[State 1004]
type = veladd
trigger1 = 1
X = 0.3 * cos(var(0)*Pi/180)
Y = -0.1 * sin(var(0)*Pi/180)

[State 1004]
type= HitDef
trigger1 = !Movecontact
attr = A, SP
hitflag	= MAF
guardflag = MA
damage = ceil(57*(root,fvar(14))), 7
animtype = Medium
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 0, 1
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%10,-28+random%10
hitsound = -1
guardsound = S300, 0
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity	= -8, 0
guard.velocity = -8
air.velocity = -4,-5
airguard.velocity= -4,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 0
fall.recover = 1
fall.recovertime = 51
air.fall = 1
yaccel = 0.4
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 1004, ChangeState]
type = changestate
trigger1 = var(0)
value = 1002

[State 1004]
type = DestroySelf
trigger1 = FrontEdgeBodyDist <= -42

[StateDef 1005]
Type = S
Movetype= A
Physics = S
Anim = 1000
Velset = 0, 0
Ctrl = 0
Poweradd = 30

[State 1005, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S400,7
channel = 0

[State 1005]
type = Playsnd
trigger1 = AnimElem = 7
value = S100,24

[State 1005]
type = Helper
trigger1 = AnimElem = 7
name = "Starburst"
ID = 1006
postype = p1
pos = 28,-48
Stateno = 1006
ownpal = 1
ignorehitpause = 1

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

[StateDef 1006]
Type = A
Movetype= A
Physics = N
Anim = 1001
Ctrl = 0
Sprpriority = 5

[State 1006, PlaySnd]
type = Playsnd
trigger1 = Time = 0
value = S100,24

[State 1006]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1006]
type = AngleDraw
trigger1 = 1
scale = 1.5,1.5
ignorehitpause = 1

[State 1006]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 1006]
type = veladd
trigger1 = 1
X = 0.4 * cos(var(0)*Pi/180)
Y = -0.1 * sin(var(0)*Pi/180)

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

[State 1006, hitby]
type = hitby
trigger1 = 1
value = SCA,AP
time = -1

[State 1006, var]
type = varset
trigger1 = movecontact
var(0) = 1+(moveguarded!=0)

[State 1006]
type= HitDef
trigger1 = !Movecontact
attr = A, SP
hitflag	= MAF
guardflag = MA
damage = ceil(55*(root,fvar(14))),6
animtype = Medium
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 0, 1
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%10,-28+random%10
hitsound = -1
guardsound = S300, 0
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity	= -8, 0
guard.velocity = -8
air.velocity = -4,-5
airguard.velocity= -4,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
fall.recover = 0
air.fall = 1
yaccel = 0.4
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 1006, ChangeState]
type = changestate
trigger1 = var(0)
value = 1002

[State 1006]
type = DestroySelf
trigger1 = FrontEdgeBodyDist <= -42

[StateDef 1010]
type = A
movetype = A
physics = A
juggle = 0
anim = 1010
ctrl = 0
poweradd = 30

[State 1010, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S400,0+Random%2
channel = 0

[State 1010, Helper]
type = Helper
trigger1 = AnimElem = 6
ID = 1011
pos = 20,-40
postype = p1
stateno = 1011
helpertype = normal
name = "Aerial_StarBurst"
keyctrl = 0
ownpal = 1
supermovetime = 1

[State 1010, VelSet]
Type = VelSet
Trigger1 = Time = 0
Trigger1 = Anim = 1010 && Vel X != 0
X = Vel X * 0.25

[State 1010, VelSet]
Type = VelSet
Trigger1 = Time = 0
Trigger1 = Anim = 1010 && Vel Y != 0
Y = Vel Y * 0.25

[State 1010, VelSet]
Type = VelSet
Trigger1 = Vel Y = 0 || Pos Y >= 5
Y = 0

[State 1010, Gravity]
Type = Gravity
Trigger1 = Anim = 44

[State 1010, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = IfElse(Pos Y >= 5, 0, 51)
Anim = IfElse(Pos Y >= 5, 0, 44)
Ctrl = 1

[StateDef 1011]
MoveType = A
Physics = N
Anim = 1011
SprPriority = 3

[State 1011, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S100,24

[State 1011]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow
IgnoreHitPause = 1

[State 1011]
Type = SprPriority
Trigger1 = 1
Value = 3
IgnoreHitPause = 1

[State 1011]
Type = Trans
Trigger1 = 1
Trans = Add
IgnoreHitPause = 1

[State 1011, VelSet]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo != 1002
Trigger1 = 1
X = 2
y = 2

[State 1011]
Type = VelAdd
Trigger1 = MoveContact
X = -Vel X / 2
Y = -Vel Y / 2
IgnoreHitPause = 1
Persistent = 0

[State 1011, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1.5,1.5
value = 315
ignorehitpause = 1

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

[State 1011, hitby]
type = hitby
trigger1 = 1
value = SCA,AP
time = -1

[State 1011, VarSet]
type = varset
trigger1 = movecontact
var(0) = 1+(moveguarded!=0)

[State 1011, HitDef]
type = HitDef
trigger1 = !Movecontact
attr = A, SP
hitflag	= MAF
guardflag = MA
damage = ceil(57*(root,fvar(14))), 7
animtype = Medium
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 0, 1
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%10,-28+random%10
hitsound = -1
guardsound = S300, 0
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity	= -8, 0
guard.velocity = -8
air.velocity = -4,-5
airguard.velocity= -4,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 0
fall.recover = 1
fall.recovertime = 39
air.fall = 1
yaccel = 0.4
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 1011, DestroySelf]
type = DestroySelf
trigger1 = FrontEdgeBodyDist <= -120

[State 1011, ChangeState]
type = ChangeState
trigger1 = Anim = 1011 && Pos Y >= 0
trigger2 = Var(0)
Value = 1002

[StateDef 1012]
type = A
movetype = A
physics = A
juggle = 0
anim = 1010
ctrl = 0
poweradd = 30

[State 1012, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S400,0+Random%2
channel = 0

[State 1012, Helper]
type = Helper
trigger1 = AnimElem = 6
ID = 1013
pos = 20,-40
postype = p1
stateno = 1013
helpertype = normal
name = "Aerial_StarBurst"
keyctrl = 0
ownpal = 1
supermovetime = 1

[State 1012, VelSet]
Type = VelSet
Trigger1 = Time = 0
Trigger1 = Anim = 1010 && Vel X != 0
X = Vel X * 0.25

[State 1012, VelSet]
Type = VelSet
Trigger1 = Time = 0
Trigger1 = Anim = 1010 && Vel Y != 0
Y = Vel Y * 0.25

[State 1012, VelSet]
Type = VelSet
Trigger1 = Vel Y = 0 || Pos Y >= 5
Y = 0

[State 1012, Gravity]
Type = Gravity
Trigger1 = Anim = 44

[State 1012, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = IfElse(Pos Y >= 5, 0, 51)
Anim = IfElse(Pos Y >= 5, 0, 44)
Ctrl = 1

[StateDef 1013]
MoveType = A
Physics = N
Anim = 1011
SprPriority = 3

[State 1013, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S100,24

[State 1013]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow
IgnoreHitPause = 1

[State 1013]
Type = SprPriority
Trigger1 = 1
Value = 3
IgnoreHitPause = 1

[State 1013]
Type = Trans
Trigger1 = 1
Trans = Add
IgnoreHitPause = 1

[State 1013, VelSet]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo != 1002
Trigger1 = 1
X = 4
y = 4

[State 1013]
Type = VelAdd
Trigger1 = MoveContact
X = -Vel X / 2
Y = -Vel Y / 2
IgnoreHitPause = 1
Persistent = 0

[State 1013, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1.5,1.5
value = 315
ignorehitpause = 1

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

[State 1013, hitby]
type = hitby
trigger1 = 1
value = SCA,AP
time = -1

[State 1013, VarSet]
type = varset
trigger1 = movecontact
var(0) = 1+(moveguarded!=0)

[State 1013, HitDef]
type = HitDef
trigger1 = !Movecontact
attr = A, SP
hitflag	= MAF
guardflag = MA
damage = ceil(57*(root,fvar(14))), 7
animtype = Medium
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 0, 1
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%10,-28+random%10
hitsound = -1
guardsound = S300, 0
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity	= -8, 0
guard.velocity = -8
air.velocity = -4,-5
airguard.velocity= -4,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 0
fall.recover = 1
fall.recovertime = 39
air.fall = 1
yaccel = 0.4
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 1013, DestroySelf]
type = DestroySelf
trigger1 = FrontEdgeBodyDist <= -120

[State 1013, ChangeState]
type = ChangeState
trigger1 = Anim = 1011 && Pos Y >= 0
trigger2 = Var(0)
Value = 1002

[StateDef 1014]
type = A
movetype = A
physics = A
juggle = 0
anim = 1012
ctrl = 0
poweradd = 30

[State 1014, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
trigger2 = AnimElem = 8
value = S400,0+Random%2
channel = 0

[State 1014, Helper]
type = Helper
trigger1 = AnimElem = 6
ID = 1015
pos = 20,-50
postype = p1
stateno = 1015
helpertype = normal
name = "Aerial_StarBurst"
keyctrl = 0
ownpal = 1
supermovetime = 1

[State 1014, Helper]
type = Helper
trigger1 = AnimElem = 8
ID = 1016
pos = 20,-50
postype = p1
stateno = 1015
helpertype = normal
name = "Aerial_StarBurst"
keyctrl = 0
ownpal = 1
supermovetime = 1

[State 1014, VelSet]
Type = VelSet
trigger1 = Time > 0
trigger1 = Time <= 17
X = 0
Y = 0

[State 1014, VelSet]
Type = VelSet
trigger1 = AnimElem = 6
Y = -5

[State 1014, VelSet]
Type = VelSet
Trigger1 = Vel Y = 0 || Pos Y >= 5
Y = 0

[State 1014, Gravity]
Type = Gravity
Trigger1 = Anim = 44

[State 1014, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = IfElse(Pos Y >= 5, 0, 51)
Anim = IfElse(Pos Y >= 5, 0, 44)
Ctrl = 1

[StateDef 1015]
MoveType = A
Physics = N
Anim = 1011
SprPriority = 3

[State 1015, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S100,24

[State 1015]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow
IgnoreHitPause = 1

[State 1015]
Type = SprPriority
Trigger1 = 1
Value = 3
IgnoreHitPause = 1

[State 1015]
Type = Trans
Trigger1 = 1
Trans = Add
IgnoreHitPause = 1

[State 1015, VelSet]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo != 1002
Trigger1 = 1
X = 4
y = 4

[State 1015]
Type = VelAdd
Trigger1 = MoveContact
X = -Vel X / 2
Y = -Vel Y / 2
IgnoreHitPause = 1
Persistent = 0

[State 1015, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1.5,1.5
value = 315
ignorehitpause = 1

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

[State 1015, hitby]
type = hitby
trigger1 = 1
value = SCA,AP
time = -1

[State 1015, VarSet]
type = varset
trigger1 = movecontact
var(0) = 1+(moveguarded!=0)

[State 1015, HitDef]
type = HitDef
trigger1 = !Movecontact
attr = A, SP
hitflag	= MAF
guardflag = MA
damage = ceil(35*(root,fvar(14))), 4
animtype = Medium
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 0, 1
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%10,-28+random%10
hitsound = -1
guardsound = S300, 0
ground.slidetime = 18
ground.hittime = 18
guard.hittime = 18
air.hittime = 20
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity	= -5, 0
guard.velocity = -5
air.velocity = -3,-4
airguard.velocity= -4,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 0
fall.recover = 1
fall.recovertime = 39
air.fall = 1
yaccel = 0.4
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 1015, DestroySelf]
type = DestroySelf
trigger1 = FrontEdgeBodyDist <= -120

[State 1015, ChangeState]
type = ChangeState
trigger1 = Anim = 1011 && Pos Y >= 0
trigger2 = Var(0)
Value = 1002

[StateDef 1100]
Type = U
Movetype= A
Physics = N
Anim = 1100
Velset = 0, 0
Ctrl = 0

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S400,6+Random%2
channel = 0

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

[State 1100]
type = Playsnd
trigger1 = AnimElem = 5
value = S100,12
ignorehitpause = 1
persistent = 0

[State 1100]
type = Explod
trigger1 = AnimElem = 5
anim = 1103
ID = 1103
pos = 25,-60
postype = p1
bindtime = -1
removetime = 24
ownpal = 1
ontop = 1
sprpriority = 5
facing = 1
scale = 2, 2
removeongethit = 1
ignorehitpause = 1

[State 1100]
type = StateTypeSet
trigger1 = AnimElem = 5
StateType = A
Movetype = A
Physics = N

[State 1100]
type = velset
trigger1 = AnimElem = 5
X = 4
Y = -5.7

[State 1100]
type = varrandom
trigger1 = AnimElemTime(5) >= 0
v = 1
range = -30, 15

[State 1100]
type = varrandom
trigger1 = AnimElemTime(5) >= 0
v = 2
range = 70, 110

[State 1100]
type = varset
trigger1 = AnimElemTime(5) >= 0
fvar(3) = 0.6 + 0.01*ceil(Random%21)

[State 1100]
type = Explod
trigger1 = AnimElemTime(5) >= 0
trigger1 = Random%2 = 0
anim = 1104 + Random%4
ID = 1104
pos = -6+Random%25,-48+Random%25
postype = p1
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 5
facing = IfElse(Random%2 = 0, 1,-1)
vfacing = IfElse(Random%2 = 0, 1,-1)
scale = fvar(3), fvar(3)
vel = 0.1*var(1), 0.1*var(2)
accel = 0.01*var(1), 0.01*var(2)
ignorehitpause = 1
trans = add

[State 1100, Hitdef]
type = HitDef
trigger1 = AnimElem = 5
attr = A, SA
hitflag	= MAF
guardflag = M
damage = 67,12
animtype = Hard
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 8, 8
sparkno = S8050*10**(random%4)
guard.sparkno= S9000
sparkxy	= -30+random%20,-100+random%20
hitsound = S200,9
guardsound= S300,4
fall = 1
fall.recover = 1
fall.recovertime = 27
air.fall = 1
yaccel = 0.4
ground.slidetime= 18
ground.hittime= 18
guard.hittime = 16
air.hittime = 18
guard.ctrltime = 14
airguard.ctrltime = 15
ground.velocity	= -2,-9
guard.velocity = -4
air.velocity = -2,-5
airguard.velocity = -3,-4
ground.cornerpush.veloff = -5
air.cornerpush.veloff = -4
down.cornerpush.veloff = -5
guard.cornerpush.veloff = -5
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

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

[StateDef 1101]
Type = A
Movetype= A
Physics = N
Anim = 1101
Velset = 0, 0
Ctrl = 0

[State 1101]
type = varrandom
trigger1 = AnimElemTime(2) < 0
v = 1
range = -30, 15

[State 1101]
type = varrandom
trigger1 = AnimElemTime(2) < 0
v = 2
range = 70, 110

[State 1101]
type = varset
trigger1 = AnimElemTime(2) < 0
fvar(3) = 0.6 + 0.01*ceil(Random%21)

[State 1101]
type = Explod
trigger1 = AnimElemTime(2) < 0
trigger1 = Random%2 = 0
anim = 1104 + Random%4
ID = 1104
pos = -6+Random%25,-48+Random%25
postype = p1
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 5
facing = IfElse(Random%2 = 0, 1,-1)
vfacing = IfElse(Random%2 = 0, 1,-1)
scale = fvar(3), fvar(3)
vel = 0.1*var(1), 0.1*var(2)
accel = 0.01*var(1), 0.01*var(2)
ignorehitpause = 1
trans = add

[State 1101]
type = velmul
trigger1 = AnimElemTime(2) > 0
X = 0.9

[State 1101]
type = veladd
trigger1 = AnimElemTime(2) > 0
Y = 0.6

[State 1101]
type = ChangeState
trigger1 = vel Y > 0
trigger1 = pos Y >= 0
value = 1102

[StateDef 1102]
Type = S
MoveType= A
Physics	= S
Anim = 1102
Ctrl = 0

[State 1102, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,0

[State 1102]
type = velset
trigger1 = time = 0
Y = 0

[State 1102]
type = posset
trigger1 = time = 0
Y = 0

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

[StateDef 1103]
Type = U
Movetype= A
Physics = N
Anim = 1100
Velset = 0, 0
Ctrl = 0

[State 1103, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S400,6+Random%2
channel = 0

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

[State 1103]
type = Playsnd
trigger1 = AnimElem = 5
value = S100,12
ignorehitpause = 1
persistent = 0

[State 1103]
type = Explod
trigger1 = AnimElem = 5
anim = 1103
ID = 1103
pos = 25,-60
postype = p1
bindtime = -1
removetime = 24
ownpal = 1
ontop = 1
sprpriority = 5
facing = 1
scale = 2, 2
removeongethit = 1
ignorehitpause = 1

[State 1103]
type = StateTypeSet
trigger1 = AnimElem = 5
StateType = A
Movetype = A
Physics = N

[State 1103]
type = velset
trigger1 = AnimElem = 5
X = 7
Y = -8.8

[State 1103]
type = varrandom
trigger1 = AnimElemTime(5) >= 0
v = 4
range = -30, 15

[State 1103]
type = varrandom
trigger1 = AnimElemTime(5) >= 0
v = 5
range = 70, 110

[State 1103]
type = varset
trigger1 = AnimElemTime(5) >= 0
fvar(6) = 0.6 + 0.01*ceil(Random%21)

[State 1103]
type = Explod
trigger1 = AnimElemTime(5) >= 0
trigger1 = Random%2 = 0
anim = 1104 + Random%4
ID = 1104
pos = -6+Random%25,-48+Random%25
postype = p1
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 5
facing = IfElse(Random%2 = 0, 1,-1)
vfacing = IfElse(Random%2 = 0, 1,-1)
scale = fvar(6), fvar(6)
vel = 0.1*var(4), 0.1*var(5)
accel = 0.01*var(4), 0.01*var(5)
ignorehitpause = 1
trans = add

[State 1103, Hitdef]
type = HitDef
trigger1 = AnimElem = 5
attr = A, SA
hitflag	= MAF
guardflag = M
damage = 89,16
animtype = Hard
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 8, 8
sparkno = S8050*10**(random%4)
guard.sparkno= S9000
sparkxy	= -30+random%20,-100+random%20
hitsound = S200,9
guardsound= S300,4
yaccel = 0.4
ground.slidetime= 23
ground.hittime= 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity	= -2,-14
guard.velocity = -5
air.velocity = -2,-12
airguard.velocity = -4,-5
ground.cornerpush.veloff = -7
air.cornerpush.veloff = -7
down.cornerpush.veloff = -7
guard.cornerpush.veloff = -7
airguard.cornerpush.veloff = 0
fall = 1
fall.recover = 1
fall.recovertime = 35
air.fall = 1
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 1103, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1101
ctrl = 0

[StateDef 1104]
Type = U
Movetype= A
Physics = N
Anim = 1108
Velset = 0, 0
Ctrl = 0

[State 1104, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S400,6+Random%2
channel = 0

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

[State 1104]
type = Playsnd
trigger1 = AnimElem = 5
value = S100,12
ignorehitpause = 1
persistent = 0

[State 1104]
type = Explod
trigger1 = AnimElem = 5
anim = 1103
ID = 1103
pos = 25,-60
postype = p1
bindtime = -1
removetime = 24
ownpal = 1
ontop = 1
sprpriority = 5
facing = 1
scale = 2, 2
removeongethit = 1
ignorehitpause = 1

[State 1104]
type = StateTypeSet
trigger1 = AnimElem = 5
StateType = A
Movetype = A
Physics = N

[State 1104]
type = velset
trigger1 = AnimElem = 5
X = 4
Y = -10

[State 1104]
type = varrandom
trigger1 = AnimElemTime(5) >= 0
trigger1 = AnimElemTime(17) < 0
v = 6
range = -30, 15

[State 1104]
type = varrandom
trigger1 = AnimElemTime(5) >= 0
trigger1 = AnimElemTime(17) < 0
v = 7
range = 70, 110

[State 1104]
type = varset
trigger1 = AnimElemTime(5) >= 0
trigger1 = AnimElemTime(17) < 0
fvar(8) = 0.6 + 0.01*ceil(Random%21)

[State 1104]
type = Explod
trigger1 = AnimElemTime(5) >= 0
trigger1 = AnimElemTime(17) < 0
trigger1 = Random%2 = 0
anim = 1104 + Random%4
ID = 1104
pos = -6+Random%25,-48+Random%25
postype = p1
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 5
facing = IfElse(Random%2 = 0, 1,-1)
vfacing = IfElse(Random%2 = 0, 1,-1)
scale = fvar(8), fvar(8)
vel = 0.1*var(6), 0.1*var(7)
accel = 0.01*var(6), 0.01*var(7)
ignorehitpause = 1
trans = add

[State 1104, Hitdef]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 11
trigger3 = AnimElem = 17
attr = A, SA
hitflag	= MAF
guardflag = M
damage = 33,7
animtype = Hard
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 7,7
sparkno = S8050*10**(random%4)
guard.sparkno= S9000
sparkxy	= -30+random%20,-100+random%20
hitsound = S200,9
guardsound= S300,4
ground.slidetime= 26
ground.hittime= 26
guard.hittime = 24
air.hittime = 25
guard.ctrltime = 24
airguard.ctrltime = 24
ground.velocity	= -2,-14
guard.velocity = -4
air.velocity = -2,-13.7
airguard.velocity = -4,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
fall.recover = 1
fall.recovertime = 40
air.fall = 1
yaccel = 0.64
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 1104, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1101
ctrl = 0

[StateDef 1105]
Type = A
Movetype= A
Physics = N
Anim = 1101
Velset = 0, 0
Ctrl = 0

[State 1105]
type = varrandom
trigger1 = AnimElemTime(2) < 0
v = 1
range = -30, 15

[State 1105]
type = varrandom
trigger1 = AnimElemTime(2) < 0
v = 2
range = 70, 110

[State 1105]
type = varset
trigger1 = AnimElemTime(2) < 0
fvar(3) = 0.6 + 0.01*ceil(Random%21)

[State 1105]
type = Explod
trigger1 = AnimElemTime(2) < 0
trigger1 = Random%2 = 0
anim = 1104 + Random%4
ID = 1104
pos = -6+Random%25,-48+Random%25
postype = p1
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 5
facing = IfElse(Random%2 = 0, 1,-1)
vfacing = IfElse(Random%2 = 0, 1,-1)
scale = fvar(3), fvar(3)
vel = 0.1*var(1), 0.1*var(2)
accel = 0.01*var(1), 0.01*var(2)
ignorehitpause = 1
trans = add

[State 1105]
type = velmul
trigger1 = AnimElemTime(2) > 0
X = 0.9

[State 1105]
type = veladd
trigger1 = AnimElemTime(2) > 0
Y = 0.4

[State 1105]
type = ChangeState
trigger1 = vel Y > 0
trigger1 = pos Y >= 0
value = 1102

[StateDef 1200]
Type = A
MoveType = A
Physics = N
Ctrl = 0
VelSet = 0,0
Anim = 1200

[State 1200]
Type = PosAdd
Trigger1 = Time >= 1
Trigger1 = Time <= 12
Y = -1

[State 1200]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 1201

[StateDef 1201]
Type = A
MoveType = A
Physics = N
Ctrl = 0
VelSet = 0,0
Anim = 1201

[State 1201]
type = Explod
trigger1 = AnimElem = 2
anim = 1204
ID = 1204
pos = 50,-50
postype = p1
bindtime = -1
removetime = 13
ownpal = 1
ontop = 1
sprpriority = 5
facing = 1
scale = 2, 2
removeongethit = 1
ignorehitpause = 1

[State 1201]
type = varrandom
trigger1 = AnimElemTime(2) >= 0
v = 9
range = -110, -75

[State 1201]
type = varrandom
trigger1 = AnimElemTime(2) >= 0
v = 10
range = -20, 20

[State 1201]
type = varset
trigger1 = AnimElemTime(2) >= 0
fvar(11) = 0.6 + 0.01*ceil(Random%21)

[State 1201]
type = Explod
trigger1 = AnimElemTime(2) >= 0
trigger1 = Random%3 < 2
anim = 1104 + Random%4
ID = 1104
pos = -40+Random%25,-72+Random%25
postype = p1
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 5
facing = IfElse(Random%2 = 0, 1,-1)
vfacing = IfElse(Random%2 = 0, 1,-1)
scale = fvar(11), fvar(11)
vel = 0.1*var(9), 0.1*var(10)
accel = 0.01*var(10), 0.01*var(10)
ignorehitpause = 1
trans = add

[State 1201, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S100,21

[State 1200, HitDef]
Type = HitDef
Trigger1 = !MoveContACT
Trigger1 = 1
Attr = A, SA
Damage = 73,12
AnimType = Hard
HitFlag = MAF
GuardFlag = MA
Priority = 3, Hit
PauseTime = 4, 7
sparkno = S8050*10**(random%4)
guard.sparkno= S9000
Hitsound = S200,6
guardsound = S300,0
sparkxy	= -30+random%20,-50+random%20
Ground.Type = High
Air.Type = High
Ground.SlideTime = 15
Ground.HitTime = 20
Air.HitTime = 20
Ground.Velocity = -6,-2
Air.Velocity = -6,-2
AirGuard.Velocity = -6,-2
Fall = 1
Air.Fall = 1
Fall.Recover = 0
Persistent = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 1201]
Type = VelSet
Trigger1 = AnimElem = 1
X = 10

[State 1201]
Type = ChangeState
Trigger1 = Time >= 15
Value = 1202

[State 1201]
Type = ChangeState
Trigger1 = Movecontact
Trigger2 = FrontEdgeDist <= 15
Trigger2 = Time <= 32
Value = 1203

[StateDef 1202]
Type = A
MoveType = A
Physics = N
Ctrl = 0
VelSet = 0,0
Anim = 1202

[State 1202]
Type = VelSet
Trigger1 = AnimElem = 1
Y = -5

[State 1203]
Type = VelSet
Trigger1 = AnimElem = 1
X = 1.5

[State 1202]
Type = StateTypeSet
Trigger1  = AnimElem = 1
StateType = A
Physics   = A

[State 1202]
Type = ChangeState
Trigger1 = (Vel Y > 0) && (Pos Y >= 0)
Value = 52
Ctrl = 0

[StateDef 1203]
Type = A
Physics = A
Ctrl = 0
VelSet = 0,0
Anim = 1203

[State 1203, RemoveExplod]
type = RemoveExplod
trigger1 = 1
id = 1204

[State 1203]
Type = VelSet
Trigger1 = Time = 0
X = -1.5

[State 1203]
Type = VelSet
Trigger1 = Time = 0
Y = -6

[State 1203]
Type = VelSet
Trigger1 = Time = 0
Y = -7.5

[State 1203]
Type = ChangeState
Trigger1 = (Vel Y > 0) && (Pos Y >= 0)
Value = 52
Ctrl = 0

[StateDef 1204]
Type = A
MoveType = A
Physics = N
Ctrl = 0
VelSet = 0,0
Anim = 1200

[State 1204]
Type = PosAdd
Trigger1 = Time >= 1
Trigger1 = Time <= 12
Y = -1

[State 1204]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 1205

[StateDef 1205]
Type = A
MoveType = A
Physics = N
Ctrl = 0
VelSet = 0,0
Anim = 1201

[State 1205]
type = Explod
trigger1 = AnimElem = 2
anim = 1204
ID = 1204
pos = 50,-50
postype = p1
bindtime = -1
removetime = 28
ownpal = 1
ontop = 1
sprpriority = 5
facing = 1
scale = 2, 2
removeongethit = 1
ignorehitpause = 1

[State 1205]
type = varrandom
trigger1 = AnimElemTime(2) >= 0
v = 9
range = -110, -75

[State 1205]
type = varrandom
trigger1 = AnimElemTime(2) >= 0
v = 10
range = -20, 20

[State 1205]
type = varset
trigger1 = AnimElemTime(2) >= 0
fvar(11) = 0.6 + 0.01*ceil(Random%21)

[State 1205]
type = Explod
trigger1 = AnimElemTime(2) >= 0
trigger1 = Random%3 < 2
anim = 1104 + Random%4
ID = 1104
pos = -40+Random%25,-72+Random%25
postype = p1
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 5
facing = IfElse(Random%2 = 0, 1,-1)
vfacing = IfElse(Random%2 = 0, 1,-1)
scale = fvar(11), fvar(11)
vel = 0.1*var(9), 0.1*var(10)
accel = 0.01*var(10), 0.01*var(10)
ignorehitpause = 1
trans = add

[State 1205, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S100,21

[State 1205, HitDef]
Type = HitDef
Trigger1 = !MoveContACT
Trigger1 = 1
Attr = A, SA
Damage = 73,12
AnimType = Hard
HitFlag = MAF
GuardFlag = MA
Priority = 3, Hit
PauseTime = 4, 7
sparkno = S8050*10**(random%4)
guard.sparkno= S9000
Hitsound = S200,6
guardsound = S300,0
sparkxy	= -30+random%20,-50+random%20
Ground.Type = High
Air.Type = High
Ground.SlideTime = 15
Ground.HitTime = 20
Air.HitTime = 20
Ground.Velocity = -6,-2
Air.Velocity = -6,-2
AirGuard.Velocity = -6,-2
Fall = 1
Air.Fall = 1
Fall.Recover = 0
Persistent = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 1205]
Type = VelSet
Trigger1 = AnimElem = 1
X = 10

[State 1205]
Type = ChangeState
Trigger1 = Time >= 32
Value = 1202

[State 1205]
Type = ChangeState
Trigger1 = Movecontact
Trigger2 = FrontEdgeDist <= 15
Trigger2 = Time <= 32
Value = 1203

[StateDef 1206]
Type = A
MoveType = A
Physics = N
Ctrl = 0
VelSet = 0,0
Anim = 1200

[State 1206]
Type = PosAdd
Trigger1 = Time >= 1
Trigger1 = Time <= 12
Y = -1

[State 1206]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 1207

[StateDef 1207]
Type = A
MoveType = A
Physics = N
Ctrl = 0
VelSet = 0,0
Anim = 1201

[State 1207]
type = Explod
trigger1 = AnimElem = 2
anim = 1204
ID = 1204
pos = 50,-50
postype = p1
bindtime = -1
removetime = 28
ownpal = 1
ontop = 1
sprpriority = 5
facing = 1
scale = 2, 2
removeongethit = 1
ignorehitpause = 1

[State 1207]
type = varrandom
trigger1 = AnimElemTime(2) >= 0
v = 9
range = -110, -75

[State 1207]
type = varrandom
trigger1 = AnimElemTime(2) >= 0
v = 10
range = -20, 20

[State 1207]
type = varset
trigger1 = AnimElemTime(2) >= 0
fvar(11) = 0.6 + 0.01*ceil(Random%21)

[State 1207]
type = Explod
trigger1 = AnimElemTime(2) >= 0
trigger1 = Random%3 < 2
anim = 1104 + Random%4
ID = 1104
pos = -40+Random%25,-72+Random%25
postype = p1
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 5
facing = IfElse(Random%2 = 0, 1,-1)
vfacing = IfElse(Random%2 = 0, 1,-1)
scale = fvar(11), fvar(11)
vel = 0.1*var(9), 0.1*var(10)
accel = 0.01*var(10), 0.01*var(10)
ignorehitpause = 1
trans = add

[State 1207, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S100,21

[State 1207]
type= HitDef
trigger1= !Movecontact
attr= A, SA
hitflag	= MAF
guardflag = MA
damage = 80,13
animtype = Hard
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 0,0
fall = 1
fall.recover = 1
fall.recovertime = 50
air.fall = 1
yaccel = 0.4
sparkxy	= -30+random%20,-50+random%20
sparkno = S8050*10**(random%4)
guard.sparkno= S9000
Hitsound = S200,6
guardsound = S300,0
ground.slidetime= 23
ground.hittime= 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime 	= 21
airguard.ctrltime = 21
ground.velocity	= -2,-8
guard.velocity = -7
air.velocity = -2,-7
airguard.velocity= -2,-4
ground.cornerpush.veloff = -7
air.cornerpush.veloff = -7
down.cornerpush.veloff = -7
guard.cornerpush.veloff = -7
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5
p2stateno = 1208

[State 1207]
Type = VelSet
Trigger1 = AnimElem = 1
X = 10

[State 1207]
Type = ChangeState
Trigger1 = Time >= 32
Value = 1202

[State 1207]
Type = ChangeState
Trigger1 = Moveguarded
Trigger2 = FrontEdgeDist <= 15
Trigger2 = Time <= 32
Value = 1203

[Statedef 1208]
type = A
movetype= H
physics = N

[State 1208]
type = NotHitBy
trigger1 = 1
value = , AT

[State 1208]
type = VelSet
trigger1 = Time = 0
y = -9

[State 1208]
type = VelSet
trigger1 = Time = 0
x = 0

[State 1208]
type = VelAdd
trigger1 = 1
y = .35

[State 1208]
type = AngleAdd
trigger1 = 1
value = 25

[State 1208]
type = AngleDraw
trigger1 = 1

[State 1208]
type = ChangeState
trigger1 = command = "recovery"
trigger1 = Time > 50
value = 5210

[State 1208]
type = ChangeAnim2
trigger1 = Time = 0
value = 6003

[State 1208]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= -10)
value = 5100

[StateDef 1300]
Type = S
Movetype= A
Physics = S
Anim = 1300
Ctrl = 0

[State 1300]
type = Playsnd
trigger1 = AnimElem = 7
value = S100,22

[State 1300]
type = Helper
trigger1 = AnimElem = 7
name = "Grand_StarDust"
ID = 1301
postype = p1
pos = 36,-72
Stateno = 1301
ownpal = 1
ignorehitpause = 1

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

[StateDef 1301]
Type = A
Movetype= I
Physics = N
Anim = 1301
Ctrl = 0
Sprpriority = 5

[State 1301]
type = HitOverride
trigger1 = Anim = 1301
attr = SCA, AP
time = 1
stateno = 1312

[State 1301]
type = HitBy
trigger1 = Anim = 1301
value = SCA, AP
time = 1

[State 1301]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1301]
type = velset
trigger1 = time = 0
X = 1.5
Y = -6

[State 1301]
type = veladd
trigger1 = time > 0
Y = 0.4

[State 1301]
type = AngleDraw
trigger1 = 1
scale = 0.5, 0.5
value = -30 - 10*time
ignorehitpause = 1

[State 1301]
type = Helper
trigger1 = time = 0
name = "Aura"
Stateno = 1302
ID = 1302
postype = p1
pos = 0, 0
ownpal = 1
ignorehitpause = 1

[State 1301]
type = varset
trigger1 = time = 0
fvar(8) = 0.6 + 0.01*ceil(Random%21)

[State 1301]
type = Explod
trigger1 = Random%3 < 2
anim = 1104 + Random%4
ID = 1104
pos = -12+Random%25,-12+Random%25
postype = p1
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 5
facing = IfElse(Random%2 = 0, 1,-1)
vfacing = IfElse(Random%2 = 0, 1,-1)
scale = fvar(8), fvar(8)
vel = 0, 0
accel = 0, 0
ignorehitpause = 1
trans = add

[State 1301]
type = ChangeState
trigger1 = vel Y > 0 && pos Y >= 0
value = 1303

[StateDef 1302]
Type = A
Movetype= I
Physics = N
Anim = 1302
Ctrl = 0
Sprpriority = 4

[State 1302]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1302]
type = BindtoParent
trigger1 = 1
pos = 0, 0
ignorehitpause = 1

[State 1302]
type = DestroySelf
trigger1 = parent,Stateno != 1301
trigger2 = time >= 120

[StateDef 1303]
Type = A
Movetype= A
Physics = N
Anim = 1303
Velset = 0, 0
Ctrl = 0
Sprpriority = 5

[State 1303]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1303]
type = AngleDraw
trigger1 = 1
scale = 4.5-0.3*(time%4<2), 4.5-0.3*(time%4<2)
ignorehitpause = 1

[State 1303]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 1303]
type = Helper
trigger1 = time = 0
name = "Explosion"
ID = 1304
Stateno = 1304
postype = p1
pos = 0, 0
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 1303, Hitdef]
type = HitDef
trigger1 = !MoveContact
attr = S, SP
hitflag = MAF
guardflag = MA
damage = ceil(89*(root,fvar(14))),10
animtype = Hard
air.animtype = Back
ground.type= High
priority= 6, Hit
pausetime= 0, 4
sparkno = S8050*10**(random%4)
guard.sparkno= S9000
sparkxy	= -30+random%20,-55+random%20
hitsound = S200, 3
guardsound = S300, 0
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity = -8,-8
guard.velocity = -6
air.velocity = -8,-8
airguard.velocity= -5,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
Sprpriority= 5
fall = 1
fall.recover= 1
fall.recovertime = 60
air.fall = 1
yaccel = 0.4
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 1303]
type = Playsnd
trigger1 = time = 0
value = S100,23
ignorehitpause = 1
persistent = 0

[State 1303]
type = ChangeState
trigger1 = time >= 23
value = 1305

[StateDef 1304]
Type = A
Movetype = I
Physics = N
Anim = 1304
Ctrl = 0
Sprpriority = 5

[State 1304]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1304]
type = AngleDraw
trigger1 = 1
scale = 0.2+0.1*time, 0.2+0.1*time
ignorehitpause = 1

[State 1304]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256-10*time, 256
ignorehitpause = 1

[State 1304]
type = DestroySelf
trigger1 = time >= 24

[StateDef 1305]
Type = A
Movetype = I
Physics = N
Anim = 1302
Velset = 0, 0
Ctrl = 0
Sprpriority = 5

[State 1305]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1305]
type = varset
trigger1 = time = 0
fvar(10) = 4.5
ignorehitpause = 1

[State 1305]
type = varset
trigger1 = time > 0
fvar(10) = 0.8 * fvar(10)
ignorehitpause = 1

[State 1305]
type = AngleDraw
trigger1 = time > 0
scale = fvar(10), fvar(10)
ignorehitpause = 1

[State 1305]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 1305]
type = DestroySelf
trigger1 = time >= 15

[StateDef 1306]
Type = S
Movetype= A
Physics = S
Anim = 1300
Ctrl = 0

[State 1306]
type = Playsnd
trigger1 = AnimElem = 7
value = S100,22

[State 1306]
type = Helper
trigger1 = AnimElem = 7
name = "Grand_StarDust"
ID = 1307
postype = p1
pos = 36,-72
Stateno = 1307
ownpal = 1
ignorehitpause = 1

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

[StateDef 1307]
Type = A
Movetype= I
Physics = N
Anim = 1301
Ctrl = 0
Sprpriority = 5

[State 1307]
type = HitOverride
trigger1 = Anim = 1301
attr = SCA, AP
time = 1
stateno = 1312

[State 1307]
type = HitBy
trigger1 = Anim = 1301
value = SCA, AP
time = 1

[State 1307]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1307]
type = velset
trigger1 = time = 0
X = 2.5
Y = -10

[State 1307]
type = veladd
trigger1 = time > 0
Y = 0.4

[State 1307]
type = AngleDraw
trigger1 = 1
scale = 0.5, 0.5
value = -30 - 10*time
ignorehitpause = 1

[State 1307]
type = Helper
trigger1 = time = 0
name = "Aura"
Stateno = 1308
ID = 1308
postype = p1
pos = 0, 0
ownpal = 1
ignorehitpause = 1

[State 1307]
type = varset
trigger1 = time = 0
fvar(8) = 0.6 + 0.01*ceil(Random%21)

[State 1307]
type = Explod
trigger1 = Random%3 < 2
anim = 1104 + Random%4
ID = 1104
pos = -12+Random%25,-12+Random%25
postype = p1
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 5
facing = IfElse(Random%2 = 0, 1,-1)
vfacing = IfElse(Random%2 = 0, 1,-1)
scale = fvar(8), fvar(8)
vel = 0, 0
accel = 0, 0
ignorehitpause = 1
trans = add

[State 1307]
type = ChangeState
trigger1 = vel Y > 0 && pos Y >= 0
value = 1303

[Statedef 1308]
Type = A
Movetype= I
Physics = N
Anim = 1302
Ctrl = 0
Sprpriority = 4

[State 1308]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1308]
type = BindtoParent
trigger1 = 1
pos = 0, 0
ignorehitpause = 1

[State 1308]
type = DestroySelf
trigger1 = parent,Stateno != 1307
trigger2 = time >= 120

[StateDef 1309]
Type = S
Movetype= A
Physics = S
Anim = 1300
Ctrl = 0

[State 1309]
type = Playsnd
trigger1 = AnimElem = 7
value = S100,22

[State 1309]
type = Helper
trigger1 = AnimElem = 7
name = "Grand_StarDust"
ID = 1310
postype = p1
pos = 36,-72
Stateno = 1310
ownpal = 1
ignorehitpause = 1

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

[StateDef 1310]
Type = A
Movetype= I
Physics = N
Anim = 1301
Ctrl = 0
Sprpriority = 5

[State 1310]
type = HitOverride
trigger1 = Anim = 1301
attr = SCA, AP
time = 1
stateno = 1312

[State 1310]
type = HitBy
trigger1 = Anim = 1301
value = SCA, AP
time = 1

[State 1310]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1310]
type = velset
trigger1 = time = 0
X = 5
Y = -6.5

[State 1310]
type = veladd
trigger1 = time > 0
Y = 0.4

[State 1310]
type = AngleDraw
trigger1 = 1
scale = 0.5, 0.5
value = -30 - 10*time
ignorehitpause = 1

[State 1310]
type = Helper
trigger1 = time = 0
name = "Aura"
Stateno = 1311
ID = 1311
postype = p1
pos = 0, 0
ownpal = 1
ignorehitpause = 1

[State 1310]
type = varset
trigger1 = time = 0
fvar(8) = 0.6 + 0.01*ceil(Random%21)

[State 1310]
type = Explod
trigger1 = Random%3 < 2
anim = 1104 + Random%4
ID = 1104
pos = -12+Random%25,-12+Random%25
postype = p1
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 5
facing = IfElse(Random%2 = 0, 1,-1)
vfacing = IfElse(Random%2 = 0, 1,-1)
scale = fvar(8), fvar(8)
vel = 0, 0
accel = 0, 0
ignorehitpause = 1
trans = add

[State 1310]
type = ChangeState
trigger1 = vel Y > 0 && pos Y >= 0
value = 1303

[Statedef 1311]
Type = A
Movetype= I
Physics = N
Anim = 1302
Ctrl = 0
Sprpriority = 4

[State 1311]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1311]
type = BindtoParent
trigger1 = 1
pos = 0, 0
ignorehitpause = 1

[State 1311]
type = DestroySelf
trigger1 = parent,Stateno != 1310
trigger2 = time >= 120

[StateDef 1312]
Type = A
Movetype= H
Physics = N
Anim = 1303
Velset = 0, 0
Ctrl = 0
Sprpriority = 5

[State 1312]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1312]
type = AngleDraw
trigger1 = 1
scale = 4.5-0.3*(time%4<2), 4.5-0.3*(time%4<2)
ignorehitpause = 1

[State 1312]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 1312]
type = Helper
trigger1 = time = 0
name = "Explosion"
ID = 1313
Stateno = 1313
postype = p1
pos = 0, 0
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 1312]
type = Playsnd
trigger1 = time = 0
value = S100,23
ignorehitpause = 1
persistent = 0

[State 1312]
type = ChangeState
trigger1 = time >= 23
value = 1314

[StateDef 1313]
Type = A
Movetype = I
Physics = N
Anim = 1304
Ctrl = 0
Sprpriority = 5

[State 1313]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1313]
type = AngleDraw
trigger1 = 1
scale = 0.2+0.1*time, 0.2+0.1*time
ignorehitpause = 1

[State 1313]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256-10*time, 256
ignorehitpause = 1

[State 1313]
type = DestroySelf
trigger1 = time >= 24

[StateDef 1314]
Type = A
Movetype = H
Physics = N
Anim = 1302
Velset = 0, 0
Ctrl = 0
Sprpriority = 5

[State 1314]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1314]
type = varset
trigger1 = time = 0
fvar(10) = 4.5
ignorehitpause = 1

[State 1314]
type = varset
trigger1 = time > 0
fvar(10) = 0.8 * fvar(10)
ignorehitpause = 1

[State 1314]
type = AngleDraw
trigger1 = time > 0
scale = fvar(10), fvar(10)
ignorehitpause = 1

[State 1314]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 1314]
type = DestroySelf
trigger1 = time >= 15

[StateDef 2000]
Type = S
Movetype= A
Physics = S
Anim = 2000
Velset = 0, 0
Ctrl = 0
Sprpriority = 2

[State 2000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S410,1
channel = 0

[State 2000]
type = Explod
trigger1 = AnimElem= 3
anim = 10300
postype = p1
pos = -5,-45
facing = 1
bindtime = 1
removetime = -2
supermovetime = 9999
pausemovetime = 9999
sprpriority = 3

[State 2000]
type = SuperPause
trigger1 = AnimElem = 3
time = 92
movetime = 0
anim = -1
pos = 999,999
darken = 0
unhittable = 1

[State 2000, AfterImage]
type = AfterImage
trigger1 = AnimElem = 3
time = 75
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

[State 2000, Helper]
type = Helper
trigger1 = AnimElem = 1
stateno = 20000
ID = 20100
name = "ex_effect"
ownpal = 1
supermovetime = 2**30*2-1
pausemovetime = 2**30*2-1
ignorehitpause = 1
persistent = 0

[State 2000, PowerAdd]
type = PowerAdd
trigger1 = AnimElem = 1
value = -1000

[State 2000]
type = Helper
trigger1 = AnimElem = 6
Stateno = 2002
ID = 2002
name = "Master_Spark"
postype = p1
pos = 25,-42
size.xscale = 1
size.yscale = 1
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 2000]
type = Explod
trigger1 = AnimElem = 6
anim = 2002
ID = 2002
pos = -38,-64
postype = p1
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
sprpriority = 2
facing = 1
pausemovetime = 0
supermovetime = 0
scale = 1, 1
ignorehitpause = 1
removeongethit = 1

[State 2000]
type = Explod
trigger1 = AnimElem = 6
anim = 2003
ID = 2003
pos = 25,-43
postype = p1
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
sprpriority = 5
facing = 1
pausemovetime = 0
supermovetime = 0
scale = 2, 2
ignorehitpause = 1
removeongethit = 1

[State 2000]
type = NotHitBy
trigger1 = AnimElemTime(3) >= 0
value = SCA
ignorehitpasue = 1

[State 2000]
type = ChangeState
trigger1 = time >= 127
value = 2001

[StateDef 2001]
Type = S
Movetype= A
Physics = S
Anim = 2001
Velset = 0, 0
Ctrl = 0
Sprpriority = 2

[State 2001]
type = RemoveExplod
trigger1 = time = 0
ID = 2002

[State 2001]
type = ModifyExplod
trigger1 = time = [0, 16]
ID = 2003
trans = addalpha
alpha = 256-16*time, 256

[State 2001]
type = RemoveExplod
trigger1 = time = 16
ID = 2003

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

[StateDef 2002]
Type = A
Movetype= A
Physics = N
Anim = 2004
Ctrl = 0
Sprpriority = 5

[State 2002]
type = Playsnd
trigger1 = time = 0
value = S100,14

[State 2002]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 2002]
type = AngleDraw
trigger1 = 1
scale = 2, 1
ignorehitpause = 1

[State 2002]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 2002]
type = BindtoRoot
trigger1 = 1
pos = 25,-42
ignorehitpause = 1

[State 2002, Hitdef]
type = HitDef
trigger1 = time%3 = 0
attr = A, HP
hitflag	= MAF
guardflag = MA
damage = ceil(9*(root,fvar(14))),2
animtype = Hard
air.animtype = Back
ground.type = High
priority = 6, Hit
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%20,-25+random%20
hitsound = -1
guardsound = -1
pausetime = 1, 6
fall = 1
fall.recover = 0
fall.recovertime = 0
air.fall = 1
getpower = 0, 0
givepower = 0, 0
yaccel = 0.4
ground.slidetime= 23
ground.hittime	= 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity	= -8,-5.5
guard.velocity = -6
air.velocity = -8,-5.5
airguard.velocity = -6,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
Sprpriority = 5
guard.dist = 360
envshake.time = 5
envshake.freq = 60
envshake.ampl = -3

[State 2002, PlaySnd]
type = PlaySnd
trigger1 = MoveHit = 1
value = S100,15
Channel = 1

[State 2002, PlaySnd]
type = PlaySnd
trigger1 = MoveGuarded = 1
value = S300,0
Channel = 2

[State 2002]
type = MoveHitReset
trigger1 = MoveContact
ignorehitpause = 1

[State 2002]
type = ChangeState
triggerall = time > 2
trigger1 = root,Anim != 2000
trigger2 = root,MoveType = H
value = 2003

[StateDef 2003]
Type = A
Movetype= I
Physics = N
Ctrl = 0
Sprpriority = 5

[State 2003]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

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

[State 2003]
type = varset
trigger1 = time = 0
fvar(10) = 1
ignorehitpause = 1

[State 2003]
type = varset
trigger1 = time > 0
fvar(10) = 0.8 * fvar(10)
ignorehitpause = 1

[State 2003]
type = AngleDraw
trigger1 = time > 0
scale = 2, fvar(10)
ignorehitpause = 1

[State 2003]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 2003]
type = DestroySelf
trigger1 = time >= 34

[StateDef 2100]
Type = S
Movetype= A
Physics = N
Anim = 2100
Velset = 0, 0
Ctrl = 0

[State 2100, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S410,0
channel = 0

[State 2100]
type = Explod
trigger1 = AnimElem = 1
anim = 10300
postype = p1
pos = 8,-45
facing = 1
bindtime = 1
removetime = -2
supermovetime = 9999
pausemovetime = 9999
sprpriority = 3

[State 2100]
type = SuperPause
trigger1 = AnimElem = 1
time = 92
anim = -1
pos = 999,999
darken = 0
unhittable = 1
poweradd=-1000

[State 2100, AfterImage]
type = AfterImage
trigger1 = AnimElem = 1
time = 999
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

[State 2100, Helper]
type = Helper
trigger1 = AnimElem = 1
stateno = 20000
ID = 20100
name = "ex_effect"
ownpal = 1
supermovetime = 2**30*2-1
pausemovetime = 2**30*2-1
ignorehitpause = 1
persistent = 0

[State 2100]
type = Explod
trigger1 = AnimElem = 4
trigger2 = AnimElem = 11
anim = 1103
ID = 1103
pos = 25,-60
postype = p1
bindtime = -1
removetime = -2
ownpal = 1
ontop = 1
sprpriority = 5
facing = 1
scale = 2, 2
removeongethit = 1
ignorehitpause = 1

[State 2100]
type = Playsnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 11
value = S100,12

[State 2100]
type = VelSet
trigger1 = AnimElemTime(4) = 0
trigger2 = AnimElemTime(11) = 0
x = 3.25
ignorehitpause = 1

[State 2100, Hitdef]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
trigger3 = AnimElem = 10
trigger4 = AnimElem = 11
attr = S, HA
hitflag	= MAF
guardflag = M
damage = 25,6
animtype = Hard
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 4,10
sparkno = S8050*10**(random%4)
guard.sparkno= S9000
sparkxy	= -30+random%20,-100+random%20
hitsound = S200,9
guardsound= S300,4
ground.slidetime= 18
ground.hittime= 18
guard.hittime = 15
air.hittime = 17
guard.ctrltime = 16
airguard.ctrltime = 16
ground.velocity	= -2
guard.velocity = -2
air.velocity = -3,-4
airguard.velocity = -3,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall.recover = 1
fall.recovertime = 40
air.fall = 1
getpower=0,0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 2100, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 2101
ctrl = 0

[StateDef 2101]
Type = S
Movetype= A
Physics = N
Anim = 2101
Velset = 0, 0
Ctrl = 0

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

[State 2101]
type = Playsnd
trigger1 = AnimElem = 4
value = S100,12
ignorehitpause = 1
persistent = 0

[State 2101]
type = Explod
trigger1 = AnimElem = 4
anim = 1103
ID = 1103
pos = 25,-60
postype = p1
bindtime = -1
removetime = 24
ownpal = 1
ontop = 1
sprpriority = 5
facing = 1
scale = 2, 2
removeongethit = 1
ignorehitpause = 1

[State 2101]
type = StateTypeSet
trigger1 = AnimElem = 4
StateType = A
Movetype = A
Physics = N

[State 2101]
type = velset
trigger1 = AnimElem = 4
X = 7
Y = -14

[State 2101]
type = varrandom
trigger1 = AnimElemTime(4) >= 0
trigger1 = AnimElemTime(7) <= 0
v = 4
range = -30, 15

[State 2101]
type = varrandom
trigger1 = AnimElemTime(4) >= 0
trigger1 = AnimElemTime(7) <= 0
v = 5
range = 70, 110

[State 2101]
type = varset
trigger1 = AnimElemTime(4) >= 0
trigger1 = AnimElemTime(7) <= 0
fvar(6) = 0.6 + 0.01*ceil(Random%21)

[State 2101]
type = Explod
trigger1 = AnimElemTime(4) >= 0
trigger1 = AnimElemTime(7) <= 0
trigger1 = Random%2 = 0
anim = 1104 + Random%4
ID = 1104
pos = -6+Random%25,-48+Random%25
postype = p1
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 5
facing = IfElse(Random%2 = 0, 1,-1)
vfacing = IfElse(Random%2 = 0, 1,-1)
scale = fvar(6), fvar(6)
vel = 0.1*var(4), 0.1*var(5)
accel = 0.01*var(4), 0.01*var(5)
ignorehitpause = 1
trans = add

[State 2101, Hitdef]
type = HitDef
trigger1 = AnimElem = 4
attr = A, SA
hitflag	= MAF
guardflag = M
damage = 100,20
animtype = Up
air.animtype = Up
ground.type = High
priority = 6, Hit
pausetime = 8, 8
sparkno = S8050*10**(random%4)
guard.sparkno= S9000
sparkxy	= -30+random%20,-100+random%20
hitsound = S200,9
guardsound= S300,4
ground.slidetime= 23
ground.hittime= 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity	= 0,-15.5
guard.velocity = -5
air.velocity = 0,-15.5
airguard.velocity = -4,-5
ground.cornerpush.veloff = -7
air.cornerpush.veloff = -7
down.cornerpush.veloff = -7
guard.cornerpush.veloff = -7
airguard.cornerpush.veloff = 0
fall = 1
fall.recover = 0
air.fall = 1
getpower=0,0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 8

[State 2101]
type = velmul
trigger1 = AnimElemTime(4) > 0
X = 0.9

[State 2101]
type = veladd
trigger1 = AnimElemTime(4) > 0
Y = 0.6

[State 2101]
type = ChangeState
trigger1 = AnimElem = 4, >=0 && movehit
trigger1 = vel Y > 0 && pos Y >= 0
value = 2102

[State 2101]
type = ChangeState
trigger1 = !movehit
trigger1 = vel Y > 0 && pos Y >= 0
value = 1102

[StateDef 2102]
Type = S
MoveType= A
Physics	= S
Anim = 2102
Ctrl = 0

[State 2102]
type = Explod
trigger1 = AnimElem = 7
anim = 2103
ID = 2103
pos = 0, 8
postype = p1
bindtime = 1
removetime = -2
ownpal = 1
ontop = 1
sprpriority = 5
facing = 1
pausemovetime = 0
supermovetime = 0
scale = 2,2

[State 2102, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = S100,7

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

[State 2102]
type = varrandom
trigger1 = AnimElemTime(5) >= 0
trigger1 = AnimElemTime(31) < 0
v = 6
range = -30, 15

[State 2102]
type = varrandom
trigger1 = AnimElemTime(5) >= 0
trigger1 = AnimElemTime(31) < 0
v = 7
range = 70, 110

[State 2102]
type = varset
trigger1 = AnimElemTime(5) >= 0
trigger1 = AnimElemTime(31) < 0
fvar(8) = 1.2 + 0.01*ceil(Random%21)

[State 2102]
type = Explod
trigger1 = AnimElemTime(5) >= 0
trigger1 = AnimElemTime(31) < 0
trigger1 = Random%2 = 0
anim = 1104 + Random%4
ID = 1104
pos = -6+Random%25,-48+Random%25
postype = p1
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 5
facing = IfElse(Random%2 = 0, 1,-1)
vfacing = IfElse(Random%2 = 0, 1,-1)
scale = fvar(8), fvar(8)
vel = 0.1*var(6), 0.1*var(7)
accel = 0.01*var(6), 0.01*var(7)
ignorehitpause = 1
trans = add

[State 2102]
type = Explod
trigger1 = AnimElem = 5
anim = 1103
ID = 1103
pos = 25,-60
postype = p1
bindtime = -1
removetime = 72
ownpal = 1
ontop = 1
sprpriority = 5
facing = 1
scale = 2, 2
removeongethit = 1
ignorehitpause = 1

[State 2102]
type = velset
trigger1 = time = 0
Y = 0

[State 2102]
type = posset
trigger1 = time = 0
Y = 0

[State 2102, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S410,3
channel = 0

[State 2102]
type = StateTypeSet
trigger1 = AnimElem = 7
StateType = A
Movetype = A
Physics = N

[State 2102]
type = velset
trigger1 = AnimElem = 7
X = 0
Y = -12

[State 2102, Hitdef]
type = HitDef
trigger1 = AnimElem = 7
trigger2 = AnimElem = 9
trigger3 = AnimElem = 11
trigger4 = AnimElem = 13
trigger5 = AnimElem = 15
trigger6 = AnimElem = 17
trigger7 = AnimElem = 19
trigger8 = AnimElem = 21
trigger9 = AnimElem = 23
trigger10 = AnimElem = 25
trigger11 = AnimElem = 27
trigger12 = AnimElem = 29
trigger13 = AnimElem = 31
attr = A, HA
hitflag	= MAF
guardflag = M
damage = 10,3
animtype = Up
air.animtype = Up
ground.type = High
priority = 6, Hit
pausetime = 2,2
sparkno = S8050*10**(random%4)
guard.sparkno= S9000
sparkxy	= -30+random%20,-100+random%20
hitsound = S200,9
guardsound= S300,4
ground.slidetime= 26
ground.hittime= 14
guard.hittime = 14
air.hittime = 15
guard.ctrltime = 14
airguard.ctrltime = 14
ground.velocity	= -0.3,-15.4
guard.velocity = -4
air.velocity = -0.4,-15.4
airguard.velocity = -4,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
fall.recover = 0
air.fall = 1
getpower=0,0
yaccel = 0.5
envshake.time = 10
envshake.freq = 85
envshake.ampl = 3

[State 2102, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 2103
ctrl = 0

[StateDef 2103]
Type = A
Movetype= A
Physics = N
Anim = 1101
Velset = 0, 0
Ctrl = 0

[State 2103]
type = varrandom
trigger1 = AnimElemTime(2) < 0
v = 1
range = -30, 15

[State 2103]
type = varrandom
trigger1 = AnimElemTime(2) < 0
v = 2
range = 70, 110

[State 2103]
type = varset
trigger1 = AnimElemTime(2) < 0
fvar(3) = 0.6 + 0.01*ceil(Random%21)

[State 2103]
type = Explod
trigger1 = AnimElemTime(2) < 0
trigger1 = Random%2 = 0
anim = 1104 + Random%4
ID = 1104
pos = -6+Random%25,-48+Random%25
postype = p1
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 5
facing = IfElse(Random%2 = 0, 1,-1)
vfacing = IfElse(Random%2 = 0, 1,-1)
scale = fvar(3), fvar(3)
vel = 0.1*var(1), 0.1*var(2)
accel = 0.01*var(1), 0.01*var(2)
ignorehitpause = 1
trans = add

[State 2103]
type = velmul
trigger1 = AnimElemTime(2) > 0
X = 0.9

[State 2103]
type = veladd
trigger1 = AnimElemTime(2) > 0
Y = 0.2

[State 2103]
type = ChangeState
trigger1 = vel Y > 0
trigger1 = pos Y >= 0
value = 1102

[StateDef 2200]
Type = S
Movetype= A
Physics = S
Anim = 2200
Ctrl = 0

[State 2200, NotHitBy]
type = NotHitBy
trigger1 = !time
time = 12
value = SCA

[State 2200, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S410,8
channel = 0

[State 2200]
type = Explod
trigger1 = AnimElem= 4
anim = 10300
postype = p1
pos = 20,-42
facing = 1
bindtime = 1
removetime = -2
supermovetime = 9999
pausemovetime = 9999
sprpriority = 3

[State 2200]
type = SuperPause
trigger1 = AnimElem = 4
time = 92
movetime = 0
anim = -1
pos = 999,999
darken = 0
unhittable = 1

[State 2200, AfterImage]
type = AfterImage
trigger1 = AnimElem = 4
time = 50
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

[State 2200, Helper]
type = Helper
trigger1 = AnimElem = 4
stateno = 20000
ID = 20100
name = "ex_effect"
ownpal = 1
supermovetime = 2**30*2-1
pausemovetime = 2**30*2-1
ignorehitpause = 1
persistent = 0

[State 2200, PowerAdd]
type = PowerAdd
trigger1 = AnimElem = 1
value = -1000

[State 2200]
type = Playsnd
trigger1 = AnimElem = 7
value = S100,22

[State 2200]
type = Helper
trigger1 = AnimElem = 7
name = "Earthlight_Ray"
ID = 2201
postype = p1
pos = 36,-72
Stateno = 2201
ownpal = 1
ignorehitpause = 1

[State 2200]
type = Helper
trigger1 = AnimElem = 7
name = "Earthlight_Ray"
ID = 2202
postype = p1
pos = 36,-72
Stateno = 2201
ownpal = 1
ignorehitpause = 1

[State 2200]
type = Helper
trigger1 = AnimElem = 7
name = "Earthlight_Ray"
ID = 2203
postype = p1
pos = 36,-72
Stateno = 2201
ownpal = 1
ignorehitpause = 1

[State 2200]
type = Helper
trigger1 = AnimElem = 7
name = "Earthlight_Ray"
ID = 2204
postype = p1
pos = 36,-72
Stateno = 2201
ownpal = 1
ignorehitpause = 1

[State 2200]
type = Helper
trigger1 = AnimElem = 7
name = "Earthlight_Ray"
ID = 2205
postype = p1
pos = 36,-72
Stateno = 2201
ownpal = 1
ignorehitpause = 1

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

[StateDef 2201]
Type = A
Movetype= I
Physics = N
Anim = 2203
Ctrl = 0
Sprpriority = 5

[State 2201]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 2201, Helper]
type = Helper
trigger1 = time = 0
name = "Aura"
Stateno = 2204
ID = 2204
postype = p1
pos = 0, 0
ownpal = 1
ignorehitpause = 1

[State 2201]
type = velset
trigger1 = time = 0
trigger1 = IsHelper(2201)
X = 1.5
Y = -2

[State 2201]
type = velset
trigger1 = time = 0
trigger1 = IsHelper(2202)
X = 3
Y = -2.5

[State 2201]
type = velset
trigger1 = time = 0
trigger1 = IsHelper(2203)
X = 4.5
Y = -3

[State 2201]
type = velset
trigger1 = time = 0
trigger1 = IsHelper(2204)
X = 6
Y = -3.5

[State 2201]
type = velset
trigger1 = time = 0
trigger1 = IsHelper(2205)
X = 7.5
Y = -4

[State 2201]
type = veladd
trigger1 = time > 0
Y = 0.4

[State 2201]
type = AngleDraw
trigger1 = 1
scale = 0.5, 0.5
value = -30 - 10*time
ignorehitpause = 1

[State 2201]
type = ChangeState
trigger1 = vel Y > 0 && pos Y >= 0
value = 2202

[StateDef 2202]
Type = A
Movetype= A
Physics = N
Anim = 2201
Velset = 0, 0
Ctrl = 0
Sprpriority = 5

[State 2202]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 2202]
type = AngleDraw
trigger1 = 1
scale = 1,1
value = 345
ignorehitpause = 1

[State 2202]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 2202, Helper]
type = Helper
trigger1 = Time = 0
ID = 2203
pos = 0,0
postype = p1
stateno = 2203
helpertype = normal
name = "Smoke"
keyctrl = 0
ownpal = 1
supermovetime = 1

[State 2202, Hitdef]
type = HitDef
trigger1 = !MoveContact
attr = S, HP
hitflag = MAF
guardflag = MA
damage = ceil(63*(root,fvar(14))),12
animtype = Hard
air.animtype = Back
ground.type= High
priority= 6, Hit
pausetime = 0,0
sparkno = S8050*10**(random%4)
guard.sparkno= S9000
sparkxy	= -30+random%20,-55+random%20
hitsound = S200,6
guardsound = S300, 0
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity = -8,-8
guard.velocity = -6
air.velocity = -8,-8
airguard.velocity= -5,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
Sprpriority= 5
fall = 1
fall.recover= 0
air.fall = 1
yaccel = 0.4
getpower = 0,0

[State 2202]
type = Playsnd
trigger1 = time = 0
value = S100,23
ignorehitpause = 1
persistent = 0

[State 2202]
type = Palfx
trigger1= Time >= 10
add = 0,0,0
mul = 255-var(0),255-var(0),255-var(0)
time = -1

[State 2202]
type = VarAdd
trigger1 = Time >= 10
var(0) = 24

[State 2202]
type = DestroySelf
trigger1 = time >= 20

[StateDef 2203]
type = A
physics = N
anim = 2202
sprpriority = 5

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

[State 2203, PalFX]
type = PalFX
trigger1 = 1
add = 0,0,0
mul = 30,144,255
invertall = 0
color = 0
time = 1

[State 2203, DestroySelf]
type = DestroySelf
trigger1 = Time >= 30

[Statedef 2204]
Type = A
Movetype= I
Physics = N
Anim = 1302
Ctrl = 0
Sprpriority = 4

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

[State 2204, BindtoParent]
type = BindtoParent
trigger1 = 1
pos = 0, 0
ignorehitpause = 1

[State 2204, DestroySelf]
type = DestroySelf
trigger1 = parent,Stateno != 2201
trigger2 = time >= 120

[StateDef 3000]
Type = S
Physics  = S
Ctrl = 0
Anim = 40

[State 3000, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S410,2
channel = 0

[State 3000]
type = Explod
trigger1 = time = 0
anim = 10350
postype = p1
pos = 10,-40
facing = 1
bindtime = 1
removetime = -2
supermovetime = 9999
pausemovetime = 9999
sprpriority = 3

[State 3000]
type = SuperPause
trigger1 = Time = 0
time = 92
movetime = 92
anim = -1
pos = 999,999
darken = 0
unhittable = 1

[State 3000, AfterImage]
type = AfterImage
trigger1 = Time = 0
time = 999
PalBright = 0,0,0
PalContrast = 128,128,256
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

[State 3000, Helper]
type = Helper
trigger1 = AnimElem = 1
stateno = 20000
ID = 20100
name = "ex_effect"
ownpal = 1
supermovetime = 2**30*2-1
pausemovetime = 2**30*2-1
ignorehitpause = 1
persistent = 0

[State 3000, PowerAdd]
type = PowerAdd
trigger1 = Time = 0
value = -2000

[State 3000]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 3001

[StateDef 3001]
Type = A
Physics = N
Ctrl = 0
VelSet = -12,-3
Anim = 3000

[State 3001]
Type = NotHitBy
Trigger1 = 1
Value = SAC
Time = 1

[State 3001]
Type = PlayerPush
Trigger1 = 1
Value = 0

[State 3001]
Type = ScreenBound
Trigger1 = 1
Value = 0

[State 3001]
Type = VarAdd
Trigger1 = Time = 0
FV = 15
Value = -0.5

[State 3001]
Type = ChangeState
Trigger1 = BackEdgeDist <= -250
Value = 3002

[StateDef 3002]
Type = A
MoveType = A
Physics = N
Ctrl = 0
VelSet = 0,0
Anim = 3001

[State 3002]
Type = NotHitBy
Trigger1 = 1
Value = SAC
Time = 1

[State 3002]
Type = PosSet
Trigger1 = Time = 0
Y = -120

[State 3002]
Type = PosSet
Trigger1 = Facing = 1
Trigger1 = Time <= 60
X = -220

[State 3002]
Type = PosSet
Trigger1 = Facing = -1
Trigger1 = Time <= 60
X = 220

[State 3002]
Type = VelSet
Trigger1 = Time >= 61
X = 30

[State 3002]
Type = PlayerPush
Trigger1 = 1
Value = 0

[State 3002]
Type = ScreenBound
Trigger1 = 1
Value = 0

[State 3002, HitDef]
Type = HitDef
Trigger1 = Time >= 61
Attr = A, HA
Damage = 375,50
AnimType = Hard
HitFlag = MAF
GuardFlag = MA
Priority = 3, Hit
PauseTime = 0, 0
HitSound = S200,5
GuardSound = S300,4
SparkNo = -1
Guard.SparkNo = S9000
Sparkxy = 0, -50
Ground.Type = High
Air.Type = High
Ground.SlideTime = 15
Ground.HitTime = 20
Air.HitTime = 20
Ground.Velocity = -20,-2
Air.Velocity = -20,-2
AirGuard.Velocity = -7,-2
Fall = 1
Air.Fall = 1
Fall.Recover = 0
GetPower = 0
Persistent = 0
envshake.time = 20
envshake.freq = 90
envshake.ampl = 8
P2StateNo = 3005

[State 3002]
Type = Explod
Trigger1 = Time >= 61
Anim = 3004
Postype = P1
Pos = 0,135
OwnPal = 1
Scale = 1,1
Trans = Add
SprPriority = 8
Persistent  = 2
IgnoreHitPause = 1

[State 3002]
Type = Explod
Trigger1 = Time >= 61
Anim = 3004
Postype = P1
Pos = 0,135
OwnPal = 1
Scale = 1,1
Trans = Sub
SprPriority = 7
Persistent  = 2
IgnoreHitPause = 1

[State 3002]
Type = Explod
Trigger1 = Time = 61
Anim = 3002
ID = 3002
Postype = P1
Pos = 0,0
OwnPal = 1
Scale = 2,2
ReMoveTime = 340
Vel = 30
SprPriority = 8
PauseMoveTime = 99999
SuperMoveTime = 99999

[State 3002]
Type = Explod
Trigger1 = Time = 61
Anim = 3005
ID = 3005
Postype = P1
Pos = 0,0
OwnPal = 1
Scale = 6,6
ReMoveTime  = 340
Vel = 30
SprPriority = 8
PauseMoveTime = 99999
SuperMoveTime = 99999

[State 3002]
Type = Explod
Trigger1 = Time = 61
Anim = 3005
ID = 3005
Postype = P1
Pos = -150,0
OwnPal = 1
Scale = 6,6
ReMoveTime = 340
Vel = 30
SprPriority = 8
PauseMoveTime = 99999
SuperMoveTime = 99999

[State 3002]
Type = Null
Trigger1 = Time >= 61
Stateno = 3004
ID = 3004
Name = "Stars"
Pos = -50,0
PosType = P1
Ownpal = 1

[State 3002]
Type = Helper
Trigger1 = Time >= 61
Trigger1 = Random > 550
Stateno = 3004
ID = 3004
Name = "Stars"
Pos = -50,0
PosType = P1
Ownpal = 1

[State 3002]
Type = PlaySnd
Trigger1 = Time = 61
Value = S100,13

[State 3002]
Type = AssertSpecial
Trigger1 = Time <= 60
Flag = Invisible
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 3002]
Type = ChangeState
Trigger1 = FrontEdgeDist <= -300
Trigger2 = Time >= 340
Value = 3003

[StateDef 3003]
Type = A
Physics = N
Ctrl = 0
VelSet = 0,0
Anim = 3006

[State 3003]
Type = NotHitBy
Trigger1 = Time <= 55
Value = SAC
Time = 1

[State 3003]
Type = PosSet
Trigger1 = Time <= 29
Y = -9999

[State 3003]
Type = PosSet
Trigger1 = Time = 30
Y = -300

[State 3003]
Type = PosAdd
Trigger1 = Time = 31
X = -20

[State 3003]
Type = VelAdd
Trigger1 = Time >= 30
Y = 0.2

[State 3003]
Type = Trans
Trigger1 = Time >= 30
Trans = AddAlpha
Alpha = 0+Var(2),256-Var(2)

[State 3003]
Type = VarSet
Trigger1 = Time = 0
V = 2
Value = 0

[State 3003]
Type = VarAdd
Trigger1 = Time >= 30
V = 2
Value = 10

[State 3003]
Type = ScreenBound
Trigger1 = Time <= 30
Value = 0

[State 3003]
Type = ScreenBound
Trigger1 = Time >= 31
Value = 1
MoveCamera = 1,0

[State 3003]
Type = AssertSpecial
Trigger1 = Time <= 30
Flag = Invisible
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 3003]
Type = ChangeState
Trigger1 = (Vel Y > 0) && (Pos Y >= 0)
Value = 52
Ctrl = 0

[StateDef 3004]
Type = A
Physics = N
Anim = 3003
SprPriority = 8
VelSet = 0,0

[State 3004]
Type = NotHitBy
Trigger1 = 1
Value = SAC
Time = 1

[State 3004]
Type = Trans
Trigger1 = 1
Trans = Add

[State 3004]
Type = VarSet
Trigger1 = Time = 0
FV = 6
Value = Random % 30

[State 3004]
Type = VarSet
Trigger1 = Time = 0
FV = 7
Value = Random % 30

[State 3004]
Type = VelSet
Trigger1 = Time = 0
X = -FVar(6)/4
Y = (FVar(7)/10)*IfElse(Random<=499,1,-1)

[State 3004]
Type = VarRandom
Trigger1 = Time = 0
V = 3
Range = 0,360

[State 3004]
Type = VarAdd
Trigger1 = Time >= 5
V = 2
Value = 15

[State 3004]
Type = VarAdd
Trigger1 = Time >= 5
V = 12
Value = 10

[State 3004]
Type = PalFx
Trigger1 = 1
Time = 1
Add = 0,0,0
Mul = 256,256,256

[State 3004]
Type = VarRandom
Trigger1 = Time = 0
V = 17
Range = 0,5

[State 3004]
Type = AngleDraw
Trigger1 = Var(17) = 0
Scale = 0.5,0.5

[State 3004]
Type = AngleDraw
Trigger1 = Var(17) = 1
Scale = 0.45,0.45

[State 3004]
Type = AngleDraw
Trigger1 = Var(17) = 2
Scale = 0.4,0.4

[State 3004]
Type = AngleDraw
Trigger1 = Var(17) = 3
Scale = 0.35,0.35

[State 3003]
Type = AngleDraw
Trigger1 = Var(17) = 4
Scale = 0.3,0.3

[State 3004]
Type = AngleDraw
Trigger1 = Var(17) = 5
Scale = 0.25,0.25

[State 3004]
Type = AngleSet
Trigger1 = Time = 0
Value = Var(3)

[State 3004]
Type = AngleAdd
Trigger1 = 1
Value = 2

[State 3004]
Type = AssertSpecial
Trigger1 = 1
Flag = Noshadow
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 3004]
Type = DestroySelf
Trigger1 = Time = 30
Trigger2 = Vel X >= 0
Trigger3 = FrontEdgeDist <= -50
Trigger4 = BackEdgeDist <= -50

[StateDef 3005]
Type = A
MoveType = H
Physics = N
Ctrl = 0

[State 3005]
Type = ChangeAnim
Trigger1 = Time = 0
Value = 5030

[State 3005]
Type = VelSet
Trigger1 = AnimElem = 1
X = 0
Y = -7

[State 3005]
Type = HitVelSet
Trigger1 = HitShakeOver
X = 1
Y = -8

[State 3005]
Type = ChangeState
Trigger1 = HitShakeOver
Value = 3006

[StateDef 3006]
Type = A
MoveType = H
Physics = N
Ctrl = 0

[State 3006]
Type = ChangeAnim
Trigger1 = Time = 0
Value = 5035

[State 3006]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 3009

[State 3006]
Type = ChangeState
Trigger1 = ((FrontEdgeDist <= 3) || (BackEdgeDist <= 3))
Value = 3007

[StateDef 3007]
Type = A
MoveType = H
Physics  = N
Ctrl     = 0

[State 3007]
Type = ChangeAnim2
Trigger1 = Time = 0
Value = 5410

[State 3007]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 3007]
Type = ChangeState
Trigger1 = Time = 1
Value = 3008

[StateDef 3008]
Type = A
MoveType = H
Physics = N
Ctrl = 0

[State 3008]
Type = ChangeAnim2
Trigger1 = Time = 0
Value = 5400

[State 3008]
Type = AngleDraw
Trigger1 = 1

[State 3008]
Type = AngleAdd
Trigger1 = 1
Value = 50

[State 3008]
Type = VelSet
Trigger1 = Time = 0
X = 2
Y = -11

[State 3008]
Type = VelAdd
Trigger1 = 1
Y = GetHitVar(YAccel)

[State 3008]
Type = SelfState
Trigger1 = Time >= 3
Trigger1 = Pos Y >= -15
Value = 5100

[StateDef 3009]
Type = A
MoveType = H
Physics = N
Ctrl = 0

[State 3009]
Type = ChangeAnim
Trigger1 = Time = 0
Value = 5050

[State 3009]
Type = SelfState
Trigger1 = Time >= 3
Trigger1 = Pos Y >= 0
Value = 5100

[State 3009]
Type = ChangeState
Trigger1 = ((FrontEdgeDist <= 3) || (BackEdgeDist <= 3))
Value = 3007

[StateDef 3500]
type = S
movetype = A
physics = S
juggle = 0
anim = 3500
ctrl = 0

[state 3500]
type = VarSet
trigger1 = Time = 0
var(33) = 600

[State 3500, Helper]
type = Helper
trigger1 = time = 0
ID = 3501
pos = -10,-90
postype = back
stateno = 3501
helpertype = normal
name = "Alice"
keyctrl = 0
ownpal = 1
supermovetime = 1

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

[StateDef 3501]
type = A
movetype = I
physics = S
velset = 0,0
poweradd = 0
ctrl = 0
anim = 3501
sprpriority = 2
facep2 = 1

[State 3501]
type = velset
trigger1 = time = 0
X = (parentdist X+72) / 8
Y = 6

[State 3501]
type = nothitby
trigger1 = 1
value = SCA
time = -1

[State 3501]
type = Gravity
trigger1 = 1

[State 3501]
type = PosSet
trigger1 = Pos Y > 0
y = 1

[State 3501]
Type = ChangeState
Trigger1 = Vel Y > 0
Trigger1 = Pos Y > 0
Value = 3502

[StateDef 3502]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3502
sprpriority = 2

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

[State 3502, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S0,0

[State 3502, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 3503

[StateDef 3503]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3503
sprpriority = 2

[State 3503]
type = turn
triggerall = (P2Dist X < 0)
trigger1 = Anim = 3503
trigger2 = AnimElem = 1

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

[State 3503, end]
type = ChangeState
trigger1 = Time = 5
value = 3504

[StateDef 3504]
Type = S
MoveType = A
Physics = S
Anim = 3504
Ctrl = 0
VelSet = 0, 0

[State 3504, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1

[State 3504, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
trigger2 = AnimElem = 13
trigger3 = AnimElem = 19
value = S100,0

[State 3504]
type = HitOverride
trigger1 = Anim = 3504
attr = SCA, NA, SA, HA, NP, SP, HP
time = -1
stateno = 3516

[State 3504]
type = nothitby
trigger1 = Anim = 3504
value = , NT, ST, HT
time = -1

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

[State 3504]
Type = PlaySnd
Trigger1 = AnimElem = 20
Value = S100,4

[State 3504, PlaySnd]
Type = PlaySnd
Trigger1 = AnimElem = 20
Value = S3500,0+Random%2
channel = 5

[State 3504]
Type = Helper
Trigger1 = AnimElem = 20
StateNo = 3505
ID = 3505
Pos = 30,-75
Name = "Artful_Sacrifice"
PosType = P1
Ownpal = 1
Keyctrl = 0
IgnoreHitPause = 1
Persistent = 0

[State 3504]
type = turn
triggerall = (P2Dist X < 0)
trigger1 = Anim = 3504
trigger2 = AnimElem = 1

[State 3504]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 3510

[StateDef 3505]
Type = A
Physics = N
Anim = 3513
SprPriority = 10

[State 3505]
Type = AssertSpecial
Trigger1 = 1
IgnoreHitPause = 1
Flag = NoShadow

[State 3505]
Type = Trans
Trigger1 = Time <= 16
Trans = AddAlpha
Alpha = 0+Time*16,256-Time*16

[State 3505]
Type = AngleSet
Trigger1 = Time = 0
Value = 0

[State 3505]
Type = AngleAdd
Trigger1 = Time > 0
Value = -15

[State 3505]
Type = AngleDraw
Trigger1 = 1

[State 3505]
Type = VelSet
Trigger1 = Time = 0
X = Ceil(P2Dist X) / 23.75
Y = -5

[State 3505]
Type = VelAdd
Trigger1 = Time >= 10
Y = 1.5

[State 3505]
Type = Helper
Trigger1 = Pos Y > -10
StateNo = 3506
ID = 3506
Name = "Burning_Shanghai"
Pos = 0,0
PosType = P1
Ownpal = 1
Keyctrl = 0
Size.XScale = 1
Size.YScale = 1
IgnoreHitPause = 1
Persistent = 0

[State 3505]
Type = Helper
Trigger1 = Pos Y > -10
StateNo = 3507
ID = 3507
Pos = 0,10
Name = "Explosion"
PosType = P1
Ownpal = 1
Keyctrl = 0
Size.XScale = 1
Size.YScale = 0.5
IgnoreHitPause = 1
Persistent = 0

[State 3505]
Type = Helper
Trigger1 = Pos Y > -10
StateNo = 3508
ID = 3508
Name = "Explosion"
Pos = 0,10
PosType = P1
Ownpal = 1
Keyctrl = 0
Size.XScale = 1
Size.YScale = 1
IgnoreHitPause = 1
Persistent = 0

[State 3505]
Type = ChangeState
Trigger1 = Pos Y > -10
Value = 3509

[StateDef 3506]
Type = A
Physics = N
Anim = 3514
SprPriority = 10

[State 3506]
Type = AssertSpecial
Trigger1 = 1
IgnoreHitPause = 1
Flag = NoShadow

[State 3506]
Type = EnvShake
Trigger1 = Time = 0
Time = 16
Freq = 80
Ampl = 4
Phase = 90

[State 3506]
Type = PlaySnd
Trigger1 = Time = 0
Value = S100,5

[State 3506]
Type = VarRandom
Trigger1 = Time = 0
V = 0
Range = -3,3

[State 3506]
Type = VarRandom
Trigger1 = Time = 0
V = 1
Range = -6,-3

[State 3506]
Type = AngleSet
Trigger1 = Time = 0
Value = 0

[State 3506]
Type = AngleAdd
Trigger1 = Time > 0
Value = IfElse(Var(0)>=0,-20,20)

[State 3506]
Type = AngleDraw
Trigger1 = 1

[State 3506]
Type = VelSet
Trigger1 = Time = 0
X = Var(0)
Y = Var(1)

[State 3506]
Type = VelAdd
Trigger1 = Time >= 5
Y = 0.25

[State 3506]
Type = DestroySelf
Trigger1 = !(ScreenPos X = [-100,420])
Trigger2 = !(ScreenPos Y = [-100,340])

[StateDef 3507]
Type = A
Physics = N
Anim = 3515
SprPriority = 1

[State 3507]
Type = AssertSpecial
Trigger1 = 1
IgnoreHitPause = 1
Flag = NoShadow

[State 3507]
Type = Trans
Trigger1 = 1
Trans = Add

[State 3507]
Type = VarAdd
Trigger1 = 1
FV = 0
Value = 0.25

[State 3507]
Type = VarAdd
Trigger1 = 1
FV = 1
Value = 0.05

[State 3507]
Type = AngleDraw
Trigger1 = 1
Scale = 0.25+FVar(0) , 0.025+FVar(1)

[State 3507]
Type = VarSet
Trigger1 = Time = 0
V = 0
Value = 256

[State 3507]
Type = VarAdd
Trigger1 = Time > 0
V = 0
Value = -12

[State 3507]
Type = VarSet
Trigger1 = Var(0) <= 0
V = 0
Value = 0

[State 3507]
Type = PalFx
Trigger1 = 1
Time = 1
Add = 0,0,0
Mul = Var(0),Var(0),Var(0)

[State 3507]
Type = DestroySelf
Trigger1 = Time = 20

[StateDef 3508]
Type = A
Physics = N
Anim = 3516
SprPriority = 1

[State 3508]
Type = AssertSpecial
Trigger1 = 1
IgnoreHitPause = 1
Flag = NoShadow

[State 3508]
Type = Trans
Trigger1 = 1
Trans = Add

[State 3508]
Type = VarAdd
Trigger1 = 1
FV = 0
Value = 0.055

[State 3508]
Type = AngleSet
Trigger1 = 1

[State 3508]
Type = AngleDraw
Trigger1 = 1
Scale = 0.25+FVar(0),0.25+FVar(0)

[State 3508]
Type = VarSet
Trigger1 = Time = 0
V = 10
Value = 256

[State 3508]
Type = VarAdd
Trigger1 = Time >= 20
V = 10
Value = -25

[State 3508]
Type = VarSet
Trigger1 = Var(10) <= 0
V = 10
Value = 0

[State 3508]
Type = PalFx
Trigger1 = 1
Time = 1
Add = 0,0,0
Mul = Var(10),Var(10),Var(10)

[State 3508]
Type = DestroySelf
Trigger1 = Time = 30

[StateDef 3509]
Type = A
MoveType = A
Physics = N
Anim = 3518
SprPriority = 10

[State 3509]
Type = AssertSpecial
Trigger1 = 1
IgnoreHitPause = 1
Flag = NoShadow

[State 3509]
Type = Explod
Trigger1 = Time = 0
Anim = 3517
ID = 3517
PosType = P1
Pos = 0,0
OwnPal = 0
Scale = 1.5,1.5
ReMoveTime = -2
SprPriority = 2

[State 3509, Hitdef]
Type = HitDef
Trigger1 = !Movecontact
Attr = A, SA
Damage = 100,24
AnimType = Head
HitFlag = MAF
GuardFlag = MA
Priority = 3, Hit
PauseTime = 0, 0
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
Sparkxy = 0,-40
HitSound = s1,2
GuardSound = S300,0
Ground.Type = High
Ground.HitTime = 16
Ground.Velocity = 0,-10
Ground.SlideTime = 7
Air.Type = Low
Air.HitTime = 16
Air.Velocity = 0,-10
Fall = 1
Air.Fall = 1
Fall.Recover = 0
Ground.CornerPush.veloff = 0
Air.CornerPush.Veloff = 0
Down.CornerPush.Veloff = 0
Guard.CornerPush.Veloff = 0
AirGuard.CornerPush.Veloff = 0

[State 3509]
Type = DestroySelf
Trigger1 = Time = 10

[StateDef 3510]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3503
sprpriority = 2

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

[State 3510]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
trigger1 = Anim = 3503
trigger1 = Time = 5
Value = 3513

[State 3510, end]
type = ChangeState
trigger1 = Time = 5
value = 3511

[StateDef 3511]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3505
sprpriority = 2

[State 3511, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 3512

[StateDef 3512]
type = S
movetype= I
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3506
sprpriority = 2

[State 3512, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S0,2

[State 3512, VelAdd]
type = VelAdd
trigger1 = AnimElem = 3
x = 7
y = 0

[State fadeout]
type=trans
trans=addalpha
alpha=ifelse(time>=93,32*(100-time),256),ifelse(time<=91,32*(time-85),256)
trigger1=time>=85

[State 3512, DestroySelf]
type=DestroySelf
trigger1=pos x>=360
trigger2=time>=100

[StateDef 3513]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3503
sprpriority = 1
facep2 = 1

[State 3513]
type = nothitby
trigger1 = 1
value = SCA

[State 3513]
type = ScreenBound
trigger1 = 1
value = 1

[State 3513]
type = turn
trigger1 = (P2Dist X < 0)

[State 3513]
type = ChangeState
trigger1 = RoundState = 4
trigger1 = parent, stateno = [181,189]
value = 3514

[State 3513]
type = ChangeState
triggerall = RoundState = 4
trigger1 = parent, stateno = 170
trigger2 = parent, alive = 0
value = 3515

[StateDef 3514]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3508
sprpriority = 1
facep2 = 1

[State 3514, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,180]
flag = roundnotover

[State 3514]
type = ScreenBound
trigger1 = 1
value = 1

[State 3514]
type = nothitby
trigger1 = 1
value = SCA

[StateDef 3515]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3510
sprpriority = 0
facep2 = 1

[State 3515]
type = ScreenBound
trigger1 = 1
value = 1

[State 3515]
type = nothitby
trigger1 = 1
value = SCA

[StateDef 3516]
type = S
movetype = H
physics = S
velset = 0,0
poweradd = 0
ctrl = 0
anim = 3507
sprpriority = 1

[State 3516, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 0
Value = S3500,2+Random%2
channel = 5

[State 3516]
type = velset
trigger1 = AnimElemTime(3) <= 0
X =  -0.8

[State 3516]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
trigger1 = Anim = 3507
trigger1 = AnimTime = 0
Value = 3513

[State 3516]
Type = Changestate
trigger1 = AnimTime = 0
value = 3512

[StateDef 3600]
type = S
movetype = A
physics = S
juggle = 0
anim = 3500
ctrl = 0

[state 3600]
type = VarSet
trigger1 = Time = 0
var(33) = 900

[State 3600, Helper]
type = Helper
trigger1 = time = 0
ID = 3601
pos = -10,-90
postype = back
stateno = 3601
helpertype = normal
name = "Shanghai_Alice"
keyctrl = 0
ownpal = 1
supermovetime = 1

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

[StateDef 3601]
type = A
movetype = I
physics = S
velset = 0,0
poweradd = 0
ctrl = 0
anim = 3501
sprpriority = 2
facep2 = 1

[State 3601]
type = velset
trigger1 = time = 0
X = (parentdist X+72) / 8
Y = 6

[State 3601]
type = nothitby
trigger1 = 1
value = SCA
time = -1

[State 3601]
type = Gravity
trigger1 = 1

[State 3601]
type = PosSet
trigger1 = Pos Y > 0
y = 1

[State 3601]
Type = ChangeState
Trigger1 = Vel Y > 0
Trigger1 = Pos Y > 0
Value = 3602

[StateDef 3602]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3502
sprpriority = 2

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

[State 3602, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S0,0

[State 3602, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 3603

[StateDef 3603]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3503
sprpriority = 2

[State 3603]
type = turn
triggerall = (P2Dist X < 0)
trigger1 = Anim = 3503
trigger2 = AnimElem = 1

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

[State 3603, end]
type = ChangeState
trigger1 = Time = 15
value = 3604

[StateDef 3604]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3525
sprpriority = 2

[State 3604]
type = HitOverride
trigger1 = Anim = 3525
attr = SCA, NA, SA, HA, NP, SP, HP
time = -1
stateno = 3614

[State 3604]
type = nothitby
trigger1 = Anim = 3525
value = , NT, ST, HT
time = -1

[State 3604, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S3600,0
channel = 5
persistent = 0

[State 3604, Helper]
type = Helper
trigger1 = time = 0
ID = 3605
pos = 50,0
postype = P1
stateno = 3605
helpertype = normal
name = "Goliath_Doll"
keyctrl = 0
ownpal = 1
supermovetime = 1

[State 3604, ChangeState]
type = ChangeState
trigger1 = time = 98
value = 3607

[StateDef 3605]
type = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3511
sprpriority = 0

[State 3605]
type = EnvShake
trigger1 = time = [0,98]
trigger1 = time%10 = 0
time = 10
ampl = 4
freq = 127

[State 3605, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,7
Channel = 3

[State 3605]
type = angledraw
trigger1 = time = [0,97]
scale = 1 + (time-30)*0.02,1 + (time-30)*0.02

[State 3605, ChangeState]
type = ChangeState
trigger1 = time = 98
value = 3606

[State 3605, StopSnd]
type = StopSnd
trigger1 = Parent,movetype = H
channel = 3

[State 3605, DestroySelf]
type = DestroySelf
trigger1 = Parent,movetype = H

[StateDef 3606]
type = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3512
sprpriority = 0

[State 3606, Helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "Slash"
ID = 3623
pos = 0,-60
postype = p1
facing = 1
stateno = 3623
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = .5
size.yscale = .5

[State 3606, Helper]
type = Helper
trigger1 = Time = 0
helpertype = normal
name = "Slash-2"
ID = 3624
pos = 0,-60
postype = p1
facing = 1
stateno = 3623
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = .5
size.yscale = .5

[State 3606, Explod]
type = Explod
trigger1 = AnimElem = 12
anim = 3524
ID = 3525
pos = 0,0
postype = p1
bindtime = 1
vel = cos(20)*1,sin(20)*.2
removetime = 99
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = -5
ownpal = 1

[State 3606, Explod]
type = Explod
trigger1 = AnimElem = 12
anim = 3524
ID = 3525
pos = 0,0
postype = p1
bindtime = 1
vel = cos(40)*2,sin(40)*.4
removetime = 99
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = -5
ownpal = 1

[State 3606, Explod]
type = Explod
trigger1 = AnimElem = 12
anim = 3524
ID = 3525
pos = 0,0
postype = p1
bindtime = 1
vel = cos(60)*3,sin(60)*.6
removetime = 99
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = -5
ownpal = 1

[State 3606, Explod]
type = Explod
trigger1 = AnimElem = 12
anim = 3524
ID = 3525
pos = 0,0
postype = p1
bindtime = 1
vel = cos(80)*4,sin(80)*.8
removetime = 99
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = -5
ownpal = 1

[State 3606, Explod]
type = Explod
trigger1 = AnimElem = 12
anim = 3524
ID = 3525
pos = 0,0
postype = p1
bindtime = 1
vel = cos(100)*4,sin(100)*.8
removetime = 99
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = 5
ownpal = 1

[State 3606, Explod]
type = Explod
trigger1 = AnimElem = 12
anim = 3524
ID = 3525
pos = 0,0
postype = p1
bindtime = 1
vel = cos(120)*4,sin(120)*.8
removetime = 99
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = 5
ownpal = 1

[State 3606, Explod]
type = Explod
trigger1 = AnimElem = 12
anim = 3524
ID = 3525
pos = 0,0
postype = p1
bindtime = 1
vel = cos(140)*3,sin(140)*.6
removetime = 99
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = 5
ownpal = 1

[State 3606, Explod]
type = Explod
trigger1 = AnimElem = 12
anim = 3524
ID = 3525
pos = 0,0
postype = p1
bindtime = 1
vel = cos(160)*2,sin(160)*.4
removetime = 99
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = 5
ownpal = 1

[State 3606, Explod]
type = Explod
trigger1 = AnimElem = 12
anim = 3524
ID = 3525
pos = 0,0
postype = p1
bindtime = 1
vel = cos(180)*1,sin(180)*.2
removetime = 99
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = 5
ownpal = 1

[State 3606, Explod]
type = Explod
trigger1 = AnimElem = 12
anim = 3524
ID = 3525
pos = 0,0
postype = p1
bindtime = 1
vel = cos(200)*1,sin(200)*.2
removetime = 99
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = 5
ownpal = 1

[State 3606, Explod]
type = Explod
trigger1 = AnimElem = 12
anim = 3524
ID = 3525
pos = 0,0
postype = p1
bindtime = 1
vel = cos(220)*2,sin(220)*.2
removetime = 99
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = 5
ownpal = 1

[State 3606, Explod]
type = Explod
trigger1 = AnimElem = 12
anim = 3524
ID = 3525
pos = 0,0
postype = p1
bindtime = 1
vel = cos(240)*2,sin(240)*.4
removetime = 99
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = 5
ownpal = 1

[State 3606, Explod]
type = Explod
trigger1 = AnimElem = 12
anim = 3524
ID = 3525
pos = 0,0
postype = p1
bindtime = 1
vel = cos(260)*3,sin(260)*.6
removetime = 99
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = 5
ownpal = 1

[State 3606, Explod]
type = Explod
trigger1 = AnimElem = 12
anim = 3524
ID = 3525
pos = 0,0
postype = p1
bindtime = 1
vel = cos(280)*4,sin(280)*.8
removetime = 99
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = -5
ownpal = 1

[State 3606, Explod]
type = Explod
trigger1 = AnimElem = 12
anim = 3524
ID = 3525
pos = 0,0
postype = p1
bindtime = 1
vel = cos(300)*4,sin(300)*.8
removetime = 99
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = -5
ownpal = 1

[State 3606, Explod]
type = Explod
trigger1 = AnimElem = 12
anim = 3524
ID = 3525
pos = 0,0
postype = p1
bindtime = 1
vel = cos(320)*3,sin(320)*.6
removetime = 99
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = -5
ownpal = 1

[State 3606, Explod]
type = Explod
trigger1 = AnimElem = 12
anim = 3524
ID = 3525
pos = 0,0
postype = p1
bindtime = 1
vel = cos(340)*2,sin(340)*.4
removetime = 99
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = -5
ownpal = 1

[State 3606, Explod]
type = Explod
trigger1 = AnimElem = 12
anim = 3524
ID = 3525
pos = 0,0
postype = p1
bindtime = 1
vel = cos(360)*1,sin(360)*.2
removetime = 99
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = -5
ownpal = 1

[State 3606, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 11
value = S100,6

[State 3606, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 2.5,2.5

[State 3606]
type = HitDef
trigger1 = animelem = 12
attr = S, SA
animtype = heavy
getpower = 0
damage = 200,30
priority = 5
hitflag = MAF
guardflag =
pausetime = 0,0
guard.pausetime = 0,0
guard.sparkno = S9000
sparkno = -1
sparkxy = -25,-53
hitsound = S200,4
guardsound = s300,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 10
ground.velocity = -10,-10
guard.velocity = -12
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
air.velocity = -12,-3
envshake.time=16
envshake.freq=75
envshake.ampl=5
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 3615

[State 3606, Explod]
type = Explod
Trigger1 = AnimElem=12,>=0
Trigger1 = Movehit=1
anim = 3523
ID = 3524
pos = 0,-50
postype = p2
facing = 1
vfacing = 1
removetime = -2
scale = 1.5,1
sprpriority = 10
ignorehitpause=1
persistent=0

[State 3606, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 3619

[StateDef 3607]
type = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3520
sprpriority = 2

[State 3607, ChangeState]
type = ChangeState
trigger1 = time = 136
value = 3608

[StateDef 3608]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3503
sprpriority = 2

[State 3608]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
trigger1 = Anim = 3503
trigger1 = Time = 5
Value = 3611

[State 3608, end]
type = ChangeState
trigger1 = Time = 5
value = 3609

[StateDef 3609]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3505
sprpriority = 2

[State 3609, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 3610

[StateDef 3610]
type = S
movetype= i
physics = n
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3506
sprpriority = 2

[State 3606, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S0,2

[State 3610, VelAdd]
type = VelAdd
trigger1 = AnimElem = 3
x = 7
y = 0

[State fadeout]
type=trans
trans=addalpha
alpha=ifelse(time>=93,32*(100-time),256),ifelse(time<=91,32*(time-85),256)
trigger1=time>=85

[State 3610, DestroySelf]
type=DestroySelf
trigger1=pos x>=360
trigger2=time>=100

[StateDef 3611]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3503
sprpriority = 1
facep2 = 1

[State 3611]
type = nothitby
trigger1 = 1
value = SCA

[State 3611]
type = ScreenBound
trigger1 = 1
value = 1

[State 3611]
type = turn
trigger1 = (P2Dist X < 0)

[State 3611]
type = ChangeState
trigger1 = RoundState = 4
trigger1 = parent, stateno = [181,189]
value = 3612

[State 3611]
type = ChangeState
triggerall = RoundState = 4
trigger1 = parent, stateno = 170
trigger2 = parent, alive = 0
value = 3613

[StateDef 3612]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3509
sprpriority = 1
facep2 = 1

[State 3612, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,180]
flag = roundnotover

[State 3612]
type = ScreenBound
trigger1 = 1
value = 1

[State 3612]
type = nothitby
trigger1 = 1
value = SCA

[StateDef 3613]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3510
sprpriority = 0
facep2 = 1

[State 3613]
type = ScreenBound
trigger1 = 1
value = 1

[State 3613]
type = nothitby
trigger1 = 1
value = SCA

[StateDef 3614]
type = S
movetype = H
physics = S
velset = 0,0
poweradd = 0
ctrl = 0
anim = 3507
sprpriority = 1

[State 3614, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 0
Value = S3500,2+Random%2
channel = 5

[State 3614]
type = velset
trigger1 = AnimElemTime(3) <= 0
X =  -0.8

[State 3614]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
trigger1 = Anim = 3507
trigger1 = AnimTime = 0
Value = 3611

[State 3614]
Type = Changestate
trigger1 = AnimTime = 0
value = 3610

[StateDef 3615]
type = A
movetype= H
physics = N
velset = 0,0
sprpriority = 1

[State 3615]
type = ChangeAnim2
trigger1 = 1
value = 6000

[State 3615]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 3616

[StateDef 3616]
type = A
movetype= H
physics = N
sprpriority = 1

[State 3616]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 3616]
type = VelAdd
trigger1 = 1
y = .45

[State 3616]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,1

[State 3616]
type = ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 3617

[State 3616]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

[Statedef 3617]
type = A
movetype= H
physics = N
sprpriority = 1

[State 3617]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 3617]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 3617]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

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

[State 3617]
type = Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor(screenpos y) - 50
postype = back
sprpriority = 3

[State 3617]
type = ChangeAnim2
trigger1 = Time = 0
value = 6002

[State 3617]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 3617]
type = ChangeState
trigger1 = AnimTime = 0
value = 3618

[StateDef 3618]
type = A
movetype= H
physics = N
sprpriority = 1

[State 3618]
type = NotHitBy
trigger1 = 1
value = , AT

[State 3618]
type = VelSet
trigger1 = Time = 0
y = -8

[State 3618]
type = VelSet
trigger1 = Time = 0
x = 1.6

[State 3618]
type = Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 3618]
type = VelAdd
trigger1 = 1
y = .45

[State 3618]
type = AngleAdd
trigger1 = 1
value = 25

[State 3618]
type = AngleDraw
trigger1 = 1

[State 3618]
type = null
trigger1 = command = "recovery"
trigger1 = Time > 30
value = 5210

[State 3618]
type = ChangeAnim2
trigger1 = Time = 0
value = 6003

[State 3618]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= -10)
value = 5100

[StateDef 3619]
type = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
anim = 3511
sprpriority = 0

[State 3619, AngleDraw]
type = AngleDraw
trigger1 = Time >= 1
trigger1 = Time < 5
scale = 2.5,2.5

[State 3619]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
trigger1 = Anim = 3511
trigger1 = Time = 5
Value = 3621

[State 3619, end]
type = ChangeState
trigger1 = Time = 5
value = 3620

[StateDef 3620]
type = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
anim = 3511
sprpriority = 0

[State 3620, AngleDraw]
type = AngleDraw
trigger1 = Time >= 0
trigger1 = Time < 45
scale = 2.5,2.5

[State fadeout]
type=trans
trans=addalpha
alpha=ifelse(time>=23,32*(30-time),256),ifelse(time<=21,32*(time-15),256)
trigger1=time>=15

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

[StateDef 3621]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3511
sprpriority = 0

[State 3621, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 2.5,2.5

[State 3621]
type = nothitby
trigger1 = 1
value = SCA

[State 3621]
type = ScreenBound
trigger1 = 1
value = 1

[State 3621]
type = ChangeState
trigger1 = RoundState = 4
trigger1 = Root, stateno = [181,189]
value = 3622

[StateDef 3622]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3511
sprpriority = 0

[State 3622, AngleDraw]
type = AngleDraw
trigger1 = AnimElemTime(1) > 0
scale = 2.5,2.5

[State 3622, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,180]
flag = roundnotover

[State 3622]
type = ScreenBound
trigger1 = 1
value = 1

[State 3622]
type = nothitby
trigger1 = 1
value = SCA

[StateDef 3623]
type = A
movetype= I
physics = N
ctrl = 0
poweradd = 0
sprpriority = 5
anim = 3521

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

[State 3623, VarAdd]
type = varadd
trigger1 = anim = 3522
var(15) = 1

[State 3623, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256

[State 3623, AngleDraw]
type = angledraw
trigger1 = time <= 10
scale = 1+time,1

[State 3623, AngleDraw]
type = angledraw
trigger1 = time > 10
scale = 11,1

[State 3623, AngleDraw]
type = angledraw
trigger1 = anim = 3522
scale = 11,4-var(15)*.1

[State 3623, AngleSet]
type = angleset
trigger1 = time = 0
trigger1 = ishelper(3623) = 1
value = 45

[State 3623, AngleSet]
type = angleset
trigger1 = time = 0
trigger1 = ishelper(3624) = 1
value = -45

[State 3623, ChangeAnim]
type = changeanim
trigger1 = Parent,AnimElem = 12
value = 3522
persistent = 0

[State 3623, NotHitBy]
type = nothitby
trigger1 = 1
value = SCA

[State 3623, DestroySelf]
type = Destroyself
trigger1 = Helper(3601),MoveType = H
trigger2 = var(15) >= 40

[StateDef 4000]
type = S
movetype= A
physics = N
ctrl = 0
Velset = 0,0
anim = 4000

[State 4000, NotHitBy]
type = NotHitBy
trigger1 = !time
time = 11
value = SCA

[State 4000, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S400,5
channel = 0

[State 4000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 15
value = S410,6
channel = 0

[State 4000]
Type = Helper
Trigger1 = AnimElem = 4
Name = "Hyper"
Stateno = 10400
ID = 10400
Pos = 15,-30
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4000]
Type = Helper
Trigger1 = AnimElem = 4
Name = "Hyper"
Stateno = 10401
ID = 10401
Pos = 15,-30
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4000]
Type = Helper
Trigger1 = AnimElem = 4
Name = "Hyper"
Stateno = 10402
ID = 10402
Pos = 15,-30
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4000, PowerAdd]
type = PowerAdd
trigger1 = AnimElem = 1
value = -3000

[State 4000]
type = SuperPause
trigger1 = AnimElem = 4
time = 92
movetime = 0
anim = -1
pos = 999,999
darken = 0
unhittable = 1

[State 4000, AfterImage]
type = AfterImage
trigger1 = AnimElem = 4
time = 999
PalBright = 0,0,0
PalContrast = 256,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

[State 4000, Helper]
type = Helper
trigger1 = AnimElem = 4
stateno = 20000
ID = 20100
name = "ex_effect"
ownpal = 1
supermovetime = 2**30*2-1
pausemovetime = 2**30*2-1
ignorehitpause = 1
persistent = 0

[State 4000]
type = Explod
trigger1 = AnimElem = 5
anim = 2003
ID = 2003
pos = 45,-45
postype = p1
bindtime = -1
removetime = 100
ownpal = 1
ontop = 1
sprpriority = 5
facing = 1
pausemovetime = 0
supermovetime = 0
scale = 1, 1
ignorehitpause = 1
removeongethit = 1

[State 4000]
type = Helper
trigger1 = AnimElem = 5
pos = 0,-50
postype = p1
ID = 4003
pausemovetime = 0
supermovetime = 0
name = "Rings"
sprpriority = 10
Stateno = 4003
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1

[State 4000]
type = Helper
trigger1 = AnimElem = 5
pos = 0,-60
postype = p1
ID = 4004
pausemovetime = 0
supermovetime = 0
name = "Rings"
sprpriority = 10
stateno = 4003
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1

[State 4000]
type = Helper
trigger1 = AnimElem = 5
pos = 0,0
postype = p1
ID = 4005
pausemovetime = 0
supermovetime = 0
name = "Final_Spark"
sprpriority = 10
Stateno = 4005
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1

[State 4000]
type = PlaySnd
trigger1 = AnimElem = 5
value = S100,14

[State 4000]
type = Helper
trigger1 = AnimElem = 30
pos = 0,0
postype = p1
ID = 4004
pausemovetime = 0
supermovetime = 0
name = "Spark"
sprpriority = 10
Stateno = 4004
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1

[State 4000]
type = Helper
trigger1 = AnimElem = 30
pos = 0,0
postype = p1
ID = 4001
pausemovetime = 0
supermovetime = 0
name = "Burst"
sprpriority = 100
stateno = 4001
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1

[State 4000]
type = Explod
trigger1 = AnimElem = 30
anim = 2002
ID = 2002
pos = -38,-64
postype = p1
bindtime = -1
removetime = 131
ownpal = 1
ontop = 1
sprpriority = 2
facing = 1
pausemovetime = 0
supermovetime = 0
scale = 1, 1
ignorehitpause = 1
removeongethit = 1

[State 4000]
type = PlaySnd
trigger1 = AnimElem = 30
value = S100,8

[State 4000]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1

[StateDef 4001]
type = A
movetype= A
physics = N
Velset = 0,0
sprpriority = 8
ctrl = 0
anim = 2003

[State 4001]
Type = VarAdd
Trigger1 = Time >= 132
V = 40
Value = 16

[State 4001]
Type = VarSet
Trigger1 = Var(40) >= 256
V = 40
Value = 256

[State 4001]
Type = PalFx
Trigger1 = Var(40) > 0
Time = 1
Add = 0,0,0
Mul = 256-Var(40),256-Var(40),256-Var(40)

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

[State 4001]
Type = Trans
trigger1 = 1
Trans = add
IgnoreHitPause = 1

[State 4001]
type = BindToParent
trigger1 = 1
pos = 49,-48

[State 4001]
type = Angleset
trigger1 = 1
value = (random%720+1)*0.5

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

[State 4001]
type = Destroyself
trigger1 = time = 164
trigger2 = Root,MoveType = H

[StateDef 4003]
type = A
movetype= A
physics = N
Velset = 0,0
sprpriority = 8
ctrl = 0
anim = 4004

[State 4003, PosAdd]
type = PosAdd
trigger1 = ishelper(4003)
trigger1 = time > 0
trigger1 = time <= 45
x = 2

[State 4003, PosAdd]
type = PosAdd
trigger1 = ishelper(4004)
trigger1 = time > 0
trigger1 = time <= 45
x = 4

[State 4003]
type = angledraw
trigger1 = Ishelper(4003)
trigger1 = time = [96,146]
scale = 1.5 + (time-96)*0.3,2 + (time-96)*0.3

[State 4003]
type = angledraw
trigger1 = Ishelper(4004)
trigger1 = time = [96,146]
scale = 2 + (time-96)*0.3,2.5 + (time-96)*0.3

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

[State 4003]
Type = Trans
trigger1 = 1
Trans = add
IgnoreHitPause = 1

[State 4003]
type = AngleDraw
trigger1 = ishelper(4003)
scale = 1.5,2

[State 4003]
type = AngleDraw
trigger1 = ishelper(4004)
scale = 2,2.5

[State 4003]
type = Destroyself
trigger1 = Time = 146
trigger2 = Root,MoveType = H

[StateDef 4004]
type = A
movetype= A
physics = N
Velset = 0,0
sprpriority = 8
ctrl = 0
anim = 4003

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

[State 4004]
Type = Trans
trigger1 = 1
Trans = add
IgnoreHitPause = 1

[State 4004]
type = BindToParent
trigger1 = 1
pos = 49,-48

[State 4004]
type = AngleDraw
trigger1 = Time > 0
trigger2 = Time <= 16
scale = 3,0.04

[State 4004]
type = Destroyself
trigger1 = time = 16
trigger2 = Root,MoveType = H

[StateDef 4005]
type = A
movetype= A
physics = N
Velset = 0,0
sprpriority = 8
ctrl = 0
Anim = 4003

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

[State 4005]
Type = Trans
trigger1 = 1
Trans = add
IgnoreHitPause = 1

[State 4005]
type = BindToParent
trigger1 = Time < 225
pos = 20,-48

[State 4005]
type = AngleDraw
trigger1 = Time = [0,96]
scale = 2.5,0.04

[State 4005]
type = AngleDraw
trigger1 = Time > 96
scale = 2.5,2.5

[State 4005]
type = ChangeAnim
trigger1 = Time = 96
value = 4005

[State 4005, Hitdef]
type = HitDef
trigger1 = (Time%3=0)*(Time=[1,93])
attr = A, HP
animtype = medium
damage = 3,1
priority = 8,Hit
hitflag = MAFP
guardflag = MAF
getpower = 0,0
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%20,-25+random%20
pausetime = 0,9
guard.pausetime = 0,9
ground.type = High
ground.slidetime = 12
ground.hittime  = 26
guard.slidetime = 8
guard.hittime = 17
ground.velocity	= -2
air.animtype = Back
airguard.velocity = -2.5,-2.5
air.velocity = -12.5,-5.5
fall.recover = 0
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
AirGuard.CornerPush.VelOff = 0
guard.dist = 20

[State 4005, Hitdef]
type = HitDef
trigger1 = (Time%5=1)*(Time>95)
attr = A, HP
animtype  = medium
damage = 25,3
priority = 8,Hit
hitflag = MAFP
guardflag = MAF
getpower = 0,0
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%20,-25+random%20
pausetime = 0,5
guard.pausetime = 0,5
ground.type = High
ground.slidetime = 12
ground.hittime  = 26
guard.slidetime = 8
guard.hittime = 17
ground.velocity = -12.5,-6.5
air.animtype = Back
airguard.velocity = -2.5,-2.5
air.velocity = -12.5,-6.5
fall = 1
fall.recover = 0
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
AirGuard.CornerPush.VelOff = 0
guard.dist = 20
envshake.time = 10
envshake.freq = 90
envshake.ampl = 8

[State 4005, AttackMulSet]
type = AttackMulSet
trigger1 = Anim = 4005
trigger1 = HitCount > 5
value = 0.9

[State 4005, AttackMulSet]
type = AttackMulSet
trigger1 = Anim = 4005
trigger1 = HitCount > 10
value = 0.75

[State 4005, AttackMulSet]
type = AttackMulSet
trigger1 = Anim = 4005
trigger1 = HitCount > 15
value = 0.5

[State 4005, PlaySnd]
type = PlaySnd
trigger1 = MoveHit = 1
value = S100,15
Channel = 1

[State 4005, PlaySnd]
type = PlaySnd
trigger1 = MoveGuarded = 1
value = S300,0
Channel = 2

[State 4005]
type = MoveHitReset
trigger1 = Movecontact+Movereversed
ignorehitpause = 1

[State 4005]
type = ChangeState
trigger1 = time =225
Value = 4009

[State 4005, DestroySelf]
type = DestroySelf
trigger1 = Root,MoveType = H

[StateDef 4009]
Type = A
Movetype= I
Physics = N
Ctrl = 0
Sprpriority = 5
Anim = 4006

[State 4009]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

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

[State 4009]
type = varset
trigger1 = time = 0
fvar(10) = 2.5
ignorehitpause = 1

[State 4009]
type = varset
trigger1 = time > 0
fvar(10) = 0.8 * fvar(10)
ignorehitpause = 1

[State 4009]
type = AngleDraw
trigger1 = time > 0
scale = 2.5, fvar(10)
ignorehitpause = 1

[State 4009]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 4009]
type = DestroySelf
trigger1 = time >= 34
trigger2 = Root,MoveType = H

[StateDef 4100]
Type = S
Movetype= A
Physics = S
Anim = 4100
Velset = 0, 0
Ctrl = 0

[State 4100, NotHitBy]
type = NotHitBy
trigger1 = !time
time = 8
value = SCA

[State 4100, PowerAdd]
type = PowerAdd
trigger1 = AnimElem = 1
value = -3000

[State 4100]
type = SuperPause
trigger1 = AnimElemTime(3) = 1
time = 92
movetime = 92
anim = -1
pos = 999,999
darken = 0
unhittable = 1

[State 4100, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S410,6
channel = 0

[State 4100]
Type = Helper
Trigger1 = AnimElem = 3
Name = "Hyper"
Stateno = 10400
ID = 10400
Pos = 0,-30
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4100]
Type = Helper
Trigger1 = AnimElem = 3
Name = "Hyper"
Stateno = 10401
ID = 10401
Pos = 0,-30
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4100]
Type = Helper
Trigger1 = AnimElem = 3
Name = "Hyper"
Stateno = 10402
ID = 10402
Pos = 0,-30
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4100, AfterImage]
type = AfterImage
trigger1 = AnimElemTime(3) = 1
time = 999
PalBright = 0,0,0
PalContrast = 256,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

[State 4100, Helper]
type = Helper
trigger1 = AnimElemTime(3) = 1
stateno = 20000
ID = 20100
name = "ex_effect"
ownpal = 1
supermovetime = 2**30*2-1
pausemovetime = 2**30*2-1
ignorehitpause = 1
persistent = 0

[State 4100]
type = Explod
trigger1 = AnimElem = 8
anim = 2002
ID = 2002
pos = -38,-64
postype = p1
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
sprpriority = 2
facing = 1
pausemovetime = 0
supermovetime = 0
scale = 1, 1
ignorehitpause = 1
removeongethit = 1

[State 4100]
type = Explod
trigger1 = AnimElem = 8
anim = 2003
ID = 2003
pos = 14,-78
postype = p1
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
sprpriority = 5
facing = 1
pausemovetime = 0
supermovetime = 0
scale = 3, 3
ignorehitpause = 1
removeongethit = 1

[State 4100]
type = Helper
Trigger1 = AnimElem = 8
name = "Final_Spark"
ID = 4101
postype = p1
pos = 24,-77
Stateno = 4101
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 4100, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 8
value = S100,8

[State 4100]
type = ChangeState
trigger1 = time >= 217
value = 4103

[StateDef 4101]
Type = A
Movetype= A
Physics = N
Anim = 4101
Ctrl = 0
Sprpriority = 5

[State 4101]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 4101]
type = AngleDraw
trigger1 = 1
scale = 2, 2
value = 30
ignorehitpause = 1

[State 4101]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 4101]
type = BindtoRoot
trigger1 = 1
pos = 24,-77
ignorehitpause = 1

[State 4101, HitDef]
type = HitDef
trigger1 = time%4 = 0
attr = A, HP
hitflag	= MAF
guardflag = MA
damage = ceil(20*(root,fvar(14))), 5
animtype = Hard
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 0, 5
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%20,-25+random%20
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity	= -9,-6
guard.velocity = -6
air.velocity = -9,-6
airguard.velocity = -6,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
Sprpriority= 5
guard.dist= 360
fall = 1
fall.recover = 0
fall.recovertime = 0
air.fall = 1
yaccel = 0.4
getpower=0,0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 8

[State 4101, PlaySnd]
type = PlaySnd
trigger1 = MoveHit = 1
value = S100,15
Channel = 1

[State 4101, PlaySnd]
type = PlaySnd
trigger1 = MoveGuarded = 1
value = S300,0
Channel = 2

[State 4101]
type = Playsnd
trigger1 = time = 0
value = S100,8

[State 4001, DestroySelf]
type = DestroySelf
trigger1 = Root,MoveType = H

[State 4101]
type = ChangeState
triggerall = time > 2
trigger1 = root,Anim != 4100
value = 4102

[StateDef 4102]
Type = A
Movetype = I
Physics = N
Ctrl = 0
Sprpriority = 5

[State 4102]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

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

[State 4102]
type = varset
trigger1 = time = 0
fvar(10) = 1.5
ignorehitpause = 1

[State 4102]
type = varset
trigger1 = time > 0
fvar(10) = 0.85 * fvar(10)
ignorehitpause = 1

[State 4102]
type = AngleDraw
trigger1 = time > 0
scale = 2, fvar(10)
value = 30
ignorehitpause = 1

[State 4102]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 4102]
type = DestroySelf
trigger1 = time >= 34

[StateDef 4103]
Type = S
Movetype= A
Physics = S
Anim = 4522
Velset = 0, 0
Ctrl = 0

[State 4103]
type = RemoveExplod
trigger1 = time = 0
ID = 2002

[State 4103]
type = ModifyExplod
trigger1 = time = [0, 16]
ID = 2003
trans = addalpha
alpha = 256-16*time, 256

[State 4103]
type = RemoveExplod
trigger1 = time = 16
ID = 2003

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

[StateDef 4500]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 4500

[State 4500, NotHitBy]
type = NotHitBy
trigger1 = !time
time = 11
value = SCA

[State 4500, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S410,5
channel = 0

[State 4500]
Type = Helper
Trigger1 = AnimElem = 3
Name = "Hyper"
Stateno = 10400
ID = 10450
Pos = 0,-40
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4500]
Type = Helper
Trigger1 = AnimElem = 3
Name = "Hyper"
Stateno = 10450
ID = 10450
Pos = 0,-40
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4500]
Type = Helper
Trigger1 = AnimElem = 3
Name = "Hyper"
Stateno = 10451
ID = 10451
Pos = 0,-40
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4500]
type = SuperPause
trigger1 = AnimElem = 3
time = 92
movetime = 0
anim = -1
pos = 999,999
darken = 0
unhittable = 1
poweradd=-3000

[State 4500, Helper]
type = Helper
trigger1 = AnimElem = 3
stateno = 20000
ID = 20100
name = "ex_effect"
ownpal = 1
supermovetime = 2**30*2-1
pausemovetime = 2**30*2-1
ignorehitpause = 1
persistent = 0

[State 4500, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S100,2

[State 4500]
type = HitDef
trigger1 = AnimElem = 6
attr = S, NA
animtype = Heavy
damage = 30,0
guardflag = MA
pausetime = 30,60
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -20,-70
hitsound = S200,6
guardsound = S300,4
ground.type = High
ground.slidetime = 14
ground.hittime  = 22
ground.velocity = -4
air.velocity = -4.5,-1.6
kill = 0
guard.kill = 0
P2stateno = 4502
getpower=0,0
id=4500

[state gtfo]
type=projectile
trigger1=numtarget(4500)
affectteam=b
priority=7,hit
projpriority=44444444
attr=s,ha
animtype=up
damage=0,0
hitflag=mafdp
guardflag=
sparkno=-1
pausetime=0,0 
ground.type=none
numhits=0
getpower=0,0
id=4599
nochainid=4500,4599
projanim=4599
projremove=0
projremovetime=60
projhits=444444444
pausemovetime=444444444
supermovetime=444444444
ignorehitpause=1

[state gtfo]
type=projectile
trigger1=numtarget(4500)
affectteam=b
priority=7,hit
projpriority=44444444
attr=s,hp
animtype=up
damage=0,0
hitflag=mafdp
guardflag=
sparkno=-1
pausetime=0,0 
ground.type=none
numhits=0
getpower=0,0
id=4599
nochainid=4500,4599
projanim=4599
projremove=0
projremovetime=60
projhits=444444444
pausemovetime=444444444
supermovetime=444444444
ignorehitpause=1

[state gtfo]
type=projectile
trigger1=numtarget(4500)
affectteam=b
priority=7,hit
projpriority=44444444
attr=s,ht
animtype=up
damage=0,0
hitflag=mafdp
guardflag=
sparkno=-1
pausetime=0,0 
ground.type=none
numhits=0
getpower=0,0
id=4599
nochainid=4500,4599
projanim=4599
projremove=0
projremovetime=60
projhits=444444444
pausemovetime=444444444
supermovetime=444444444
ignorehitpause=1

[State 4500,ChangeState]
type = Changestate
trigger1= AnimElem = 6 >= 0 && numtarget(4500)
value = 4501

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

[StateDef 4501]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 4501

[State 4501, Helper]
type = Helper
trigger1 = Time = 0
helpertype = normal
stateno = 7000
id = 7000
postype = Left
pos = 0, 0
keyctrl = 0
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1
pausemovetime = 9999
supermovetime = 9999

[state gtfo]
type=targetstate
id=4599
value=4599
trigger1=!time
trigger1=numtarget(4599)

[state camera]
type=screenbound
value=1
trigger1=1
ignorehitpause=1

[State 4501, PosAdd]
type = PosSet
trigger1 = time = 0
x = 0
y = 0

[State 4501, TargetBind]
type = TargetBind
id=4500
trigger1 = time = 0
time = 1
pos = 50,0

[State 4501, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 11
value = S100,30

[State 4501, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 19
value = S100,30

[State 4501, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 27
trigger2 = AnimElem = 38
value = S100,31

[State 4501, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 11
trigger3 = AnimElem = 19
trigger4 = AnimElem = 27
value = S200,15

[State 4501, HitAdd]
type = HitAdd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 11
trigger3 = AnimElem = 19
trigger4 = AnimElem = 27
value = 1

[State 4501, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 11
trigger3 = AnimElem = 19
trigger4 = AnimElem = 27
value = -15
kill = 0

[State 4501]
type = TargetState
id=4500
trigger1 = AnimElem = 4
trigger2 = AnimElem = 11
value = 4502
ignorehitpause = 1

[State 4501]
type = TargetState
id=4500
trigger1 = AnimElem = 19
value = 4503
ignorehitpause = 1

[State 4501]
type = TargetState
id=4500
trigger1 = AnimElem = 27
value = 4504
ignorehitpause = 1

[State 4501, Explod]
type = Explod
trigger1 = AnimElem = 4
trigger2 = AnimElem = 11
trigger3 = AnimElem = 19
trigger4 = AnimElem = 27
anim = 8050*10**(random%4)
ID = 8050
pos = -35+random%60, -93+random%70
postype = p2
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 5

[State 4501]
type = EnvShake
Trigger1 = AnimElem = 38
time = 10
ampl = 20
freq = 127

[State 4501]
type = HitDef
trigger1 = AnimElem = 38
attr = S, NA
animtype = Heavy
damage = 30,0
guardflag = MA
pausetime = 5,5
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -20,-70
hitsound = S200,16
guardsound = S300,4
ground.type = High
ground.slidetime = 14
ground.hittime  = 22
ground.velocity = -16,-6
kill = 0
guard.kill = 0
getpower=0,0
p2stateno=4505
chaindid=4500

[State 4501, Helper]
type = Helper
trigger1 = time = 133
ID = 4512
pos = 0,0
postype = Front
stateno = 4512
helpertype = normal
name = "Alice"
keyctrl = 0
ownpal = 1
supermovetime = 1
facing = -1

[State 4501, Helper]
type = Helper
trigger1 = time = 133
ID = 4520
pos = 0,0
postype = Front
stateno = 4520
helpertype = normal
name = "Patchouli"
keyctrl = 0
ownpal = 1
supermovetime = 1
facing = -1

[State 4501, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 4509

[StateDef 4502]
type = S
movetype= H
physics = N
velset = 0,0
poweradd = 0
SprPriority = 1

[state playerpush]
type=playerpush
value=0
trigger1=1
ignorehitpause=1

[State 4502, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 4514

[StateDef 4503]
type = S
movetype= H
physics = N
velset = 0,0
poweradd = 0
SprPriority = 1

[state playerpush]
type=playerpush
value=0
trigger1=1
ignorehitpause=1

[State 4503, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 4515

[StateDef 4504]
type = S
movetype= H
physics = N
velset = 0,0
poweradd = 0
SprPriority = 1

[state playerpush]
type=playerpush
value=0
trigger1=1
ignorehitpause=1

[State 4504, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 4516

[StateDef 4505]
type = A
movetype= H
physics = N
velset = 0,0

[state playerpush]
type=playerpush
value=0
trigger1=1
ignorehitpause=1

[State 4505]
type = ChangeAnim2
trigger1 = 1
value = 6000

[State 4505]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 4506

[StateDef 4506]
type = A
movetype= H
physics = N

[state playerpush]
type=playerpush
value=0
trigger1=1
ignorehitpause=1

[state camera]
type=screenbound
value=1
trigger1=1
ignorehitpause=1

[State 4506]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 4506]
type = VelAdd
trigger1 = 1
y = .45

[State 4506]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,1

[State 4506]
type = ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 4507

[State 4506]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

[StateDef 4507]
type = A
movetype= H
physics = N

[state playerpush]
type=playerpush
value=0
trigger1=1
ignorehitpause=1

[State 4507]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 4507]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 4507]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

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

[State 4507]
type = Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor(screenpos y) - 50
postype = back
sprpriority = 3

[State 4507]
type = ChangeAnim2
trigger1 = Time = 0
value = 6002

[State 4507]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 4507]
type = ChangeState
trigger1 = AnimTime = 0
value = 4508

[StateDef 4508]
type = A
movetype= H
physics = N

[state playerpush]
type=playerpush
value=0
trigger1=1
ignorehitpause=1

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

[State 4508]
type = VelSet
trigger1 = Time = 0
y = -16

[State 4508]
type = VelSet
trigger1 = Time = 0
x = 2

[State 4508]
type = Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 4508]
type = VelAdd
trigger1 = 1
y = .45

[State 4508]
type = AngleAdd
trigger1 = 1
value = 25

[State 4508]
type = AngleDraw
trigger1 = 1

[State 4508]
type = null
trigger1 = command = "recovery"
trigger1 = Time > 30
value = 5210

[State 4508]
type = ChangeAnim2
trigger1 = Time = 0
value = 6003

[State 4508]
type = ChangeState
trigger1 = time >= 65
value = 4519

[StateDef 4509]
type = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
anim = 105
sprpriority = 2

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

[State 4509, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 4509, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = time = 15
value = -11
Absolute = 1
kill = 0

[State 4509, Explod]
type = Explod
trigger1 = time = 15
anim = 8051*10**(random%4)
pos = (floor(target,pos x-pos x)-35+random%60)*facing, floor(target,pos y-pos y)-63+random%70
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 8

[state camera]
type=screenbound
value=1
trigger1=1
ignorehitpause=1

[State 4509, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 4509]
Type = Veladd
trigger1 = AnimElemTime(4) > 0
y = 0.6

[State 4509, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 4
statetype = A       ;S,A,C,L
movetype = i        ;I,A,H
physics = n         ;A,C,S,N

[State 4509, VelSet]
type = VelSet
trigger1 = animelem = 4
x = -8
y = -4

[State 4509]
type = ChangeState
trigger1 = Pos Y > 0 && Vel Y > 0
value = 4510

[StateDef 4510]
type = S
movetype= I
physics = s
velset = 0,0
ctrl = 0
anim = 106
sprpriority = 2

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

[State 4510, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[state camera]
type=screenbound
value=1
trigger1=1
ignorehitpause=1

[State 4510, PosSet]
type = PosSet
trigger1 = time = 0
y = 0

[State 4510, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,0

[State 4510]
type = ChangeState
trigger1 = Animtime = 0
value = 4511

[StateDef 4511]
type = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
anim = 0
sprpriority = 2

[State 4511, Explod]
type = Explod
trigger1 = Time >= 300
trigger1 = Time < 600
trigger1 = Time%5
anim = 8050*10**(random%4)
pos = (floor(target,pos x-pos x)-35+random%60)*facing, floor(target,pos y-pos y)-63+random%70
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 8

[State 4514, Explod]
type = Explod
trigger1 = time = 112
trigger2 = time = 122
trigger3 = time = 132
trigger4 = time = 142
trigger5 = time = 152
trigger6 = time = 157
trigger7 = time = 162
trigger8 = time = 167
trigger9 = time = 172
trigger10 = time = 182
anim = 8051*10**(random%4)
pos = (floor(target,pos x-pos x)-35+random%60)*facing, floor(target,pos y-pos y)-63+random%70
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 8

[State 4509, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = time = 112
trigger2 = time = 122
trigger3 = time = 132
trigger4 = time = 142
trigger5 = time = 152
trigger6 = time = 162
trigger7 = time = 172
trigger8 = time = 182
value = -15
kill = 0

[state camera]
type=screenbound
value=1
trigger1=1
ignorehitpause=1

[State 4511, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

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

[State 4511]
type = ChangeState
trigger1 = time >= 700
value = 4538

[StateDef 4512]
type = S
movetype = I
physics = S
velset = 0,0
ctrl = 0
anim = 3501
sprpriority = 2

[State 4512, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,2

[State 4512, VelSet]
type = VelSet
trigger1 = time
x = 8.25

[State 4512]
type = ChangeState
trigger1 = FrontEdgeBodyDist < 238
value = 4513

[StateDef 4513]
type = S
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 4502
poweradd = 0
sprpriority = 2

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

[State 4513, Pause]
type = Pause
trigger1 = AnimElem = 4
time = 92
movetime = 92

[State 4513, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S0,11

[State 4513, Helper]
Type = Helper
Trigger1 = AnimElem = 4
StateNo = 4546
ID = 4513
Name = "EX_Effect"
Pos = 0,-85
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 5
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 4513, Helper]
Type = Helper
Trigger1 = AnimElem = 4
StateNo = 4547
ID = 4547
Name = "Fade to Black"
Pos = 0,0
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 5
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 4513, AllPallFx]
type = AllPalFX
trigger1 = AnimElem = 4
time = 30
add = 256,256,256
sinadd = -256,-256,-256,200
invertall = 0
color = 256

[State 4513, Explod]
type = Explod
trigger1 = AnimElem = 4
anim = 4531
postype = left
pos = 160,120
sprpriority = 10
ownpal = 1
ID = 4531
IgnoreHitPause = 1
bindtime = -1
removetime = 68
supermovetime = 9999999999
pausemovetime = 9999999999
scale = 1,1
facing = 1
trans = addalpha
alpha = 256,256

[State 4513, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4531) != 0
trigger1 = time%8 = 0
trigger1 = time < 60
ID = 4531
trans = addalpha
alpha = 256,256

[State 4513, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4531) != 0
trigger1 = time%8 = 2
trigger1 = time < 60
ID = 4531
trans = addalpha
alpha = 192,256

[State 4513, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4531) != 0
trigger1 = time%8 = 4
trigger1 = time < 60
ID = 4531
trans = addalpha
alpha = 128,256

[State 4513, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4531) != 0
trigger1 = time%8 = 6
trigger1 = time < 60
ID = 4531
trans = addalpha
alpha = 64,256

[State 4513, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4531) != 0
trigger1 = time >= 60
ID = 4531
trans = addalpha
alpha = 256-(time-60)*32,256

[State 4513, Explod]
type = Explod
trigger1 = AnimElem = 4
anim = 4529
postype = left
pos = 160,40
facing = 1
vfacing = 1
sprpriority = 10
ownpal = 1
ID = 4529
IgnoreHitPause = 1
bindtime = -1
removetime = 120
supermovetime = 9999
pausemovetime = 9999
scale = .5,.5
facing = 1
trans = addalpha
alpha = 256,256

[State 4513, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4529) != 0
trigger1 = time <= 32
ID = 4529
postype = left
pos = 160-time,40+time*5
trans = addalpha
alpha = 256,256

[State 4513, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4529) != 0
trigger1 = time > 32
ID = 4529
postype = left
pos = 160-time,200+floor(time*.2)
trans = addalpha
alpha = 256-(time-60)*8,256

[State 4513, Explod]
type = Explod
trigger1 = AnimElem = 4
anim = 4529
postype = left
pos = 160,200
facing = 1
vfacing = -1
sprpriority = 10
ownpal = 1
ID = 4530
IgnoreHitPause = 1
bindtime = -1
removetime = 120
supermovetime = 9999
pausemovetime = 9999
scale = .5,.5
facing = 1
trans = addalpha
alpha = 256,256

[State 4513, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4530) != 0
trigger1 = time <= 32
ID = 4530
postype = left
pos = 160+time,200-time*5
trans = addalpha
alpha = 256,256

[State 4513, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4530) != 0
trigger1 = time > 32
ID = 4530
postype = left
pos = 160+time,40-floor(time*.2)
trans = addalpha
alpha = 256-(time-60)*8,256

[State 4513, Explod]
type = Explod
trigger1 = AnimElem = 4
anim = 4530
postype = left
pos = 200,120
facing = 1
vfacing = 1
sprpriority = 10
ownpal = 1
ID = 4532
IgnoreHitPause = 1
bindtime = -1
removetime = 120
supermovetime = 9999
pausemovetime = 9999
scale = .5,.5
facing = 1
trans = addalpha
alpha = 256,256

[State 4513, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4532) != 0
trigger1 = time <= 32
ID = 4532
postype = left
pos = 200-time*5,120-time
trans = addalpha
alpha = 256,256

[State 4513, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4532) != 0
trigger1 = time > 32
ID = 4532
postype = left
pos = 40-floor(time*.2),120-time
trans = addalpha
alpha = 256-(time-60)*8,256

[State 4513, Explod]
type = Explod
trigger1 = AnimElem = 4
anim = 4530
postype = left
pos = 120,120
facing = -1
vfacing = 1
sprpriority = 10
ownpal = 1
ID = 4533
IgnoreHitPause = 1
bindtime = -1
removetime = 120
supermovetime = 9999
pausemovetime = 9999
scale = .5,.5
facing = 1
trans = addalpha
alpha = 256,256

[State 4513, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4533) != 0
trigger1 = time <= 32
ID = 4533
postype = left
pos = 120+time*5,120+time
trans = addalpha
alpha = 256,256

[State 4513, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4533) != 0
trigger1 = time > 32
ID = 4533
postype = left
pos = 280+floor(time*.2),120+time
trans = addalpha
alpha = 256-(time-60)*8,256

[State 4513, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S3500,4+Random%2
channel = 5

[State 4513, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = S100,2

[State 4513, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = S100,29

[State 4513, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = S200,14

[State 4513, HitAdd]
type = HitAdd
trigger1 = AnimElem = 5
value = 1

[state 4513]
Type = Helper
trigger1 = AnimElem = 5
Name = "Shanghai"
stateno = 4514
ID = 4514
pos = 25,-65
postype = p1
ownpal = 1
Keyctrl = 0
SprPriority = 2
ignorehitpause = 1
persistent = 0

[State 4513]
type = turn
trigger1 = (P2Dist X < 0)
trigger1 = AnimElem = 5

[State 4513]
type = ChangeState
trigger1 = Time = 350
value = 4516

[StateDef 4514]
type = A
movetype = I
physics  = N
anim = 4503
ctrl = 0
velset = 0,0
sprpriority = 1

[State 4514]
type = posadd
trigger1 = time >= 37
trigger1 = time <= 41
y = 2

[State 4514]
type = posadd
trigger1 = time >= 42
trigger1 = time <= 46
x = 3
y = 1

[State 4514]
type = posadd
trigger1 = time >= 47
trigger1 = time <= 65
X = 3
y = -10

[State 4514]
type = posadd
trigger1 = time >= 170
trigger1 = time <= 172
trigger2 = time >= 175
trigger2 = time <= 177
trigger3 = time >= 180
trigger3 = time <= 184
y = -2

[State 4514]
type = posadd
trigger1 = time >= 173
trigger1 = time <= 174
trigger2 = time >= 178
trigger2 = time <= 179
trigger3 = time >= 185
trigger3 = time <= 189
y = 2

[State 4514]
type = posadd
trigger1 = time >= 190
trigger1 = time <= 194
trigger2 = time >= 200
trigger2 = time <= 208
y = -3

[State 4514]
type = posadd
trigger1 = time >= 195
trigger1 = time <= 198
trigger2 = time >= 209
trigger2 = time <= 217
y = 3

[State 4514]
type = ChangeAnim
trigger1 = time = 65
value = 99999

[State 4514, Helper]
type = Helper
trigger1 = time = 115
trigger2 = time = 160
helpertype = Normal
name = "Shanghai"
ID = 4515
stateno = 4515
pos =  80,200
postype = p1
facing = 1
ownpal = 1

[State 4514, Helper]
type = Helper
trigger1 = time = 125
trigger2 = time = 165
helpertype = Normal
name = "Shanghai2"
ID = 4516
stateno = 4515
pos =  -80,200
postype = p1
facing = 1
ownpal = 1

[State 4514, Helper]
type = Helper
trigger1 = time = 135
trigger2 = time = 175
helpertype = Normal
name = "Shanghai3"
ID = 4517
stateno = 4515
pos =  80,130
postype = p1
facing = 1
ownpal = 1

[State 4514, Helper]
type = Helper
trigger1 = time = 145
trigger2 = time = 185
helpertype = Normal
name = "Shanghai4"
ID = 4518
stateno = 4515
pos =  -70,130
postype = p1
facing = 1
ownpal = 1

[State 4514, Helper]
type = Helper
trigger1 = time = 150
helpertype = Normal
name = "Shanghai5"
ID = 4519
stateno = 4515
pos =  80,180
postype = p1
facing = 1
ownpal = 1

[State 4514, Helper]
type = Helper
trigger1 = time = 155
helpertype = Normal
name = "Shanghai6"
ID = 4520
stateno = 4515
pos =  -80,180
postype = p1
facing = 1
ownpal = 1

[State 4514]
type = DestroySelf
trigger1 = time = 300
trigger2 = parent, movetype = H

[StateDef 4515]
type = A
movetype = I
physics  = N
anim = 4517
ctrl = 0
velset = 0,0
sprpriority = 2

[State 4515]
type = BindToTarget
trigger1 = time = 90
time = 170
ID = 2100
pos = 0, 0, food

[State 4515]
type = nothitby
trigger1 = 1
value = SCA
time = -1

[State 4515]
type = hitadd
trigger1 = IsHelper(4515) || IsHelper(4516) || IsHelper(4517) || IsHelper(4518) || IsHelper(4519)
trigger1 = time = 15
value = 1

[State 4515]
type = PlaySnd
trigger1 = IsHelper(4515) || IsHelper(4517) || IsHelper(4518) || IsHelper(4516) || IsHelper(4519) || IsHelper(4520)
trigger1 = time = 15
value = S200,14

[State 4515]
type = turn
triggerall = IsHelper(4515) || IsHelper(4517) || IsHelper(4519)
trigger1 = time = 0

[State 4515]
Type = AngleDraw
triggerall = IsHelper(4515) || IsHelper(4516)
Trigger1 = 1
value = 30
Scale = 1.1,1.1

[State 4515]
Type = AngleDraw
triggerall = IsHelper(4519) || IsHelper(4520)
Trigger1 = 1
value = 20
Scale = 1.1,1.1

[State 4515]
type = Trans
trigger1 = time >= 0
trigger1 = time <= 3
trigger2 = time >= 20
trigger2 = time <= 24
trigger2 = IsHelper(4515) || IsHelper(4517) || IsHelper(4518) || IsHelper(4516) || IsHelper(4519) || IsHelper(4520)
trans = addalpha
alpha = 256, 256

[State 4515]
type = Trans
trigger1 = time >= 4
trigger1 = time <= 6
trigger2 = time >= 17
trigger2 = time <= 19
trigger2 = IsHelper(4515) || IsHelper(4517) || IsHelper(4518) || IsHelper(4516) || IsHelper(4519) || IsHelper(4520)
trans = addalpha
alpha = 256, 128

[State 4515]
type = posadd
triggerall = IsHelper(4515) || IsHelper(4516)
trigger1 = time >= 15
trigger1 = time <= 21
x = 15
y = -15

[State 4515]
type = posadd
triggerall = IsHelper(4517) || IsHelper(4518)
trigger1 = time >= 15
trigger1 = time <= 21
x = 18

[State 4515]
type = posadd
triggerall = IsHelper(4519) || IsHelper(4520)
trigger1 = time >= 15
trigger1 = time <= 21
x = 12
y = -10

[State 4515]
type = DestroySelf
trigger1 = IsHelper(4515) || IsHelper(4517) || IsHelper(4518) || IsHelper(4516) || IsHelper(4519) || IsHelper(4520)
trigger1 = time = 25

[StateDef 4516]
type = S
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 3509
sprpriority = 2

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

[State 4516, Helper]
type = Helper
trigger1 = AnimElem = 6
ID = 4517
pos = -220,-100
postype = Back
stateno = 4517
helpertype = normal
name = "Final_Shanghai"
keyctrl = 0
ownpal = 0
facing = 1

[State 4516, Helper]
type = Helper
trigger1 = AnimElem = 6
ID = 4518
pos = 220,-100
postype = Front
stateno = 4517
helpertype = normal
name = "Final_Shanghai2"
keyctrl = 0
ownpal = 1
facing = -1

[State 4516]
type = ChangeState
trigger1 = Root,Stateno = 4538
value = 4518

[StateDef 4517]
type = A
movetype = I
physics  = N
anim = 4504
ctrl = 0
velset = 0,0
sprpriority = 0

[State 4517, PlaySnd]
type = PlaySnd
trigger1 = time = 15
value = S200,16

[State 4517, HitAdd]
type = HitAdd
trigger1 = Time = 15
value = 2

[State 4517, VelSet]
type = VelSet
trigger1 = time > 0
trigger1 = time < 11
x = 25
y = 0

[State 4517, VelSet]
type = VelSet
trigger1 = Time >= 12
x = 0
y = 0

[State 4517, SprPriority]
type = SprPriority
trigger1 = IsHelper(4517)
trigger1 = time = 0
value = 1

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

[State 4517, DestroySelf]
type = DestroySelf
trigger1 = Root,Stateno = 4538

[StateDef 4518]
type = S
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 3503
sprpriority = 2

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

[State 4518, ChangeState]
type = ChangeState
trigger1 = Root,Anim = 4522
value = 3510

[StateDef 4519]
type = A
movetype = H
physics = N
ctrl = 0
velset = 0,0
sprpriority = 0

[State 4519]
type = ChangeAnim2
Trigger1 = time = 8
value = 4518

[State 4519]
type = ChangeAnim2
Trigger1 = time = 290
value = 4520

[State 4519, LifeAdd]
type = LifeAdd
trigger1 = Time >= 330
trigger1 = Time < 645
trigger1 = Time%5 = 0
value = -3
kill = 0

[State 4519]
type = ChangeAnim2
Trigger1 = time = 190
Trigger2 = time = 200
value = 4519
elem = 1

[State 4519]
type = posadd
trigger1 = time >= 8
trigger1 = time <= 50
x = 0
y = -15

[State 4519]
type = PosSet
trigger1 = time = 70
x = 0
y = -400

[State 4519]
type = posadd
trigger1 = time >= 81
trigger1 = time <= 89
x = 0
y = 30

[State 4519]
type = PosSet
trigger1 = time = 90
x = 0
y = -125

[State 4519]
type = ChangeAnim2
Trigger1 = time = 165
Trigger2 = time = 170
Trigger3 = time = 175
Trigger4 = time = 130
Trigger5 = time = 140
Trigger6 = time = 150
Trigger7 = time = 160
Trigger8 = time = 180
value = 4518
elem = 2

[State 4519, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 322
value = 4525

[State 4519]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

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

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

[State 4519, ChangeState]
type = ChangeState
trigger1 = time = 720
value = 4543

[StateDef 4520]
type = S
movetype = I
physics = S
velset = 0,0
ctrl = 0
anim = 4505
sprpriority = 2

[State 4520, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,2

[State 4520, VelSet]
type = VelSet
trigger1 = time
x = 6.1

[State 4520]
type = ChangeState
trigger1 = FrontEdgeBodyDist < 130
value = 4521

[StateDef 4521]
type = S
movetype = I
physics = S
velset = 0,0
ctrl = 0
anim = 4506
sprpriority = 2

[State 4521, ChangeAnim]
type = ChangeAnim
trigger1 = Animtime = 0
value = 4507

[State 4521]
type = ChangeState
trigger1 = Anim = 4507 && time = 308
value = 4522

[StateDef 4522]
type = S
movetype = A
physics = S
velset = 0,0
anim = 4508
ctrl = 0
sprpriority = 0

[State 4522]
type = turn
trigger1 = p2dist x < 0
trigger1 = time = 0

[State 4522]
type = nothitby
trigger1 = 1
value = sca
time = 1

[State 4522, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S0,11

[State 4522, Pause]
type = Pause
trigger1 = AnimElem = 2
time = 92
movetime = 92

[State 4522, Helper]
Type = Helper
Trigger1 = AnimElem = 2
StateNo = 4546
ID = 4522
Name = "EX_Effect"
Pos = 0,-85
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 5
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 4522, Helper]
Type = Helper
Trigger1 = AnimElem = 2
StateNo = 4547
ID = 4547
Name = "Fade to Black"
Pos = 0,0
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 5
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 4522, AllPallFx]
type = AllPalFX
trigger1 = AnimElem = 2
time = 30
add = 256,256,256
sinadd = -256,-256,-256,200
invertall = 0
color = 256

[State 4522, Explod]
type = Explod
trigger1 = AnimElem = 2
anim = 4531
postype = left
pos = 160,120
sprpriority = 10
ownpal = 1
ID = 4531
IgnoreHitPause = 1
bindtime = -1
removetime = 68
supermovetime = 9999999999
pausemovetime = 9999999999
scale = 1,1
facing = 1
trans = addalpha
alpha = 256,256

[State 4522, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4531) != 0
trigger1 = time%8 = 0
trigger1 = time < 60
ID = 4531
trans = addalpha
alpha = 256,256

[State 4522, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4531) != 0
trigger1 = time%8 = 2
trigger1 = time < 60
ID = 4531
trans = addalpha
alpha = 192,256

[State 4522, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4531) != 0
trigger1 = time%8 = 4
trigger1 = time < 60
ID = 4531
trans = addalpha
alpha = 128,256

[State 4522, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4531) != 0
trigger1 = time%8 = 6
trigger1 = time < 60
ID = 4531
trans = addalpha
alpha = 64,256

[State 4522, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4531) != 0
trigger1 = time >= 60
ID = 4531
trans = addalpha
alpha = 256-(time-60)*32,256

[State 4522, Explod]
type = Explod
trigger1 = AnimElem = 2
anim = 4529
postype = left
pos = 160,40
facing = 1
vfacing = 1
sprpriority = 10
ownpal = 1
ID = 4529
IgnoreHitPause = 1
bindtime = -1
removetime = 120
supermovetime = 9999
pausemovetime = 9999
scale = .5,.5
facing = 1
trans = addalpha
alpha = 256,256

[State 4522, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4529) != 0
trigger1 = time <= 32
ID = 4529
postype = left
pos = 160-time,40+time*5
trans = addalpha
alpha = 256,256

[State 4522, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4529) != 0
trigger1 = time > 32
ID = 4529
postype = left
pos = 160-time,200+floor(time*.2)
trans = addalpha
alpha = 256-(time-60)*8,256

[State 4522, Explod]
type = Explod
trigger1 = AnimElem = 2
anim = 4529
postype = left
pos = 160,200
facing = 1
vfacing = -1
sprpriority = 10
ownpal = 1
ID = 4530
IgnoreHitPause = 1
bindtime = -1
removetime = 120
supermovetime = 9999
pausemovetime = 9999
scale = .5,.5
facing = 1
trans = addalpha
alpha = 256,256

[State 4522, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4530) != 0
trigger1 = time <= 32
ID = 4530
postype = left
pos = 160+time,200-time*5
trans = addalpha
alpha = 256,256

[State 4522, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4530) != 0
trigger1 = time > 32
ID = 4530
postype = left
pos = 160+time,40-floor(time*.2)
trans = addalpha
alpha = 256-(time-60)*8,256

[State 4522, Explod]
type = Explod
trigger1 = AnimElem = 2
anim = 4530
postype = left
pos = 200,120
facing = 1
vfacing = 1
sprpriority = 10
ownpal = 1
ID = 4532
IgnoreHitPause = 1
bindtime = -1
removetime = 120
supermovetime = 9999
pausemovetime = 9999
scale = .5,.5
facing = 1
trans = addalpha
alpha = 256,256

[State 4522, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4532) != 0
trigger1 = time <= 32
ID = 4532
postype = left
pos = 200-time*5,120-time
trans = addalpha
alpha = 256,256

[State 4522, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4532) != 0
trigger1 = time > 32
ID = 4532
postype = left
pos = 40-floor(time*.2),120-time
trans = addalpha
alpha = 256-(time-60)*8,256

[State 4522, Explod]
type = Explod
trigger1 = AnimElem = 2
anim = 4530
postype = left
pos = 120,120
facing = -1
vfacing = 1
sprpriority = 10
ownpal = 1
ID = 4533
IgnoreHitPause = 1
bindtime = -1
removetime = 120
supermovetime = 9999
pausemovetime = 9999
scale = .5,.5
facing = 1
trans = addalpha
alpha = 256,256

[State 4522, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4533) != 0
trigger1 = time <= 32
ID = 4533
postype = left
pos = 120+time*5,120+time
trans = addalpha
alpha = 256,256

[State 4522, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4533) != 0
trigger1 = time > 32
ID = 4533
postype = left
pos = 280+floor(time*.2),120+time
trans = addalpha
alpha = 256-(time-60)*8,256

[State 4522, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S3600,1
channel = 6

[State 4522]
type = Helper
trigger1 = animelemtime(2) = 92
helpertype = normal
name = "Spell_Circle"
ID = 4523
pos = 0, 0
postype = p1
facing = 1
stateno = 4523
keyctrl = 0
ownpal = 1
size.xscale = 1
size.yscale = .15
persistent = 0
supermovetime = 99999
pausemovetime = 99999

[State 4522]
type = PlaySnd
trigger1 = AnimElemTime(2) >= 91
trigger1 = time%10 = 0
value = S100,26

[State 4522]
type = PlaySnd
trigger1 = AnimElemTime(2) = 91
value = S100,27

[State 4522]
type = PlaySnd
trigger1 = AnimElemTime(2) = 91
value = S100,28

[State 4522]
type = Helper
trigger1 = AnimElemTime(2) = 91
helpertype = normal
name = "Silent_Selene"
ID = 4527
Stateno = 4527
pos = 0, 0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = 1
size.yscale = 1
persistent = 0
supermovetime = 99999

[State 4522]
type = Helper
trigger1 = AnimElemTime(2) = 92
helpertype = normal
name = "Silent_Selene"
ID = 4528
Stateno = 4528
pos = 0, 0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = 1
size.yscale = 1
persistent = 0
supermovetime = 99999

[State 4522]
type = Helper
trigger1 = AnimElemTime(2) = 92
helpertype = normal
name = "Silent_Selene"
ID = 4529
Stateno = 4529
pos = 0, 0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = 1
size.yscale = 1
persistent = 0
supermovetime = 99999

[State 4522]
type = Helper
trigger1 = AnimElemTime(2) = 92
helpertype = normal
name = "Silent_Selene"
ID = 4530
Stateno = 4530
pos = 0, 0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = 1
size.yscale = 1
persistent = 0
supermovetime = 99999

[State 4522]
type = Helper
trigger1 = AnimElemTime(2) = 92
helpertype = normal
name = "Silent_Selene"
ID = 4531
Stateno = 4531
pos = 0, 0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = 1
size.yscale = 1
persistent = 0
supermovetime = 99999

[State 4522]
type = Helper
trigger1 = AnimElemTime(2) = 92
helpertype = normal
name = "Silent_Selene"
ID = 4532
Stateno = 4532
pos = 0, 0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = 1
size.yscale = 1
persistent = 0
supermovetime = 99999

[State 4522]
type = Helper
trigger1 = AnimElemTime(2) = 92
helpertype = normal
name = "Silent_Selene"
ID = 4533
Stateno = 4533
pos = 0, 0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = 1
size.yscale = 1
persistent = 0
supermovetime = 99999

[State 4522]
type = Helper
trigger1 = AnimElemTime(2) = 92
helpertype = normal
name = "Silent_Selene"
ID = 4534
Stateno = 4534
pos = 0, 0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = 1
size.yscale = 1
persistent = 0
supermovetime = 99999

[State 4522]
type = changestate
trigger1 = time >= 389
value = 4535

[State 4522, HitAdd]
type = HitAdd
trigger1 = Time >= 96
trigger1 = Time < 401
trigger1 = Time%5 = 0
value = 1

[State 4522, PlaySnd]
type = PlaySnd
trigger1 = Time >= 96
trigger1 = Time < 401
trigger1 = Time%5 = 0
value = S200,15

[Statedef 15020]
type=A
movetype=H
physics=N
velset=0,0

[state camera]
type=screenbound
value=1
trigger1=1
ignorehitpause=1

[State 5020, 1] 
type=ChangeAnim
trigger1=Time=0
trigger1=GetHitVar(animtype) !=[3,5]
value=ifelse((GetHitVar(airtype)=1),5000,5010) + GetHitVar(animtype)

[State 5020, 2] 
type=ChangeAnim
trigger1=Time=0
trigger1=GetHitVar(animtype)=[3,5]
value=5030

[State 5020, 3] 
type=ChangeAnim
trigger1=Time=0
trigger1=(GetHitVar(animtype)=[4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value=5047 + GetHitVar(animtype)

[State 5020, 4] 
type=ChangeAnim
trigger1=Time > 0
value=anim

[State 5020, 5]
type=SelfState
trigger1=HitShakeOver
value=5030

[State 5020, FFB Light]
type=ForceFeedback
trigger1=anim=5000
trigger2=anim=5010
persistent=0
time=6
waveform=square

[State 5020, FFB Medium]
type=ForceFeedback
trigger1=anim=5001
trigger2=anim=5011
persistent=0
time=8
waveform=sinesquare
ampl=110,-1,-.3

[State 5020, FFB Hard]
type=ForceFeedback
trigger1=anim=5012
trigger2=anim=5002
trigger3=anim=5030
trigger4=anim=[5051,5059]
persistent=0
time=15
waveform=sinesquare
ampl=140

[StateDef 4523]
type = S
movetype = I
physics = N
anim = 99999
ctrl = 0
sprpriority = -1

[State 4523]
type = nothitby
trigger1 = 1
value = sca
time = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4523]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

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

[State 4523]
type = ChangeAnim
trigger1 = time = 0
value = 4512

[State 4523]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "Spell_Circle"
stateno = 4524
ID = 4524
pos = 0, 0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = 1
size.yscale = .3
persistent = 0
supermovetime = 99999
pausemovetime = 99999

[State 4523]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "Spell_Circle"
stateno = 4525
ID = 4525
pos = 0, 0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = 1
size.yscale = .3
persistent = 0
supermovetime = 99999
pausemovetime = 99999

[State 4523]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "Spell_Circle"
stateno = 4526
ID = 4526
pos = 0, 0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = 1
size.yscale = .3
persistent = 0
supermovetime = 99999
pausemovetime = 99999

[State 4523]
type = varset
trigger1 = time = 0
var(0) = 256
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4523]
type = varadd
triggerall = Parent,stateno = 4535
trigger1 = var(0) > 0
var(0) = -16

[State 4523]
type = varset
trigger1 = var(0) <= 0
var(0) = 0
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4523]
type = trans
trigger1 = 1
trans = addalpha
alpha = var(0),256
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4523]
type = varset
trigger1 = time = 0
fvar(0) = 0
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4523]
type = varadd
triggerall = root,stateno = 4535
trigger1 = fvar(0) < 1
fvar(0) = .02

[State 4523]
type = varset
trigger1 = fvar(0) >= 1
fvar(0) = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4523]
type = destroyself
trigger1 = var(0) <= 0
trigger2 = fvar(0) >= 1

[StateDef 4524]
type = S
movetype = I
physics = N
anim = 4512
ctrl = 0
velset = 0,-6
sprpriority = -1

[State 4524]
type = nothitby
trigger1 = 1
value = sca
time = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4524]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4524]
type = varset
trigger1 = time = 0
var(0) = 256
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4524]
type = varadd
trigger1 = var(0) > 0
var(0) = -8

[State 4524]
type = varset
trigger1 = var(0) <= 0
var(0) = 0
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4524]
type = trans
trigger1 = 1
trans = addalpha
alpha = var(0),256
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4524]
type = destroyself
trigger1 = var(0) <= 0

[StateDef 4525]
type = S
movetype = I
physics = N
anim = 4512
ctrl = 0
velset = 5,-6
sprpriority = -1

[State 4525]
type = nothitby
trigger1 = 1
value = sca
time = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4525]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4525]
type = varset
trigger1 = time = 0
var(0) = 256
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4525]
type = varadd
trigger1 = var(0) > 0
var(0) = -8

[State 4525]
type = varset
trigger1 = var(0) <= 0
var(0) = 0
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4525]
type = trans
trigger1 = 1
trans = addalpha
alpha = var(0),256
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4525]
type = destroyself
trigger1 = var(0) <= 0

[StateDef 4526]
type = S
movetype = A
physics = N
anim = 4512
ctrl = 0
velset = -8,-6
sprpriority = -1

[State 4526]
type = nothitby
trigger1 = 1
value = SCA
time = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4526]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4526]
type = varset
trigger1 = time = 0
var(0) = 256
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4526]
type = varadd
trigger1 = var(0) > 0
var(0) = 8

[State 4526]
type = trans
trigger1 = 1
trans = addalpha
alpha = var(0),256
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4526]
type = destroyself
trigger1 = var(0) <= 0
trigger2=root,stateno!=[4500,4599]

[StateDef 4527]
type = S
movetype = A
physics = N
anim = 4513
ctrl = 0

[State 4527]
type = nothitby
trigger1 = 1
value = sca
time = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4527]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4527]
type = trans
trigger1 = 1
trans = add

[State 4527]
type = varset
trigger1 = time = 0
var(0) = 90
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4527]
type = BindToParent
trigger1 = 1
time = 1
pos = cos(var(0)*pi/180)*40, sin(var(0)*pi/180)*5

[State 4527]
type = varadd
trigger1 = 1
var(0) = 2

[State 4527]
type = varadd
trigger1 = var(0) >= 360
var(0) = -360

[State 4527]
type = SprPriority
trigger1 = var(0) <= 180
value = 1

[State 4527]
type = SprPriority
trigger1 = var(0) > 180
value = -1

[State 4527]
type = varset
trigger1 = time = 0
fvar(0) = .3
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4527]
type = varadd
trigger1 = Parent,stateno = 4535
fvar(0) = -.02

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

[State 4527]
type = HitDef
trigger1 = time%9 = 0
attr = S, HP
hitflag = MAFD
guardflag = MA
animtype = Back
air.animtype = Back
priority = 4,Hit
damage = 2,1
pausetime = 0, 25
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%20,-25+random%20
hitsound = S100,15
guardsound = S300, 0
ground.type = low
air.type = low
ground.slidetime = 20
guard.slidetime = 20
ground.hittime = 40
air.hittime = 40
guard.ctrltime = 10
yaccel = .5
ground.velocity = 0, -7
guard.velocity = -4
air.velocity = 0, -7
airguard.velocity = -2, -4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.ctrltime = 10
sprpriority = ifelse(var(0) <= 180 ,1 ,-1)
fall = 1
fall.yvelocity = -2.5
fall.recover = 0
air.fall = 1
down.velocity = 0,-10
down.hittime = 40
p2stateno=15020
getpower=0,0

[State 4527]
type = parentvaradd
trigger1  = movehit = 1
var(5) = 2

[State 4527]
type = MoveHitReset
trigger1 = movehit > 1

[State 4527]
type = destroyself
trigger1 = fvar(0) <= 0

[StateDef 4528]
type = S
movetype = A
physics = N
anim = 4513
ctrl = 0

[State 4528]
type = nothitby
trigger1 = 1
value = sca
time = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4528]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4528]
type = trans
trigger1 = 1
trans = add

[State 4528]
type = varset
trigger1 = time = 0
var(0) = 90
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4528]
type = BindToParent
trigger1 = 1
time = 1
pos = cos(var(0)*pi/180)*75, sin(var(0)*pi/180)*10

[State 4528]
type = varadd
trigger1 = 1
var(0) = 2

[State 4528]
type = varadd
trigger1 = var(0) >= 360
var(0) = -360

[State 4528]
type = SprPriority
trigger1 = var(0) <= 180
value = 1

[State 4528]
type = SprPriority
trigger1 = var(0) > 180
value = -1

[State 4528]
type = varset
trigger1 = time = 0
fvar(0) = .3
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4528]
type = varadd
trigger1 = Parent,stateno = 4535
fvar(0) = -.02

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

[State 4528, HitDef]
type = HitDef
trigger1 = time%10 = 0
attr = S, HP
hitflag = MAFD
guardflag = MA
animtype = Back
air.animtype = Back
priority = 4,Hit
damage = 2,1
pausetime = 0, 25
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%20,-25+random%20
hitsound = S100,15
guardsound = S300, 0
ground.type = low
air.type = low
ground.slidetime = 20
guard.slidetime = 20
ground.hittime = 40
air.hittime = 40
guard.ctrltime = 10
yaccel = .5
ground.velocity = 0, -7
guard.velocity = -4
air.velocity = 0, -7
airguard.velocity = -2, -4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.ctrltime = 10
sprpriority = ifelse(var(0) <= 180 ,1 ,-1)
fall = 1
fall.yvelocity = -2.5
fall.recover = 0
air.fall = 1
down.velocity = 0,-10
down.hittime = 40
p2stateno=15020
getpower=0,0

[State 4528]
type = parentvaradd
trigger1  = movehit = 1
var(5) = 2

[State 4528]
type = MoveHitReset
trigger1 = movehit > 1

[State 4528]
type = destroyself
trigger1 = fvar(0) <= 0

[StateDef 4529]
type = S
movetype = A
physics = N
anim = 4513
ctrl = 0

[State 4529]
type = nothitby
trigger1 = 1
value = sca
time = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4529]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4529]
type = trans
trigger1 = 1
trans = add

[State 4529]
type = varset
trigger1 = time = 0
var(0) = 90
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4529]
type = BindToParent
trigger1 = 1
time = 1
pos = cos(var(0)*pi/180)*75, sin(var(0)*pi/180)*10

[State 4529]
type = varadd
trigger1 = 1
var(0) = 4

[State 4529]
type = varadd
trigger1 = var(0) >= 360
var(0) = -360

[State 4529]
type = SprPriority
trigger1 = var(0) <= 180
value = 1

[State 4529]
type = SprPriority
trigger1 = var(0) > 180
value = -1

[State 4529]
type = varset
trigger1 = time = 0
fvar(0) = .3
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4529]
type = varadd
trigger1 = Parent,stateno = 4535
fvar(0) = -.02

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

[State 4529, HitDef]
type = HitDef
trigger1 = time%9 = 0
attr = S, HP
hitflag = MAFD
guardflag = MA
animtype = Back
air.animtype = Back
priority = 4,Hit
damage = 2,1
pausetime = 0, 25
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%20,-25+random%20
hitsound = S100,15
guardsound = S300, 0
ground.type = low
air.type = low
ground.slidetime = 20
guard.slidetime = 20
ground.hittime = 40
air.hittime = 40
guard.ctrltime = 10
yaccel = .5
ground.velocity = 0, -7
guard.velocity = -4
air.velocity = 0, -7
airguard.velocity = -2, -4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.ctrltime = 10
sprpriority = ifelse(var(0) <= 180 ,1 ,-1)
fall = 1
fall.yvelocity = -2.5
fall.recover = 0
air.fall = 1
down.velocity = 0,-10
down.hittime = 40
p2stateno=15020
getpower=0,0

[State 4529]
type = parentvaradd
trigger1  = movehit = 1
var(5) = 2

[State 4529]
type = MoveHitReset
trigger1 = movehit > 1

[State 4529]
type = destroyself
trigger1 = fvar(0) <= 0

[StateDef 4530]
type = S
movetype = A
physics = N
anim = 4513
ctrl = 0

[State 4530]
type = nothitby
trigger1 = 1
value = sca
time = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4530]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4530]
type = trans
trigger1 = 1
trans = add

[State 4530]
type = varset
trigger1 = time = 0
var(0) = 90
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4530]
type = BindToParent
trigger1 = 1
time = 1
pos = cos(var(0)*pi/180)*105, sin(var(0)*pi/180)*15

[State 4530]
type = varadd
trigger1 = 1
var(0) = 5

[State 4530]
type = varadd
trigger1 = var(0) >= 360
var(0) = -360

[State 4530]
type = SprPriority
trigger1 = var(0) <= 180
value = 1

[State 4530]
type = SprPriority
trigger1 = var(0) > 180
value = -1

[State 4530]
type = varset
trigger1 = time = 0
fvar(0) = .3
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4530]
type = varadd
trigger1 = Parent,stateno = 4535
fvar(0) = -.02

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

[State 4530, HitDef]
type = HitDef
trigger1 = time%9 = 0
attr = S, HP
hitflag = MAFD
guardflag = MA
animtype = Back
air.animtype = Back
priority = 4,Hit
damage = 2,1
pausetime = 0, 25
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%20,-25+random%20
hitsound = S100,15
guardsound = S300, 0
ground.type = low
air.type = low
ground.slidetime = 20
guard.slidetime = 20
ground.hittime = 40
air.hittime = 40
guard.ctrltime = 10
yaccel = .5
ground.velocity = 0, -7
guard.velocity = -4
air.velocity = 0, -7
airguard.velocity = -2, -4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.ctrltime = 10
sprpriority = ifelse(var(0) <= 180 ,1 ,-1)
fall = 1
fall.yvelocity = -2.5
fall.recover = 0
air.fall = 1
down.velocity = 0,-10
down.hittime = 40
p2stateno=15020
getpower=0,0

[State 4530]
type = parentvaradd
trigger1  = movehit = 1
var(5) = 2

[State 4530]
type = MoveHitReset
trigger1 = movehit > 1

[State 4530]
type = destroyself
trigger1 = fvar(0) <= 0

[StateDef 4531]
type = S
movetype = A
physics = N
anim = 4513
ctrl = 0

[State 4531]
type = nothitby
trigger1 = 1
value = sca
time = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4531]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4531]
type = trans
trigger1 = 1
trans = add

[State 4531]
type = varset
trigger1 = time = 0
var(0) = 280
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4531]
type = BindToParent
trigger1 = 1
time = 1
pos = cos(var(0)*pi/180)*40, sin(var(0)*pi/180)*5

[State 4531]
type = varadd
trigger1 = 1
var(0) = 2

[State 4531]
type = varadd
trigger1 = var(0) >= 360
var(0) = -360

[State 4531]
type = SprPriority
trigger1 = var(0) <= 180
value = 1

[State 4531]
type = SprPriority
trigger1 = var(0) > 180
value = -1

[State 4531]
type = varset
trigger1 = time = 0
fvar(0) = .3
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4531]
type = varadd
trigger1 = Parent,stateno = 4535
fvar(0) = -.02

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

[State 4531, HitDef]
type = HitDef
trigger1 = time%9 = 0
attr = S, HP
hitflag = MAFd
guardflag = MA
animtype = Back
air.animtype = Back
priority = 4,Hit
damage = 2,1
pausetime = 0, 25
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%20,-25+random%20
hitsound = S100,15
guardsound = S300, 0
ground.type = low
air.type = low
ground.slidetime = 20
guard.slidetime = 20
ground.hittime = 40
air.hittime = 40
guard.ctrltime = 10
yaccel = .5
ground.velocity = 0, -7
guard.velocity = -4
air.velocity = 0, -7
airguard.velocity = -2, -4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.ctrltime = 10
sprpriority = ifelse(var(0) <= 180 ,1 ,-1)
fall = 1
fall.yvelocity = -2.5
fall.recover = 0
air.fall = 1
down.velocity = 0,-10
down.hittime = 40
p2stateno=15020
getpower=0,0

[State 4531]
type = parentvaradd
trigger1  = movehit = 1
var(5) = 2

[State 4531]
type = MoveHitReset
trigger1 = movehit > 1

[State 4531]
type = destroyself
trigger1 = fvar(0) <= 0

[StateDef 4532]
type = S
movetype = A
physics = N
anim = 4513
ctrl = 0

[State 4532]
type = nothitby
trigger1 = 1
value = sca
time = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4532]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4532]
type = trans
trigger1 = 1
trans = add

[State 4532]
type = varset
trigger1 = time = 0
var(0) = 270
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4532]
type = BindToParent
trigger1 = 1
time = 1
pos = cos(var(0)*pi/180)*75, sin(var(0)*pi/180)*10

[State 4532]
type = varadd
trigger1 = 1
var(0) = 2

[State 4532]
type = varadd
trigger1 = var(0) >= 360
var(0) = -360

[State 4532]
type = SprPriority
trigger1 = var(0) <= 180
value = 1

[State 4532]
type = SprPriority
trigger1 = var(0) > 180
value = -1

[State 4532]
type = varset
trigger1 = time = 0
fvar(0) = .3
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4532]
type = varadd
trigger1 = Parent,stateno = 4535
fvar(0) = -.02

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

[State 4532], HitDef
type = HitDef
trigger1 = time%9 = 0
attr = S, HP
hitflag = MAFd
guardflag = MA
animtype = Back
air.animtype = Back
priority = 4,Hit
damage = 2,1
pausetime = 0, 25
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%20,-25+random%20
hitsound = S100,15
guardsound = S300, 0
ground.type = low
air.type = low
ground.slidetime = 20
guard.slidetime = 20
ground.hittime = 40
air.hittime = 40
guard.ctrltime = 10
yaccel = .5
ground.velocity = 0, -7
guard.velocity = -4
air.velocity = 0, -7
airguard.velocity = -2, -4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.ctrltime = 10
sprpriority = ifelse(var(0) <= 180 ,1 ,-1)
fall = 1
fall.yvelocity = -2.5
fall.recover = 0
air.fall = 1
down.velocity = 0,-10
down.hittime = 40
p2stateno=15020
getpower=0,0

[State 4532]
type = parentvaradd
trigger1  = movehit = 1
var(5) = 2

[State 4532]
type = MoveHitReset
trigger1 = movehit > 1

[State 4532]
type = destroyself
trigger1 = fvar(0) <= 0

[StateDef 4533]
type = S
movetype = A
physics = N
anim = 4513
ctrl = 0

[State 4533]
type = nothitby
trigger1 = 1
value = sca
time = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4533]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4533]
type = trans
trigger1 = 1
trans = add

[State 4533]
type = varset
trigger1 = time = 0
var(0) = 270
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4533]
type = BindToParent
trigger1 = 1
time = 1
pos = cos(var(0)*pi/180)*75, sin(var(0)*pi/180)*10

[State 4533]
type = varadd
trigger1 = 1
var(0) = 4

[State 4533]
type = varadd
trigger1 = var(0) >= 360
var(0) = -360

[State 4533]
type = SprPriority
trigger1 = var(0) <= 180
value = 1

[State 4533]
type = SprPriority
trigger1 = var(0) > 180
value = -1

[State 4533]
type = varset
trigger1 = time = 0
fvar(0) = .3
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4533]
type = varadd
trigger1 = Parent,stateno = 4535
fvar(0) = -.02

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

[State 4533, HitDef]
type = HitDef
trigger1 = time%9 = 0
attr = S, HP
hitflag = MAFD
guardflag = MA
animtype = Back
air.animtype = Back
priority = 4,Hit
damage = 2,1
pausetime = 0, 25
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%20,-25+random%20
hitsound = S100,15
guardsound = S300, 0
ground.type = low
air.type = low
ground.slidetime = 20
guard.slidetime = 20
ground.hittime = 40
air.hittime = 40
guard.ctrltime = 10
yaccel = .5
ground.velocity = 0, -7
guard.velocity = -4
air.velocity = 0, -7
airguard.velocity = -2, -4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.ctrltime = 10
sprpriority = ifelse(var(0) <= 180 ,1 ,-1)
fall = 1
fall.yvelocity = -2.5
fall.recover = 0
air.fall = 1
down.velocity = 0,-10
down.hittime = 40
p2stateno=15020
getpower=0,0

[State 4533]
type = parentvaradd
trigger1  = movehit = 1
var(5) = 2

[State 4533]
type = MoveHitReset
trigger1 = movehit > 1

[State 4533]
type = destroyself
trigger1 = fvar(0) <= 0

[StateDef 4534]
type = S
movetype = A
physics = N
anim = 4513
ctrl = 0

[State 4534]
type = nothitby
trigger1 = 1
value = sca
time = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4534]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4534]
type = trans
trigger1 = 1
trans = add

[State 4534]
type = varset
trigger1 = time = 0
var(0) = 270
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4534]
type = BindToParent
trigger1 = 1
time = 1
pos = cos(var(0)*pi/180)*105, sin(var(0)*pi/180)*15

[State 4534]
type = varadd
trigger1 = 1
var(0) = 5

[State 4534]
type = varadd
trigger1 = var(0) >= 360
var(0) = -360

[State 4534]
type = SprPriority
trigger1 = var(0) <= 180
value = 1

[State 4534]
type = SprPriority
trigger1 = var(0) > 180
value = -1

[State 4534]
type = varset
trigger1 = time = 0
fvar(0) = .3
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4534]
type = varadd
trigger1 = Parent,stateno = 4535
fvar(0) = -.02

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

[State 4534]
type = HitDef
trigger1 = time%9 = 0
attr = S, HP
hitflag = MAFD
guardflag = MA
animtype = Back
air.animtype = Back
priority = 4,Hit
damage = 2,1
pausetime = 0, 25
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%20,-25+random%20
hitsound = S100,15
guardsound = S300, 0
ground.type = low
air.type = low
ground.slidetime = 20
guard.slidetime = 20
ground.hittime = 40
air.hittime = 40
guard.ctrltime = 10
yaccel = .5
ground.velocity = 0, -7
guard.velocity = -4
air.velocity = 0, -7
airguard.velocity = -2, -4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.ctrltime = 10
sprpriority = ifelse(var(0) <= 180 ,1 ,-1)
fall = 1
fall.yvelocity = -2.5
fall.recover = 0
air.fall = 1
down.velocity = 0,-10
down.hittime = 40
p2stateno=15020
getpower=0,0

[State 4534]
type = parentvaradd
trigger1  = movehit = 1
var(5) = 2

[State 4534]
type = MoveHitReset
trigger1 = movehit > 1

[State 4534]
type = destroyself
trigger1 = fvar(0) <= 0

[StateDef 4535]
type = S
movetype = A
physics = S
anim = 4509
ctrl = 0

[State 4535]
type = changestate
trigger1 = animtime = 0
value = 4536

[StateDef 4536]
type = S
movetype = A
physics = S
anim = 4507
ctrl = 0

[State 4536]
type = changestate
trigger1 = Root,Anim = 4522
value = 4537

[StateDef 4537]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 4511
sprpriority = 2

[State 4537]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
trigger1 = Anim = 4511
trigger1 = Time = 5
Value = 4544

[State 4537, end]
type = ChangeState
trigger1 = Time = 60
value = 4542

[StateDef 4538]
Type = S
Movetype= A
Physics = S
Anim = 4521
Velset = 0, 0
Ctrl = 0

[State 4538, Pause]
type = Pause
trigger1 = AnimElemTime(3) = 1
time = 92
movetime = 92

[State 4538, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S0,11

[state camera]
type=screenbound
value=1
trigger1=1
ignorehitpause=1

[State 4538, Helper]
Type = Helper
Trigger1 = AnimElem = 3
StateNo = 4546
ID = 4538
Name = "EX_Effect"
Pos = 0,-85
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 5
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 4538, Helper]
Type = Helper
Trigger1 = AnimElem = 3
StateNo = 4547
ID = 4547
Name = "Fade to Black"
Pos = 0,0
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 5
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 4538, AllPallFx]
type = AllPalFX
trigger1 = AnimElem = 3
time = 30
add = 256,256,256
sinadd = -256,-256,-256,200
invertall = 0
color = 256

[State 4538, Explod]
type = Explod
trigger1 = AnimElem = 3
anim = 4531
postype = left
pos = 160,120
sprpriority = 10
ownpal = 1
ID = 4531
IgnoreHitPause = 1
bindtime = -1
removetime = 68
supermovetime = 9999999999
pausemovetime = 9999999999
scale = 1,1
facing = 1
trans = addalpha
alpha = 256,256

[State 4538, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4531) != 0
trigger1 = time%8 = 0
trigger1 = time < 60
ID = 4531
trans = addalpha
alpha = 256,256

[State 4538, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4531) != 0
trigger1 = time%8 = 2
trigger1 = time < 60
ID = 4531
trans = addalpha
alpha = 192,256

[State 4538, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4531) != 0
trigger1 = time%8 = 4
trigger1 = time < 60
ID = 4531
trans = addalpha
alpha = 128,256

[State 4538, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4531) != 0
trigger1 = time%8 = 6
trigger1 = time < 60
ID = 4531
trans = addalpha
alpha = 64,256

[State 4538, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4531) != 0
trigger1 = time >= 60
ID = 4531
trans = addalpha
alpha = 256-(time-60)*32,256

[State 4538, Explod]
type = Explod
trigger1 = AnimElem = 2
anim = 4529
postype = left
pos = 160,40
facing = 1
vfacing = 1
sprpriority = 10
ownpal = 1
ID = 4529
IgnoreHitPause = 1
bindtime = -1
removetime = 120
supermovetime = 9999
pausemovetime = 9999
scale = .5,.5
facing = 1
trans = addalpha
alpha = 256,256

[State 4538, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4529) != 0
trigger1 = time <= 32
ID = 4529
postype = left
pos = 160-time,40+time*5
trans = addalpha
alpha = 256,256

[State 4538, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4529) != 0
trigger1 = time > 32
ID = 4529
postype = left
pos = 160-time,200+floor(time*.2)
trans = addalpha
alpha = 256-(time-60)*8,256

[State 4538, Explod]
type = Explod
trigger1 = AnimElem = 2
anim = 4529
postype = left
pos = 160,200
facing = 1
vfacing = -1
sprpriority = 10
ownpal = 1
ID = 4530
IgnoreHitPause = 1
bindtime = -1
removetime = 120
supermovetime = 9999
pausemovetime = 9999
scale = .5,.5
facing = 1
trans = addalpha
alpha = 256,256

[State 4538, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4530) != 0
trigger1 = time <= 32
ID = 4530
postype = left
pos = 160+time,200-time*5
trans = addalpha
alpha = 256,256

[State 4538, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4530) != 0
trigger1 = time > 32
ID = 4530
postype = left
pos = 160+time,40-floor(time*.2)
trans = addalpha
alpha = 256-(time-60)*8,256

[State 4538, Explod]
type = Explod
trigger1 = AnimElem = 2
anim = 4530
postype = left
pos = 200,120
facing = 1
vfacing = 1
sprpriority = 10
ownpal = 1
ID = 4532
IgnoreHitPause = 1
bindtime = -1
removetime = 120
supermovetime = 9999
pausemovetime = 9999
scale = .5,.5
facing = 1
trans = addalpha
alpha = 256,256

[State 4538, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4532) != 0
trigger1 = time <= 32
ID = 4532
postype = left
pos = 200-time*5,120-time
trans = addalpha
alpha = 256,256

[State 4538, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4532) != 0
trigger1 = time > 32
ID = 4532
postype = left
pos = 40-floor(time*.2),120-time
trans = addalpha
alpha = 256-(time-60)*8,256

[State 4538, Explod]
type = Explod
trigger1 = AnimElem = 2
anim = 4530
postype = left
pos = 120,120
facing = -1
vfacing = 1
sprpriority = 10
ownpal = 1
ID = 4533
IgnoreHitPause = 1
bindtime = -1
removetime = 120
supermovetime = 9999
pausemovetime = 9999
scale = .5,.5
facing = 1
trans = addalpha
alpha = 256,256

[State 4538, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4533) != 0
trigger1 = time <= 32
ID = 4533
postype = left
pos = 120+time*5,120+time
trans = addalpha
alpha = 256,256

[State 4538, ModifyExplod]
type = modifyExplod
trigger1 = numexplod(4533) != 0
trigger1 = time > 32
ID = 4533
postype = left
pos = 280+floor(time*.2),120+time
trans = addalpha
alpha = 256-(time-60)*8,256

[State 4538, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S410,7
channel = 0

[State 4538]
type = Explod
trigger1 = AnimElem = 8
anim = 2002
ID = 2002
pos = -38,-64
postype = p1
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
sprpriority = 2
facing = 1
pausemovetime = 0
supermovetime = 0
scale = 1, 1
ignorehitpause = 1
removeongethit = 1

[State 4538]
type = Explod
trigger1 = AnimElem = 8
anim = 2003
ID = 2003
pos = 14,-78
postype = p1
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
sprpriority = 5
facing = 1
pausemovetime = 0
supermovetime = 0
scale = 3, 3
ignorehitpause = 1
removeongethit = 1

[State 4538]
type = Helper
Trigger1 = AnimElem = 8
name = "Final_Spark"
ID = 4539
postype = p1
pos = 24,-77
Stateno = 4539
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 4538, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 8
value = S100,8

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

[State 4538]
type = ChangeState
trigger1 = time >= 247
value = 4541

[StateDef 4539]
Type = A
Movetype= A
Physics = N
Anim = 4523
Ctrl = 0
Sprpriority = 5

[State 4539]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 4539]
type = AngleDraw
trigger1 = 1
scale = 2, 2
value = 30
ignorehitpause = 1

[State 4539]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 4539]
type = BindtoRoot
trigger1 = 1
pos = 24,-77
ignorehitpause = 1

[State 4539, HitDef]
type = HitDef
trigger1 = time%4 = 0
attr = A, HP
hitflag	= MAF
guardflag = MA
damage = ceil(12*(root,fvar(14))), 5
animtype = Hard
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 0, 5
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy	= -30+random%20,-25+random%20
hitsound = S200,15
guardsound = S300, 0
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity	= -9,-6
guard.velocity = -6
air.velocity = -9,-6
airguard.velocity = -6,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
Sprpriority= 5
guard.dist= 360
fall = 1
fall.recover = 0
fall.recovertime = 0
air.fall = 1
yaccel = 0.4
p2stateno=15020
getpower=0,0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 8

[State 4539]
type = Playsnd
trigger1 = time = 0
value = S100,8

[State 4539]
type = ChangeState
triggerall = time > 2
trigger1 = root,Anim != 4521
value = 4540

[StateDef 4540]
Type = A
Movetype = I
Physics = N
Ctrl = 0
Sprpriority = 5

[State 4540]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

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

[State 4540]
type = varset
trigger1 = time = 0
fvar(10) = 1.5
ignorehitpause = 1

[State 4540]
type = varset
trigger1 = time > 0
fvar(10) = 0.85 * fvar(10)
ignorehitpause = 1

[State 4540]
type = AngleDraw
trigger1 = time > 0
scale = 2, fvar(10)
value = 30
ignorehitpause = 1

[State 4540]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 4540]
type = DestroySelf
trigger1 = time >= 34

[StateDef 4541]
Type = S
Movetype= A
Physics = S
Anim = 4522
Velset = 0, 0
Ctrl = 0

[state target4599]
type=targetstate
id=4599
value=4598
trigger1=!time
trigger1=numtarget(4599)
ignorehitpause=1

[State 4541]
type = RemoveExplod
trigger1 = time = 0
ID = 2002

[State 4541]
type = ModifyExplod
trigger1 = time = [0, 16]
ID = 2003
trans = addalpha
alpha = 256-16*time, 256

[State 4541]
type = RemoveExplod
trigger1 = time = 16
ID = 2003

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

[StateDef 4542]
type = S
movetype= I
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 4524
sprpriority = 2

[State 4542, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S0,2

[State 4542, VelAdd]
type = VelAdd
trigger1 = AnimElem = 3
x = 7
y = 0

[State 4542]
type=trans
trans=addalpha
alpha=ifelse(time>=93,32*(100-time),256),ifelse(time<=91,32*(time-85),256)
trigger1=time>=85

[State 4542, DestroySelf]
type=DestroySelf
trigger1=pos x>=360
trigger2=time>=100

[StateDef 4543]
type = A
movetype= H
physics = N

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

[State 4543]
type = NotHitBy
trigger1 = 1
value = , AT

[State 4543]
type = VelSet
trigger1 = Time = 0
y = -10

[State 4543]
type = VelSet
trigger1 = Time = 0
x = 0

[State 4543]
type = VelAdd
trigger1 = 1
y = .41

[State 4543]
type = AngleAdd
trigger1 = 1
value = 25

[State 4543]
type = AngleDraw
trigger1 = 1

[State 4543]
type = ChangeAnim2
trigger1 = Time = 0
value = 6003

[State 4543]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= -10)
value = 5100

[StateDef 4544]
type = S
movetype = I
physics = S
velset = 0,0
anim = 4507
sprpriority = 1
facep2 = 1

[State 4544]
type = nothitby
trigger1 = 1
value = SCA

[State 4544]
type = ScreenBound
trigger1 = 1
value = 1

[State 4544]
type = turn
trigger1 = (P2Dist X < 0)

[State 4544]
type = ChangeState
trigger1 = RoundState = 4
trigger1 = parent, stateno = [181,189]
value = 4545

[StateDef 4545]
type = S
movetype = I
physics = S
velset = 0,0
anim = 4511
sprpriority = 1
facep2 = 1

[State 4545, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,180]
flag = roundnotover

[State 4545]
type = ScreenBound
trigger1 = 1
value = 1

[State 4545]
type = nothitby
trigger1 = 1
value = SCA

[StateDef 4546]
Type = A
Physics = N
Anim = 99999
SprPriority = 4
VelSet = 0,0

[State 4546, NotHitBy]
Type = NotHitBy
Trigger1 = 1
Value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time = 1

[State 4546, Trans]
Type = Trans
Trigger1 = 1
Trans = AddAlpha
Alpha = 255,255

[State 4546, Explod]
Type = Explod
Trigger1 = IsHelper(4513)
Trigger1 = Time = 0
ID = 4513
Anim = 4527
Pos = 160,125
PosType = Back
Ownpal = 1
Scale = 0.5,0.5
SprPriority = -5
RemoveTime = 92
RemoveOnGetHit = 1
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State 4546, Explod]
Type = Explod
Trigger1 = IsHelper(4522)
Trigger1 = Time = 0
ID = 4522
Anim = 4528
Pos = 160,120
PosType = Back
Ownpal = 1
Scale = 0.5,0.5
SprPriority = -5
RemoveTime = 92
RemoveOnGetHit = 1
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State 4546, Explod]
Type = Explod
Trigger1 = IsHelper(4538)
Trigger1 = Time = 0
ID = 4538
Anim = 4526
Pos = 160,120
PosType = Back
Ownpal = 1
Scale = 0.5,0.5
SprPriority = -5
RemoveTime = 92
RemoveOnGetHit = 1
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State 4546, ModifyExplod]
Type = ModifyExplod
Trigger1 = Time = [66,92]
Scale = 0.5+(0.1*(Time-66)),0.5+(0.1*(Time-66))
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State 4546, AssertSpecial]
Type = AssertSpecial
Trigger1 = Time < 66
Flag = Noshadow
IgnoreHitPause = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State 4546, AssertSpecial]
Type = AssertSpecial
Trigger1 = Time >= 67
Flag = Noshadow
Flag2 = Invisible
IgnoreHitPause = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State 4546, DestroySelf]
Type = DestroySelf
Trigger1 = Time = 92

[StateDef 4547]
Type = A
Physics = N
Anim = 99999
SprPriority = 4
VelSet = 0,0

[State 4547, NotHitBy]
Type = NotHitBy
Trigger1 = 1
Value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time = 1

[State 4547, VarSet]
Type = VarSet
Trigger1 = Time = 0
V = 6
Value = 0

[State 4547, VarAdd]
Type = VarAdd
Trigger1 = Time = [0,17]
V = 6
Value = -6

[State 4547, VarAdd]
Type = VarAdd
Triggerall = IsHelper(4547)
trigger1 = Time > 100
V = 6
Value = 6

[State 4547, VarAdd]
Type = BGPalFX
Triggerall = IsHelper(4547)
Trigger1 = Time = [0,17]
Add = 0+Var(6),0+Var(6),0+Var(6)
Time = 1

[State 4547, VarAdd]
Type = BGPalFX
Triggerall = IsHelper(4547)
Trigger1 = Time = [18,99]
Add = -102,-102,-102
Time = 1

[State 4547, BGPalFX]
Type = BGPalFX
Triggerall = IsHelper(4547)
Trigger1 = Time = [100,115]
Add = Ceil(-102+((Time-100)*7)),Ceil(-102+((Time-100)*7)),Ceil(-102+((Time-100)*7))
Time = 1

[State 4547, AssertSpecial]
Type = AssertSpecial
Trigger1 = Time <= 26
Flag = Noshadow
IgnoreHitPause = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State 4547, AssertSpecial]
Type = AssertSpecial
Trigger1 = Time >= 27
Flag = Noshadow
Flag2 = Invisible
IgnoreHitPause = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State 4547, DestroySelf]
Type = DestroySelf
Trigger1 = Time = 120

[Statedef 7000]
type = A
movetype = I
physics = N
ctrl = 0
anim = 99999
velset = 0,0
ownpal = 1
sprpriority = 7

[State 7000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = TimerFreeze
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 7000]
type = DestroySelf
trigger1 = (Parent,Stateno != [4501,4599])
trigger2 = (Parent,Stateno = 4541) &&(Parent,time = 1)
trigger3 = (Parent,Anim = 4522)

[Statedef 7050]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 99999
ownpal = 1

[State 7050]
Type = VarSet
Trigger1 = Time = 0 || Time = 11
var(5) = 0

[State 7050]
Type = VarAdd
Trigger1 = time <= 10
Trigger2 = time >= 70
var(5) = 1

[State 7050]
Type = ModifyExplod
Trigger1 = Time < 10
Scale = .5,0+(Var(5)*.05)

[State 7050]
Type = ModifyExplod
Trigger1 = Time = [10,69]
Scale = .5,.5

[State 7050]
Type = ModifyExplod
Trigger1 = Time >= 70
Scale = .5,.5-(Var(5)*.05)

[State 7050]
type = Explod
trigger1 = Time = 0
anim = 10600
pos = 0,90
postype = back
sprpriority = -4
ownpal = 0
supermove = 1
persistent = 0
Removetime = 80
bindtime = -1
pausemovetime = 9999999
supermovetime = 9999999

[State 7050]
type = Explod
trigger1 = Time = 0
anim = 10500
pos = 0,90
postype = back
sprpriority = -3
ownpal = 0
bindtime = -1
persistent = 0
Removetime = 80
supermove = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 7050]
type = DestroySelf
trigger1 = Time = 85

[Statedef 7075]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 99999
ownpal = 1

[State 7075]
Type = VarSet
Trigger1 = Time = 0 || Time = 11
var(5) = 0

[State 7075]
Type = VarAdd
Trigger1 = time <= 10
Trigger2 = time >= 70
var(5) = 1

[State 7075]
Type = ModifyExplod
Trigger1 = Time < 10
Scale = .5,0+(Var(5)*.05)

[State 70750]
Type = ModifyExplod
Trigger1 = Time = [10,69]
Scale = .5,.5

[State 7075]
Type = ModifyExplod
Trigger1 = Time >= 70
Scale = .5,.5-(Var(5)*.05)

[State 7075]
type = Explod
trigger1 = Time = 0
anim = 10600
pos = 0,90
postype = back
sprpriority = -4
ownpal = 0
supermove = 1
persistent = 0
Removetime = 80
bindtime = -1
pausemovetime = 9999999
supermovetime = 9999999

[State 7075]
type = Explod
trigger1 = Time = 0
anim = 10501
pos = 0,90
postype = back
sprpriority = -3
ownpal = 0
bindtime = -1
persistent = 0
Removetime = 80
supermove = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 7075]
type = DestroySelf
trigger1 = Time = 85

[Statedef 7100]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 99999
ownpal = 1

[State 7100]
Type = VarSet
Trigger1 = Time = 0 || Time = 11
var(5) = 0

[State 7100]
Type = VarAdd
Trigger1 = time <= 10
Trigger2 = time >= 70
var(5) = 1

[State 7100]
Type = ModifyExplod
Trigger1 = Time < 10
Scale = .5,0+(Var(5)*.05)

[State 7100]
Type = ModifyExplod
Trigger1 = Time = [10,69]
Scale = .5,.5

[State 7100]
Type = ModifyExplod
Trigger1 = Time >= 70
Scale = .5,.5-(Var(5)*.05)

[State 7100]
type = Explod
trigger1 = Time = 0
anim = 10600
pos = 0,90
postype = back
sprpriority = -4
ownpal = 0
supermove = 1
persistent = 0
Removetime = 80
bindtime = -1
pausemovetime = 9999999
supermovetime = 9999999

[State 7100]
type = Explod
trigger1 = Time = 0
anim = 10502
pos = 0,90
postype = back
sprpriority = -3
ownpal = 0
bindtime = -1
persistent = 0
Removetime = 80
supermove = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 7100]
type = DestroySelf
trigger1 = Time = 85

[StateDef 10400]
Type = A
MoveType = I
Physics = N
Anim = IfElse(IsHelper(10400),10400,10452)
SprPriority = 999

[State 10400]
Type = VarSet
Trigger1 = Time = 0
FV = 1
Value = 0.3

[State 10400]
Type = VarAdd
Trigger1 = Time = [1,4]
FV = 1
Value = 0.16

[State 10400]
Type = VarAdd
Trigger1 = Time = [5,8]
FV = 1
Value = 0.1

[State 10400]
Type = VarAdd
Trigger1 = Time > 8
FV = 1
Value = 0.02

[State 10400]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 10400]
Type = Trans
Trigger1 = 1
Trans = Add

[State 10400]
Type = AngleSet
Trigger1 = Time = 0
Value = 20

[State 10400]
Type = AngleAdd
Trigger1 = Time > 0
Value = 10

[State 10400]
Type = AngleDraw
Trigger1 = 1
Scale = 0.75*FVar(1),0.75*FVar(1)

[State 10400]
Type = DestroySelf
Trigger1 = Time = 32

[StateDef 10401]
Type = A
MoveType = I
Physics = N
Anim = 10401
SprPriority = 999

[State 10401]
Type = VarSet
Trigger1 = Time = 0
FV = 1
Value = 0.5

[State 10401]
Type = VarAdd
Trigger1 = Time = [1,4]
FV = 1
Value = 0.1

[State 10401]
Type = VarAdd
Trigger1 = Time > 4
FV = 1
Value = 0.01

[State 10401]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 10401]
Type = Trans
Trigger1 = 1
Trans = Add

[State 10401]
Type = AngleSet
Trigger1 = Time = 0
Value = 20

[State 10401]
Type = AngleAdd
Trigger1 = Time > 0
Value = 10

[State 10401]
Type = AngleDraw
Trigger1 = 1
Scale = 0.75*FVar(1),0.75*FVar(1)

[State 10401]
Type = DestroySelf
Trigger1 = Time = 32

[StateDef 10402]
Type = A
MoveType = I
Physics = N
Anim = 10402
SprPriority = 999

[State 10402]
Type = Trans
Trigger1 = 1
Trans = Add

[State 10402]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 10402]
Type = VarSet
Trigger1 = Time = 0
FV = 1
Value = 0.5

[State 10402]
Type = VarAdd
Trigger1 = Time = [1,4]
FV = 1
Value = 0.1

[State 10402]
Type = VarAdd
Trigger1 = Time > 4
FV = 1
Value = 0.01

[State 10402]
Type = AngleDraw
Trigger1 = 1
Scale = 0.75*FVar(1),0.75*FVar(1)

[State 10402]
Type = DestroySelf
Trigger1 = Time = 32

[StateDef 10450]
Type = A
MoveType = I
Physics = N
Anim = 10451
SprPriority = 999

[State 10450]
Type = VarSet
Trigger1 = Time = 0
FV = 1
Value = 0.5

[State 10450]
Type = VarAdd
Trigger1 = Time = [1,4]
FV = 1
Value = 0.1

[State 10450]
Type = VarAdd
Trigger1 = Time > 4
FV = 1
Value = 0.01

[State 10450]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 10450]
Type = Trans
Trigger1 = 1
Trans = Add

[State 10450]
Type = AngleSet
Trigger1 = Time = 0
Value = 20

[State 10450]
Type = AngleAdd
Trigger1 = Time > 0
Value = 10

[State 10450]
Type = AngleDraw
Trigger1 = 1
Scale = 0.75*FVar(1),0.75*FVar(1)

[State 10450]
Type = DestroySelf
Trigger1 = Time = 32

[StateDef 10451]
Type = A
MoveType = I
Physics = N
Anim = 10450
SprPriority = 999

[State 10451]
Type = Trans
Trigger1 = 1
Trans = Add

[State 10451]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 10451]
Type = VarSet
Trigger1 = Time = 0
FV = 1
Value = 0.5

[State 10451]
Type = VarAdd
Trigger1 = Time = [1,4]
FV = 1
Value = 0.1

[State 10451]
Type = VarAdd
Trigger1 = Time > 4
FV = 1
Value = 0.01

[State 10451]
Type = AngleDraw
Trigger1 = 1
Scale = 0.75*FVar(1),0.75*FVar(1)

[State 10451]
Type = DestroySelf
Trigger1 = Time = 32

[statedef 850]
type=u
movetype=i
physics=u
ctrl=!(var(31):=-1)
sprpriority=2

[state type]
type=statetypeset
statetype=s
physics=s
trigger1=!time
trigger1=statetype!=a
trigger1=command!="holddown"

[state type]
type=statetypeset
statetype=c
physics=c
trigger1=!time
trigger1=statetype!=a
trigger1=command="holddown"

[state type]
type=statetypeset
physics=a
trigger1=!time
trigger1=statetype=a

[state anim]
type=changeanim
value=ifelse(statetype=a,852,850+(statetype=c))
trigger1=!time

[state vel]
type=velset
x=0
y=0
trigger1=!time
trigger1=statetype!=a

[state success]
type=changestate
value=851
trigger1=numhelper(17000)
trigger1=helper(17000),stateno=17110
trigger2=time>=128
trigger3=time>4
trigger3=command!="hold_a"||power<=0

[state power]
type=poweradd
value=-8-(time%8=5)
trigger1=time>4
ignorehitpause=1

[statedef 851]
type=u
movetype=i
physics=n
anim=helper(17000),anim-16247
sprpriority=2
ctrl=0
facep2=(var(31):=var(31)-2)>=0

[state anim]
type=changeanim
value=853
trigger1=!time
trigger1=numhelper(17000)
trigger1=anim=855
trigger1=statetype!=a

[state type]
type=statetypeset
physics=a
triggerall=statetype=a
trigger1=!time
trigger1=var(31)<0
trigger2=time=17-4*!var(30)
trigger2=var(30)+(var(31)>=0)

[state invul]
type=hitby
value=
time=16-4*!var(30)
triggerall=!time
trigger1=var(30)
trigger2=var(31)>=0
ignorehitpause=1

[state vel]
type=velset
x=(statetype=a)*(vel x)
y=(statetype=a)*(-3+(vel y+3)*!var(30))
trigger1=!time

[state pause]
type=superpause
anim=-1
sound=-1,-1
darken=0
p2defmul=1
time=15-4*!var(30)
movetime=15-4*!var(30)
endcmdbuftime=15-4*!var(30)
pausebg=0
triggerall=!time
trigger1=var(30)
trigger2=var(31)>=0
ignorehitpause=1

[state type]
type=posfreeze
value=1
triggerall=time<17-4*!var(30)
triggerall=statetype=a
trigger1=var(30)
trigger2=var(31)>=0

[state type]
type=ctrlset
value=1
trigger1=time=15
trigger1=var(30)
trigger1=!(helper(17000),var(8)+var(36))

[state type]
type=explod
anim=99999
id=851
removetime=3
removeongethit=1
trigger1=!time
trigger1=var(30)

[state anim]
type=changeanim
value=44
elem=4
trigger1=time=16-4*!var(30)
trigger1=statetype=a

[state type]
type=changestate
value=helper(17000),var(8)+!helper(17000),var(8)*var(36)
triggerall=time>15-4*!var(30)
triggerall=var(31)>=0
trigger1=helper(17000),var(8)*(1-var(31)*(helper(17000),var(8)!=850)*(helper(17000),var(8)<1000))
trigger2=var(36)*(1-var(31)*(var(36)!=850)*(var(36)<1000))

[state end]
type=changestate
value=51*(statetype=a)+11*(statetype=c)
ctrl=1
trigger1=time>24-5*var(30)

[Statedef 860]
type    = S
movetype= H
physics = N
velset = 0,0

[state back]
type=changestate
value=150
trigger1=command="holdback"

[State 150, 1]
type = ChangeAnim
trigger1 = 1
value = 860

[State 150, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State 150, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 150, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 150, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 3

;---------------------------------------------------------------------------
; SGUARDHIT2 (knocked back)
[Statedef 861]
type    = S
movetype= H
physics = S
anim = 860

[state back]
type=changestate
value=151
trigger1=command="holdback"
trigger1=1||(var(34):=var(34)-time)||(var(35):=var(35)-time)

[State 151, 2]
type = VelSet
trigger1 = Time = var(34)
trigger2 = HitOver
x = 0

[State 151, 3]
type = CtrlSet
trigger1 = Time = var(35)
value = 1

[State 151, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 151, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 151, 4]
type = ChangeState
trigger1 = HitOver
value = 130
ctrl = 1

;---------------------------------------------------------------------------
; CGUARDHIT (shaking)
[Statedef 862]
type    = C
movetype= H
physics = N
velset = 0,0

[state back]
type=changestate
value=152
trigger1=command="holdback"

[State 152, 1]
type = ChangeAnim
trigger1 = 1
value = 861

[State 152, 3]
type = ChangeState
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State 152, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 152, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 152, 4]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

;---------------------------------------------------------------------------
; CGUARDHIT2 (knocked back)
[Statedef 863]
type    = C
movetype= H
physics = C
anim = 861

[state back]
type=changestate
value=153
trigger1=command="holdback"
trigger1=1||(var(34):=var(34)-time)||(var(35):=var(35)-time)

[State 153, 2]
type = VelSet
trigger1 = Time = var(34)
trigger2 = HitOver
x = 0

[State 153, 3]
type = CtrlSet
trigger1 = Time = var(35)
value = 1

[State 153, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 153, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 153, 4]
type = ChangeState
trigger1 = HitOver
value = 131
ctrl = 1

;---------------------------------------------------------------------------
; AGUARDHIT (shaking)
[Statedef 864]
type    = A
movetype= H
physics = N
velset = 0,0

[state back]
type=changestate
value=154
trigger1=command="holdback"

[State 154, 1]
type = ChangeAnim
trigger1 = 1
value = 862

[State 154, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 155 ;AGUARDHIT2

[State 154, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

;---------------------------------------------------------------------------
; AGUARDHIT2 (knocked away)
[Statedef 865]
type    = A
movetype= H
physics = N
anim = 862

[state back]
type=changestate
value=155
trigger1=command="holdback"
trigger1=1||(var(34):=var(34)-time)||(var(35):=var(35)-time)

[State 155, 2]
type = VelAdd
trigger1=1
y = Const(movement.yaccel)

[State 155, 3]
type = CtrlSet
trigger1 = Time = var(35)
value = 1

[State 155, 4]
type = VarSet
trigger1 = 1
sysvar(0) = (pos y >= 0) && (vel y > 0)

[State 155, 5]
type = VelSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = PosSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = ChangeState
trigger1 = sysvar(0)
trigger1 = command = "holdback"
trigger1 = inguarddist
value = 130

[State 155, 7]
type = ChangeState
trigger1 = sysvar(0)
value = 52

;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

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

[State -2, PlaySnd]
type = playsnd
triggerall = alive && time = 1
triggerall = stateno = 5000 || stateno = 5010
trigger1 = gethitvar(animtype) >= 2 && random < 500
trigger2 = gethitvar(animtype) = 1 && random < 500
trigger3 = gethitvar(animtype) = 0 && random < 500
value = S5000,0+random%5
channel = 0
ignorehitpause = 1

[State -2, PlaySnd]
type = playsnd
triggerall = alive && time = 1
trigger1 = (stateno = 5000 || stateno = 5010) && numenemy
trigger1 = gethitvar(fall) || (enemynear, hitdefattr = SCA, SA, HA)
trigger2 = (stateno = 5020 || stateno = 5070 || stateno = 5080)
trigger3 = (stateno = 5050 || stateno = 5100) && (prevstateno != [5000, 5199])
value = S5000,0+random%5
channel = 0
ignorehitpause = 1

[State -2, PlaySnd]
type = PlaySnd
triggerall = time = 1
trigger1 = StateNo = [5200,5210]
value = S5200,0
persistent = 0
channel = 0

[State -2, PlaySnd]
type = PlaySnd
triggerall = time = 1
trigger1 = stateno = 5120
value = S5200,0
persistent = 0
channel = 0

[State -2, Striker Bars]
type = Helper
trigger1 = roundstate=2
trigger1 = numhelper(10900)=0
trigger1 = var(33)!=4444
id = 10900
name = "strikerbars"
stateno = 10900
ownpal = 1
postype = left
pos = 160
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = StateType != A || StateNo = 5210
var(18) = 0

[State -2, VarSet]
Type     = VarSet
Trigger1 = Var(12) > 0
Trigger1 = StateType != A
V        = 12
Value    = 0
IgnoreHitPause = 1

[state dtc]
type=displaytoclipboard
text="%d %d %d %d"
params=var(31),var(36),gethitvar(hittime),gethitvar(ctrltime)
trigger1=1
ignorehitpause=1

[state Right.]
type=helper
id=17000
stateno=17000
name="Paint the man, cut the lines"
ownpal=1
pausemovetime=99999999
supermovetime=99999999
trigger1=var(36):=0
trigger2=!numhelper(17000)
ignorehitpause=1

[state Everyone]
type=assertspecial
flag=nowalk
trigger1=numexplod(851)

[state listening?]
type=hitoverride
attr=sa,ap
stateno=851
triggerall=var(30)=[0,1]
triggerall=helper(17000),stateno=17800
triggerall=helper(17000),anim=17100
trigger1=ctrl
trigger2=stateno=[850,851]

[state Here's]
type=hitoverride
attr=c,ap
stateno=851
triggerall=var(30)=[0,1]
triggerall=helper(17000),stateno=17800
triggerall=helper(17000),anim=17101
trigger1=ctrl
trigger2=stateno=[850,851]

[state the]
type=hitoverride
attr=sca,ap
stateno=851
triggerall=var(30)=[0,1]
triggerall=helper(17000),stateno=17800
triggerall=helper(17000),anim=17102
trigger1=ctrl
trigger2=stateno=[850,851]

[state campaign]
type=reversaldef
reversal.attr=sca,aa,ap
hitflag=mafdp
sparkno=-1
hitsound=-1,-1
numhits=0
p1stateno=851
trigger1=stateno=[860,865]
trigger1=helper(17000),stateno=17800

[state intro.]
type=reversaldef
reversal.attr=
trigger1=stateno=[860,865]
trigger1=helper(17000),stateno!=17800

[State striker var]
type=null
triggerall=var(33)!=4444
trigger1=var(33)>=1
trigger1=0&&var(33):=var(33)-1
trigger2=!var(33)
trigger2=!numhelper(3501)
trigger2=!numhelper(3601)
trigger2=0&&var(33):=-2

[State -2]
type=varset
trigger1= numenemy
fvar(12)= enemynear,gethitvar(hitcount)
ignorehitpause=1

[State -2]
type=varset
trigger1= numenemy
trigger1= (enemynear,movetype!=H)
trigger2= !numenemy
fvar(12)=1

[State -2]
type=varset
trigger1=1
fvar(10)= ifelse(fvar(12)=0, 1, ifelse(fvar(12)=1, .9, .8**fvar(12)))
ignorehitpause=1

[State -2]
type=varset
trigger1=1
fvar(10)= ifelse(fvar(12)=0, 1, ifelse(fvar(12)=1, 1, .9**fvar(12)))
ignorehitpause=1

[State -2, VarSet]
type = Varset
trigger1 = numenemy
fvar(13) = enemynear,gethitvar(hitcount)
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = numenemy
trigger1 = (enemynear,movetype!=H)
trigger2 = !numenemy
fvar(13) = 1

[State -2, VarSet]
type = VarSet
trigger1 = 1
fvar(14) = ifelse(fvar(13) = 0, 1, ifelse(fvar(13) = 1, 1, .96875**fvar(13)))
ignorehitpause = 1

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = 1
value = fvar(14)
ignorehitpause = 1

[State -2, VarAdd]
type = VarAdd
trigger1 = 100*life/lifemax <= 30
v = 24
value = 1

[State -2, Helper]
type = Helper
trigger1 = Var(24) = 1
persistent = 0
id = 7050
name = "Face"
pos = 0,0
postype = P1
stateno = 7050
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State -2, LifeAdd]
type = LifeAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "VAkiha_K"
trigger1 = Enemy,Var(30) = 1
value = -5
kill = 0

[State -2, PowerAdd]
type = PowerAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "VAkiha_K"
trigger1 = Enemy,Var(30) = 1
value = -26

[state stats]
type=null
trigger1=roundstate>2
trigger1=!numexplod(4321)
trigger1=0&&var(32):=var(32)+floor(life*100./lifemax)*1000+floor((1-enemy,life*1./enemy,lifemax)*100.)
trigger2=enemy,gethitvar(hitcount)>var(32)/1000000
trigger2=var(32):=var(32)%1000000+enemy,gethitvar(hitcount)*1000000
ignorehitpause=1

[state stats]
type=explod
id=4321
anim=99999
trigger1=roundstate>2
trigger1=!numexplod(4321)
ignorehitpause=1

[state airjump]
type=null
trigger1=statetype=a
trigger1=var(18)>=0
trigger1=command!="holdup"
trigger1=var(18):=-var(18)-1

[state no envshake]
type=envshake
time=0
trigger1=numhelper(3605)
trigger1=movetype=h

[State -2, Explod]
type = Explod
triggerall = (time%4)=0
triggerall = time >= 4
trigger1 = Stateno = 100
trigger2 = Stateno = 105
trigger3 = Stateno = 110 && Anim != 111
trigger4 = Stateno = 115
anim = 6102
postype = p1
pos = 40*ifelse(Stateno=100||Stateno=110,-1,1),-50
random = 0,80
ID = 6102
ownpal = 1
removetime = 9
sprpriority = 2
bindtime = 1

[state -2]
type = afterimagetime
trigger1 = stateno != [2000,4599]
time = 0

[State -1, parry]
type=selfstate
value=851
ctrl=0
trigger1=var(30)!=2
trigger1=var(31)>1

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

[Statedef -3]

[State -3, VarSet]
type = VarSet
trigger1 = 1
var(25) = 0

[State -3, VarSet]
type = VarSet
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = movecontact
trigger3 = Statetype = A
trigger3 = (Stateno = [600,699])
trigger3 = MoveContact
var(25) = 1

[State -3, VarSet]
type = VarSet
trigger1 = 1
var(26) = 0

[State -3, VarSet]
type = VarSet
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [1000,1999])
trigger2 = MoveContact
var(26) = 1

[State -3, VarSet]
type = VarSet
trigger1 = 1
var(27) = 0

[State -3, VarSet]
type = VarSet
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [2000,3999])
trigger2 = stateno != [4000,4999]
trigger2 = MoveContact
var(27) = 1

;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
value = 0, 0

[statedef 4599]
type=s
movetype=h
physics=n
velset=0,0
ctrl=0

[state invincible]
type=hitby
value=
time=-1
trigger1=1
ignorehitpause=1

[state camera]
type=screenbound
value=0
trigger1=1
ignorehitpause=1

[state remove explods]
type=removeexplod
trigger1=!time
ignorehitpause=1

[state shut up]
type=stopsnd
channel=-1
trigger1=!time
ignorehitpause=1

[state fadeout]
type=trans
trans=addalpha
alpha=240-time*16,256
trigger1=time<16
ignorehitpause=1

[state invisible]
type=assertspecial
flag=invisible
trigger1=time>15
ignorehitpause=1

[state pos]
type=posset
x=0
y=0
trigger1=time=16
ignorehitpause=1

[statedef 4598]
type=l
movetype=i
physics=n
anim=5110
velset=0,0
ctrl=0

[state pos]
type=posset
y=0
x=0
trigger1=!time
ignorehitpause=1

[state fadein]
type=trans
trans=addalpha
alpha=8*time,256
trigger1=time<32
ignorehitpause=1

[state wakeup]
type=selfstate
value=5120
trigger1=time>=120

[statedef 182]
type=s
movetype=i
physics=s
ctrl=0
anim=195
velset=0,0
Sprpriority=2

[state win]
type=helper
postype=left
stateno=20000
id=19000
ownpal=1
supermovetime=-2**31-1
pausemovetime=-2**31-1
triggerall=time=60
triggerall=matchover
trigger1=teammode=single
trigger2=teammode=simul
trigger2=id<partner,id

[State anim]
type=changeanim
trigger1=!animtime
trigger1=anim=195
value=215

[State anim]
type=changeanim
trigger1=!animtime
trigger1=anim=215
value=220

[State anim]
type=changeanim
value=180
elem=3
trigger1=!animtime
trigger1=anim=220

[state anim]
type=changeanim
value=1108
elem=2
trigger1=time=186

[state vel]
type=velset
x=4
triggerall=animelem=1
trigger1=anim=215
trigger2=anim=220

[state type]
type=statetypeset
statetype=a
physics=n
trigger1=animelem=5
trigger1=anim=1108

[state vel]
type=velset
x=0
y=-3.2
trigger1=animelem=5
trigger1=anim=1108

[state halo]
type=explod
anim=1103
id=1103
pos=25,-60
postype=p1
bindtime=-1
removetime=-1
ownpal=1
sprpriority=5
facing=1
scale=2,2
removeongethit=1
trigger1=animelem=5
trigger1=anim=1108

[state stars var]
type=varset
fvar(8)=0.6+0.01*ceil(Random%21)
trigger1=animelem=5,>=0
trigger1=anim=1108

[state stars var]
type=varrandom
v=6
range=-30,15
trigger1=animelem=5,>=0
trigger1=anim=1108

[state stars var]
type=varrandom
v=7
range=70,110
trigger1=animelem=5,>=0
trigger1=anim=1108

[state stars]
type=explod
trigger1=animelem=5,>=0
trigger1=anim=1108
trigger1=random%2=0
anim=1104+random%4
id=1104
pos=-6+random%25,-48+random%25
bindtime=1
removetime=-2
ownpal=1
sprpriority=random%2+1
facing=ifelse(random%2=0,1,-1)
vfacing=ifelse(random%2=0,1,-1)
scale=fvar(8),fvar(8)
vel=0.1*var(6),0.1*var(7)
accel=0.01*var(6),0.01*var(7)
ignorehitpause=1
trans=add

[State 181, AssertSpecial]
type=assertspecial
flag=roundnotover
flag2=nomusic
flag3=noautoturn
trigger1=1

[state invul]
type=hitby
value=
time=-1
trigger1=!time

[state push]
type=playerpush
value=0
trigger1=1

[state camera]
type=screenbound
value=0
movecamera=1,0
trigger1=anim=1108
