; 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 = 250			;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 = 12		;Player width (back, air)
air.front = 12		;Player width (front, air)
height = 60			;Height of player (for opponent to jump over)
attack.dist = 160		;Default attack distance
proj.attack.dist = 90	;Default attack distance for projectiles
proj.doscale = 0		;Set to 1 to scale projectiles too   
head.pos = -5, -90	;Approximate position of head
mid.pos = -5, -60		;Approximate position of midsection
shadowoffset = 0		;Number of pixels to vertically offset the shadow
draw.offset = 0,0		;Player drawing offset in pixels (x, y)

[Velocity]
walk.fwd = 2
walk.back = -2
run.fwd = 7.5, 0
run.back = -18.0, 0
jump.neu = 0, -9.4
jump.fwd = 3.0
jump.back = -3.0
runjump.fwd = 5.5
runjump.back = -5.5
airjump.neu = 0,-7.8
airjump.fwd = 3.0
airjump.back = -3.0		;.

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

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

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

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

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

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

[State 180, 1]
type = ChangeState
trigger1 = Matchover
value = 182

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

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

[StateDef 182]
type = S
movetype = I
physics = S
velset = 0,0
anim = 181
sprpriority = 1

[state win]
type=helper
postype=left
stateno=19000
ownpal=1
supermovetime=44444444
pausemovetime=44444444
triggerall=time=20
triggerall=matchover
trigger1=teammode=single
trigger2=teammode=simul
trigger2=id<partner,id

[State 182, 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=181

[State 182]
type = ChangeState
trigger1 = AnimTime = 0
value = 183

[StateDef 183]
type = A
movetype = A
physics = N
velset = 1,-8
Anim = 810

[state invul]
type=hitby
value=
trigger1=1

[state push]
type=playerpush
value=0
trigger1=1

[state gravity]
type=gravity
trigger1=1

[State 183, AssertSpecial]
type=assertspecial
flag=roundnotover
flag2=nomusic
flag3=noautoturn
trigger1=1

[State 183]
type = changestate
value = 184
trigger1 = pos y>0

[StateDef 184]
type = S
movetype = I
physics = S
velset = 0,0
anim = 182

[State 184, AssertSpecial]
type=assertspecial
flag=roundnotover
flag2=nomusic
flag3=noautoturn
trigger1=1

[state dust]
type=makedust
trigger1=time<=4

[state invul]
type=hitby
value=
trigger1=1

[state push]
type=playerpush
value=0
trigger1=1

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

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

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

[State 190, PlaySnd]
type = PlaySnd
trigger1 = time = 100
value = S4000,0
volume = 255

[State 190]
Type = Helper
Trigger1 = animelemtime(1) = [0,142]
Trigger1 = statetime%8 = 0
Pos = random%320,-240
Stateno = 191
ID = 191
PosType = back
Ownpal = 1
Keyctrl = 0

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

[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 0

[Statedef 191]
Type = A
Physics = N
VelSet = 0,0
SprPriority = -4
Anim = 191

[State 191]
Type = NotHitBy
Trigger1 = 1
Value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time = 1

[State 191]
Type = PosSet
Trigger1 = time = 0
y = - ScreenPos Y -240

[State 191]
Type = VarSet
Trigger1 = time = 0
fv = 1
value = .125+.005*(random%50)

[State 191]
Type  = VarSet
Trigger1 = time = 0
v = 2
value = random%360

[State 191]
Type = VarSet
Trigger1 = time = 0
fv = 3
value = -2+.1*(random%40)

[State 191]
Type = VarSet
Trigger1 = time = 0
fv = 4
value = -.2+.01*(random%40)

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

[State 191]
Type = AngleSet
Trigger1 = 1
Value = Var(2)

[State 191]
Type  = AngleDraw
Trigger1 = 1
Scale = fvar(1),fvar(1)

[State 191]
Type = VelSet
Trigger1 = time = 0
X = fvar(3)
Y = 1

[State 191]
Type = VelAdd
Trigger1 = 1
X = fvar(4)
Y = .12

[State 191, AssertSpacial]
Type = AssertSpecial
Trigger1 = 1
Flag = Noshadow
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 191, DestroySelf]
Type = DestroySelf
Trigger1 = Pos Y > 50

;---------------------------------------------------------------------------
; 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 = 20			;Power to add (Def: 0)
sprpriority = 2		;Set layering priority to 2 (in front)

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

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA			;Attribute: Standing, Normal Attack
damage = 10,0			;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)
guard.sparkno = S9000			;Spark anim no (Def: set above)
sparkxy = -10, -61		;X-offset for the "hit spark" rel. to p2,
					;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 = Low		;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 = -4		;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 =Low		;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, 3]
type = CtrlSet
trigger1 = Time = 6
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
juggle  = 4
poweradd= 30
ctrl = 0
velset = 0,0
anim = 210
sprpriority = 2

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

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

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 7
attr = S, NA
animtype  = Medium
damage = 20
guardflag = MA
pausetime = 8,8
sparkno = S8052*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-70
hitsound   = S200,3
guardsound = S300,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 13
ground.velocity = -4
air.velocity = -2.5,-4

[State 210, 3]
type = ChangeAnim
trigger1 = AnimElemTime(5) > 0 && AnimElemTime(6) <= 0
trigger1 = movecontact
ignorehitpause = 1
persistent = 0
value = 210
elem = 6

[State 210, 4]
type = SprPriority
trigger1 = AnimElem = 5
value = 2

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

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

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

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

[State 215, 1]
type = HitDef
trigger1 = AnimElem = 7
attr = S, NA
damage = 25
animtype = medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 8,8
sparkno = S8051*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -76
hitsound = S200, 3
guardsound = S300, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[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
juggle  = 4
poweradd= 45
ctrl = 0
velset = 0,0
anim = 220
sprpriority = -1

[State 220, Heavy Slash Spark]
type = Explod
trigger1 = AnimElem = 3
anim = 2013
ID = 2015
pos = 64,-45
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1,1
sprpriority = 2
removeongethit = 1
ignorehitpause = 0
supermovetime = 9999
pausemovetime = 9999
;persistent =

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

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

[State 220, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
animtype  = Heavy
damage = 35
guardflag = MA
pausetime = 10,13
sparkno = S8053*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-70
hitsound   = S200,3
guardsound = S300,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = -3
air.velocity = -4,-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 = 40
sprpriority = 2

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

[State 225, Thrust Spark]
Type = Explod
Trigger1 = AnimElem = 6
Anim = 2003
ID = 2003
Pos = 93,-30
BindTime = -1
Ownpal = 1
SprPriority = 5
RemoveOnGetHit = 1
IgnoreHitPause = 0
supermovetime = 9999
pausemovetime = 9999

[State 225, 1]
type = HitDef
trigger1 = AnimElem = 7
attr = S, NA
damage = 30
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10, 13
sparkno = S8052*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -76
hitsound = S200, 3
guardsound = S300, 0
ground.type = Low
ground.slidetime = 5
ground.hittime  = 13
ground.velocity = -3.3
airguard.velocity = -1.9,-.8
air.type = Low
air.velocity = -1.4,-3
air.hittime = 12

[State 225, end]
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
juggle  = 5
poweradd= 15
ctrl = 0
anim = 400
sprpriority = 2

[State 400, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = S100, 1

[State 400, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
damage = 12
priority  = 3
animtype  = Light
hitflag = MAF
guardflag = MA
pausetime = 7,8
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 = -4
air.velocity = -1.5,-3

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

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

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

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

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

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

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

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

[State 420, 2]
type = HitDef
trigger1 = AnimElem = 5
attr = C, NA
damage = 42
priority = 3
animtype = Up
hitflag = MAF
guardflag = MA
hitflag = MAF
pausetime = 10,11
sparkno = S8053*10**(random%4)
guard.sparkno = S9000
pausetime = 15,16
sparkxy = -10,-42
hitsound   = S200,3
guardsound = S300,0
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

[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
juggle  = 0
poweradd= 11
ctrl = 0
anim = 600

[State 600, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = S100, 1

[State 600, 2]
type = HitDef
trigger1 = animelem = 4
attr = A, NA
damage = 14
hitflag = MAFD
guardflag = HA
priority = 4,Hit
pausetime = 7,7
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-50
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.5
air.fall = 1
yaccel = .44

[State 600, 3]
type = CtrlSet
trigger1 = Time = 6
value = 1

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

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

[State 610, 2]
type = HitDef
trigger1 = animelem = 3
attr = A, NA
damage = 22
hitflag = MAFD
guardflag = HA
priority = 6,Hit
pausetime = 8,8
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-50
hitsound   = S200,0
guardsound = S300,4
animtype = Medium
ground.type = High
ground.slidetime = 10
ground.hittime  = 12
fall.recovertime = 22
ground.velocity = -5
air.velocity = -2,-5.5
air.fall = 1
yaccel = .44

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

[State 620, Heavy Slash Spark]
type = Explod
trigger1 = AnimElem = 4
anim = 2013
ID = 2013
pos = 64,-35
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1,1
sprpriority = 2
removeongethit = 1
ignorehitpause = 0
;persistent =

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

[State 620, 1]
type = HitDef
trigger1 = animelem = 5
attr = A, NA
damage = 44
hitflag = MAFD
guardflag = HA
priority = 7,Hit
pausetime = 10,10
sparkno = S8053*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-70
hitsound   = S200,3
guardsound = S300,0
animtype = Heavy
ground.type = High
ground.slidetime = 10
ground.hittime  = 14
fall.recovertime = 25
ground.velocity = -6
air.velocity = -8,20
air.fall = 1
yaccel = .44

[Statedef 1032]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 1032
sprpriority = 2
velset = 0,0
poweradd = -1000

[State 1032, Explod]
type = Explod
trigger1 = AnimElem = 8
anim = 6103
ID = 6103
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 2
removeongethit = 1

[State 1032]
type = SuperPause
trigger1 = AnimElem = 6
time = 30
movetime = 0
anim = -1
sound = S0,5
pos = 999,999
darken = 0
unhittable = 1

[State 1032, AfterImage]
type = AfterImage
trigger1 = Time = 9
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 1032]
type = Explod
trigger1 = AnimElem= 6
anim = 10300
postype = p1
pos = -10,-20
facing = 1
bindtime = 1
removetime = -2
supermovetime = 9999
pausemovetime = 9999
sprpriority = 3

[State -1]
Type = Helper
Trigger1 = AnimElem = 6
StateNo = 6010
ID = 10001
Name = "EX_Effect"
Pos = -22,-85
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 5
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[state 1032]
type = RemoveExplod
trigger1 = time = 0

[State 1032]
type = null
trigger1 = time = 2
postype = p1
pos = -2,-29
anim = 1035
ownpal = 1
sprpriority = 4

[State 1032]
type = Explod
trigger1 = time = 7
postype = p1
pos = 10,0
anim = 7766
ownpal = 1
sprpriority = 3

[state 1032]
type = playsnd
trigger1 = AnimElem = 8
value = S200, 7

[state 1032]
type = velset
trigger1 = time = 13
x = 11

[state 1032]
type = null
trigger1 = time = 19
x = 8

[state 1032]
type = statetypeset
trigger1 = time = 31
physics = S

[State 1032]
type = HitDef
trigger1 = AnimElem = 7
attr = S, HT
hitflag = MAF
guardflag = MA
priority = 1, Miss
sparkno = -1
guard.sparkno = S9000
hitsound = S101, 11
sprpriority = 1
sparkxy = 0, -45
;p2facing = -1
guardsound = S8, 1
p1stateno = 1033
p2stateno = 1035
fall = 1
fall.recover = 0

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

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

[State 1033]
type = Explod
trigger1 = time = 0
postype = p2
pos = 60,-15
anim = 2014
sprpriority = 5
bindtime = -1
scale = 1.5,1
removetime = -2

[state 1033]
type = playsnd
trigger1 = time = 1
value = S200,8
channel = 0

[State 1033]
type = ChangeState
trigger1 = time = 30
value = 1034

[Statedef 1034]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 1034
sprpriority = 2
velset = 12,0

[state 1034]
type = playsnd
trigger1 = AnimElem = 9
value = S200, 9

[state 1034]
type = playsnd
trigger1 = animelem = 10
value = 3, 8
channel = 0

[state 1034]
type = velset
trigger1 = time <= 8
x = 12

[State 1034]
Type = Helper
trigger1 = AnimElem = 9
StateNo = 1036
ID = 1036
Name = "Effect"
pos = Ceil(target,Pos X - Pos X)*facing+0,-50
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 0

[State 1034]
Type = Helper
trigger1 = AnimElem = 9
StateNo = 1037
ID = 1047
Name = "Effect2"
pos = Ceil(target,Pos X - Pos X)*facing+0,-50
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 0

[State 1034, Explod]
type = null
trigger1 = NumTarget
trigger1 = AnimElem = 9
anim = 4444
pos = Ceil(target,Pos X - Pos X)*facing+10,0
sprpriority = 5
ownpal = 1
facing = -1

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

[Statedef 1035]
type    = S
movetype= H
physics = S
ctrl = 0
sprpriority = 0
velset = 0,0

[State 1035]
type = Changeanim2
trigger1 = time = 0
value = 1040

[State 1035]
type = Changeanim2
trigger1 = time = 70
value = 1041

[state 1035]
type = lifeadd
trigger1 = Time = 70
value = -200

[state 1035]
type = posset
trigger1 = time <= 1
y = 0

[State 1035]
type = selfState
trigger1 = anim = 1041
trigger1 = AnimTime = 0
trigger2 = enemy,stateno != [1032,1034]
value = 5050
ctrl = 0

[StateDef 1036]
type = A
physics = N
ctrl = 0
anim = 4445
velset = 0,0

[State 1036]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1036]
type = Trans
trigger1 = 1
Trans = AddAlpha
Alpha = 256-floor(Time*12.8),256
time = 1

[State 1036]
type = SprPriority
trigger1 = 1
value = 3

[State 1036]
type = AngleDraw
trigger1 = 1
scale = Time*0.15,Time*0.15

[State 1036]
type = DestroySelf
trigger1 = time = 15

[StateDef 1037]
type = A
physics = N
ctrl = 0
anim = 4446
velset = 0,0

[State 1037]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1037]
type = Trans
trigger1 = 1
Trans = AddAlpha
Alpha = 256-floor(Time*19.2),256
time = 1

[State 1037]
type = SprPriority
trigger1 = 1
value = 3

[State 1037]
type = AngleDraw
trigger1 = 1
scale = 0.2+Time*0.1,0.2+Time*0.1

[State 1037]
type = DestroySelf
trigger1 = time = 15

[Statedef 1100]
type=S
physics=S
movetype=A
anim=1100
ctrl=0
velset=0,0
poweradd=49
sprpriority=1
facep2=1

[State 1100, Rolling Slash Spark]
type = Explod
trigger1 = AnimElem = 5 && Anim = 1100
anim = 2009
pos = 45,-75
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1.5,1.5
sprpriority = 2
removeongethit = 1
ignorehitpause = 0

[State 1100, nothitby]
type=nothitby
trigger1= anim=1100 && animelemtime(6)<0
value=SCA
time=1
ignorehitpause=1

[State 1100]
type=nothitby
trigger1= animelemtime(2)<0
value=SCA
time=1

[State 1100, vel]
type=velset
trigger1= anim=1100 && animelem=6
x=6
y=-6

[State 1100, vel]
type=velmul
trigger1= 1
x=.88

[State 1100, vel]
type=velmul
trigger1= vel y>0
x=0

[State 1100, snd]
type=playsnd
trigger1= anim=1100 && animelem=4
value=S100,6

[State 1100, dust]
type=helper
trigger1= anim=1100 && animelem=4
helpertype=normal
stateno=7100
ID=7100
name="Dust"
postype=p1
ownpal=1

[State 1100, snd]
type=playsnd
trigger1= anim=1100 && animelem=4
value= S100,6
channel=0
ignorehitpause=1
persistent=0

[State 1100, HitDef]
type = hitdef
trigger1= animelem = 5
attr = S,SA
damage = 52,12
animtype = Back
guardflag = M
hitflag = MAF
priority = 4,Hit
pausetime = 6,6
sparkno = S8053*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-79
hitsound = s200,3
guardsound = s300,0
ground.type = Low
ground.slidetime = 16
ground.hittime = 16
ground.velocity = -2,-10
ground.cornerpush.veloff = 0
air.type = Low
air.velocity = -2,-10
ground.cornerpush.veloff = 0
guard.velocity = -10.52
guard.cornerpush.veloff = -12.74
givepower=36,36
fall=1
fall.recover=0
fall.animtype=Medium
yaccel=.5
forcestand=1

[State 1100, statetype]
type=statetypeset
trigger1= anim=1100 && animelemtime(6)>=0
trigger2= anim=1101
statetype=A
physics=A

[State 1100]
type=changeanim
trigger1= anim=1100 && animelemtime(6)>0
value=1101
persistent=0

[State 1100]
type=statetypeset
trigger1= anim=1101
movetype=I

[Statedef 1101]
type=S
physics=S
movetype=A
anim=1100
ctrl=0
velset=0,0
poweradd=64
sprpriority=1
facep2=1

[State 1101, Rolling Slash Spark]
type = Explod
trigger1 = AnimElem = 5 && Anim = 1100
anim = 2009
pos = 45,-75
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1.5,1.5
sprpriority = 2
removeongethit = 1
ignorehitpause = 0

[State 1101, nothitby]
type=nothitby
trigger1= anim=1100 && animelemtime(6)<0
value=SCA
time=1
ignorehitpause=1

[State 1101]
type=nothitby
trigger1= animelemtime(3)<0
value=SCA
time=1

[State 1101, vel]
type=velset
trigger1= anim=1100 && animelem=6
x=12
y=-11

[State 1101, vel]
type=velmul
trigger1= 1
x=.88

[State 1101, vel]
type=velmul
trigger1= vel y>0
x=0

[State 1101, snd]
type=playsnd
trigger1= anim=1100 && animelem=4
value=S100,6

[State 1101, dust]
type=helper
trigger1= anim=1100 && animelem=4
helpertype=normal
stateno=7100
ID=7100
name="Dust"
postype=p1
ownpal=1

[State 1101, snd]
type=playsnd
trigger1= anim=1100 && animelem=4
value= S100,6
channel=0
ignorehitpause=1
persistent=0

[State 1101, HitDef]
type=hitdef
trigger1= animelem=5 && anim=1100
attr = S,SA
damage= 87, 7
animtype=Medium
fall.animtype=Medium
guardflag=M
hitflag=MAF
priority=4,Hit
pausetime= 12,11
sparkno=s8053*10**(random%4)
guard.sparkno = S9000
sparkxy=-10,ifelse((animelem=2),-52,-79)
hitsound=s200,3
guardsound=s300,0
ground.type=Low
ground.slidetime=16
ground.hittime=16
ground.velocity=-2,-10
ground.cornerpush.veloff=0
air.type=Low
air.velocity=-2,-10
ground.cornerpush.veloff= 0
guard.velocity= -10.52
guard.cornerpush.veloff= -12.74
envshake.time=16
envshake.freq=60
envshake.ampl=4
givepower=36,36
fall=1
fall.recover=0
fall.animtype=Medium
yaccel=.5
forcestand=1

[State 1101, statetype]
type=statetypeset
trigger1= anim=1100 && animelemtime(6)>=0
trigger2= anim=1101
statetype=A
physics=A

[State 1101]
type=changeanim
trigger1= anim=1100 && animelemtime(6)>0
value=1101
persistent=0

[State 1101]
type=statetypeset
trigger1= anim=1101
movetype=I

[StateDef 1102]
type = S
physics = S
movetype = A
anim = 1200
ctrl = 0
velset = 0,0
poweradd = 50
sprpriority = 2

[State 1102, VelSet]
type = VelSet
trigger1 = AnimElemTime(2) >= 0
trigger1 = AnimElemTime(6) <=0
x = 3.5

[State 1102, Explod]
type = Explod
trigger1 = AnimElem = 3
anim = 2010
pos = 0,-60
postype = p1
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1.5,1.5
sprpriority = 2
removeongethit = 1
ignorehitpause = 0

[State 1102, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 15
value = S100,6

[State 1102, HitDef]
type = Hitdef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
attr = S,SA
hitflag = MAF
guardflag = M
animtype = back
air.animtype = back
fall.animtype = back
ground.type = high
air.type = high
damage = 14,8
getpower = 0,0
givepower = 50,25
pausetime = 3,6
guard.pausetime = 3,3
sparkno = S8053*10**(random%4)
guard.sparkno = S9000
sparkxy = -30+random%20,ceil((EnemyNear,ScreenPos Y-ScreenPos Y)-60+random%20)
hitsound = S200,3
guardsound = S300,0
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
air.hittime = 21
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity = -4,0
guard.velocity = -3
air.velocity = -4,3
airguard.velocity = -1.5,-3
ground.cornerpush.veloff = -3
air.cornerpush.veloff = 0
down.cornerpush.veloff = -3.0
guard.cornerpush.veloff = -3.0
airguard.cornerpush.veloff = 0
fall.recover = 0
forcestand = 0
fall = 0
air.fall = 1
kill = 1
guard.kill = 1
yaccel = 0.3

[State 1102]
type = Explod
trigger1 = AnimElem = 15 && Anim = 1200
anim = 2009
pos = 45,-75
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1.5,1.5
sprpriority = 2
removeongethit = 1
ignorehitpause = 0

[State 1102, vel]
type = velset
trigger1 = AnimElem = 15
x = 3
y = -8

[State 1102, statetype]
type = statetypeset
trigger1 = AnimElem = 15
statetype = A
physics = A

[State 1102, HitDef]
type = hitdef
trigger1= animelem = 15
attr = S,SA
damage = 38, 8
animtype = Back
guardflag = M
hitflag = MAF
priority = 4,Hit
pausetime = 6,6
sparkno = S8053*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-79
hitsound = s200,3
guardsound = s300,0
ground.type = Low
ground.slidetime = 16
ground.hittime = 16
ground.velocity = -2,-10
ground.cornerpush.veloff = 0
air.type = Low
air.velocity = -2,-10
ground.cornerpush.veloff = 0
guard.velocity = -10.52
guard.cornerpush.veloff = -12.74
givepower=36,36
fall=1
fall.recover=0
fall.animtype=Medium
yaccel=.5
forcestand=1

[State 1102]
type = changeanim
trigger1= anim = 1200 && animelemtime(21)>0
value = 1101
persistent=0
Elem = 6

[StateDef 1105]
type = S
physics = N
movetype = A
ctrl = 0
Velset = 0,0
sprpriority = 3
anim = 1105

[State 1105]
type = Velset
trigger1 = time = [11,29]
x = 15-(time = 13)*7.5-(time = [14,15])*8.5-(time = [16,17])*9.5-(time = 18)*10-(time = [19,20])*10.5-(time = [21,22])*11.5-(time = 23)*12.5-(time = 24)*12-(time = [25,26])*13.5-(time = 27)*15-(time = 28)*14.5-(time = 29)*15

[State 1105]
type = Explod
trigger1 = time = [15,32]
trigger1 = time%5 = 0
anim = 6103
ID = 6103
sprpriority = -1
postype = p1
pos = 10,2
ownpal = 0
scale = 1,1
IgnoreHitPause = 1

[State 1105]
type = Helper
trigger1 = time = 11
pos = 0,0
postype = p1
ID = 1108
pausemovetime = 0
supermovetime = 0
name = "Extraction_Cut"
sprpriority = 10
stateno = 1108
helpertype = normal
keyctrl = 0
ownpal = 1

[State 1105]
type = PlaySnd
trigger1 = time = 11
value = S100,15

[State 1105]
type = Varset
trigger1 = time = 11
v = 43
value = 120

[State 1105]
type = Varadd
trigger1 = time = 11
fv = 11
value = -25

[State 1105]
type = HitBy
trigger1 = time = [13,26]
value = SCA,AA,AT

[State 1105,Hitdef]
type = HitDef
trigger1 = AnimElem = 7
attr = S, SA
animtype = hard
damage = 63,11
hitflag = MAF
guardflag = L
getpower = 50,20
sparkno = S8052*10**(random%4)
guard.sparkno = S9000
pausetime = 10,10
guardpausetime = 10,10
sparkxy = -15,ceil(p2dist y+enemynear,const(size.mid.pos.y))
hitsound = S200,5
guardsound = S300,0
ground.type = High
ground.slidetime = 24+(p2movetype = A)*7
ground.hittime = 24+(p2movetype = A)*7
guard.slidetime = 21
guard.hittime = 21
guard.velocity = -10
ground.velocity = 0,-7.5
air.animtype = Back
airguard.velocity = -2.5,-2.5
air.velocity = 0,-7.5
yaccel = 0.6
fall = 1
fall.recovertime = ceil(80*fVar(1)*(1+(p2movetype = A)*0.5))
fall.recover = ifelse(var(56)+40 >= 100, 0, 1)

[State 1105]
type = Varadd
trigger1 = movehit
v = 56
value = 40
persistent = 0
IgnoreHitPause = 1

[State 1105]
type = ChangeState
trigger1 = !animtime
value = 0
Ctrl = 1

[StateDef 1106]
type = S
physics = N
movetype = A
ctrl = 0
Velset = 0,0
sprpriority = 3
anim = 1106

[State 1106]
type = Velset
trigger1 = time = [13,41]
x = 15-(time = 25)*7.5-(time = [26,27])*8.5-(time = [28,29])*9.5-(time = 30)*10-(time = [31,32])*10.5-(time = [33,34])*11.5-(time = 35)*12.5-(time = 36)*12-(time = [37,38])*13.5-(time = 39)*15-(time = 40)*14.5-(time = 41)*15

[State 1106]
type = Explod
trigger1 = time = [15,35]
trigger1 = time%5 = 0
anim = 6103
ID = 6103
sprpriority = -1
postype = p1
pos = 10,2
ownpal = 0
scale = 1,1
IgnoreHitPause = 1

[State 1106]
type = Helper
trigger1 = time = 13
pos = 0,0
postype = p1
ID = 1108
pausemovetime = 0
supermovetime = 0
name = "Extraction_Cut"
sprpriority = 10
stateno = 1108
helpertype = normal
keyctrl = 0
ownpal = 1

[State 1106]
type = PlaySnd
trigger1 = time = 13
value = S100,15

[State 1106]
type = Varset
trigger1 = time = 13
v = 43
value = 120

[State 1106]
type = Varadd
trigger1 = time = 13
fv = 11
value = -25

[State 1106]
type = HitBy
trigger1 = time = [13,35]
value = SCA,AA,AT

[State 1106,Hitdef]
type = HitDef
trigger1 = AnimElem = 7
attr = S, SA
animtype = hard
damage = 75,18
hitflag = MAF
guardflag = MA
getpower = 60,30
sparkno = S8052*10**(random%4)
guard.sparkno = S9000
pausetime = 10,10
guardpausetime = 10,10
sparkxy = -15,ceil(p2dist y+enemynear,const(size.mid.pos.y))
hitsound = S200,5
guardsound = S300,0
ground.type = High
ground.slidetime = 24+(p2movetype = A)*7
ground.hittime = 24+(p2movetype = A)*7
guard.slidetime = 21
guard.hittime = 21
guard.velocity = -10
ground.velocity = 0,-7.5
air.animtype = Back
airguard.velocity = -2.5,-2.5
air.velocity = 0,-7.5
yaccel = 0.6
fall = 1
fall.recovertime = 40
fall.recover = 0
P2Stateno = 1109

[State 1106]
type = Varadd
trigger1 = movehit
v = 56
value = 40
persistent = 0
IgnoreHitPause = 1

[State 1106]
type = ChangeState
trigger1 = !animtime
value = 0
Ctrl = 1

[StateDef 1107]
type = S
physics = N
movetype = A
ctrl = 0
Velset = 0,0
sprpriority = 3
anim = 1107

[State 1107]
type = Velset
trigger1 = time = [15,53]
x = 15-(time = 37)*7.5-(time = [38,39])*8.5-(time = [40,41])*9.5-(time = 42)*10-(time = [43,44])*10.5-(time = [45,46])*11.5-(time = 47)*12.5-(time = 48)*12-(time = [49,50])*13.5-(time = 51)*15-(time = 52)*14.5-(time = 53)*15

[State 1107]
type = Explod
trigger1 = time = [20,45]
trigger1 = time%5 = 0
anim = 6103
ID = 6103
sprpriority = -1
postype = p1
pos = 10,2
ownpal = 0
scale = 1,1
IgnoreHitPause = 1

[State 1107]
type = Helper
trigger1 = time = 15
pos = 0,0
postype = p1
ID = 1108
pausemovetime = 0
supermovetime = 0
name = "Extraction_Cut"
sprpriority = 100
stateno = 1108
helpertype = normal
keyctrl = 0
ownpal = 1

[State 1107]
type = PlaySnd
trigger1 = time = 15
value = S100,15

[State 1107]
type = Varset
trigger1 = time = 15
v = 43
value = 120

[State 1107]
type = Varadd
trigger1 = time = 15
fv = 11
value = -25

[State 1107, VarSet]
type = VarSet
trigger1 = time = 0
v = 19
value = 0
ignorehitpause = 1

[State 1107, VarAdd]
type = VarAdd
trigger1 = Movecontact
v = 19
value = 1
ignorehitpause = 1

[State 1107, MoveHitReset]
type = MoveHitReset
trigger1 = Movecontact
ignorehitpause = 1

[State 1107,HitDef]
type = HitDef
trigger1 = (time = [15,45])*(time%7 = 1)
trigger1 = var(19) < 3
attr = S, SA
animtype = hard
damage = 28,4
hitflag = MAF
guardflag = MA
getpower = 70,40
sparkno = S8052*10**(random%4)
guard.sparkno = S9000
pausetime = 10,10
guardpausetime = 10,10
sparkxy = -15,ceil(p2dist y+enemynear,const(size.mid.pos.y))
hitsound = S200,5
guardsound = S300,0
ground.type = High
ground.slidetime = 24+(p2movetype = A)*7
ground.hittime  = 24+(p2movetype = A)*7
guard.slidetime = 21
guard.hittime = 21
guard.velocity = -10
ground.velocity = 0,-2
air.animtype = Back
airguard.velocity = -2.5,-2.5
air.velocity = 0,-2
yaccel = 0.5
fall = 1
fall.recover = 0

[State 1107]
type = Varadd
trigger1 = movehit
trigger1 = hitcount = 1
var(56) = 15
persistent = 0
IgnoreHitPause = 1

[State 1107]
type = Varadd
trigger1 = movehit
trigger1 = hitcount = 2
var(56) = 15
persistent = 0
IgnoreHitPause = 1

[State 1107]
type = Varadd
trigger1 = movehit
trigger1 = hitcount = 3
var(56) = 15
persistent = 0
IgnoreHitPause = 1

[State 1107]
type = Varadd
trigger1 = movehit
trigger1 = hitcount = 1
fvar(1) = -fvar(1)*0.07
persistent = 0
IgnoreHitPause = 1

[State 1107]
type = Varadd
trigger1 = movehit
trigger1 = hitcount = 2
fvar(1) = -fvar(1)*0.07
persistent = 0
IgnoreHitPause = 1

[State 1107]
type = Varadd
trigger1 = movehit
trigger1 = hitcount = 3
fvar(1) = -fvar(1)*0.07
persistent = 0
IgnoreHitPause = 1

[State 1107]
type = Varset
trigger1 = moveguarded
var(40) = 1
IgnoreHitPause = 1

[State 1107]
type = Varset
trigger1 = !moveguarded+!time
var(40) = 0
IgnoreHitPause = 1

[State 1107, ChangeState]
type = ChangeState
trigger1 = !animtime
value = 0
Ctrl = 1

[StateDef 1108]
type = A
movetype= A
physics = N
sprpriority = 8
ctrl = 0
anim = 1108

[State 1108]
type = Varset
trigger1 = parent,stateno = 1107
var(0) = 1

[State 1108]
type = Varadd
trigger1 = 1
var(1) = 1

[State 1108]
type = Varset
trigger1 = parent,stateno = 1105
trigger2 = !var(0)
trigger2 = var(1) < 4
trigger2 = parent,stateno != 1105
var(1) = (parent,stateno = 1105)*(parent,time-13)+(parent,stateno != [1105,1107])*14

[State 1108]
type = Varset
trigger1 = parent,stateno = 1106
trigger2 = !var(0)
trigger2 = var(1) < 14
trigger2 = parent,stateno != 1106
var(1) = (parent,stateno = 1106)*(parent,time-13)+(parent,stateno != [1105,1107])*14

[State 1108]
type = Varset
trigger1 = parent,stateno = 1107
trigger2 = var(0)
trigger2 = var(1) < 24
trigger2 = parent,stateno != 1107
var(1) = (parent,stateno = 1107)*(parent,time-15)+(parent,stateno != [1105,1107])*24

[State 1108]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1108]
Type = Trans
Trigger1 = 1
Trans = add
IgnoreHitPause = 1

[State 1108]
type = AngleDraw
trigger1 = 1
scale = 2.0*(1+(var(1) = [14,38])*(var(1)-13)*0.04)*(1+Var(0)*0.5),2.0*(1-(var(1) = [14,38])*(var(1)-13)*0.04)*(1+Var(0)*0.5)

[State 1108]
type = BindToParent
trigger1 = parent,stateno = 1105
trigger2 = parent,stateno = 1106
trigger3 = parent,stateno = 1107
pos = 66-Var(0)*21,2

[State 1108]
type = PalFX
trigger1 = !var(0)
trigger1 = var(1) = [14,38]
trigger2 = var(0)
trigger2 = var(1) = [24,48]
time = 1
add = 0,0,0
mul = 256-(var(1)-(13+var(0)*10))*10,256-(var(1)-(13+var(0)*10))*10,256-(var(1)-(13+var(0)*10))*10
invertall = 0
color = 256

[State 1108,DestroySelf]
type = Destroyself
trigger1 = !var(0)*var(1) = 39
trigger2 = var(0)*var(1) = 49

[StateDef 1109]
type = A
movetype= H
physics = N

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

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

[State 1109]
type = VelSet
trigger1 = Time = 0
x = -1

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

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

[State 1109]
type = AngleDraw
trigger1 = 1

[State 1109]
type = Changestate
trigger1 = command = "recovery"
trigger1 = Time > 40
value = 5210

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

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

[Statedef 1616]
type = S
movetype= A
physics = S
juggle  = 2
poweradd= 0
velset = 0,0
anim = 8506
ctrl = 0
sprpriority = 2

[State 1616, PowerAdd]
type = PowerAdd
trigger1 = AnimElem = 1
value = -2000
;ignorehitpause =
;persistent =

[State 1616, Explod]
type = Explod
trigger1 = AnimElem = 11
anim = 6103
ID = 6103
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 2
removeongethit = 1

[State 1616, Pause]
type = Pause
trigger1 = AnimElem = 1
time = 30
movetime = 30

[State 1616]
type = SuperPause
trigger1 = AnimElem = 3
time = 30
movetime = 30
anim = -1
sound = S0,9
pos = 999,999
darken = 0
unhittable = 1

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

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

[State -1]
Type = Helper
Trigger1 = AnimElem = 3
StateNo = 6010
ID = 10001
Name = "EX_Effect"
Pos = -22,-85
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 5
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 1616, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S0,7

[State 1616, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 10
value = S100,11

[State 1616]
type     = EnvShake
Trigger1 = AnimElem = 1
time     = 30
ampl     = 4
freq     = 127

[State 1616]
type = NotHitBy
trigger1 = time >= 4
value = SAC
time = 1

[State 1616]
type = playsnd
trigger1 = animelem = 1
value = S1680,21

[State 1616]
type = NotHitBy
trigger1 = time >= 0
value = SAC
time = 1

[State 1616, 2]
type = helper
trigger1 = animelem = 3
ignorehitpause = 1
helpertype = normal
name = "Ragnarok"
ID = 3500
pos = 0,0
postype = p1
stateno = 1617
supermovetime = 99999
pausemovetime = 99999
keyctrl = 0
persistent = 0
ownpal = 1

[State 1616,end]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

[Statedef 1617]
type = S
movetype= A
physics = N
juggle  = 1
poweradd= 0
velset = 0,0
anim = 8500
ctrl = 0
sprpriority = 5

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

[State 1617]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1617]
type = NotHitBy
trigger1 = 1
value = SAC
time = 1

[State 1617]
Type  = AngleDraw
Trigger1 = 1
Scale = 0.7,0.7

[State 1617]
type = posadd
trigger1 = time = 0
x = -3
y = -4

[State 1617]
type = DestroySelf
trigger1 = parent,movetype = H
value = 0

[State 1617]
type = changestate
trigger1 = animtime = 0
value = 1618

[Statedef 1618]
type = S
movetype= A
physics = N
juggle  = 1
poweradd= 0
velset = 0,0
anim = 8501
ctrl = 0
sprpriority = 5

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

[State -1]
Type  = Angleset
Trigger1 = 1
Value = 40

[State 1618]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1618, 1]
type = NotHitBy
trigger1 = 1
value = SAC
time = 1

[State 1618, 1]
type = varset
trigger1 = time = 0
fv = 1
value = 0

[State 1618, 1]
type = varadd
trigger1 = time >= 1
trigger1 = gametime%2 = 0
fv = 1
value = 0.005

[State 1618, 1]
Type  = AngleDraw
Trigger1 = 1
Scale = 0.6+fvar(1),0.6+fvar(1)

[State 1618]
type = posadd
trigger1 = time = 0
x = 3
y = -9

[State 1618]
type = DestroySelf
trigger1 = parent,movetype = H
value = 0

[State 1618]
type = changestate
trigger1 = animtime = 0
value = 1619

[Statedef 1619]
type = S
movetype= A
physics = N
juggle  = 1
poweradd= 0
velset = 0,0
anim = 8502
ctrl = 0
sprpriority = 5

[State 1619]
Type  = Angleset
Trigger1 = 1
Value = 0

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

[State 1619]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1618]
type = NotHitBy
trigger1 = 1
value = SAC
time = 1

[State 1619]
type = varset
trigger1 = time = 0
fv = 1
value = 0

[State 1619]
type = varadd
trigger1 = time >= 1
fv = 1
value = 0.01

[State 1619]
Type  = AngleDraw
Trigger1 = 1
Scale = 0.6,0.6

[State 1619]
type = posadd
trigger1 = animelem = 1
x = 13
y = -6

[State 1619]
type = posadd
trigger1 = animelem = 2
x = -3
y = -4

[State 1619]
type = posadd
trigger1 = animelem = 3
x = -15
y = -9

[State 1619]
type = posadd
trigger1 = animelem = 4
x = -11
y = 8

[State 1619]
type = posadd
trigger1 = animelem = 10
x = 8
y = -5

[State 1619,end]
type = DestroySelf
trigger1 = parent,movetype = H
value = 0

[State 1619,end]
type = changestate
trigger1 = animtime = 0
value = 1620

[Statedef 1620]
type = S
movetype= A
physics = N
juggle  = 1
poweradd= 0
velset = 0,0
anim = 8503
ctrl = 0
sprpriority = 5

[State 1620]
Type  = Angleset
Trigger1 = 1
Value = 0

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

[State 1620]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1620, 4]
type = NotHitBy
trigger1 = 1
value = SAC
time = 1

[State 1620, 4]
type = varset
trigger1 = time = 0
fv = 1
value = 0

[State 1620, 4]
type = varadd
trigger1 = time >= 1
fv = 1
value = 0.01

[State 1620]
type = posset
trigger1 = time = 0
y = 0

[State 1620]
type = posadd
trigger1 = animelem = 2
x = 7
y = -1

[State 1620]
type = posadd
trigger1 = animelem = 2
x = 1
y = -1

[State 1620]
type = posadd
trigger1 = animelem = 3
y = -2

[State 1620]
type = DestroySelf
trigger1 = parent,movetype = H
value = 0

[State 1620]
type = HitDef
trigger1 = animelem = 2
attr = S, HA
animtype = heavy
getpower = 0
damage = 350,20
priority = 5
hitflag = MAF
guardflag = M
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 = 1623

[State 1620]
type = Explod
trigger1 = movehit = 1
postype = p2
pos = 60,-30
anim = 2014
sprpriority = 5
bindtime = 1
scale = 1.5,1
removetime = -2

[State 1620, 4]
type = playsnd
trigger1 = movehit = 1
value = 1,7
channel = 1

[State 1620,end]
type = changestate
trigger1 = animtime = 0
value = 1621

[Statedef 1621]
type = S
movetype= A
physics = N
juggle  = 1
poweradd= 0
velset = 0,0
anim = 8504
ctrl = 0
sprpriority = 5

[State -1]
Type  = AngleDraw
Trigger1 = 1
Scale = 0.86,0.86

[State -1]
Type  = Angleset
Trigger1 = 1
Value = 0

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

[State 1621]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1621, 4]
type = NotHitBy
trigger1 = 1
value = SAC
time = 1

[State 1621, 4]
type = varset
trigger1 = time = 0
fv = 1
value = 0

[State 1621, 4]
type = varadd
trigger1 = time >= 1
fv = 1
value = 0.01

[State 1621]
type = posset
trigger1 = time = 0
y = 0

[State 1621]
type = posadd
trigger1 = animelem = 1
x = -4
y = -4

[State 1621,end]
type = DestroySelf
trigger1 = parent,movetype = H
value = 0

[State 1621,end]
type = changestate
trigger1 = animtime = 0
value = 1622

[Statedef 1622]
type = S
movetype= A
physics = N
juggle  = 1
poweradd= 0
velset = 0,0
anim = 8505
ctrl = 0
sprpriority = 5

[State -1]
Type  = AngleDraw
Trigger1 = 1
Scale = 0.9,0.9

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

[State 1622]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1622, 4]
type = NotHitBy
trigger1 = 1
value = SAC
time = 1

[State 1622, 4]
type = varset
trigger1 = time = 0
fv = 1
value = 0

[State 1622]
type = posset
trigger1 = time = 0
y = 0

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

[Statedef 1623]
type = A
movetype= H
physics = N
velset = 0,0

[State 1623]
type = ChangeAnim2
trigger1 = 1
value = 6000

[State 1623]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 1624

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

[State 1624]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 1624]
type = VelAdd
trigger1 = 1
y = .45

[State 1624]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,1

[State 1624]
type = ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 1625

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

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

[State 1625]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 1625]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 1625]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

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

[State 1625]
type = Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor(screenpos y) - 50
postype = back
sprpriority = 3

[State 1625]
type = ChangeAnim2
trigger1 = Time = 0
value = 6002

[State 1625]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 1625]
type = ChangeState
trigger1 = AnimTime = 0
value = 1626

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

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

[State 1626]
type = VelSet
trigger1 = Time = 0
y = -8

[State 1626]
type = VelSet
trigger1 = Time = 0
x = 1.6

[State 1626]
type = Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 1626]
type = VelAdd
trigger1 = 1
y = .45

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

[State 1626]
type = AngleDraw
trigger1 = 1

[State 1626]
type = null
trigger1 = command = "recovery"
trigger1 = Time > 30
value = 5210

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

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

[StateDef 2005]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 2000
poweradd = 20

[State 2005, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S100,10

[State 2005, 1]
type = Projectile
trigger1 = AnimElem = 4
projanim = 2005
projhitanim = 2006
projpriority = 1
projheightbound = -240, 100
projedgebound = 100
projscreenbound = 100
offset = 0,-41
velocity = 5
remvelocity = 1
attr = S, SP
damage   = 30,5
animtype = light
guardflag = MA
hitflag = MAF
pausetime = 10,10
hitsound   = S200,10
guardsound = S300,0
sparkno = S8053*10**(random%4)
sparkxy = 50, -16
ground.type = Low
ground.slidetime = 25
ground.hittime  = 25
ground.velocity = -6
air.animtype = Back
air.velocity = -4,-6
air.juggle = 1
air.fall = 1
down.velocity = -4,-6
down.hittime = 30
down.bounce = 0

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

[StateDef 2006]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 2000
poweradd = 20

[State 2006, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S100,10

[State 2006, 1]
type = Projectile
trigger1 = AnimElem = 4
projanim = 2005
projhitanim = 2006
projpriority = 1
projheightbound = -240, 100
projedgebound = 100
projscreenbound = 100
offset = 0,-41
velocity = 7
remvelocity = 2
attr = S, SP
damage   = 40,7
animtype = medium
guardflag = MA
hitflag = MAF
pausetime = 10,10
hitsound   = S200,10
sparkno = S8053*10**(random%4)
guard.sparkno = S9000
sparkxy = 50, -16
guardsound = S300,0
ground.type = Low
ground.slidetime = 25
ground.hittime  = 25
ground.velocity = -6
air.animtype = Back
air.velocity = -4,-6
air.juggle = 2
air.fall = 1
down.velocity = -4,-6
down.hittime = 30
down.bounce = 0

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

[StateDef 2007]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 2000
poweradd = 20

[State 2007, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S100,10

[State 2007, 1]
type = Projectile
trigger1 = AnimElem = 4
projanim = 2005
projhitanim = 2006
projpriority = 1
projheightbound = -240, 100
projedgebound = 100
projscreenbound = 100
offset = 0,-41
velocity = 9
remvelocity = 3
attr = S, SP
damage   = 50,9
animtype = Heavy
guardflag = MA
hitflag = MAF
pausetime = 10,10
hitsound   = S200,10
guardsound = S300,0
sparkno = S8053*10**(random%4)
guard.sparkno = S9000
sparkxy = 50, -16
ground.type = Low
ground.slidetime = 25
ground.hittime  = 25
ground.velocity = -6,-4
air.animtype = Back
air.velocity = -4,-6
air.juggle = 3
air.fall = 1
down.velocity = -4,-6
down.hittime = 30
down.bounce = 0
fall = 1

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

[StateDef 2100]
type = S
movetype = A
physics = S
anim = 2100
ctrl = 0
velset = 0,0

[State 2100]
type = Explod
trigger1 = AnimElem = 5
trigger2 = AnimElem = 16
trigger3 = AnimElem = 27
trigger4 = AnimElem = 38
trigger5 = AnimElem = 49
anim = 2010
pos = 0,-60
postype = p1
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1.5,1.5
sprpriority = 2
removeongethit = 1
ignorehitpause = 0

[State 2100, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 15
trigger3 = AnimElem = 26
trigger4 = AnimElem = 37
trigger5 = AnimElem = 48
value = S100,6

[State 2100]
type = SuperPause
trigger1 = AnimElem = 3
time = 30
movetime = 0
anim = -1
sound = S0,5
pos = 999,999
darken = 0
unhittable = 1

[State 2100]
type = AfterImage
trigger1 = AnimElem = 3
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]
type = Explod
trigger1 = AnimElem= 3
anim = 10300
postype = p1
pos = 20,-40
facing = 1
bindtime = 1
removetime = -2
supermovetime = 9999
pausemovetime = 9999
sprpriority = 2

[State -1]
Type = Helper
Trigger1 = AnimElem = 3
StateNo = 6010
ID = 10001
Name = "EX_Effect"
Pos = -22,-85
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 5
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 2100]
type = PowerAdd
trigger1 = AnimElem = 3
value = -1000
ignorehitpause = 1

[State 2100]
type = NotHitBy
trigger1 = AnimElemTime(1) >= 0
trigger1 = AnimElemTime(4) < 0
value = SCA
time = 1
ignorehitpause = 1

[State 2100]
type = VelSet
trigger1 = time
x = 2
ignorehitpause = 1

[State 2100]
type = VelSet
trigger1 = AnimElem = 58
x = 0
ignorehitpause = 1

[State 2100]
type = Hitdef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 15
trigger3 = AnimElem = 26
trigger4 = AnimElem = 37
trigger5 = AnimElem = 48
attr = S,HA
hitflag = MAF
guardflag = M
animtype = back
air.animtype = back
fall.animtype = back
ground.type = low
air.type = low
damage = 16,6
getpower = 0,0
givepower = 50,25
pausetime = 0,6
guard.pausetime = 2,3
sparkno = S8053*10**(random%4)
guard.sparkno = S9000
sparkxy = -30+random%20,ceil((EnemyNear,ScreenPos Y-ScreenPos Y)-60+random%20)
hitsound = S200,3
guardsound = S300,0
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
air.hittime = 21
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity = -4,0
guard.velocity = -3
air.velocity = -4,ifelse(EnemyNear,Vel Y <= 0,(-2.5+EnemyNear,Vel Y*0.25),-2.25)
airguard.velocity = -1.5,-3
ground.cornerpush.veloff = fvar(17)-3.0
air.cornerpush.veloff = 0
down.cornerpush.veloff = -3.0
guard.cornerpush.veloff = -3.0
airguard.cornerpush.veloff = 0
fall.recover = 0
forcestand = 0
fall = 0
air.fall = 1
kill = 1
guard.kill = 1
yaccel = 0.3

[State 2100]
type = Hitdef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 16
trigger3 = AnimElem = 27
trigger4 = AnimElem = 38
trigger5 = AnimElem = 49
attr = S,HA
hitflag = MAF
guardflag = M
animtype = back
air.animtype = back
fall.animtype = back
ground.type = High
air.type = High
damage = 16,6
getpower = 0,0
givepower = 50,25
pausetime = 0,6
guard.pausetime = 2,3
sparkno = S8053*10**(random%4)
guard.sparkno = S9000
sparkxy = -30+random%20,ceil((EnemyNear,ScreenPos Y-ScreenPos Y)-60+random%20)
hitsound = S200,3
guardsound = S300,0
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
air.hittime = 21
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity = -4,0
guard.velocity = -3
air.velocity = -4,ifelse(EnemyNear,Vel Y <= 0,(-2.5+EnemyNear,Vel Y*0.25),-2.25)
airguard.velocity = -1.5,-3
ground.cornerpush.veloff = fvar(17)-3.0
air.cornerpush.veloff = 0
down.cornerpush.veloff = -3.0
guard.cornerpush.veloff = -3.0
airguard.cornerpush.veloff = 0
fall.recover = 0
forcestand = 0
fall = 0
air.fall = 1
kill = 1
guard.kill = 1
yaccel = 0.3

[State 2100]
Type = ChangeState
trigger1 = AnimTime = 0
Value = 2101

[StateDef 2101]
type = S
movetype = A
physics = N
anim = 2101
ctrl = 0
velset = 0,0

[State 2101, NotHitBy]
type = NotHitBy
trigger1 = Time = [2,12]
value = SCA

[State 2101, AngleDraw]
type = AngleDraw
trigger1 = Time = [2,12]
scale =  2,.5

[State 2101]
type = Explod
trigger1 = movehit = 1
postype = p2
pos = 60,-30
anim = 2014
sprpriority = 5
bindtime = 1
scale = 1.5,1
removetime = -2

[State 2101, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = s200,19
ignorehitpause = 1

[State 2101, Explod]
type = Explod
trigger1 = AnimElem = 2
anim = 6103
ID = 6103
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 2

[State 2101, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 2101]
type = VelSet
trigger1 = AnimElem = 2
x = 30
ignorehitpause = 1

[State 2101]
type = VelSet
trigger1 = AnimElem = 4
x = 0
ignorehitpause = 1

[State 2101]
type = HitDef
trigger1 = animelem = 2
attr = S, HA
animtype = heavy
getpower = 0
damage = 100,30
priority = 5
hitflag = MAFD
guardflag = M
pausetime = 0,0
guard.pausetime = 0,0
guard.sparkno = S9000
sparkno = -1
sparkxy = -25,-53
hitsound = S200,17
guardsound = s300,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 16
ground.velocity = -10,-5
guard.velocity = -5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
air.velocity = -9,-5
envshake.time=16
envshake.freq=75
envshake.ampl=5
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 1109

[State 2101]
Type = ChangeState
trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

[StateDef 3000]
type = C
movetype= A
physics = C
velset = 0,0
ctrl = 0
anim = 3000
sprpriority = 2

[State 3000]
type = NotHitBy
trigger1 = time = 0
time = 9
value = SAC

[State 3000, PowerAdd]
type = PowerAdd
trigger1 = AnimElem = 3
value = -1000
;ignorehitpause =
;persistent =

[State 3000]
type = SuperPause
trigger1 = AnimElem = 3
time = 30
movetime = 0
anim = -1
sound = S0,5
pos = 999,999
darken = 0
unhittable = 1

[State 3000, AfterImage]
type = AfterImage
trigger1 = AnimElem = 3
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 3000]
type = Explod
trigger1 = AnimElem= 3
anim = 10300
postype = p1
pos = 0,-25
facing = 1
bindtime = 1
removetime = -2
supermovetime = 9999
pausemovetime = 9999
sprpriority = 3

[State -1]
Type = Helper
Trigger1 = AnimElem = 3
StateNo = 6010
ID = 10001
Name = "EX_Effect"
Pos = -22,-85
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 5
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 3000, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 2001
pos = 8,-45
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 5
removeongethit = 1
ignorehitpause = 0
;persistent =

[State 3000]
Type = Helper
trigger1 = stateno = 3000 && movehit
StateNo = 3011
ID = 3011
Name = "Tenha_Yurei"
Pos = 50,0
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 10
IgnoreHitPause = 1
Persistent = 0

[State 3000]
type = Helper
trigger1 = Movehit = 1
pos = 0,-30
postype = p2
ID = 4007
pausemovetime = 0
name = "Petal"
sprpriority = 10
stateno = 4007
helpertype = normal
keyctrl = 0
ownpal = 1

[State 3000]
type = Helper
trigger1 = Movehit = 1
pos = 0,-30
postype = p2
ID = 4007
pausemovetime = 0
name = "Petal"
sprpriority = 10
stateno = 4007
helpertype = normal
keyctrl = 0
ownpal = 1

[State 3000]
type = Helper
trigger1 = Movehit = 1
pos = 0,-30
postype = p2
ID = 4007
pausemovetime = 0
name = "Petal"
sprpriority = 10
stateno = 4007
helpertype = normal
keyctrl = 0
ownpal = 1

[State 3000]
type = Helper
trigger1 = Movehit = 1
pos = 0,-30
postype = p2
ID = 4007
pausemovetime = 0
name = "Petal"
sprpriority = 10
stateno = 4007
helpertype = normal
keyctrl = 0
ownpal = 1

[State 3000]
type = Helper
trigger1 = Movehit = 1
pos = 0,-30
postype = p2
ID = 4007
pausemovetime = 0
name = "Petal"
sprpriority = 10
stateno = 4007
helpertype = normal
keyctrl = 0
ownpal = 1

[State 3000]
type = Helper
trigger1 = Movehit = 1
pos = 0,-30
postype = p2
ID = 4007
pausemovetime = 0
name = "Petal"
sprpriority = 10
stateno = 4007
helpertype = normal
keyctrl = 0
ownpal = 1

[State 3000]
type = Helper
trigger1 = Movehit = 1
pos = 0,-30
postype = p2
ID = 4007
pausemovetime = 0
name = "Petal"
sprpriority = 10
stateno = 4007
helpertype = normal
keyctrl = 0
ownpal = 1

[State 3000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = S100,16

[State 3000, PlaySnd]
type = PlaySnd
trigger1 = stateno = 3000 && movehit
value = S100,17

[State 3000, HitDef]
type = HitDef
trigger1 = AnimElem = 5
attr = C, HA
damage = 26,6
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 4,4
sparkno = S8052*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -76
hitsound = S200, 5
guardsound = S300, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = 0,-10
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -0,-9
air.hittime = 12
fall = 1
fall.recover = 0
air.fall = 1
getpower = 0
kill = 0

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

[State 3000]
type = Changestate
trigger1= AnimElem = 5 >= 0 && movehit
value = 3001

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

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

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

[State 3001, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 0
y = -11

[State 3001]
type = Changestate
trigger1= AnimTime = 0
value = 3002

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

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

[State 3002, HitDef]
type = HitDef
trigger1 = AnimElem = 5
attr = A, HA
damage = 26,5
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 5, Hit
pausetime = 10, 10
sparkno = S8051*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -76
hitsound = S200, 5
guardsound = S300, 0
ground.type = High
ground.slidetime = 15
ground.hittime  = 12
ground.velocity = 0,20
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = 0,20
air.hittime = 22
fall = 1
fall.recover = 0
air.fall = 1
getpower = 0
P2Stateno = 3006
kill = 0

[State 3002]
type = Changestate
trigger1 = AnimTime = 0
value = 3003

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

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

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

[State 3003, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(10) > 0
x = 0
y = 2.5

[State 3003]
type = Changestate
trigger1 = Pos Y > 0
value = 3004

[StateDef 3004]
type = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
anim = 3004
sprpriority = 2

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

[State 3004, Explod]
type = Explod
trigger1 = AnimElem = 4
anim = 8052*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 3004]
type = Explod
trigger1 = AnimElem = 4
Anim = 3010
pos = 55, 0
postype = p1
ownpal = 1
bindtime = 1
sprpriority = 5
scale = 2,2

[State 3004, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem = 4
value = -150
kill = 1
absolute = 1

[State 3004, HitAdd]
type = HitAdd
trigger1 = AnimElem = 4
value = 1

[State 3004, TargetState]
type = TargetState
trigger1 = AnimElem = 4
value = 3008

[State 3004, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S200,10

[State 3004]
type = EnvShake
Trigger1 = AnimElem = 4
time = 10
ampl = 25
freq = 147

[State 3004, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

[State 3004]
type = Changestate
trigger1 = Time = 30
value = 3005

[StateDef 3005]
type = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
anim = 3005
sprpriority = 2

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

[State 3005, Explod]
type = Explod
trigger1 = AnimElem = 7
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 3005, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem = 7
value = -36
kill = 1
absolute = 1

[State 3005, HitAdd]
type = HitAdd
trigger1 = AnimElem = 7
value = 1

[State 3005, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S200,12

[State 3004, TargetState]
type = TargetState
trigger1 = AnimElem = 7
value = 3009

[State 3005]
type = Changestate
trigger1 = AnimTime = 0
value = 0
Ctrl = 1

[StateDef 3006]
type = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = 1

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

[State 3006, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 3006

[State 3006, VelSet]
type = VelSet
trigger1 = AnimElemTime(1) > 0
x = 0
y = 12

[State 3006]
type = Changestate
trigger1 = Pos Y > 0
value = 3007

[StateDef 3007]
type = L
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = 1

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

[State 3007]
type = PlaySnd
trigger1 = Time = 1
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 3007, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 3007

[StateDef 3008]
type = L
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = 1

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

[State 3008, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 3008

[StateDef 3009]
type = A
movetype= H
physics = N
facep2 = 1

[State 3009]
type = velset
Trigger1 = time = 0
x = -6
y = -3

[State 3009]
type = nothitby
trigger1 = 1
value = SCA
time = 2

[State 3009]
type = veladd
Trigger1 = 1
y = .44

[State 3009]
type = selfstate
Trigger1 = !time
value = 5050
ctrl = 0

[State 3009]
type = changestate
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 3010
ctrl = 0

[StateDef 3010]
type = L
movetype= H
physics = N

[State 3010]
type = PlaySnd
trigger1 = Time = 1
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 3010]
type = selfstate
trigger1 = time > const(data.liedown.time) + 20
value = 5120

[State 3010]
type = nothitby
trigger1 = 1
value = SCA
time = 2

[State 3010]
type = FallEnvShake
trigger1 = Time = 0

[State 3010]
type = ChangeAnim
persistent = 0
trigger1 = SelfAnimExist(5110 + (anim % 10))
trigger1 = anim = [5081,5089]
value = 5110 + (anim % 10)

[State 3010]
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119]
triggerall = prevstateno != 604
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170

[State 3010]
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119]
triggerall = prevstateno != 604
trigger1 = anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)

[State 3010]
type = PosSet
trigger1 = Time = 0
y = 0

[State 3010]
type = VarSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) != 0
sysvar(1) = floor(vel y)

[State 3010]
type = PlaySnd
trigger1 = Time = 0
trigger1 = enemynear,stateno < 610
trigger1 = prevstateno != 804
trigger1 = !SysVar(0)
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 3010]
type = VelSet
trigger1 = Time = 0
y = 0

[State 3010]
type = ChangeAnim
persistent = 0
triggerall = anim = [5171,5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = AnimTime = 0
trigger2 = SysVar(0)
value = 5110 + (anim % 10)

[State 3010]
type = ChangeAnim
persistent = 0
triggerall = Anim != [5111,5119]
trigger1 = AnimTime = 0
trigger2 = SysVar(0)
value = 5110

[State 3010]
type = selfState
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0)
trigger3 = Anim = [5110,5119]
value = 5150

[State 3010]
type = VarSet
trigger1 = SysVar(0)
trigger1 = Time = 0
sysvar(0) = 0

[State 3010]
type = VelMul
trigger1 = 1
x = 0.85

[StateDef 3011]
type = A
physics = N
velset = 0,0
anim = 3009
sprpriority = 10

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

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

[State 3011, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1.5,2

[State 3011, PalFX]
type = PalFX
trigger1 = 1
add = 0,0,0
mul = 255,105,180
invertall = 0
color = 0
time = 1

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

[StateDef 3500]
type = S
movetype = I
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
trigger1 = !numhelper(3501)
ID = 3506
pos = 30,0
postype = p1
stateno = 3506
helpertype = normal
name = "Yuyuko"
keyctrl = 0
ownpal = 1
supermovetime = 1

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

[Statedef 3501]
type = S
movetype = A
physics = S
ctrl = 0
anim = 3501
velset = 0,0
sprpriority = 3

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

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

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

[State 3501, VelAdd]
type = Velset
trigger1 = time
x = 5
y = 0
;ignorehitpause =
;persistent =

[State 3501]
type = changestate
trigger1 =(P2Dist X < 60)
value = 3502
ctrl = 1

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

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

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

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

[State 3502, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[State 3502, Explod]
type = Explod
trigger1 = AnimElem = 3
anim = 1203
ID = 1203
pos = 10,-70
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 2.2,1
ignorehitpause = 0
sprpriority = 4

[State 3502, Explod]
type = Explod
trigger1 = AnimElem = 4
anim = 1203
ID = 1203
pos = 10,-70
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 2.2,1
ignorehitpause = 0
sprpriority = 4

[State 3502, Explod]
type = Explod
trigger1 = AnimElem = 3
anim = 1204
ID = 1204
pos = -10,-70
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 1.7,1
ignorehitpause = 0
sprpriority = 4

[State 3502, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 1204
ID = 1204
pos = 10,-70
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 1.7,1
ignorehitpause = 0
sprpriority = 4

[State 3502, Explod]
type = Explod
trigger1 = AnimElem = 7
anim = 1204
ID = 1204
pos = 10,-70
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 1.7,1
ignorehitpause = 0
sprpriority = 4

[State 3502, Explod]
type = Explod
trigger1 = AnimElem = 4
anim = 1205
ID = 1205
pos = -10,-70
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 1.7,1
ignorehitpause = 0
sprpriority = 4

[State 3502, Explod]
type = Explod
trigger1 = AnimElem = 6
anim = 1205
ID = 1205
pos = -10,-70
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 1.7,1
ignorehitpause = 0
sprpriority = 4

[State 3502, Explod]
type = Explod
trigger1 = AnimElem = 8
anim = 1205
ID = 1205
pos = -10,-70
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 1.7,1
ignorehitpause = 0
sprpriority = 4

[State 3502, Explod]
type = Explod
trigger1 = AnimElem = 3
anim = 1206
ID = 1206
pos = -10,-70
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 2.2,1
ignorehitpause = 0
sprpriority = 4

[State 3502, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 1206
ID = 1206
pos = -10,-70
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 2.2,1
ignorehitpause = 0
sprpriority = 4

[State 3502, Explod]
type = Explod
trigger1 = AnimElem = 7
anim = 1206
ID = 1206
pos = -10,-70
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 2.2,1
ignorehitpause = 0
sprpriority = 4

[State 3502, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S100,8

[State 3502, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S100,9

[State 3502, VelAdd]
type = Velset
trigger1 = time
x = 7
y = 0
;ignorehitpause =
;persistent =

[State 3502, 1]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
trigger3 = AnimElem = 5
trigger4 = AnimElem = 6
trigger5 = AnimElem = 7
trigger6 = AnimElem = 8
attr = S, SA
damage = 20,5
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 3,7
sparkno = S8052*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -76
hitsound = S200, 10
guardsound = S300, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -6,-2
fall = 1
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

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

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

[State 3503]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
trigger1 = Anim = 3503
trigger1 = animTime = 0
Value = 3508

[State 3503, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[State 3503, Explod]
type = null
trigger1 = AnimElem = 1
anim = 1203
ID = 1203
pos = 10,-70
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 2.2,1
ignorehitpause = 0

[State 3503, Explod]
type = null
trigger1 = AnimElem = 1
anim = 1205
ID = 1205
pos = -10,-70
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 1.7,1
ignorehitpause = 0

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

[StateDef 3504]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3504
poweradd = 20
sprpriority = 3

[State 3504, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[State 3504, end]
type = ChangeState
trigger1 = Time = 6
value = 3505
ctrl = 1

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

[State 3505, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 15
value = S100,12

[State 3505, end]
type = destroyself
trigger1 = time = 88

[StateDef 3506]
type = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3506
sprpriority = 3

[State 3506, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S4000,0
volume = 255

[State 3506, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[state fadein]
type=trans
trans=addalpha
alpha=ifelse(time<=7,32*(time+1),256),ifelse(time<=8,256,(16-time)*32)
trigger1=time<=16

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

[Statedef 3507]
type = S
movetype = H
physics = S
velset = 0,0
poweradd = 0
ctrl = 0
anim = IfElse(RoundState = 3 || RoundState = 4,3511,3507)
sprpriority = 1

[State 3507]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
trigger1 = Anim = IfElse(RoundState = 3 || RoundState = 4,3511,3507)
trigger1 = animTime = 0
Value = 3508

[State 3507]
type = velset
trigger1 = AnimElemTime(3) <= 0
X =  -0.8

[State 3507]
Type = Destroyself
Trigger1 = time = 61

[statedef 3508]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3504
sprpriority = 3
facep2 = 1

[State 3508]
type = nothitby
trigger1 = 1
value = SCA

[State 3508]
type = ScreenBound
trigger1 = 1
value = 1

[State 3508]
type = turn
trigger1 = (P2Dist X < 0)

[State 3508]
type = ChangeState
trigger1 = RoundState = 4
trigger1 = parent, stateno = [181,189]
value = 3509

[State 3508]
type = ChangeState
triggerall = RoundState = 4
trigger1 = parent, stateno = 170
trigger2 = parent, alive = 0
value = 3510

[statedef 3509]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3508
sprpriority = 1
facep2 = 1

[state fadein]
type=trans
trans=addalpha
alpha=ifelse(time<=7,32*(time+1),256),ifelse(time<=8,256,(16-time)*32)
trigger1=anim=3509
trigger1=time<=40

[State 3509, Explod]
type = Explod
trigger1 = time = 40
anim = 3509
ID = 3509
pos = 30,-100
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -1
scale = 1,1
sprpriority = 1

[State 3509]
type = ScreenBound
trigger1 = 1
value = 1

[State 3509]
type = nothitby
trigger1 = 1
value = SCA

[statedef 3510]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3510
sprpriority = 0
facep2 = 1

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

[State 3510]
type = nothitby
trigger1 = 1
value = SCA

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

[state 3600]
type = VarSet
trigger1 = Time = 0
var(33) = 420

[State 3600, Helper]
type = Helper
trigger1 = time = 0
ID = 3601
pos = 0,-250
postype = p2
facing = -1
stateno = 3601
helpertype = normal
name = "Tenshi"
keyctrl = 0
supermovetime = 1

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

[StateDef 3601]
type = A
movetype= A
physics = N
juggle  = 1
ctrl = 0
anim = 3600
poweradd = 20
sprpriority = 2

[State 3601, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[state fadein]
type=trans
trans=addalpha
alpha=ifelse(time<=7,32*(time+1),256),ifelse(time<=8,256,(16-time)*32)
trigger1=time<=16

[State 3601, 1]
type = HitDef
trigger1 = AnimElem = 1
attr = A, SA
damage = 75,10
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10, 10
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, 0
hitsound = S200, 12
guardsound = S300, 4
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -6,-3
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -4,6
air.hittime = 12
fall = 1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 3601, VelAdd]
type = Veladd
trigger1 = AnimElem = 1
x = 0
y = 1
;ignorehitpause =
;persistent =

[State 3601]
type = ChangeState
trigger1 = Pos Y >= 0
value = 3602
ctrl = 1

[State 3601, Gravity]
type = Gravity
trigger1 = 1
;ignorehitpause =
;persistent =

[StateDef 3602]
type = S
movetype= i
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3601
poweradd = 20
sprpriority = 2

[State 3602, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[State 3602]
type = EnvShake
Trigger1 = AnimElem = 1
time = 10
ampl = 20
freq = 127

[State 3602, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S200,11

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

[State 3602, ChangeState]
type = ChangeState
trigger1 = Animtime = 0
value = 3603
ctrl = 1

[StateDef 3603]
type = S
movetype= i
physics = s
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3602
poweradd = 20
sprpriority = 2

[State 3603, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[state gravity]
type=gravity
trigger1=statetype=a

[State 3603, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 2
statetype = A       ;S,A,C,L
movetype = i        ;I,A,H
physics = n         ;A,C,S,N
;ignorehitpause =
;persistent =

[State 3603, VelSet]
type = VelSet
trigger1 = animelem=2
x = -4
y = -4
;ignorehitpause =
;persistent =

[State 3503]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
trigger1 = Anim = 3602
trigger1 = AnimElemTime(2) > 0
trigger1 = Pos Y >= 0
Value = 3607

[State 3603]
type = ChangeState
trigger1 = AnimElemTime(2) > 0
trigger1 = Pos Y >= 0
value = 3604

[StateDef 3604]
type = S
movetype= i
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3603
sprpriority = 2

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

[State 3604, ChangeState]
type = ChangeState
trigger1 = time = 6
value = 3605
ctrl = 1

[StateDef 3605]
type = S
movetype= i
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3604
sprpriority = 2

[State 3605, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[State 3605, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 3606
ctrl = 1

[StateDef 3606]
type = S
movetype= i
physics = n
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3605
sprpriority = 2

[State 3606, VelAdd]
type = VelAdd
trigger1 = AnimElem = 4
x = 5.6
y = 0
;ignorehitpause =
;persistent =

[State 3606, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S0,2

[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 3606, DestroySelf]
type=DestroySelf
trigger1=pos x>=360
trigger2=time>=100
;ignorehitpause =
;persistent =

[statedef 3607]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3603
sprpriority = 3
facep2 = 1

[State 3607]
type = nothitby
trigger1 = 1
value = SCA

[State 3607]
type = ScreenBound
trigger1 = 1
value = 1

[State 3607]
type = turn
trigger1 = (P2Dist X < 0)

[State 3607]
type = ChangeState
trigger1 = RoundState = 4
trigger1 = parent, stateno = [181,189]
value = 3608

[State 3607]
type = ChangeState
triggerall = RoundState = 4
trigger1 = parent, stateno = 170
trigger2 = parent, alive = 0
value = 3609

[StateDef 3608]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3606
sprpriority = 1
facep2 = 1

[State 3608, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S100,13
volume = 255

[State 3608]
type = ScreenBound
trigger1 = 1
value = 1

[State 3608]
type = nothitby
trigger1 = 1
value = SCA

[StateDef 3609]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3607
sprpriority = 0
facep2 = 1

[State 3609]
type = ScreenBound
trigger1 = 1
value = 1

[State 3609]
type = nothitby
trigger1 = 1
value = SCA

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

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

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

[State 4000]
Type = null
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 4000]
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 4000]
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 4000]
type = SuperPause
trigger1 = AnimElem = 3
time = 30
movetime = 0
anim = -1
sound = S0,10
pos = 999,999
darken = 0
unhittable = 1

[State 4000, AfterImage]
type = AfterImage
trigger1 = AnimElem = 3
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 -1]
Type = Helper
Trigger1 = AnimElem = 3
StateNo = 6020
ID = 10002
Name = "EX_Effect"
Pos = -22,-85
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 5
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 4000, PowerAdd]
type = PowerAdd
trigger1 = AnimElem = 3
value = -3000

[State 4000]
type = PlaySnd
trigger1 = AnimElem = 6
value = S100,5

[State 4000]
type = HitDef
trigger1 = AnimElem = 6
attr = S, HT
damage = 30,10
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 30,70
sparkno = S8052*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -76
hitsound = S200, 3
guardsound = S300, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 13
ground.velocity = -3.3
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12
Kill = 0
Guard.kill = 0
p2stateno = 4014

[State 4000,ChangeState]
type = Changestate
trigger1= AnimElem = 6 >= 0 && movehit
value = 4001

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

[StateDef 4001]
type = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 4007
sprpriority = 2

[State 4001]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = timerfreeze
;flag3 = nomusic
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State 4001]
type = BGPalFx
trigger1 = 1
time = 1
add = -240,-240,-240
ignorehitpause = 1

[State 4001, PosAdd]
type = PosSet
trigger1 = time = 0
x = 0
y = 0
;ignorehitpause =
;persistent =

[State 4001, TargetBind]
type = TargetBind
trigger1 = time = 0
time = 1
pos = 30,0

[State 4001, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S100,0

[State 4001, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 14
value = S100,4

[State 4001, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 18
value = S100,5

[State 4001]
type = Helper
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
pos = 0,-30
postype = p2
ID = 4007
pausemovetime = 0
name = "Petal"
sprpriority = 10
stateno = 4007
helpertype = normal
keyctrl = 0
ownpal = 1

[State 4001]
type = Helper
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
pos = 0,-30
postype = p2
ID = 4007
pausemovetime = 0
name = "Petal"
sprpriority = 10
stateno = 4007
helpertype = normal
keyctrl = 0
ownpal = 1

[State 4001]
type = Helper
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
pos = 0,-30
postype = p2
ID = 4007
pausemovetime = 0
name = "Petal"
sprpriority = 10
stateno = 4007
helpertype = normal
keyctrl = 0
ownpal = 1

[State 4001]
type = Helper
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
stateno = 4015
id = 4015
pos=ifelse(movetype=H,Ceil(P2Dist X/2),-10+ifelse(Facing=enemynear,Facing,-1,1)*ifelse(P2StateType=A,enemynear,Const(size.air.front),enemynear,Const(size.ground.front))),ifelse(-Var(35)>P2BodyDist Y,0,-Var(35))-Ceil(Abs(P2BodyDist Y)/2)
postype = P2
facing = -1
keyctrl = 0
ownpal = 1
sprpriority = 8
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999
size.xscale = 1.0
size.yscale = 1.0

[State 4001, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
value =  - 8
kill = 0
absolute = 1

[State 4001, HitAdd]
type = HitAdd
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
value = 1

[State 4001, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
value = S200,3

[State 4001]
type = TargetState
trigger1 = AnimElem = 7
trigger2 = AnimElem = 18
value = 4010
ignorehitpause = 1

[State 4001]
type = TargetState
trigger1 = AnimElem = 14
trigger2 = Time = 124
value = 4011
ignorehitpause = 1

[State 4001, end]
type = ChangeState
trigger1 = Time = 144
value = 4002

[StateDef 4002]
type = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 4008
sprpriority = 2

[State 4002, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S100,0

[State 4002, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 14
value = S100,4

[State 4002, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 18
value = S100,5

[State 4002]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = timerfreeze
;flag3 = nomusic
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State 4002]
type = BGPalFx
trigger1 = 1
time = 1
add = -240,-240,-240
ignorehitpause = 1

[State 4002]
type = Helper
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
pos = 0,-30
postype = p2
ID = 4007
pausemovetime = 0
name = "Petal"
sprpriority = 10
stateno = 4007
helpertype = normal
keyctrl = 0
ownpal = 1

[State 4002]
type = Helper
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
stateno = 4015
id = 4015
pos=ifelse(movetype=H,Ceil(P2Dist X/2),-10+ifelse(Facing=enemynear,Facing,-1,1)*ifelse(P2StateType=A,enemynear,Const(size.air.front),enemynear,Const(size.ground.front))),ifelse(-Var(34)>P2BodyDist Y,0,-Var(34))-Ceil(Abs(P2BodyDist Y)/2)
postype = P2
facing = -1
keyctrl = 0
ownpal = 1
sprpriority = 8
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999
size.xscale = 1.0
size.yscale = 1.0

[State 4002, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
value =  - 8
kill = 0
absolute = 1

[State 4002, HitAdd]
type = HitAdd
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
value = 1

[State 4002, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
value = S200,3

[State 4002]
type = TargetState
trigger1 = AnimElem = 7
trigger2 = AnimElem = 18
value = 4010
ignorehitpause = 1

[State 4002]
type = envcolor
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
value = 250,250,250
time = 3
undar = 1

[State 4002]
type = TargetState
trigger1 = AnimElem = 14

value = 4011
ignorehitpause = 1

[State 4002, end]
type = ChangeState
trigger1 = Time = 96
value = 4003

[StateDef 4003]
type = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 4009
sprpriority = 2

[State 4003, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S100,0

[State 4003, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 14
value = S100,4

[State 4003, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 18
value = S100,5

[State 4003]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = timerfreeze
;flag3 = nomusic
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State 4003]
type = BGPalFx
trigger1 = 1
time = 1
add = -240,-240,-240
ignorehitpause = 1

[State 4003]
type = Helper
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
pos = 0,-30
postype = p2
ID = 4007
pausemovetime = 0
name = "Petal"
sprpriority = 10
stateno = 4007
helpertype = normal
keyctrl = 0
ownpal = 1

[State 4003]
type = Helper
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
stateno = 4015
id = 4015
pos=ifelse(movetype=H,Ceil(P2Dist X/2),-10+ifelse(Facing=enemynear,Facing,-1,1)*ifelse(P2StateType=A,enemynear,Const(size.air.front),enemynear,Const(size.ground.front))),ifelse(-Var(34)>P2BodyDist Y,0,-Var(34))-Ceil(Abs(P2BodyDist Y)/2)
postype = P2
facing = -1
keyctrl = 0
ownpal = 1
sprpriority = 8
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999
size.xscale = 1.0
size.yscale = 1.0

[State 4003, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
value =  - 8
kill = 0
absolute = 1

[State 4003, HitAdd]
type = HitAdd
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
value = 1

[State 4003, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
value = S200,3

[State 4003]
type = TargetState
trigger1 = AnimElem = 7
trigger2 = AnimElem = 18
value = 4010
ignorehitpause = 1

[State 4003]
type = envcolor
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
value = 250,250,250
time = 3
undar = 1

[State 4003]
type = envshake
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 18
time = 18
freq = 130
ampl = 10
phase = 140

[State 4003]
type = TargetState
trigger1 = AnimElem = 14
value = 4011
ignorehitpause = 1

[State 4003, end]
type = ChangeState
trigger1 = Time = 120
value = 4004

[StateDef 4004]
type = S
movetype= A
physics = S
velset = 1,-4
ctrl = 0
anim = 4013
sprpriority = 2

[State 4004]
type = Explod
trigger1 = AnimElem = 2
anim = 2009
pos = 45,-75
postype = p1
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1.5,1.5
sprpriority = 2
removeongethit = 1
ignorehitpause = 0

[State 4004]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = timerfreeze
;flag3 = nomusic
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State 4004]
type = BGPalFx
trigger1 = 1
time = 1
add = -240,-240,-240
ignorehitpause = 1

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

[State 4004]
type = Helper
trigger1 = AnimElem = 2
pos = 0,-30
postype = p2
ID = 4007
pausemovetime = 0
name = "Petal"
sprpriority = 10
stateno = 4007
helpertype = normal
keyctrl = 0
ownpal = 1

[State 4004]
type = Helper
trigger1 = AnimElem = 2
pos = 0,-30
postype = p2
ID = 4007
pausemovetime = 0
name = "Petal"
sprpriority = 10
stateno = 4007
helpertype = normal
keyctrl = 0
ownpal = 1

[State 4004]
type = Helper
trigger1 = AnimElem = 2
pos = 0,-30
postype = p2
ID = 4007
pausemovetime = 0
name = "Petal"
sprpriority = 10
stateno = 4007
helpertype = normal
keyctrl = 0
ownpal = 1

[State 4004]
type = Helper
trigger1 = AnimElem = 2
stateno = 4015
id = 4015
pos=ifelse(movetype=H,Ceil(P2Dist X/2),-10+ifelse(Facing=enemynear,Facing,-1,1)*ifelse(P2StateType=A,enemynear,Const(size.air.front),enemynear,Const(size.ground.front))),ifelse(-Var(34)>P2BodyDist Y,0,-Var(34))-Ceil(Abs(P2BodyDist Y)/2)
postype = P2
facing = -1
keyctrl = 0
ownpal = 1
sprpriority = 8
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999
size.xscale = 1.0
size.yscale = 1.0

[State 4004]
type = Helper
trigger1 = time = 50
name = "cut-in"
stateno = 4900
ownpal = 1
postype = left
pos = 160
ignorehitpause = 1
persistent = 0
supermovetime = 9999
pausemovetime = 9999
size.xscale = .625
size.yscale = .625

[State 4004, PosFreeze]
type = PosFreeze
trigger1 = Time = [50,80]
value = 1

[State 4004, PlaySnd]
type = PlaySnd
trigger1 = Time = 50
value = S0,8

[State 4004, Pause]
type = Pause
trigger1 = Time = 50
time = 30
movetime = 30

[State 4004, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem = 2
value =  - 50
kill = 0
absolute = 1

[State 4004, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S200,5

[State 4004]
type = TargetState
trigger1 = AnimElem = 2
value = 4012
ignorehitpause = 1

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

[State 4004]
type = veladd
trigger1 = AnimElemTime(10) > 0
Y = 0.6

[State 4004, end]
type = ChangeState
trigger1 = Pos Y >=0 && Vel Y >=0
value = 4005

[StateDef 4005]
type = S
movetype = A
physics = S
velset = vel x,0
anim = 4002

[State 4005]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = timerfreeze
;flag3 = nomusic
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State 4005]
type = BGPalFx
trigger1 = 1
time = 1
add = -240,-240,-240
ignorehitpause = 1

[State 4005]
type = Helper
trigger1 = AnimElem = 4
pos = 0,0
postype = p1
ID = 4006
pausemovetime = 0
name = "Nirvana"
sprpriority = 100
stateno = 4006
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1

[State 4005]
type = playsnd
trigger1 = AnimElem = 4
value = S100,14

[State 4005]
type = playsnd
trigger1 = !time
value = S100,5

[State 4005]
type = makedust
trigger1 = time<=4

[State 4005]
type = hitby
value =
trigger1 = 1

[State 4005]
type = playerpush
value = 0
trigger1 = 1

[State 4005]
type = posset
y = 0
trigger1 = !time

[State 4005]
type = playsnd
trigger1 = animelem=4
value = S200,3

[State 4005]
type = ChangeState
value = 0
ctrl = 1
trigger1 = !animtime

[StateDef 4006]
type = A
movetype= A
physics = N
sprpriority = 8
Velset = 0,0
ctrl = 0

[State 4006]
type = EnvShake
trigger1 = Var(0) < 40
trigger1 = Var(0)%10 = 0
time = 10
ampl = -5+ceil(Var(0)*0.1)
freq = 60
phase = 120

[State 4006]
type = Helper
trigger1 = anim = 4003
trigger1 = Var(0)%2 = 1
pos = 60,0
postype = p1
ID = 4007
pausemovetime = 0
name = "Petal"
sprpriority = 10
stateno = 4007
helpertype = normal
keyctrl = 0
ownpal = 1

[State 4006]
type = Helper
trigger1 = anim = 4003
trigger1 = Var(0)%20 = 0
trigger2 = !time
pos = 80,0
postype = p1
ID = 4008
pausemovetime = 0
name = "Burst"
sprpriority = 100
stateno = 4008
helpertype = normal
keyctrl = 0
ownpal = 1

[State 4006]
type = ChangeAnim
trigger1 = !Var(0)
value = 4003

[State 4006]
type = ChangeAnim
triggerall = anim = 4003
trigger1 = !animtime
trigger2 = (root,stateno != [150,159])*(root,movetype = H)
value = 4004

[State 4006]
type = BindToParent
trigger1 = root,stateno = 4005
pos = 25,3

[State 4006]
type = AssertSpecial
trigger1 = 1
flag = noshadow

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

[State 4006]
type = AngleDraw
trigger1 = 1

[State 4006,HitDef]
type = HitDef
trigger1 = (Var(0) = [3,48])*(Var(0)%5 = 3)
attr = A, HP
animtype = medium
damage = 20,6
priority = 8,Hit
hitflag = MAFP
guardflag = MA
getpower = 0,0
sparkno = S8050*10**(random%4)
guardsparkno = S9000
sparkxy = -15,ceil(p2dist y+enemynear,const(size.mid.pos.y))
hitsound = S200,10
guardsound = S300,0
pausetime = 0,10
guardpausetime = 0,10
ground.type = High
ground.slidetime = 12
ground.hittime  = 26
guard.slidetime = 8
guard.hittime = 17
ground.velocity = -1,-6
air.animtype = Back
airguard.velocity = -2.5,-2.5
air.velocity = -1,-6
fall = 1
fall.recovertime = ceil(120*root,fVar(1)*(1+(p2movetype = A)))
fall.recover = ifelse(root,var(56)+10>=100,0,1)
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
AirGuard.CornerPush.VelOff = 0
guard.dist = 100
numhits = 0

[State 4006]
type = HitAdd
trigger1 = movehit*!MoveGuarded
trigger1 = enemynear,movetype = H
value = 1
IgnoreHitPause = 1

[State 4006]
type = ParentVarset
trigger1 = movehit*!MoveGuarded
trigger1 = enemynear,movetype = H
var(2) = 1
IgnoreHitPause = 1

[State 4006]
type = ParentVaradd
trigger1 = movehit*!MoveGuarded
trigger1 = enemynear,movetype = H
v = 56
value = 10
IgnoreHitPause = 1

[State 4006]
type = TargetState
trigger1 = movehit
value = 4009
ignorehitpause = 1

[State 4006]
type = varadd
trigger1 = 1
var(0) = 1
ignorehitpause = 1

[State 4006]
type = Destroyself
trigger1 = Anim = 4004
trigger1 = !animtime

[StateDef 4007]
type = A
movetype= A
physics = N
sprpriority = 8
Velset = 0,0
ctrl = 0
anim = 4005

[State 4007]
type = Varrandom
trigger1 = !time
v = 0
range = 245,305

[State 4007]
type = Varrandom
trigger1 = !time
v = 1
range = 50,100

[State 4007]
type = Varrandom
trigger1 = !time
v = 2
range = 1,360

[State 4007]
type = Varrandom
trigger1 = !time
v = 3
range = 0,1

[State 4007]
type = Varrandom
trigger1 = !time
v = 4
range = 1,5

[State 4007]
type = Varrandom
trigger1 = !time
v = 5
range = 50,200

[State 4007]
type = Velset
trigger1 = !time
x = cos(var(0)*pi/180)*Var(5)*0.1
y = sin(var(0)*pi/180)*Var(5)*0.1

[State 4007]
type = Veladd
trigger1 = time
y = 0.2

[State 4007]
type = Angleset
trigger1 = 1
value = Var(2)+ifelse(Var(3) = 0, 1, -1)*Var(4)*0.1

[State 4007]
type = AngleDraw
trigger1 = 1
scale = Var(1)*0.01,Var(1)*0.01

[State 4007]
type = PalFX
trigger1 = time < 100
time = 1
add = 0,0,0
mul = 256-ceil(time*2.56),256-ceil(time*2.56),256-ceil(time*2.56)
invertall = 0
color = 256

[State 4007]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 4007]
Type = Trans
trigger1 = 1
Trans = add
IgnoreHitPause = 1

[State 4007,DestroySelf]
type = Destroyself
trigger1 = time = 100

[StateDef 4008]
type = A
movetype= A
physics = N
sprpriority = 8
Velset = 0,0
ctrl = 0
anim = 4006

[State 4008]
type = Angleset
trigger1 = 1
value = -15

[State 4008]
type = AngleDraw
trigger1 = 1
scale = 2*(1+time*0.1),0.75*(1+time*0.1)

[State 4008]
type = PalFX
trigger1 = time < 20
time = 1
add = 0,0,0
mul = 256-ceil(time*12.8),256-ceil(time*12.8),256-ceil(time*12.8)
invertall = 0
color = 256

[State 4008]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 4008]
Type = Trans
trigger1 = 1
Trans = add
IgnoreHitPause = 1

[State 4008,DestroySelf]
type = Destroyself
trigger1 = time = 20

[StateDef 4009]
type = A
physics = N
movetype = H
ctrl = 0

[State 4009]
type = Offset
trigger1 = HitShakeOver
trigger1 = pos y<= 10
y = Const(size.mid.pos.y)

[State 4009]
type = HitVelSet
trigger1 = HitShakeOver
x = 1
y = 1
persistent = 0

[State 4009]
type = posfreeze
trigger1 = !HitShakeOver

[State 4009]
type = Veladd
trigger1 = HitShakeOver
y = GetHitVar(yaccel)

[State 4009]
type = Changeanim
trigger1 = !HitShakeOver
value = 5002

[State 4009]
type = Changeanim2
trigger1 = HitShakeOver
value = 6003

[State 4009]
type = Angleset
trigger1 = HitShakeOver
value = (time-7) * 30

[State 4009]
type = AngleDraw
trigger1 = HitShakeOver

[State 4009]
type = Angleset
trigger1 = pos y> 10
trigger1 = Vel y> 0
value = 0

[State 4009]
type = SelfState
trigger1 = pos y> 10
trigger1 = Vel y> 0
value = 5100

[StateDef 4010]
type = S
physics = N
movetype = H
ctrl = 0

[State 4010, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 4011

[StateDef 4011]
type = S
physics = N
movetype = H
ctrl = 0

[State 4011, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 4012

[StateDef 4012]
type = A
movetype= H
physics = N

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

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

[State 4012]
type = VelSet
trigger1 = Time = 0
y = -8

[State 4012]
type = VelSet
trigger1 = Time = 0
x = -1

[State 4012]
type = VelAdd
trigger1 = 1
y = .2

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

[State 4012]
type = AngleDraw
trigger1 = 1

[State 4012]
type = null
trigger1 = command = "recovery"
trigger1 = Time > 40
value = 5210

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

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

[statedef 4013]
type=a
movetype=h
physics=n
velset=0,0

[state 4013]
type=screenbound
value=0
trigger1=1

[state 4013]
type=changeanim
triggerall=anim!=5050
trigger1=animtime=0
trigger1=anim=5035
trigger2=hitshakeover
trigger2=anim!=5035
trigger2=(anim!=[5051,5059])&&(anim!=[5061,5069])
trigger2=anim!=5090
value=5050

[state 4013]
type=changeanim
trigger1=anim=[5050,5059]
trigger1=vel y>=ifelse(anim=5050,1,-2)
trigger1=selfanimexist(anim+10)
value=anim+10
persistent=0

[state 4013]
type=velset
x=hitvel x
y=hitvel y
trigger1=hitshakeover
persistent=0

[state 4013]
type=veladd
trigger1=hitshakeover
y=gethitvar(yaccel)

[State 4013]
type = SelfState 
trigger1 = pos y>=0
value = 5100

[StateDef 4014]
type    = S
movetype= H
physics = N
velset = 0,0
poweradd = 0
SprPriority = 1

[State 4014, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 4010

[StateDef 4015]
type = A
physics = N
velset = 0,0
anim = 8070
sprpriority = 8

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

[State 4015]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State 4015]
type = PosAdd
trigger1 = Time = 0
x = (Random%20)*ifelse(Random<=499,1,-1)
y = (Random%10)*ifelse(Random<=499,1,-1)
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State 4015]
type = Trans
trigger1 = 1
trans = Add

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

[State 4015]
type = AngleSet
trigger1 = Time = 0
value = 45*(Random%8)

[State 4015]
type = DestroySelf
trigger1 = Animtime = 0

[Statedef 4500]
type = S
movetype = A
physics = S
anim = 4500
ctrl = 0
velset = 0,0
poweradd = -3000
facep2 = 1

[State 4500]
Type = null
Trigger1 = AnimElem = 6
Name = "Hyper"
Stateno = 10400
ID = 10400
Pos = -10,-20
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4500]
Type = Helper
Trigger1 = AnimElem = 6
Name = "Hyper"
Stateno = 10450
ID = 10450
Pos = -10,-20
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4500]
Type = Helper
Trigger1 = AnimElem = 6
Name = "Hyper"
Stateno = 10451
ID = 10451
Pos = -10,-20
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4500]
type = SuperPause
trigger1 = AnimElem = 6
time = 30
movetime = 0
anim = -1
sound = S0,10
pos = 999,999
darken = 0
unhittable = 1

[State 4500]
type = PowerAdd
trigger1 = AnimElem = 6
value = -3000
ignorehitpause = 1

[State 4500]
type = Helper
trigger1 = AnimElem = 6
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 4500]
type = Helper
trigger1 = AnimElem = 6
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 4500, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S0,12
volume = 255
channel = 0

[State 4500, VarSet];Hitsound and effects select
type = VarSet
trigger1 = Time = 0
var(1) = 0
ignorehitpause = 1

[State 4500, VarSet];MoveContact initialize
type = VarSet
trigger1 = Time = 0
var(2) = 0
ignorehitpause = 1

[State 4500, VarSet];MoveContact detection
type = Null;VarSet
trigger1 = MoveContact
var(2) = 1
ignorehitpause = 1

[State 4500, VarSet];MoveHit detection
type = VarSet
trigger1 = Time = 0
var(0) = 0
ignorehitpause = 1

[State 4500, VarSet];MoveHit detection
type = VarSet
trigger1 = MoveHit
var(0) = 1
ignorehitpause = 1

[State 4500, VarSet];Damage Correction
type = VarAdd
trigger1 = MoveHit
fvar(3) = 0
ignorehitpause = 1

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

[State 4500, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(8) = 0
value = s200,19
ignorehitpause = 1

[State 4500, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(8) = 0
value = s200,8
ignorehitpause = 1

[State 4500, Explod]
type = Explod
trigger1 = AnimElemTime(8) = 0
anim = 10040
ownpal = 1
sprpriority = 5
postype = p1
pos = 0,0
bindtime = 1
removetime = -2
removeongethit = 1

[State 4500, PosAdd]
type = PosAdd
trigger1 = AnimElemTime(8) = 0
x = ceil(P2Dist X) + 50

[State 4500, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(10) = 1
x = 2

[State 4500, Hitdef]
type = Hitdef
trigger1 = AnimElem = 8
attr = S,HA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
fall.animtype = hard
ground.type = low
air.type = low
damage = 0,8
getpower = 0,0
givepower = 200,150
pausetime = 0,0
guard.pausetime = 0,6
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = -1,0
guardsound = S1,100
ground.hittime = 20
ground.slidetime = 20
guard.hittime = 20
air.hittime = 20
guard.ctrltime = 20
airguard.ctrltime = 20
ground.velocity = 0,0
guard.velocity = 0
air.velocity = 0,0
airguard.velocity = 0,0
fall.recover = 0
forcestand = 0
fall = 1
air.fall = 1
kill = 1
guard.kill = 0
p2stateno = 46520

[State 4500, PlaySnd]
type = PlaySnd
trigger1 = MoveHit=1
value = s200,17
ignorehitpause = 1

[State 4500, PlaySnd]
type = PlaySnd
trigger1 = MoveHit=1
value = s200,18
ignorehitpause = 1

[State 4500, Helper]
type = Helper
trigger1 = MoveHit=1
helpertype = normal
name = "Slash"
pos = ceil((320-ScreenPos X)-160)*facing,-30
ownpal = 1
pausemovetime = 0
supermovetime = 0
stateno = 4507
ignorehitpause = 1

[State 4500, ChangeState]
type = ChangeState
trigger1 = NumTarget != 0
trigger1 = var(0) = 1
value = 4501
ctrl = 0

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

[Statedef 4501]
type = S
movetype = A
physics = S
anim = 4501
ctrl = 0

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

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

[State 4501, VelAdd]
type = VelSet
trigger1 = 1
x = 0.6

[State 4501, TargetState]
type = TargetState
trigger1 = NumTarget > 0
trigger1 = Time = 15
value = 46521
ignorehitpause = 1
persistent = 0

[State 4501, Trans]
type = Trans
trigger1 = Time > 0
trans = AddAlpha
alpha = ceil(fvar(20)),ceil(fvar(21))

[State 4501, VarSet]
type = VarSet
trigger1 = Time = 0
fvar(20) = 250

[State 4501, VarSet]
type = VarSet
trigger1 = Time = 0
fvar(21) = 6

[State 4501, VarAdd]
type = VarAdd
trigger1 = Time > 0
trigger1 = fvar(20) > 0
fvar(20) = -10

[State 4501, VarAdd]
type = VarAdd
trigger1 = Time > 0
trigger1 = fvar(21) < 256
fvar(21) = 10

[State 4501, ChangeState]
type = ChangeState
trigger1 = NumTarget > 0
trigger1 = Target,StateNo = 46522
value = 4502

[State 4501, ChangeState]
type = ChangeState
trigger1 = NumTarget = 0
trigger1 = Time > 20
value = 0
ctrl = 1

[Statedef 4502]
type = S
movetype = A
physics = S
anim = 99999
ctrl = 0
velset = 0,0

[State 4502, PosSet]
type = PosSet
trigger1 = Time = 0
x = 0

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

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

[State 4502, VarSet];Damage Correction
type = VarAdd
trigger1 = Time = [0,165]
trigger1 = Time % 5 = 0
fvar(3) = 0.02
ignorehitpause = 1

[State 4502, Explod]
type = Explod
trigger1 = time = [0,165]
trigger1 = time % 20 = 0
anim = 8052
ID = 8052
pos = -35+random%60, -93+random%70
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
supermove = 9999
pausemove = 9999
scale = 1,1
sprpriority = 5

[State 4502, Explod]
type = Explod
trigger1 = time = [0,165]
trigger1 = time % 25 = 0
anim = 8051
ID = 8051
pos = -35+random%60, -93+random%70
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
supermove = 9999
pausemove = 9999
scale = 1,1
sprpriority = 5

[State 4502, Explod]
type = Explod
trigger1 = time = [0,165]
trigger1 = time % 5 = 0
anim = 8053*10**(random%4)
ID = 8053
pos = -35+random%60, -93+random%70
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
supermove = 9999
pausemove = 9999
scale = 1,1
sprpriority = 5

[State 4502, EnvShake]
type = EnvShake
trigger1 = Time = [0,165]
trigger1 = Time % 5 = 0
time = 10
ampl = -3

[State 4502, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = Time = [0,165]
trigger1 = Time % 5 = 0
value = -14+ceil(-10*fvar(0))
absolute = 0
kill = 0

[State 4502, PlaySnd]
type = PlaySnd
trigger1 = Time = [0,165]
trigger1 = Time % 5 = 0
value = S200,3

[State 4502, HitAdd]
type = HitAdd
trigger1 = Time = [0,165]
trigger1 = Time % 5 = 0
value = 1

[State 4502, Helper];Shadow
type = Helper
trigger1 = Time = 0
name = "Shadow"
postype = p1
pos = 0,ceil((Target,ScreenPos Y - ScreenPos Y) - 100)
ownpal = 1
stateno = 4505
ID = 1

[State 4502, Helper];Slash
type = Helper
trigger1 = Time = 0
name = "Slash"
postype = p1
pos = 0,ceil((Target,ScreenPos Y - ScreenPos Y) - 115)
ownpal = 1
stateno = 4504
ID = 1

[State 4502, Helper];Shadow
type = Helper
trigger1 = Time = 5
name = "Shadow"
postype = p1
pos = 0,ceil((Target,ScreenPos Y - ScreenPos Y))
ownpal = 1
stateno = 4505
ID = 2

[State 4502, Helper];Slash
type = Helper
trigger1 = Time = 5
name = "Slash"
postype = p1
pos = 0,ceil((Target,ScreenPos Y - ScreenPos Y) + 15)
ownpal = 1
stateno = 4504
ID = 2

[State 4502, Helper];Shadow
type = Helper
trigger1 = Time = 10
name = "Shadow"
postype = p1
pos = -50,ceil((Target,ScreenPos Y - ScreenPos Y)-50)
ownpal = 1
stateno = 4505
ID = 3

[State 4502, Helper];Slash
type = Helper
trigger1 = Time = 10
name = "Slash"
postype = p1
pos = -65,ceil((Target,ScreenPos Y - ScreenPos Y)-50)
ownpal = 1
stateno = 4504
ID = 3

[State 4502, Helper];Shadow
type = Helper
trigger1 = Time = 15
name = "Shadow"
postype = p1
pos = 50,ceil((Target,ScreenPos Y - ScreenPos Y)-50)
ownpal = 1
stateno = 4505
ID = 4

[State 4502, Helper];Slash
type = Helper
trigger1 = Time = 15
name = "Slash"
postype = p1
pos = 65,ceil((Target,ScreenPos Y - ScreenPos Y)-50)
ownpal = 1
stateno = 4504
ID = 4

[State 4502, Helper];Shadow
type = Helper
trigger1 = Time = 20
name = "Shadow"
postype = p1
pos = 60,ceil((Target,ScreenPos Y - ScreenPos Y)-80)
ownpal = 1
stateno = 4505
ID = 5

[State 4502, Helper];Slash
type = Helper
trigger1 = Time = 20
name = "Slash"
postype = p1
pos = 70,ceil((Target,ScreenPos Y - ScreenPos Y)-90)
ownpal = 1
stateno = 4504
ID = 5

[State 4502, Helper];Shadow
type = Helper
trigger1 = Time = 25
name = "Shadow"
postype = p1
pos = -60,ceil((Target,ScreenPos Y - ScreenPos Y)-40)
ownpal = 1
stateno = 4505
ID = 6

[State 4502, Helper];Slash
type = Helper
trigger1 = Time = 25
name = "Slash"
postype = p1
pos = -70,ceil((Target,ScreenPos Y - ScreenPos Y)-30)
ownpal = 1
stateno = 4504
ID = 6

[State 4502, Helper];Shadow
type = Helper
trigger1 = Time = 30
name = "Shadow"
postype = p1
pos = -60,ceil((Target,ScreenPos Y - ScreenPos Y)-80)
ownpal = 1
stateno = 4505
ID = 7

[State 4502, Helper];Slash
type = Helper
trigger1 = Time = 30
name = "Slash"
postype = p1
pos = -70,ceil((Target,ScreenPos Y - ScreenPos Y)-90)
ownpal = 1
stateno = 4504
ID = 7

[State 4502, Helper];Shadow
type = Helper
trigger1 = Time = 35
name = "Shadow"
postype = p1
pos = 60,ceil((Target,ScreenPos Y - ScreenPos Y)-40)
ownpal = 1
stateno = 4505
ID = 8

[State 4502, Helper];Slash
type = Helper
trigger1 = Time = 35
name = "Slash"
postype = p1
pos = 70,ceil((Target,ScreenPos Y - ScreenPos Y)-30)
ownpal = 1
stateno = 4504
ID = 8

[State 4502, ChangeState]
type = ChangeState
trigger1 = Time > 170
value = 4503

[Statedef 4503]
type = S
movetype = A
physics = S
anim = 4503
ctrl = 0

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

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

[State 4503, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = s200,17
ignorehitpause = 1

[State 4503, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = s200,18
ignorehitpause = 1

[State 4503, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = s200,19
ignorehitpause = 1

[State 4503, EnvShake]
type = EnvShake
trigger1 = Time = 0
time = 10
ampl = -10

[State 4503, TargetState]
type = TargetState
trigger1 = Time = 0
value = 46523
persistent = 0

[State 4503, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = Time = 0
value = -40
absolute = 1
kill = 1

[State 4503, HitAdd]
type = HitAdd
trigger1 = Time = 0
value = 1

[State 4503, Helper];Finish
type = Helper
trigger1 = Time = 0
name = "Finish"
postype = p1
pos = 0,0
ownpal = 1
stateno = 4506
pausemovetime = 9999
supermovetime = 0
ID = 4506
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

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

[Statedef 4504]
type = S
movetype = I
physics = N
anim = 4502
ctrl = 0
velset = 0,0
sprpriority = 3

[State noshadow]
type=assertspecial
flag=noshadow
trigger1=time%40<=5
ignorehitpause=1

[State invisible]
type=assertspecial
flag=invisible
trigger1=time%40>5
ignorehitpause=1

[State angle var]
type=null
triggerall=!time
trigger1=isHelper(1)
trigger1=1||var(0):=0
trigger2=isHelper(2)
trigger2=1||var(0):=180
trigger3=isHelper(3)
trigger3=1||var(0):=270
trigger4=isHelper(4)
trigger4=1||var(0):=90
trigger5=isHelper(5)
trigger5=1||var(0):=315
trigger6=isHelper(6)
trigger6=1||var(0):=135
trigger7=isHelper(7)
trigger7=1||var(0):=45
trigger8=isHelper(8)
trigger8=1||var(0):=225

[State scale vars]
type=null
trigger1=time%40=0
trigger1=1||fvar(0):=1
trigger1=1||fvar(1):=.5
trigger2=time%40=[1,5]
trigger2=1||fvar(0):=fvar(0)+.1
trigger2=1||fvar(1):=fvar(1)-.1

[State angle]
type=angleset
value=var(0)
trigger1=!time

[State angle&scale]
type=angledraw
scale=fvar(0),fvar(1)
trigger1=time%40<=5

[State destroy]
type=destroyself
trigger1=root,stateno!=[4502,4503]
trigger2=!ishelper(1)
trigger2=!ishelper(2)
trigger2=time>135
trigger3=time>165

[Statedef 4505]
type = S
movetype = I
physics = N
anim = 4504
ctrl = 0
velset = 0,0
sprpriority = 5

[State noshadow]
type=assertspecial
flag=noshadow
trigger1=time%40<=20
ignorehitpause=1

[State invisible]
type=assertspecial
flag=invisible
trigger1=time%40>20
ignorehitpause=1

[state angle var]
type=null
triggerall=!time
trigger1=isHelper(1)
trigger1=1||var(0):=0
trigger2=isHelper(2)
trigger2=1||var(0):=180
trigger3=isHelper(3)
trigger3=1||var(0):=90
trigger4=isHelper(4)
trigger4=1||var(0):=270
trigger5=isHelper(5)
trigger5=1||var(0):=315
trigger6=isHelper(6)
trigger6=1||var(0):=135
trigger7=isHelper(7)
trigger7=var(0):=45
trigger8=isHelper(8)
trigger8=var(0):=225

[State xscale var]
type=null
trigger1=time%40=0
trigger1=1||fvar(0):=1
trigger1=1||fvar(1):=.5
trigger2=time%40=[1,20]
trigger2=1||fvar(0):=fvar(0)+.1
trigger2=1||fvar(1):=fvar(1)-0.025

[State angle]
type=angleSet
value=var(0)
trigger1=!time

[State angle&scale]
type=angledraw
scale=fvar(0),fvar(1)
trigger1=time%40<=20

[State trans]
type=trans
trigger1=time%40<=20
trans=add

[State destroy]
type=destroySelf
trigger1=root,stateno!=[4502,4503]
trigger2=!ishelper(1)
trigger2=!ishelper(2)
trigger2=time>150
trigger3=time>180

[Statedef 4506]
type = S
movetype = I
physics = N
anim = 2014
ctrl = 0
velset = 0,0
sprpriority = 5

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

[State 4506, AngleSet]
type = AngleSet
trigger1 = !time
value = 90

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

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

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

[Statedef 4507]
type = A
movetype = I
physics = N
velset = 0,0
ctrl = 0
anim = 2014
sprpriority = 7

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

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

[State 4507, PosAdd]
type = PosAdd
trigger1 = time > 0
x = -ceil(ScreenPos X-fvar(1))

[State 4507, VarSet]
type = VarSet
trigger1 = 1
fvar(1) = ScreenPos X

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

[Statedef 4900]
type    = S
movetype= I
physics = N
juggle  = 1
poweradd= 0
ctrl = 0
velset = 0,0
anim = 4900
sprpriority = 3

[State 4900]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

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

[State 4900, 2]
type = PosSet
trigger1 = time = 0
y = (239-ScreenPos Y)-150

[State 4900, 2]
type = PalFx
trigger1 = Time <= 25
time = 1
add = -250+(Time)*10,-250+(Time)*10,-250+(Time)*10

[State 4900, 3]
type = PalFx
trigger1 = Time >= 40
time = 1
add = -(Time-40)*6,-(Time-40)*6,-(Time-40)*6

[State 4900, 4]
type = Explod
trigger1 = time = 1
anim = 4901
ID = 4900
removetime = 80
ignorehitpause = 1
persistent = 0
supermovetime = 9999
pausemovetime = 9999

[State 4900, 4]
type = ModifyExplod
trigger1 = time < 25
ID = 4900
scale = .565+time/500.0,.565+time/500.0

[State 4900, 4]
type = ModifyExplod
trigger1 = time = [25,40]
ID = 4900
scale = .615+(time-25)/750.0,.615+(time-25)/750.0

[State 4900, 4]
type = ModifyExplod
trigger1 = time > 40
ID = 4900
scale = .635+(time-40)/400.0,.635+(time-40)/400.0

[State 4900, 4]
type = Explod
trigger1 = time = 1
anim = 4901
ID = 4901
removetime = 80
ignorehitpause = 1
persistent = 0
supermovetime = 9999
pausemovetime = 9999

[State 4900, 4]
type = ModifyExplod
trigger1 = time < 25
ID = 4901
scale = .505+time/250.0,.505+time/250.0

[State 4900, 4]
type = ModifyExplod
trigger1 = time = [25,40]
ID = 4901
scale = .605+(time-25)/375.0,.605+(time-25)/375.0

[State 4900, 4]
type = ModifyExplod
trigger1 = time > 40
ID = 4901
scale = .645+(time-40)/200.0,.645+(time-40)/200.0

[State 4900, 4]
type = Explod
trigger1 = time = 1
anim = 4901
ID = 4902
removetime = 80
ignorehitpause = 1
persistent = 0
supermovetime = 9999
pausemovetime = 9999

[State 4900, 4]
type = ModifyExplod
trigger1 = time < 25
ID = 4902
scale = .395+time/125.0,.395+time/125.0

[State 4900, 4]
type = ModifyExplod
trigger1 = time = [25,40]
ID = 4902
scale = .595+(time-25)/187.5,.595+(time-25)/187.5

[State 4900, 4]
type = ModifyExplod
trigger1 = time > 40
ID = 4902
scale = .655+(time-40)/100.0,.655+(time-40)/100.0

[State 4900, 9]
type = DestroySelf
trigger1 = time = 80

[Statedef 7100]
physics=N
velset=0,0
anim=9741

[State 7100, bind]
type=bindtoroot
trigger1= time

[State 7100, dust]
type=explod
trigger1= !time
anim=7100
ID=7100
sprpriority=3
postype=p1
scale=.5,.5
pausemovetime=-1
supermovetime=-1

[State 7100, dust]
type=explod
trigger1= !time || time=2 || time=6
anim=7101
ID=7100
sprpriority=3
postype=p1
scale=.5,.5
pausemovetime=-1
supermovetime=-1

[State 7100, assert]
type=assertspecial
trigger1= 1
flag=invisible

[State 7100, end]
type=destroyself
trigger1= time>=7

[Statedef 46520]
type = A
movetype = H
phisics = N

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

[State 46520, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 46520

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

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

[Statedef 46521]
type = A
movetype = H
phisics = N

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

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

[State 46521, PosSet]
type = PosSet
trigger1 = 1
x = 0

[State 46521, VelAdd]
type = VelAdd
trigger1 = Pos Y < -70
y = 0.7

[State 46521, VelSet]
type = VelSet
trigger1 = Pos Y > -70
y = 0

[State 46521, ChangeState]
type = ChangeState
trigger1 = Pos Y > -70
value = 46522

[Statedef 46522]
type = A
movetype = H
phisics = N

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

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

[State 46521, PosSet]
type = PosSet
trigger1 = 1
x = 0
y = -70

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

[Statedef 46523]
type = A
movetype = H
phisics = N

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

[State 46523, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 46520

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

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

[State 46523, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.5

[State 46523, SelfState]
type = SelfState
trigger1 = (Vel Y > 0) && (Pos Y >= 0)
value = 5100

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

; 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
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800

; 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, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
animtype=hard
ground.type=high
air.animtype=back
fall=1
fall.recover=0
ground.velocity=-2.5,-8
sparkno = -1          ;No spark
sprpriority = 1       ;Draw in front of p2
p1facing = ifelse (command = "holdfwd", 1, -1) ;Turn if holding forwards
p2facing = 1          ;Force p2 to face player
p1stateno = 810       ;On success, player changes to state 810
p2stateno = 820       ;If hit, p2 changes to state 820 in player's cns
fall = 1              ;Force p2 into falling down
id=800

[State 800, 2]
type = ChangeState
Trigger1 = !AnimTime
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 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 60

[state invul]
type=hitby
value=
trigger1=1

[state push]
type=playerpush
value=0
trigger1=1

[State 810, Width 2-11]
type = Width
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(15) < 0
edge = 60,0

[state targetbind]
type=targetbind
pos=40,0
trigger1=!time
ignorehitpause=1

[State 810, State End]
type = ChangeState
trigger1 = animelem=3
value = 811

[statedef 811]
type=a
movetype=a
physics=n
velset=1,-8

[state invul]
type=hitby
value=
trigger1=1

[state push]
type=playerpush
value=0
trigger1=1

[state gravity]
type=gravity
trigger1=1

[state change]
type=changestate
value=812
trigger1=pos y>0

[statedef 812]
type=s
movetype=a
physics=s
velset=vel x,0
anim=811

[state swing sound]
type=playsnd
trigger1=!time
value=S100,5

[state dust]
type=makedust
trigger1=time<=4

[state invul]
type=hitby
value=
trigger1=1

[state push]
type=playerpush
value=0
trigger1=1

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

[state slash snd]
type=playsnd
trigger1=animelem=4
value=S200,3

[state hit]
type=targetlifeadd
value=-78
trigger1=animelem=4

[State 812, Explod]
type = Explod
trigger1 = AnimElem = 4
anim = 8053
ID = 8053
pos = -20,-45
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
supermove = 9999
pausemove = 9999
scale = 1,1
sprpriority = 2

[state change]
type=changestate
value=0
ctrl=1
trigger1=!animtime

;---------------------------------------------------------------------------
; 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 820]
type    = S
movetype= H
physics = s
velset = -4,0
facep2=1

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

[state hit]
type=selfstate
value=5000
trigger1=time>=49

[state self]
type=selfstate
value=0
ctrl=1
trigger1=p2stateno!=[810,812]

;---------------------------------------------------------------------------
; 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 821]
type    = A
movetype= H
physics = N
velset = -2.8,-8
poweradd = 40

[State anim]
type = ChangeAnim2
Trigger1 = !Time
value = 821

[State 821, 1] ;Gravity
type=gravity
Trigger1=1

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

[StateDef 6010]
Type = A
Physics = N
Anim = 99999
SprPriority = 4
VelSet = 0,0

[State -1]
Type = NotHitBy
Trigger1 = 1
Value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time = 1

[State -1]
Type = Trans
Trigger1 = 1
Trans = AddAlpha
Alpha = 255,255

[State -1]
Type = VarSet
Trigger1 = Time = 30
V = 6
Value = 0

[State -1]
Type = VarAdd
Trigger1 = Time = [0,10]
Trigger2 = Time >= 30
V = 6
Value = 26

[State -1]
Type = VarAdd
Trigger1 = Time = [1,3]
Trigger2 = Time = [10,15]
FV  = 3
Value = 0.05

[State -1]
Type = VarAdd
Trigger1 = Time = [4,9]
Trigger2 = Time = [16,32]
FV  = 3
Value = -0.05

[State -1]
Type = Explod
Trigger1 = Time = 0
ID = 10000
Anim = 10000
Ownpal = 1
Scale = 0.725+FVar(3),0.725+FVar(3)
SprPriority = 5
RemoveTime = 32
RemoveOnGetHit = 1
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = ModifyExplod
Trigger1 = Time = [1,32]
ID = 10000
Scale = 0.725+FVar(3),0.725+FVar(3)
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = VarAdd
Trigger1 = Time >= 23
FV  = 4
Value = 0.0175

[State -1]
Type = Explod
Trigger1 = IsHelper(10001)
Trigger1 = Time = 0
ID = 10001
Anim = IfElse(((Root,Life*100)/LifeMax) <= 30,10003,10001)
Pos = 0,240
PosType = Back
Ownpal = 1
Scale = 0.50+FVar(4),0.50+FVar(4)
SprPriority = -5
RemoveTime = 50
RemoveOnGetHit = 1
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = Explod
Trigger1 = IsHelper(10002)
Trigger1 = Time = 0
ID = 10002
Anim = 10002
Pos = 0,240
PosType = Back
Ownpal = 1
Scale = 0.50+FVar(4),0.50+FVar(4)
SprPriority = -5
RemoveTime = 50
RemoveOnGetHit = 1
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = ModifyExplod
Trigger1 = Time = [1,50]
ID = 10001
Scale = 0.50+FVar(4),0.50+FVar(4)
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = BGPalFX
Trigger1 = Time = [1,29]
Add = 0-Var(6),0-Var(6),0-Var(6)
Time = 1

[State -1]
Type = BGPalFX
Trigger1 = Time = [30,35]
Trigger1 = Parent,StateNo != 2000
Add = Ceil(-255+Var(6)*1.5),Ceil(-255+Var(6)*1.5),Ceil(-255+Var(6)*1.5)
Time = 1

[State -1]
Type = AssertSpecial
Trigger1 = Time <= 26
Flag = Noshadow
IgnoreHitPause = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = AssertSpecial
Trigger1 = Time >= 27
Flag = Noshadow
Flag2 = Invisible
IgnoreHitPause = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = DestroySelf
Trigger1 = Time = 50

[StateDef 6020]
Type = A
Physics = N
Anim = 99999
SprPriority = 4
VelSet = 0,0

[State -1]
Type = NotHitBy
Trigger1 = 1
Value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time = 1

[State -1]
Type = Trans
Trigger1 = 1
Trans = AddAlpha
Alpha = 255,255

[State -1]
Type = VarSet
Trigger1 = Time = 30
V = 6
Value = 0

[State -1]
Type = VarAdd
Trigger1 = Time = [0,10]
Trigger2 = Time >= 30
V = 6
Value = 26

[State -1]
Type = VarAdd
Trigger1 = Time = [1,3]
Trigger2 = Time = [10,15]
FV  = 3
Value = 0.05

[State -1]
Type = VarAdd
Trigger1 = Time = [4,9]
Trigger2 = Time = [16,32]
FV  = 3
Value = -0.05

[State -1]
Type = Explod
Trigger1 = Time = 0
ID = 10000
Anim = 10000
Ownpal = 1
Scale = 0.725+FVar(3),0.725+FVar(3)
SprPriority = 5
RemoveTime = 32
RemoveOnGetHit = 1
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = ModifyExplod
Trigger1 = Time = [1,32]
ID = 10000
Scale = 0.725+FVar(3),0.725+FVar(3)
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = VarAdd
Trigger1 = Time >= 23
FV  = 4
Value = 0.0175

[State -1]
Type = Explod
Trigger1 = IsHelper(10001)
Trigger1 = Time = 0
ID = 10002
Anim = 10002
Pos = 0,240
PosType = Back
Ownpal = 1
Scale = 0.50+FVar(4),0.50+FVar(4)
SprPriority = -5
RemoveTime = 50
RemoveOnGetHit = 1
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = Explod
Trigger1 = IsHelper(10002)
Trigger1 = Time = 0
ID = 10002
Anim = 10002
Pos = 0,240
PosType = Back
Ownpal = 1
Scale = 0.50+FVar(4),0.50+FVar(4)
SprPriority = -5
RemoveTime = 50
RemoveOnGetHit = 1
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = ModifyExplod
Trigger1 = Time = [1,50]
ID = 10002
Scale = 0.50+FVar(4),0.50+FVar(4)
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = BGPalFX
Trigger1 = Time = [1,29]
Add = 0-Var(6),0-Var(6),0-Var(6)
Time = 1

[State -1]
Type = BGPalFX
Trigger1 = Time = [30,35]
Trigger1 = Parent,StateNo != 2000
Add = Ceil(-255+Var(6)*1.5),Ceil(-255+Var(6)*1.5),Ceil(-255+Var(6)*1.5)
Time = 1

[State -1]
Type = AssertSpecial
Trigger1 = Time <= 26
Flag = Noshadow
IgnoreHitPause = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = AssertSpecial
Trigger1 = Time >= 27
Flag = Noshadow
Flag2 = Invisible
IgnoreHitPause = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = DestroySelf
Trigger1 = Time = 50

[Statedef 7000]
type = A
movetype = I
physics = N
ctrl = 0
anim = 9999
velset = 0,0
ownpal = 1
sprpriority = 7

[State 7000]
type = AssertSpecial
trigger1 = 1
flag = NoBG
flag2 = NoFG
flag3 = NoBarDisplay
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 7000]
type = Explod
trigger1 = !NumExplod(10700)
anim = 10700
id = 10700
postype = back
pos = 0, 0
bindtime = -1
removetime = 99999
scale = 1,1
sprpriority = -5
ownpal = 1
persistent = 0
supermovetime = 99999
pausemovetime = 99999

[State 7000]
type = PlaySnd
trigger1 = (Parent,Stateno != [4500, 4599])
trigger2 = (Parent,Stateno = 4503) &&(Parent,time = 1)
trigger3 = (Parent,Anim = 4503)
value = S0,11
persistent = 0
volume = 255

[State 7000]
type = Explod
triggerall = !NumExplod(10800)
trigger1 = (Parent,Stateno != [4500, 4599])
trigger2 = (Parent,Stateno = 4503) &&(Parent,time = 1)
trigger3 = (Parent,Anim = 4503)
anim = 10800
id = 10800
postype = back
pos = 0, 0
bindtime = -1
scale = 1,1
sprpriority = -5
ownpal = 1
persistent = 0
supermovetime = 99999
pausemovetime = 99999

[State 7000]
type = RemoveExplod
trigger1 = (Parent,Stateno != [4500, 4599])
trigger2 = (Parent,Stateno = 4503) &&(Parent,time = 1)
trigger3 = (Parent,Anim = 4503)
ID = 10700

[State 7000]
type = DestroySelf
trigger1 = (Parent,Stateno != [4500,4599])
trigger2 = (Parent,Stateno = 4503) &&(Parent,time = 1)
trigger3 = (Parent,Anim = 4503)

[Statedef 7050]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 9999
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 8000]
Anim = 8000
Ctrl = 0

[State 8000, Effect1]
Type     = Explod
Trigger1 = Time % 6 = 0
Anim     = 8001
ID       = 8001
Pos      = 0, 5
PosType  = P1
Vel      = -0.8 + (random / 500), -2.2
Random   = 18, 18
OwnPal   = 1
Scale       = 0.7, 0.7

[State 8000, Effect2]
Type        = Explod
Trigger1    = NumExplod(8002) = 0
Anim        = 8002
ID          = 8002
Pos         = 0, 0
PosType     = P1
BindTime    = -1
RemoveTime  = -1
SprPriority = -2
OwnPal      = 1
Scale       = 2.0, 2.0

[State 8000, BindToRoot]
Type     = VelSet
Trigger1 = 1
X        = (Rootdist X - 50)  / 32
Y        = (Rootdist Y - 100) / 32

[State 8000, NoShadow]
Type     = AssertSpecial
Trigger1 = 1
Flag     = NoShadow

[State 8000, Turn]
Type     = Turn
Trigger1 = Facing != Root,Facing

[StateDef 10400]
Type = A
MoveType = I
Physics = N
Anim = 10400
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 = FVar(1), 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 = FVar(1), 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 = FVar(1), 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 = FVar(1), 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 = FVar(1), FVar(1)

[State 10451]
Type = DestroySelf
Trigger1 = Time = 32

[statedef 16000]
anim=99999
ctrl=0

[state asserts]
type=assertspecial
flag=invisible
flag2=noshadow
trigger1=1

[state pos y]
type=null
trigger1=numexplod((var(59)-numexplod)%8)
trigger1=var((var(59)-numexplod)%8+8)%1000>60
trigger1=0&&var((var(59)-numexplod)%8+8):=var((var(59)-numexplod)%8+8)-5
trigger2=numexplod((var(59)-numexplod+1)%8)
trigger2=var((var(59)-numexplod+1)%8+8)%1000>70
trigger2=0&&var((var(59)-numexplod+1)%8+8):=var((var(59)-numexplod+1)%8+8)-5
trigger3=numexplod((var(59)-numexplod+2)%8)
trigger3=var((var(59)-numexplod+2)%8+8)%1000>80
trigger3=0&&var((var(59)-numexplod+2)%8+8):=var((var(59)-numexplod+2)%8+8)-5
trigger4=numexplod((var(59)-numexplod+3)%8)
trigger4=var((var(59)-numexplod+3)%8+8)%1000>90
trigger4=0&&var((var(59)-numexplod+3)%8+8):=var((var(59)-numexplod+3)%8+8)-5
trigger5=numexplod((var(59)-numexplod+4)%8)
trigger5=var((var(59)-numexplod+4)%8+8)%1000>100
trigger5=0&&var((var(59)-numexplod+4)%8+8):=var((var(59)-numexplod+4)%8+8)-5
trigger6=numexplod((var(59)-numexplod+5)%8)
trigger6=var((var(59)-numexplod+5)%8+8)%1000>110
trigger6=0&&var((var(59)-numexplod+5)%8+8):=var((var(59)-numexplod+5)%8+8)-5
trigger7=numexplod((var(59)-numexplod+6)%8)
trigger7=var((var(59)-numexplod+6)%8+8)%1000>120
trigger7=0&&var((var(59)-numexplod+6)%8+8):=var((var(59)-numexplod+6)%8+8)-5
trigger8=numexplod((var(59)-numexplod+7)%8)
trigger8=var((var(59)-numexplod+7)%8+8)%1000>130
trigger8=0&&var((var(59)-numexplod+7)%8+8):=var((var(59)-numexplod+7)%8+8)-5

[state striker msg]
type=explod
postype=left
pos=var(7+var(59)%8)/1000,var(7+var(59)%8)%1000
anim=16000
id=(var(59)-1)%8
removetime=100
scale=.5,.5
ontop=1
supermovetime=99999999
pausemovetime=99999999
triggerall=numexplod<8
trigger1=root,var(33)=-2
trigger1=1||var(var(59)%8):=time
trigger1=1||var(8+var(59)%8):=(20+199*(teamside=2))*1000+220+20*numexplod
trigger1=var(59):=var(59)+1

[state striker reset]
type=parentvarset
var(33)=-1
trigger1=root,var(33)=-2

[state counter msg]
type=explod
postype=left
pos=var(7+var(59)%8)/1000,var(7+var(59)%8)%1000
anim=16001
id=(var(59)-1)%8
removetime=100
scale=.5,.5
ontop=1
supermovetime=99999999
pausemovetime=99999999
triggerall=numexplod<8
trigger1=(root,var(34)/10)%10=4
trigger1=1||var(var(59)%8):=time
trigger1=1||var(8+var(59)%8):=(20+192*(teamside=2))*1000+220+20*numexplod
trigger1=var(59):=var(59)+1

[state counter reset]
type=parentvarset
var(34)=root,var(34)-20
trigger1=(root,var(34)/10)%10=4

[state recovery msg]
type=explod
postype=left
pos=var(7+var(59)%8)/1000,var(7+var(59)%8)%1000
anim=16003
id=(var(59)-1)%8
removetime=100
scale=.5,.5
ontop=1
supermovetime=99999999
pausemovetime=99999999
triggerall=numexplod<8
trigger1=(root,var(34)/100)%10=1
trigger1=1||var(var(59)%8):=time
trigger1=1||var(8+var(59)%8):=(20+210*(teamside=2))*1000+220+20*numexplod
trigger1=var(59):=var(59)+1

[state recovery reset]
type=parentvarset
var(34)=root,var(34)-100
trigger1=(root,var(34)/100)%10=1

[state ex-shield msg]
type=explod
postype=left
pos=var(7+var(59)%8)/1000,var(7+var(59)%8)%1000
anim=16004
id=(var(59)-1)%8
removetime=100
scale=.5,.5
ontop=1
supermovetime=99999999
pausemovetime=99999999
triggerall=numexplod<8
trigger1=(root,var(34)/1000)%10=2
trigger1=1||var(var(59)%8):=time
trigger1=1||var(8+var(59)%8):=(20+209*(teamside=2))*1000+220+20*numexplod
trigger1=var(59):=var(59)+1

[state ex-shield reset]
type=parentvarset
var(34)=root,var(34)-2000
trigger1=(root,var(34)/1000)%10=2

[state shield msg]
type=explod
postype=left
pos=var(7+var(59)%8)/1000,var(7+var(59)%8)%1000
anim=16005
id=(var(59)-1)%8
removetime=100
scale=.5,.5
ontop=1
supermovetime=99999999
pausemovetime=99999999
triggerall=numexplod<8
trigger1=(root,var(34)/1000)%10=1
trigger1=1||var(var(59)%8):=time
trigger1=1||var(8+var(59)%8):=(20+235*(teamside=2))*1000+220+20*numexplod
trigger1=var(59):=var(59)+1

[state shield reset]
type=parentvarset
var(34)=root,var(34)-1000
trigger1=(root,var(34)/1000)%10=1

[state parry msg]
type=explod
postype=left
pos=var(7+var(59)%8)/1000,var(7+var(59)%8)%1000
anim=16006
id=(var(59)-1)%8
removetime=100
scale=.5,.5
ontop=1
supermovetime=99999999
pausemovetime=99999999
triggerall=numexplod<8
trigger1=(root,var(34)/10000)%10=1
trigger1=1||var(var(59)%8):=time
trigger1=1||var(8+var(59)%8):=(20+235*(teamside=2))*1000+220+20*numexplod
trigger1=var(59):=var(59)+1

[state parry reset]
type=parentvarset
var(34)=root,var(34)-10000
trigger1=(root,var(34)/10000)%10=1

[state jd msg]
type=explod
postype=left
pos=var(7+var(59)%8)/1000,var(7+var(59)%8)%1000
anim=16007
id=(var(59)-1)%8
removetime=100
scale=.5,.5
ontop=1
supermovetime=99999999
pausemovetime=99999999
triggerall=numexplod<8
trigger1=(root,var(34)/1000000)%10=1
trigger1=1||var(var(59)%8):=time
trigger1=1||var(8+var(59)%8):=(20+168*(teamside=2))*1000+220+20*numexplod
trigger1=var(59):=var(59)+1

[state jd reset]
type=parentvarset
var(34)=root,var(34)-1000000
trigger1=(root,var(34)/1000000)%10=1

[state gc msg]
type=explod
postype=left
pos=var(7+var(59)%8)/1000,var(7+var(59)%8)%1000
anim=16002
id=(var(59)-1)%8
removetime=100
scale=.5,.5
ontop=1
supermovetime=99999999
pausemovetime=99999999
triggerall=numexplod<8
trigger1=(root,var(34)/100000)%10=1
trigger1=1||var(var(59)%8):=time
trigger1=1||var(8+var(59)%8):=(20+176*(teamside=2))*1000+220+20*numexplod
trigger1=var(59):=var(59)+1

[state gc reset]
type=parentvarset
var(34)=root,var(34)-100000
trigger1=(root,var(34)/100000)%10=1

[state explod1 fadein]
type=modifyexplod
postype=left
pos=var(8)/1000,var(8)%1000
trans=addalpha
alpha=ifelse(time-var(0)<=14,8*(time-var(0)+1),256),ifelse(time-var(0)<=16,256,(32-time+var(0))*8)
id=0
triggerall=numexplod(0)
trigger1=time-var(0)<=32

[state explod1 stop]
type=modifyexplod
postype=left
pos=var(8)/1000,var(8)%1000
trans=none
id=0
triggerall=numexplod(0)
trigger1=time-var(0)=[33,84]

[state explod1 fadeout]
type=modifyexplod
postype=left
pos=var(8)/1000-5*(time-var(0)-85)*ifelse(teamside=2,-1,1),var(8)%1000
trans=addalpha
alpha=ifelse(time-var(0)>=92,32*(99-time+var(0)),256),ifelse(time-var(0)<=90,32*(time-var(0)-84),256)
id=0
triggerall=numexplod(0)
trigger1=time-var(0)>=85

[state explod2 fadein]
type=modifyexplod
postype=left
pos=var(9)/1000,var(9)%1000
trans=addalpha
alpha=ifelse(time-var(1)<=14,8*(time-var(1)+1),256),ifelse(time-var(1)<=16,256,(32-time+var(1))*8)
id=1
triggerall=numexplod(1)
trigger1=time-var(1)<=32

[state explod2 stop]
type=modifyexplod
postype=left
pos=var(9)/1000,var(9)%1000
trans=none
id=1
triggerall=numexplod(1)
trigger1=time-var(1)=[33,84]

[state explod2 fadeout]
type=modifyexplod
postype=left
pos=var(9)/1000-5*(time-var(1)-85)*ifelse(teamside=2,-1,1),var(9)%1000
trans=addalpha
alpha=ifelse(time-var(1)>=92,32*(99-time+var(1)),256),ifelse(time-var(1)<=90,32*(time-var(1)-84),256)
id=1
triggerall=numexplod(1)
trigger1=time-var(1)>=85

[state explod3 fadein]
type=modifyexplod
postype=left
pos=var(10)/1000,var(10)%1000
trans=addalpha
alpha=ifelse(time-var(2)<=14,8*(time-var(2)+1),256),ifelse(time-var(2)<=16,256,(32-time+var(2))*8)
id=2
triggerall=numexplod(2)
trigger1=time-var(2)<=32

[state explod3 stop]
type=modifyexplod
postype=left
pos=var(10)/1000,var(10)%1000
trans=none
id=2
triggerall=numexplod(2)
trigger1=time-var(2)=[33,84]

[state explod3 fadeout]
type=modifyexplod
postype=left
pos=var(10)/1000-5*(time-var(2)-85)*ifelse(teamside=2,-1,1),var(10)%1000
trans=addalpha
alpha=ifelse(time-var(2)>=92,32*(99-time+var(2)),256),ifelse(time-var(2)<=90,32*(time-var(2)-84),256)
id=2
triggerall=numexplod(2)
trigger1=time-var(2)>=85

[state explod4 fadein]
type=modifyexplod
postype=left
pos=var(11)/1000,var(11)%1000
trans=addalpha
alpha=ifelse(time-var(3)<=14,8*(time-var(3)+1),256),ifelse(time-var(3)<=16,256,(32-time+var(3))*8)
id=3
triggerall=numexplod(3)
trigger1=time-var(3)<=32

[state explod4 stop]
type=modifyexplod
postype=left
pos=var(11)/1000,var(11)%1000
trans=none
id=3
triggerall=numexplod(3)
trigger1=time-var(3)=[33,84]

[state explod4 fadeout]
type=modifyexplod
postype=left
pos=var(11)/1000-5*(time-var(3)-85)*ifelse(teamside=2,-1,1),var(11)%1000
trans=addalpha
alpha=ifelse(time-var(3)>=92,32*(99-time+var(3)),256),ifelse(time-var(3)<=90,32*(time-var(3)-84),256)
id=3
triggerall=numexplod(3)
trigger1=time-var(3)>=85

[state explod5 fadein]
type=modifyexplod
postype=left
pos=var(12)/1000,var(12)%1000
trans=addalpha
alpha=ifelse(time-var(4)<=14,8*(time-var(4)+1),256),ifelse(time-var(4)<=16,256,(32-time+var(4))*8)
id=4
triggerall=numexplod(4)
trigger1=time-var(4)<=32

[state explod5 stop]
type=modifyexplod
postype=left
pos=var(12)/1000,var(12)%1000
trans=none
id=4
triggerall=numexplod(4)
trigger1=time-var(4)=[33,84]

[state explod5 fadeout]
type=modifyexplod
postype=left
pos=var(12)/1000-5*(time-var(4)-85)*ifelse(teamside=2,-1,1),var(12)%1000
trans=addalpha
alpha=ifelse(time-var(4)>=92,32*(99-time+var(4)),256),ifelse(time-var(4)<=90,32*(time-var(4)-84),256)
id=4
triggerall=numexplod(4)
trigger1=time-var(4)>=85

[state explod6 fadein]
type=modifyexplod
postype=left
pos=var(13)/1000,var(13)%1000
trans=addalpha
alpha=ifelse(time-var(5)<=14,8*(time-var(5)+1),256),ifelse(time-var(5)<=16,256,(32-time+var(5))*8)
id=5
triggerall=numexplod(5)
trigger1=time-var(5)<=32

[state explod6 stop]
type=modifyexplod
postype=left
pos=var(13)/1000,var(13)%1000
trans=none
id=5
triggerall=numexplod(5)
trigger1=time-var(5)=[33,84]

[state explod6 fadeout]
type=modifyexplod
postype=left
pos=var(13)/1000-5*(time-var(5)-85)*ifelse(teamside=2,-1,1),var(13)%1000
trans=addalpha
alpha=ifelse(time-var(5)>=92,32*(99-time+var(5)),256),ifelse(time-var(5)<=90,32*(time-var(5)-84),256)
id=5
triggerall=numexplod(5)
trigger1=time-var(5)>=85

[state explod7 fadein]
type=modifyexplod
postype=left
pos=var(14)/1000,var(14)%1000
trans=addalpha
alpha=ifelse(time-var(6)<=14,8*(time-var(6)+1),256),ifelse(time-var(6)<=16,256,(32-time+var(6))*8)
id=6
triggerall=numexplod(6)
trigger1=time-var(6)<=32

[state explod7 stop]
type=modifyexplod
postype=left
pos=var(14)/1000,var(14)%1000
trans=none
id=6
triggerall=numexplod(6)
trigger1=time-var(6)=[33,84]

[state explod7 fadeout]
type=modifyexplod
postype=left
pos=var(14)/1000-5*(time-var(6)-85)*ifelse(teamside=2,-1,1),var(14)%1000
trans=addalpha
alpha=ifelse(time-var(6)>=92,32*(99-time+var(6)),256),ifelse(time-var(6)<=90,32*(time-var(6)-84),256)
id=6
triggerall=numexplod(6)
trigger1=time-var(6)>=85

[state explod8 fadein]
type=modifyexplod
postype=left
pos=var(15)/1000,var(15)%1000
trans=addalpha
alpha=ifelse(time-var(7)<=14,8*(time-var(7)+1),256),ifelse(time-var(7)<=16,256,(32-time+var(7))*8)
id=7
triggerall=numexplod(7)
trigger1=time-var(7)<=32

[state explod8 stop]
type=modifyexplod
postype=left
pos=var(15)/1000,var(15)%1000
trans=none
id=7
triggerall=numexplod(7)
trigger1=time-var(7)=[33,84]

[state explod8 fadeout]
type=modifyexplod
postype=left
pos=var(15)/1000-5*(time-var(7)-85)*ifelse(teamside=2,-1,1),var(15)%1000
trans=addalpha
alpha=ifelse(time-var(7)>=92,32*(99-time+var(7)),256),ifelse(time-var(7)<=90,32*(time-var(7)-84),256)
id=7
triggerall=numexplod(7)
trigger1=time-var(7)>=85

[state destroy]
type=destroyself
trigger1=!numexplod

[statedef 850]
type=u
movetype=i
physics=u
anim=ifelse(statetype=a,852,850+(statetype=c))
facep2=1
ctrl=0
sprpriority=2

[state type]
type=statetypeset
physics=s
trigger1=!time
trigger1=statetype=s

[state type]
type=statetypeset
physics=c
trigger1=!time
trigger1=statetype=c

[state type]
type=statetypeset
physics=a
trigger1=!time
trigger1=statetype=a

[state shield_helper]
type=helper
name="shield"
id=855
stateno=855
ownpal=1
trigger1=!time

[state shield_helper]
type=helper
name="shield_proj"
id=856
stateno=856
ownpal=1
trigger1=!time

[state shield sound]
type=playsnd
value=s820,0
trigger1=!time

[state ghost]
type=explod
anim=anim
id=850
removetime=16
sprpriority=3
ownpal=1
trigger1=!time

[state ghost alpha]
type=modifyexplod
id=850
postype=p1
pos=random%9-4,random%9-4
trans=addalpha
alpha=floor(256*cos(.1*time)),256
trigger1=time<=16
trigger1=numexplod(850)

[state shield_explod]
type=explod
id=855
anim=860*10**(random%4)
pos=24-4*(anim=851),ifelse(anim=850,-52,ifelse(anim=851,-32,-60))
sprpriority=3
ownpal=1
bindtime=-1
removetime=-1
scale=.5,.5
trigger1=!time

[state shield remove]
type=removeexplod
id=855
triggerall=numexplod(855)
trigger1=numhelper(855)
trigger1=helper(855),stateno!=855
trigger2=numhelper(856)
trigger2=helper(856),stateno!=856
trigger3=time>=8
trigger3=command!="hold_a"||power<=0

[state power]
type=poweradd
value=-8-(time%3=0)
trigger1=time>=8
trigger1=numhelper(855)
trigger1=numhelper(856)
trigger1=helper(855),stateno=855
trigger1=helper(856),stateno=856

[state end]
type=changestate
value=854
trigger1=time>=128||(time>=8&&(command!="hold_a"||power<=0))

[state success]
type=changestate
value=851
triggerall=numhelper(855)
triggerall=numhelper(856)
trigger1=helper(855),stateno!=855
trigger2=helper(856),stateno!=856

[statedef 851]
type=u
movetype=i
physics=n
anim=anim+3
ctrl=0

[state ex explod]
type=explod
id=858
anim=99999
removetime=24
triggerall=!time
trigger1=numhelper(855)
trigger1=!helper(855),var(1)
trigger2=numhelper(856)
trigger2=!helper(856),var(1)

[state shield spark]
type=explod
id=856
anim=(861+numexplod(858))*10**(random%4)
pos=24-4*(anim=854),ifelse(anim=853,-52,ifelse(anim=854,-32,-60))
sprpriority=3
ownpal=1
bindtime=-1
pausemovetime=88888888
supermovetime=88888888
triggerall=!time
trigger1=numhelper(855)
trigger1=helper(855),stateno!=855
trigger2=numhelper(856)
trigger2=helper(856),stateno!=856

[state pause]
type=pause
time=12
movetime=12
trigger1=!time

[state invul]
type=hitby
value=
trigger1=time<=12

[state freeze]
type=posfreeze
value=1
trigger1=time<=12

[state type]
type=statetypeset
statetype=a
movetype=i
physics=a
trigger1=time=12
trigger1=statetype=a

[state end]
type=changestate
value=50*(statetype=a)+11*(statetype=c)
ctrl=1
trigger1=time>=24

[statedef 852]
type=u
movetype=i
physics=n
ctrl=0

[state type]
type=statetypeset
statetype=c
movetype=i
physics=n
triggerall=!time
triggerall=statetype=s
trigger1=numhelper(855)
trigger1=helper(855),var(1)=1
trigger2=numhelper(856)
trigger2=helper(856),var(1)=1

[state anim]
type=changeanim
value=ifelse(statetype=a,855,853+(statetype=c))
trigger1=!time

[state parry spark]
type=explod
id=856
anim=862*10**(random%4)
pos=12-4*(statetype=c),ifelse(statetype=s,-52,ifelse(statetype=c,-32,-60))
sprpriority=3
ownpal=1
bindtime=-1
pausemovetime=88888888
supermovetime=88888888
trigger1=!time

[state pause]
type=pause
time=20
movetime=20
trigger1=!time

[state vel_air]
type=velset
x=vel x/2
y=-4
trigger1=time=20
trigger1=statetype=a

[state invul]
type=hitby
value=
trigger1=1

[state push]
type=playerpush
value=0
trigger1=1

[state freeze]
type=posfreeze
value=1
trigger1=1

[state end]
type=changestate
value=50*(statetype=a)+11*(statetype=c)
ctrl=1
trigger1=time>=24

[statedef 854]
type=u
movetype=u
physics=u
anim=anim+3
ctrl=0

[state change]
type=changestate
value=50*(statetype=a)+11*(statetype=c)
ctrl=1
trigger1=time>=24

[statedef 855]
type=a
movetype=h
ctrl=0

[state id/low parry/shield]
type=null
trigger1=!time
trigger1=0&&var(0):=855
trigger2=!time
trigger2=root,var(30)%10=1
trigger2=0&&var(1):=root,command="down"
trigger3=time=8
trigger3=root,var(30)%10=0
trigger3=0&&var(1):=1

[state anim]
type=changeanim
value=ifelse(root,statetype=a,858,856+root,statetype=c)
trigger1=!time
trigger1=root,var(30)%10=0

[state anim]
type=changeanim
value=ifelse(root,command="down",857,856+2*root,statetype=a)
trigger1=!time
trigger1=root,var(30)%10=1

[state anim]
type=changeanim
value=856
trigger1=root,var(30)%10=1
trigger1=anim=858
trigger1=root,statetype!=a

[state invul]
type=hitby
value=
trigger1=1

[state bind]
type=bindtoroot
facing=1
trigger1=1

[state attack reversal]
type=reversaldef
reversal.attr=SCA,AA
hitflag=mafdp
sparkno=-1
numhits=0
pausetime=0,0;12+8*(root,var(30)%10=1)
p1stateno=858
trigger1=!time
trigger1=anim=856

[state attack reversal]
type=reversaldef
reversal.attr=SC,AA
hitflag=mafdp
sparkno=-1
numhits=0
pausetime=0,0;12+8*(root,var(30)%10=1)
p1stateno=858
trigger1=!time
trigger1=anim=857

[state attack reversal]
type=reversaldef
reversal.attr=SA,AA
hitflag=mafdp
sparkno=-1
numhits=0
pausetime=0,0;12+8*(root,var(30)%10=1)
p1stateno=858
trigger1=!time
trigger1=anim=858

[state disable]
type=changeanim
value=99999
triggerall=root,var(30)%10=1
trigger1=time=4
trigger1=ifelse(anim!=857,root,command="holdfwd",root,command="holddown")
trigger2=time=8
trigger3=!root,ctrl
trigger4=root,command="holdback"
trigger5=root,command="holdup"
trigger6=ifelse(anim!=857,root,command="holddown",root,command="holdfwd")
trigger7=time
trigger7=root,command="downfwd"||ifelse(anim!=857,root,command="fwd",root,command="down")

[state destroy]
type=destroyself
triggerall=!(root,var(30)%10)
trigger1=root,command!="hold_a"
trigger1=time>7
trigger2=time>=127
trigger3=root,stateno!=850

[state destroy]
type=destroyself
triggerall=root,var(30)%10=1
trigger1=time>=27
trigger2=root,stateno=852

[statedef 856]
type=a
movetype=h
ctrl=0

[state id/low parry/shield]
type=null
trigger1=!time
trigger1=0&&var(0):=856
trigger2=!time
trigger2=root,var(30)%10=1
trigger2=0&&var(1):=root,command="down"
trigger3=time=8
trigger3=root,var(30)%10=0
trigger3=0&&var(1):=1

[state anim]
type=changeanim
value=ifelse(root,statetype=a,858,856+root,statetype=c)
trigger1=!time
trigger1=root,var(30)%10=0

[state anim]
type=changeanim
value=ifelse(root,command="down",857,856+2*root,statetype=a)
trigger1=!time
trigger1=root,var(30)%10=1

[state anim]
type=changeanim
value=856
trigger1=root,var(30)%10=1
trigger1=anim=858
trigger1=root,statetype!=a

[state bind]
type=bindtoroot
facing=1
trigger1=1

[state invul]
type=hitby
value=
trigger1=1

[state proj reversal]
type=reversaldef
reversal.attr=SCA,AP
hitflag=mafdp
sparkno=-1
id=856
numhits=0
pausetime=0,2;12+8*(root,var(30)%10=1)
p1stateno=858
priority=7,hit
trigger1=!time
trigger1=anim=856

[state proj reversal]
type=reversaldef
reversal.attr=SC,AP
hitflag=mafdp
sparkno=-1
id=856
numhits=0
pausetime=0,2;12+8*(root,var(30)%10=1)
p1stateno=858
priority=7,hit
trigger1=!time
trigger1=anim=857

[state proj reversal]
type=reversaldef
reversal.attr=SA,AP
hitflag=mafdp
sparkno=-1
id=856
numhits=0
pausetime=0,2;12+8*(root,var(30)%10=1)
p1stateno=858
priority=7,hit
trigger1=!time
trigger1=anim=858

[state disable]
type=changeanim
value=99999
triggerall=root,var(30)%10=1
trigger1=time=4
trigger1=ifelse(anim!=857,root,command="holdfwd",root,command="holddown")
trigger2=time=8
trigger3=!root,ctrl
trigger4=root,command="holdback"
trigger5=root,command="holdup"
trigger6=ifelse(anim!=857,root,command="holddown",root,command="holdfwd")
trigger7=time
trigger7=root,command="downfwd"||ifelse(anim!=857,root,command="fwd",root,command="down")

[state destroy]
type=destroyself
triggerall=!(root,var(30)%10)
trigger1=root,command!="hold_a"
trigger1=time>7
trigger2=time>=127
trigger3=root,stateno!=850

[state destroy]
type=destroyself
triggerall=root,var(30)%10=1
trigger1=time>=27
trigger2=root,stateno=852

[statedef 858]
type=a
movetype=a
poweradd=50*(root,var(30)%10=1||!var(1))
anim=859
ctrl=0

[state snd]
type=playsnd
value=s820,ifelse(root,var(30)%10=1,3,2-var(1))
trigger1=!time

[state invul]
type=hitby
value=
trigger1=1

[state negate]
type=hitdef
attr=s,hp
hitflag=mafdp
guard.dist=0
sparkno=-1
numhits=0
chainid=856
priority=7,hit
trigger1=!time
trigger1=var(0)=856
trigger1=target(856),ishelper

[state destroy]
type=destroyself
trigger1=time

[statedef 19000]
type=a
movetype=i
physics=n
anim=99999
sprpriority=4000

[state config]
type=null
triggerall=!time
trigger1=0&&var(59):=156        ; pause time (also specifies when the portrait and winquote appear)
trigger2=0&&var(58):=4          ; number of winquotes (anims 18062+)
trigger3=0&&var(57):=-16        ; portrait x offset
trigger4=0&&var(56):=16         ; portrait y offset
trigger5=0&&fvar(39):=.5        ; portrait scale
trigger6=0&&var(56):=5          ; D rank (Technique)
trigger7=0&&var(55):=10         ; C rank (Technique)
trigger8=0&&var(54):=18         ; B rank (Technique)
trigger9=0&&var(53):=25         ; A rank (Technique)

[state vars]
type=null
triggerall=!time
trigger1=0&&var(0):=floor((root,var(32)%1000)*1./roundno/20)
trigger2=var(0)=5
trigger2=0&&var(0):=4
trigger3=0&&var(1):=floor((root,var(32)%1000000)*1./1000/roundno/20)
trigger4=var(1)=5
trigger4=0&&var(1):=4
trigger5=0&&var(2):=floor((root,var(32)%1000000000)*1./1000000)
trigger6=var(2)<6
trigger6=0&&var(2):=0
trigger7=var(2)=[var(56),var(55))
trigger7=var(2):=1
trigger8=var(2)=[var(55),var(54))
trigger8=var(2):=2
trigger9=var(2)=[var(54),var(53))
trigger9=var(2):=3
trigger10=var(2)>=var(53)
trigger10=var(2):=4

[state dtc]
type=displaytoclipboard
text="%d %d %d"
params=var(0),var(1),var(2)
trigger1=1

[state pos]
type=posadd
x=260-screenpos x
y=90-screenpos y
trigger1=1

[state assert]
type=assertspecial
flag=noshadow
flag2=roundnotover
flag3=nomusic
trigger1=1

[state assert]
type=assertspecial
flag=nobardisplay
flag2=nofg
trigger1=1

[state bgm1]
type=playsnd
value=18000,0
abspan=0
trigger1=!time

[state bgm2]
type=playsnd
value=18000,1
abspan=0
loop=1
trigger1=time=146

[state anim]
type=changeanim
value=19024
trigger1=time=28

[state rotate]
type=angledraw
value=(time%5760)/16.
scale=.5+(44-time)*.1,.5+(44-time)*.1
trigger1=time=[28,43]

[state rotate]
type=angledraw
value=(time%5760)/16.
scale=.5,.5
trigger1=time>43

[state pal]
type=palfx
time=-1
add=-80,-80,-80
sinadd=60,60,60,60
trigger1=time=28

[state trans]
type=trans
trans=sub
trigger1=time>27

[state title alpha]
type=explod
id=19011
anim=19011
supermovetime=44444444
pausemovetime=44444444
scale=.5,.5
ontop=1
ownpal=1
trans=addalpha
alpha=0,256
trigger1=time=20

[state title alpha ctrl]
type=modifyexplod
id=19011
postype=left
pos=ceil((time-56)/2.),16
trans=addalpha
alpha=16*(time-23),256
trigger1=time=[24,39]

[state title alpha ctrl]
type=modifyexplod
id=19011
postype=left
pos=ceil((time-56)/2.),16
trans=add
trigger1=time=[40,55]

[state title alpha ctrl]
type=modifyexplod
postype=left
pos=0,16
id=19011
trans=add
trigger1=time>55

[state title]
type=explod
id=19010
anim=19010
supermovetime=44444444
pausemovetime=44444444
scale=.5,.5
ontop=1
ownpal=1
trans=addalpha
alpha=0,256
trigger1=time=20

[state title ctrl]
type=modifyexplod
postype=left
pos=ceil((time-56)/2.),16
id=19010
trans=sub
trigger1=time=[24,39]

[state title ctrl]
type=modifyexplod
postype=left
pos=ceil((time-56)/2.),16
id=19010
trans=sub
trigger1=time=[40,55]

[state title ctrl]
type=modifyexplod
postype=left
pos=0,16
id=19010
trans=sub
trigger1=time>55

[state flames]
type=explod
postype=left
pos=-144,-8
anim=19000
id=19000
supermovetime=44444444
pausemovetime=44444444
scale=.5,.5
ontop=1
ownpal=1
trans=add
trigger1=time=20

[state flames ctrl]
type=modifyexplod
id=19000
postype=left
pos=-144,-8
trigger1=time>20

[state flames snd]
type=playsnd
value=18000,2
abspan=-160
trigger1=time=20

[state bars alpha]
type=explod
postype=left
pos=316,20
scale=.0625,.5
anim=19026
id=19026
ontop=1
ownpal=1
trans=addalpha
alpha=32,256
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state bars alpha ctrl]
type=modifyexplod
id=19026
postype=left
pos=316,20
scale=.0625*(time-43),.5
trans=addalpha
alpha=32*(time-43),256
trigger1=time=[45,51]

[state bars alpha ctrl]
type=modifyexplod
id=19026
postype=left
pos=316,20
scale=.5,.5
trans=add
trigger1=time>51

[state bars]
type=explod
postype=left
pos=316,20
scale=.0625,.5
anim=19020
id=19020
ontop=1
ownpal=1
trans=sub
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state bars ctrl]
type=modifyexplod
id=19020
postype=left
pos=316,20
scale=.0625*(time-43),.5
trans=sub
trigger1=time=[45,51]

[state bars ctrl]
type=modifyexplod
id=19020
postype=left
pos=316,20
scale=.5,.5
trans=sub
trigger1=time>51

[state bars snd]
type=playsnd
value=18000,3
abspan=120
trigger1=time=54

[state win alpha]
type=explod
postype=left
pos=188,29
anim=19031
id=19031
scale=.0625,.5
ontop=1
ownpal=1
trans=addalpha
alpha=32,256
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state win alpha ctrl]
type=modifyexplod
id=19031
postype=left
pos=188,29
scale=.0625*(time-43),.5
trans=addalpha
alpha=32*(time-43),256
trigger1=time=[45,51]

[state win alpha ctrl]
type=modifyexplod
id=19031
postype=left
pos=188,29
scale=.5,.5
trans=add
trigger1=time>51

[state win]
type=explod
postype=left
pos=188,29
anim=19030
id=19030
scale=.0625,.5
ontop=1
ownpal=1
trans=sub
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state win ctrl]
type=modifyexplod
id=19030
postype=left
pos=188,29
scale=.0625*(time-43),.5
trans=sub
trigger1=time=[45,51]

[state win ctrl]
type=modifyexplod
id=19030
postype=left
pos=188,29
scale=.5,.5
trans=sub
trigger1=time>51

[state stats alpha]
type=explod
postype=left
pos=184,72
anim=19025
id=19025
scale=.5,.5
ontop=1
ownpal=1
trans=addalpha
alpha=32,256
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state stats alpha ctrl]
type=modifyexplod
id=19025
postype=left
pos=184,72
trans=addalpha
alpha=32*(time-43),256
trigger1=time=[45,51]

[state stats alpha ctrl]
type=modifyexplod
id=19025
postype=left
pos=184,72
trans=add
trigger1=time>51

[state stats]
type=explod
postype=left
pos=184,72
anim=19021
id=19021
scale=.5,.5
ontop=1
ownpal=1
trans=sub
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state stats ctrl]
type=modifyexplod
id=19021
postype=left
pos=184,72
trans=sub
trigger1=time=[45,51]

[state stats ctrl]
type=modifyexplod
id=19021
postype=left
pos=184,72
trans=sub
trigger1=time>51

[state spot1]
type=explod
id=19023
anim=19023
postype=left
pos=204,31
scale=.5,.5
ontop=1
ownpal=1
trans=addalpha
alpha=32,256
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state spot1 ctrl]
type=modifyexplod
id=19023
postype=left
pos=204,31
trans=addalpha
alpha=32*(time-43),256
trigger1=time=[45,51]

[state spot1 ctrl]
type=modifyexplod
id=19023
postype=left
pos=204,31
trans=add
trigger1=time>51

[state spot2]
type=explod
id=19024
anim=19023
postype=left
pos=188,64
scale=.5,.5
ontop=1
ownpal=1
trans=addalpha
alpha=32,256
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state spot2 ctrl]
type=modifyexplod
id=19024
postype=left
pos=188,64
trans=addalpha
alpha=32*(time-43),256
trigger1=time=[45,51]

[state spot2 ctrl]
type=modifyexplod
id=19024
postype=left
pos=188,64
trans=add
trigger1=time>51

[state caption alpha]
type=explod
id=19027
anim=19027
postype=left
pos=193,28
scale=.5,.5
ontop=1
ownpal=1
trans=addalpha
alpha=32,256
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state caption alpha ctrl]
type=modifyexplod
id=19027
postype=left
pos=193,28
trans=addalpha
alpha=32*(time-43),256
trigger1=time=[45,51]

[state caption alpha ctrl]
type=modifyexplod
id=19027
postype=left
pos=193,28
trans=add
trigger1=time>51

[state caption]
type=explod
id=19022
anim=19022
postype=left
pos=193,28
scale=.5,.5
ontop=1
ownpal=1
trans=sub
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state caption ctrl]
type=modifyexplod
id=19022
postype=left
pos=193,28
trans=sub
trigger1=time=[45,51]

[state caption ctrl]
type=modifyexplod
id=19022
postype=left
pos=193,28
trans=sub
trigger1=time>51

[state Ograde alpha]
type=explod
id=19051
anim=19059-var(0)
postype=left
pos=240,86
ontop=1
scale=.0455,.5
ownpal=1
trans=addalpha
alpha=23,256
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state Ograde alpha ctrl]
type=modifyexplod
id=19051
postype=left
pos=240,86
scale=.0455*(time-43),.5
trans=addalpha
alpha=ceil(23.27*(time-43)),256
trigger1=time=[45,53]

[state Ograde alpha ctrl]
type=modifyexplod
id=19051
postype=left
pos=240,86
scale=.5,.5
trans=add
trigger1=time>53

[state Ograde]
type=explod
id=19050
anim=19054-var(0)
postype=left
pos=240,86
ontop=1
scale=.0455,.5
ownpal=1
trans=sub
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state Ograde ctrl]
type=modifyexplod
id=19050
postype=left
pos=240,86
scale=.0455*(time-43),.5
trans=sub
trigger1=time=[45,53]

[state Ograde ctrl]
type=modifyexplod
id=19050
postype=left
pos=240,86
scale=.5,.5
trans=sub
trigger1=time>53

[state Dgrade alpha]
type=explod
id=19053
anim=19059-var(1)
postype=left
pos=233,102
ontop=1
scale=.0455,.5
ownpal=1
trans=addalpha
alpha=23,256
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state Dgrade alpha ctrl]
type=modifyexplod
id=19053
postype=left
pos=233,102
scale=.0455*(time-43),.5
trans=addalpha
alpha=ceil(23.27*(time-43)),256
trigger1=time=[45,53]

[state Dgrade alpha ctrl]
type=modifyexplod
id=19053
postype=left
pos=233,102
scale=.5,.5
trans=add
trigger1=time>53

[state Dgrade]
type=explod
id=19052
anim=19054-var(1)
postype=left
pos=233,102
ontop=1
scale=.0455,.5
ownpal=1
trans=sub
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state Dgrade ctrl]
type=modifyexplod
id=19052
postype=left
pos=233,102
scale=.0455*(time-43),.5
trans=sub
trigger1=time=[45,53]

[state Dgrade ctrl]
type=modifyexplod
id=19052
postype=left
pos=233,102
scale=.5,.5
trans=sub
trigger1=time>53

[state Tgrade alpha]
type=explod
id=19055
anim=19059-var(2)
postype=left
pos=226,118
ontop=1
scale=.0455,.5
ownpal=1
trans=addalpha
alpha=23,256
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state Tgrade alpha ctrl]
type=modifyexplod
id=19055
postype=left
pos=226,118
scale=.0455*(time-43),.5
trans=addalpha
alpha=ceil(23.27*(time-43)),256
trigger1=time=[45,53]

[state Tgrade alpha ctrl]
type=modifyexplod
id=19055
postype=left
pos=226,118
scale=.5,.5
trans=add
trigger1=time>53

[state Tgrade]
type=explod
id=19054
anim=19054-var(2)
postype=left
pos=226,118
ontop=1
scale=.0455,.5
ownpal=1
trans=sub
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state Tgrade ctrl]
type=modifyexplod
id=19054
postype=left
pos=226,118
scale=.0455*(time-43),.5
trans=sub
trigger1=time=[45,53]

[state Tgrade ctrl]
type=modifyexplod
id=19054
postype=left
pos=226,118
scale=.5,.5
trans=sub
trigger1=time>53

[state window alpha]
type=explod
id=19061
anim=19061
postype=right
pos=-6,192
ontop=1
ownpal=1
supermovetime=44444444
pausemovetime=44444444
scale=.03125,.5
trans=addalpha
alpha=16,256
trigger1=time=var(59)-16

[state window alpha ctrl]
type=modifyexplod
id=19061
postype=right
pos=-6,192
scale=.03125*(time-var(59)+17),.5
trans=addalpha
alpha=16*(time-var(59)+17),256
trigger1=time=[var(59)-15,var(59)-1]

[state window alpha ctrl]
type=modifyexplod
id=19061
postype=right
pos=-6,192
scale=.5,.5
trans=add
trigger1=time>var(59)-1

[state window]
type=explod
id=19060
anim=19060
postype=right
pos=-6,192
ontop=1
ownpal=1
supermovetime=44444444
pausemovetime=44444444
scale=.03125,.5
trans=sub
trigger1=time=var(59)-16

[state window ctrl]
type=modifyexplod
id=19060
postype=right
pos=-6,192
scale=.03125*(time-var(59)+17),.5
trans=sub
trigger1=time=[var(59)-15,var(59)-1]

[state window ctrl]
type=modifyexplod
id=19060
postype=right
pos=-6,192
scale=.5,.5
trans=sub
trigger1=time>var(59)-1

[state msg]
type=explod
id=19062
anim=19062+random%var(58)
postype=left
pos=4,192
ontop=1
supermovetime=44444444
pausemovetime=44444444
ownpal=1
scale=.03125,.5
trans=addalpha
alpha=16,240
trigger1=time=var(59)-16

[state msg ctrl]
type=modifyexplod
id=19062
postype=left
pos=4,192
scale=.03125*(time-var(59)+17),.5
trans=addalpha
alpha=16*(time-var(59)+17),256-(time-var(59)+17)*16
trigger1=time=[var(59)-15,var(59)-1]

[state msg ctrl]
type=modifyexplod
id=19062
postype=left
pos=4,192
scale=.5,.5
trans=none
trigger1=time>var(59)-1

[state portrait]
type=explod
id=19040
anim=19040
postype=left
pos=var(57),var(56)
ownpal=1
sprpriority=3999
supermovetime=44444444
pausemovetime=44444444
scale=fvar(39),fvar(39)
trans=addalpha
alpha=16,240
trigger1=time=var(59)-16

[state portrait ctrl]
type=modifyexplod
id=19040
postype=left
pos=var(57),var(56)
trans=addalpha
alpha=16*(time-var(59)+17),256-(time-var(59)+17)*16
trigger1=time=[var(59)-16,var(59)-1]

[state portrait ctrl]
type=modifyexplod
id=19040
postype=left
pos=var(57),var(56)
trans=none
trigger1=time>var(59)-1

[state darken]
type=explod
id=19041
anim=19041
postype=left
pos=0,0
sprpriority=3998
supermovetime=44444444
pausemovetime=44444444
scale=320,240
trans=addalpha
alpha=0,248
trigger1=time=var(59)-16

[state darken ctrl]
type=modifyexplod
id=19041
postype=left
pos=0,0
trans=addalpha
alpha=0,256-(time-var(59)+17)*8
trigger1=time=[var(59)-15,var(59)-1]

[state darken ctrl]
type=modifyexplod
id=19041
postype=left
pos=0,0
trans=add1
trigger1=time>var(59)-1

[state msg snd]
type=playsnd
value=18000,5
abspan=0
trigger1=time=var(59)

[state pause]
type=pause
time=44444444
movetime=44444444
pausebg=1
trigger1=time=var(59)

;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

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

[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 @_@]
type=helper
id=17000
stateno=17000
name="defense select"
ownpal=1
pausemovetime=99999999
supermovetime=99999999
trigger1=!numhelper(17000)
trigger1=!roundsexisted
trigger1=roundstate<1

[State -2, Myon]
Type     = Helper
Trigger1 = NumHelper(8000) = 0
Name     = "Myon"
StateNo  = 8000
ID       = 8000
Pos      = -500, -100
PosType  = P1
KeyCtrl  = 0
Size.XScale = 0.8
Size.YScale = 0.8
IgnoreHitPause = 1
Persistent = 0

[State -2, VarSet]
Type     = VarSet
Trigger1 = Var(12) > 0
Trigger1 = StateType != A
V        = 12
Value    = 0
IgnoreHitPause = 1

[State -2]
type = RemoveExplod
trigger1= numexplod(2012)
trigger1 = Stateno != 215
ID = 2012

[State -2]
type = RemoveExplod
trigger1 = numexplod(2011)
trigger1 = Stateno != 210
ID = 2011

[State -2]
type = RemoveExplod
trigger1 = numexplod(2001)
trigger1 = Stateno != 420
ID = 2001

[State -2]
type = RemoveExplod
trigger1= numexplod(2003)
trigger1 = Stateno != 225
ID = 2003

[State -2]
type = RemoveExplod
trigger1 = numexplod(2013)
trigger1 = Stateno != 620
ID = 2013

[State -2]
type = RemoveExplod
trigger1 = numexplod(2015)
trigger1 = Stateno != 220
ID = 2015

[state shield remove]
type=removeexplod
id=855
triggerall=numexplod(855)
trigger1=stateno!=850

[state shield remove]
type=removeexplod
id=850
triggerall=numexplod(850)
trigger1=stateno!=850

[state shield remove]
type=removeexplod
id=858
triggerall=numexplod(858)
trigger1=stateno!=[851,852]

[State -2]
Type       = VarSet
TriggerAll = Var(59) = 0
TriggerAll = Var(13) = 0
Trigger1   = Command = "FF"
Trigger2   = Command = "BB"
V          = 13
Value      = IfElse((Command = "FF"), 7, -7)
IgnoreHitPause = 1

[State -2]
Type       = VarAdd
TriggerAll = Var(59) = 0
Trigger1   = Var(13) != 0
V          = 13
Value      = IfElse(Var(13) > 0, -1, 1)
IgnoreHitPause = 1

[State -2]
Type       = VarSet
TriggerAll = Var(59) = 0
TriggerAll = Var(13) != 0
Trigger1   = Time = 2
Trigger2   = P2Dist X < 0
V          = 13
Value      = 0

[state parry]
type=helper
name="parry1"
id=855
stateno=855
ownpal=1
triggerall=roundstate=[2,3]
triggerall=var(30)%10=1
triggerall=statetype!=l
triggerall=!numhelper(855)
trigger1=ifelse(statetype=a,command="fwd",command="fwd"^^command="down")
trigger1=command!="rls_dir"
ignorehitpause=1

[state parry]
type=helper
name="parry2"
id=856
stateno=856
ownpal=1
triggerall=roundstate=[2,3]
triggerall=var(30)%10=1
triggerall=statetype!=l
triggerall=!numhelper(856)
trigger1=ifelse(statetype=a,command="fwd",command="fwd"^^command="down")
trigger1=command!="rls_dir"
ignorehitpause=1

[State striker var]
type=null
triggerall=var(33)!=4444
trigger1=var(33)>=1
trigger1=0&&var(33):=var(33)-1
trigger2=var(33)<-1
trigger2=0&&var(33):=-1

[state jd]
type=null
triggerall=var(30)%10=2
triggerall=roundstate=[2,3]
trigger1=stateno=[150,154]
trigger1=stateno%2=0
trigger1=!time
trigger1=(var(31)/10)%10=0
trigger1=var(31)%10>1
trigger1=0&&var(31):=10
trigger2=var(31)%10>0
trigger2=0&&var(31):=var(31)-1
trigger3=var(31)%10=[0,1]
trigger3=ctrl||stateno=[150,155]
trigger3=ifelse(statetype=a,command="back",command="downback"||command="back")
trigger3=0&&var(31):=(var(31)/10)*10+4
trigger4=var(31)%10<0
trigger4=0&&var(31):=var(31)+1
trigger5=var(31)%10>1
trigger5=command!="holdback"
trigger5=0&&var(31):=1-var(31)%10
trigger6=(var(31)/10)%10
trigger6=!(stateno=150||stateno=152||stateno=154)
trigger6=0&&var(31):=var(31)-((var(31)/10)%10)*10
ignorehitpause=1

[state jd reset]
type=defencemulset
value=1
triggerall=var(30)%10=2
triggerall=var(31)%10<=1
trigger1=!(stateno=120||stateno=[150,155])
trigger1=(var(31)/10)%10!=1
trigger2=stateno=150||stateno=152||stateno=154
trigger2=(var(31)/10)%10=2
trigger3=var(31)<0

[state message var]
type=null
trigger1=0&&var(34):=var(34)-(var(34)/10-var(34)%10)*10
trigger2=0&&var(34):=(var(34)/10)*10+ifelse(p2movetype=a,1,ifelse(p2movetype=h,2,3))
ignorehitpause=1

[state messages]
type=helper
postype=left
name="messages"
stateno=16000
id=16000
ownpal=1
supermovetime=99999999
pausemovetime=99999999
triggerall=roundstate>=2
trigger1=!(var(33)||numhelper(3501)||numhelper(3601))
trigger1=0&&var(33):=-2
trigger2=(var(34)%100)/10=1
trigger2=var(34)%10=2
trigger2=0&&var(34):=var(34)-((var(34)/10)%10-4)*10
trigger3=(stateno=5201||stateno=5210)
trigger3=time=1
trigger3=0&&var(34):=var(34)-((var(34)/100)%10-1)*100
trigger4=stateno=851
trigger4=time=1
trigger4=0&&var(34):=var(34)-((var(34)/1000)%10-(1+numexplod(858)))*1000
trigger5=stateno=852
trigger5=time=1
trigger5=0&&var(34):=var(34)-((var(34)/10000)%10-1)*10000
trigger6=prevstateno=[150,154]
trigger6=prevstateno%2=0
trigger6=movetype=a
trigger6=time=1
trigger6=0&&var(34):=var(34)-((var(34)/100000)%10-1)*100000
trigger7=var(31)=10
trigger7=0&&var(34):=var(34)-((var(34)/1000000)%10-1)*1000000
trigger8=!numhelper(16000)
trigger8=var(33)=-2||(var(34)/10)%10=4||(var(34)/100)%10=1||(var(34)/1000)%10||(var(34)/10000)%10||(var(34)/100000)%10||(var(34)/1000000)%10
ignorehitpause=1

[state dtc]
type=displaytoclipboard
text="%d %d"
params=var(31),life
trigger1=1
ignorehitpause=1

[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 = StateType != A || StateNo = 5210
var(18) = 0

[State -2]
type = VarSet
trigger1 = 1
v = 35
value = ifelse(-Const(size.mid.pos.y)>-enemynear,Const(size.mid.pos.y),-enemynear,Const(size.mid.pos.y),-Const(size.mid.pos.y))
ignorehitpause = 1

[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 -2, AfterImageTime]
type = afterimagetime
trigger1 = stateno != [1000,4599]
time = 0
;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

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

;--------------------- Variable List ----------------------


;--------------------- Float Variable List ----------------------

