; 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.75		;Walk forward
walk.back = -2.75		;Walk backward
run.fwd  = 7, 0		;Run forward (x, y)
run.back = -6,-2	;Hop backward (x, y)
jump.neu = 0,-8.5		;Neutral jumping velocity (x, y)
jump.back = -4.25		;Jump back Speed (x, y)
jump.fwd = 4.25		;Jump forward Speed (x, y)
runjump.back = -3.9,-9;Running jump speeds (opt)
runjump.fwd = 4,-9	;.
airjump.neu = 0,-6	;.
airjump.back = -3	;Air jump speeds (opt)
airjump.fwd = 2.7		;.

[Movement]
airjump.num = 0		;Number of air jumps allowed (opt)
airjump.height = 30	;Minimum distance from ground before you can air jump (opt)
yaccel = .35		;Vertical acceleration
stand.friction = .85	;Friction coefficient when standing
crouch.friction = .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, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,150]
flag = roundnotover

[State 181, PlaySnd]
type = PlaySnd
trigger1 = time = 60
value = S0,12

[State 181, Explod]
type = Explod
trigger1 = time = 60
anim = 181
ID = 181
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 2,2
sprpriority = 5

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

[StateDef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0
sprpriority = 2

[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=182

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

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

[State 182, VelSet]
type = Velset
trigger1 = AnimElemTime(4) > 0
x = -2
y = -2

[State 182, ChangeState]
type = ChangeState
trigger1 = Time >= 45
value = 183

[StateDef 183]
type = A
Physics = N
ctrl = 0
anim = 183
velset = 0,0
sprpriority = 2

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

[State 183]
Type = Helper
Trigger1 = AnimElem = 6
Name = "Wind"
Stateno = 184
ID = 184
Pos = 1,-51
PosType = P1
OwnPal = 1

[StateDef 184]
MoveType = I
Physics = N
Anim = 184
VelSet = 0,0
SprPriority = 5

[State 184]
Type = BindToRoot
Trigger1 = Var(20) = 0
Time = 1
Facing = 1
Pos = 0,0

[State 184]
Type     = AssertSpecial
Trigger1 = 1
Flag     = NoShadow

[State 184]
Type = Trans
Trigger1 = 1
Trans = AddAlpha
Alpha = 256 - Var(10),256

[State 184]
Type = VarAdd
Trigger1 = Var(20) = 1
V = 10
Value = 16

[State 184]
Type = VarSet
Trigger1 = Root,StateNo != 183
V = 20
Value = 1

[State 184]
Type = Helper
Trigger1 = Time%5 = 1 && Var(20) = 0
Name = "Wind"
StateNo = 185
ID = 185
Pos = 0,0
PosType = P1
OwnPal = 1

[State 184]
Type = VarAdd
Trigger1 = Var(20) = 1
FV = 0
Value = 0.1

[State 184]
Type = AngleDraw
Trigger1 = 1
Value = -Time*5
Scale = 0.5+FVar(0),0.5+FVar(0)

[StateDef 185]
MoveType = I
Physics = N
Anim = 185
VelSet = 0,0
SprPriority = 4

[State 185]
Type = Turn
Trigger1 = Time = 0 && Random <= 499

[State 185]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 185]
Type = Trans
Trigger1 = 1
Trans = AddAlpha
Alpha = 256 - Var(10),256

[State 185]
Type = VarAdd
Trigger1 = 1
V = 10
Value = 16

[State 185]
Type = VarAdd
Trigger1 = Time = 0
V = 1
Value = Random%45

[State 185]
Type = VarAdd
Trigger1 = Time = 0 && Random <= 499
V = 1
Value = -180

[State 185]
Type = VarRandom
Trigger1 = Time = 0
V = 2
Range = 0,9

[State 185]
Type = VarSet
Trigger1 = Time = 0
FV = 0
Value = Var(2)*0.1

[State 185]
Type = VarAdd
Trigger1 = 1
FV = 1
Value = 0.1

[State 185]
Type = AngleDraw
Trigger1 = 1
Scale = 0.1+FVar(1),0.1+FVar(0)*0.5

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

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

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

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

[State 190, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S100,14

[State 190, PlaySnd]
type = PlaySnd
trigger1 = time = 95
value = S100,6

[State 190]
type = EnvShake
Trigger1 = time = 95
time = 30
ampl = 4
freq = 127

[State 190, PlaySnd]
type = PlaySnd
trigger1 = time = 95
value = S0,7

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

[State 190, end]
type = ChangeState
trigger1 = Time = 140
value = 192
ctrl = 1

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

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

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

[State 191]
type = DestroySelf
trigger1 = Time = 80

[Statedef 192]
type = S
ctrl = 0
anim = 99999
velset = 0,0
sprpriority = -1

[State 192, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S190,0
channel = 0

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

[State 192]
type = Helper
trigger1 = Time = 30
name = "Intro"
stateno = 193
pos = -120,0
postype = p1
keyctrl = 0
ownpal = 0
ID = 193
Persistent = 0

[State 192]
type = ChangeState
trigger1 = Time = 86
value = 0

[Statedef 193]
type = S
movetype = I
physics = N
anim = 20
ctrl = 0
velset = 0,0
sprpriority = -1

[State 193]
type = VelAdd
trigger1 = (Time = 0)
x = 2.2

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

[State 193]
type = DestroySelf
trigger1 = Time = 56
trigger2 = Time > 56
trigger2 = parent, stateno != 190

;---------------------------------------------------------------------------
; 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 = 2
value = S100,0
volume = 255

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

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 2
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
Var(39) = 16			;Attack priority: 0 (least) to 7 (most), 4 default
					;Hit/Miss/Dodge type (Def: Hit)
pausetime = 6, 6			;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 = 8
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= 35
ctrl = 0
velset = 0,0
anim = 210

[State 210, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S100,1
volume = 255

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

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage  = 15
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
envshake.time = 5
envshake.freq = 60
envshake.ampl = -3

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

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

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

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

[State 215, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S100,1
volume = 255

[State 215, 1]
type = HitDef
trigger1 = AnimElem = 7
attr = S, NA
damage = 15
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
envshake.time = 5
envshake.freq = 60
envshake.ampl = -3

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

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

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

[State 220, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S100,2
volume = 255

[State 220, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
animtype  = Heavy
damage = 25
guardflag = MA
pausetime = 9,14
sparkno = S8053*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-70
hitsound   = S200,3
guardsound = S300,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -3
air.velocity = -4,-4
envshake.time = 10
envshake.freq = 80
envshake.ampl = -4

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

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

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

[State 225, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S100,2
volume = 255

[State 225, 1]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
damage = 25
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10, 10
sparkno = S8053*10**(random%4)
guard.sparkno = S9000
sparkxy = -20, -76
hitsound = S200,10
guardsound = S300, 4
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -1,-8
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1,-8
air.hittime = 12
fall = 1
fall.recovertime = 17
envshake.time = 10
envshake.freq = 80
envshake.ampl = -4

[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, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 650
trigger1 = time = 1
value = S400,0+Random%2
channel = 0

[State 400, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S100,0
volume = 255

[State 400, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage    = 10
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 = -7
air.velocity = -1.5,-4

[State 400, 3]
type = CtrlSet
trigger1 = Time = 5
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= 20
ctrl = 0
anim = 410

[State 410, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S100,1
volume = 255

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

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

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

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

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

[State 420, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S100,2
volume = 255

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

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

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

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

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

[State 600, 2]
type = HitDef
trigger1 = animelem = 3
attr = A, NA
damage = 10
hitflag = MAF
guardflag = HA
priority = 4,Hit
pausetime = 8,8
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
air.fall = 1

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

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

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

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

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

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

[State 620, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S100,2
volume = 255

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

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

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

; 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 = AnimElem = 3
Trigger1 = p2stateno != 150 && 151 && 152 && 153 && 130 && 131 && 140
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = ifelse (command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = 801
p2stateno = 805
;hitsound = S800,0
fall = 1
nochainID = 600,9999

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

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

[State 801, PlaySnd]
type = PlaySnd
trigger1 = time = 30
value = S100,10

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

[State 801, 2]
type = TargetBind
trigger1 = animelem = 1
pos = 35,0

[State 801, 2]
type = Targetstate
trigger1 = time = 30
value = 805

[State 801, 2]
type = Targetstate
trigger1 = time = 30
value = 806

[State 801, 2]
type = Targetstate
trigger1 = time = 30
value = 809

[State 801]
type = Explod
trigger1 = time = 30
anim = 2004
id = 2004
sprpriority = 2
postype = p1
pos = 40,30
bindtime = 1
supermove = 0
ignorehitpause = 1
under = 0
scale = 0.5,1.5

[State 801, Explod]
type = Explod
trigger1 = time = 30
anim = 8052*10**(random%4)
ID = 8052
pos = 40,-60
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 0

[State 801]
type = varset
trigger1 = time = 0
v = 31
value = var(4)

[State 801, 2]
type = Targetlifeadd
trigger1 = time = 30
value = -80

[State 801]
type = poweradd
trigger1 = time = 30
value = 108

[State 801]
type = Width
trigger1 = time = 0
edge = 40,0

[State 801]
type = varadd
trigger1 = animelem = 2
v = 16
value = 11
ignorehitpause = 1
persistent = 0

[State 801]
type = changeState
trigger1 = animtime = 0
value = 0
ctrl = 1

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

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

[State 805]
type = ChangeAnim2
Trigger1 = Time = 0
value = 805

[State 805]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 805]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

;---------------------------------------------------------------------------
; 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 806]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 2

[State 806]
type = NotHitBy
trigger1 = 1
value = SCA

[State 806]
type = ChangeAnim2
Trigger1 = Time = 0
value = 806

[State 806]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[Statedef 809]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 2

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

[State 809]
type = ChangeAnim
Trigger1 = Time = 0
value = 5050

[State 809]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 809]
type = velset
trigger1 = time = 0
x = 0
y = -17

[State 809]
type = VelAdd
Trigger1 = 1
y = .46

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

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

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

[State 1000]
Type = Helper
Trigger1 = AnimElem = 5
Name = "Gale_Fan"
Stateno = 1001
ID = 1001
Pos = 75,0
PosType = P1
OwnPal = 1
Size.XScale = 1
Size.YScale = 1

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

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

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

[State 1001, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S100,10

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

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

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

[State 1001]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo != 1002
Trigger1 = 1;IsHelper(1001)
X = 6

[State 1001]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo = 1002
Trigger1 = 1;IsHelper(1001)
X = 3
Y = 0

[State 1001]
Type = PosSet
Trigger1 = 1
Y = 0

[State 1001]
Type = PosAdd
Trigger1 = Time = 0 && PrevStateNo = 1002
X = 20

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

[State 1001]
Type = AngleDraw
Trigger1 = !MoveContact
Value = 0

[State 1001]
Type = AngleDraw
Trigger1 = MoveContact
Value = 0
Scale = 0.5,1

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

[State 1001, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NP,SP,HP
time = -1
ignorehitpause = 1

[State 1001]
type = HitDef
trigger1 = AnimElem = 1
attr = S, SA
damage = ceil(50*(root,fvar(6))),5
animtype = hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,0
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -20
hitsound = S200,2
guardsound = S300,4
Ground.SlideTime = 12
Ground.HitTime = 13
Air.HitTime = 13
Ground.Velocity  = -4,-5
Guard.Velocity  = -3
Air.Velocity = -4,-5
AirGuard.Velocity = -3,-5
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
Airguard.CornerPush.VelOff = 0
Fall = 1
Fall.RecoverTime = 15
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 1001]
Type = AttackMulSet
Trigger1 = 1
Value = Root,FVar(3)
IgnoreHitPause = 1

[State 1001]
Type = ChangeAnim
Trigger1 = MoveContact
Value = 1003
IgnoreHitPause = 1
Persistent = 0

[State 1001]
Type = DestroySelf
Trigger1 = Anim = 1003 && AnimTime = 0
Trigger2 = FrontEdgeBodyDist <= -120

[StateDef 1002]
MoveType = I
Physics = N
Anim = 1003
SprPriority = 2

[State 1002]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 1002]
Type = SprPriority
Trigger1 = 1
Value = 5

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

[State 1002, VelAdd]
Type = VelAdd
Trigger1 = Time = 0
X = -Vel X / 2
Y = -Vel Y / 2
IgnoreHitPause = 1
Persistent = 0

[State 1002, AngleDraw]
Type = AngleDraw
Trigger1 = IsHelper(1001) || IsHelper(1006) || IsHelper(1201) || IsHelper(1203) || IsHelper(1206)
Value = 0
Scale = 0.5,1

[State 1002, AngleDraw]
Type = AngleDraw
Trigger1 = IsHelper(1007)
Value = 45
Scale = 0.5,1

[State 1002, AngleDraw]
Type = AngleDraw
Trigger1 = IsHelper(1205)
Value = 315
Scale = 0.5,1

[State 1002]
Type = DestroySelf
Trigger1 = AnimTime = 0

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

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

[State 1003, Helper]
type = Helper
trigger1 = AnimElem = 7
ID = 1004
pos = 65,-60
postype = p1
stateno = 1004
helpertype = normal
name = "Tornado"
keyctrl = 0
ownpal = 1
supermovetime = 1

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

[StateDef 1004]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1005
poweradd = 20
sprpriority = 2

[State 1004, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S100,11

[State 1004, VelSet]
type = VelSet
trigger1 = time
x = 3
y = 0

[State 1004]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 1004, 1]
type = HitDef
trigger1 = time = [0,30]
trigger1 = time %5 = 1
attr = S,SA
damage = ceil(15*(root,fvar(6))),3
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,10
sparkno = S8051*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -20
hitsound = S200,3
guardsound = S300,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -2,-3
airguard.velocity = -1,-2
air.type = High
air.velocity = -1.5,-1
air.hittime = 12
fall = 1
fall.recovertime = 20
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
Airguard.CornerPush.VelOff = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 1004, end]
type = destroyself
trigger1 = AnimTime = 0

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

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

[State 1005, Helper]
type = Helper
trigger1 = AnimElem = 3
ID = 1006
pos = 10,-60
postype = p1
stateno = 1006
helpertype = normal
name = "Violent_Gale"
keyctrl = 0
ownpal = 1
supermovetime = 1

[State 1005, Helper]
type = Helper
trigger1 = AnimElem = 3
ID = 1007
pos = 10,-60
postype = p1
stateno = 1007
helpertype = normal
name = "Violent_Gale"
keyctrl = 0
ownpal = 1
supermovetime = 1

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

[StateDef 1006]
MoveType = A
Physics = N
Anim = 1002
SprPriority = 3

[State 1006, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S100,10

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

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

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

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

[State 1006, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NP,SP,HP
time = -1
ignorehitpause = 1

[State 1006]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo != 1002
Trigger1 = 1;IsHelper(1001)
X = 6

[State 1006]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo = 1002
Trigger1 = 1;IsHelper(1001)
X = 3
Y = 0

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

[State 1006]
Type = AngleDraw
Trigger1 = !MoveContact
Value = 0

[State 1006]
Type = AngleDraw
Trigger1 = MoveContact
Value = 0
Scale = 0.5,1

[State 1006]
type = HitDef
trigger1 = AnimElem = 1
attr = S, SA
damage = ceil(25*(root,fvar(6))),3
animtype = hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,0
sparkno = S8053*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -20
hitsound = S200,3
guardsound = S300,4
Ground.SlideTime = 12
Ground.HitTime = 13
Air.HitTime = 13
Ground.Velocity  = -4
Guard.Velocity  = -3
Air.Velocity = -4,-5
AirGuard.Velocity = -3,-3
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
Airguard.CornerPush.VelOff = 0
air.fall = 1
Fall.RecoverTime = 15
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 1006]
Type = ChangeAnim
Trigger1 = MoveContact
Value = 1003
IgnoreHitPause = 1
Persistent = 0

[State 1006]
Type = DestroySelf
Trigger1 = Anim = 1003 && AnimTime = 0
Trigger2 = FrontEdgeBodyDist <= -120

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

[State 1007, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S100,10

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

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

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

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

[State 1007, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NP,SP,HP
time = -1
ignorehitpause = 1

[State 1007]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo != 1002
Trigger1 = 1;IsHelper(1001)
X = 6
y = -6

[State 1007]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo = 1002
Trigger1 = 1;IsHelper(1001)
X = 3
Y = -3

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

[State 1007]
Type = AngleDraw
Trigger1 = !MoveContact
Value = 45

[State 1007]
Type = AngleDraw
Trigger1 = MoveContact
Value = 45
Scale = 0.5,1

[State 1007]
type = HitDef
trigger1 = AnimElem = 1
attr = S, SA
damage = ceil(25*(root,fvar(6))),3
animtype = hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,0
sparkno = S8052*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -20
hitsound = S200,3
guardsound = S300,4
Ground.SlideTime = 12
Ground.HitTime = 13
Air.HitTime = 13
Ground.Velocity  = -4
Guard.Velocity  = -3
Air.Velocity = -4,-5
AirGuard.Velocity = -3,-3
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
Airguard.CornerPush.VelOff = 0
Air.Fall = 1
Fall.RecoverTime = 15
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 1007]
Type = ChangeAnim
Trigger1 = MoveContact
Value = 1003
IgnoreHitPause = 1
Persistent = 0

[State 1007]
Type = DestroySelf
Trigger1 = Anim = 1003 && AnimTime = 0
Trigger2 = FrontEdgeBodyDist <= -120

[StateDef 1100]
type = U
movetype= A
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1100
poweradd = 30
sprpriority = 2

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = Anim = 1100
trigger1 = AnimElem = 3
value = S400,7
channel = 0

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

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3 && Anim = 1100
value = S100,9

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

[State 1100, VelSet]
type = VelSet
trigger1 = AnimElem = 3 && anim = 1100
x = 3
y = -6.5

[State 1100, Helper]
type = Helper
trigger1 = AnimElem = 3 && anim = 1100
ID = 1102
pos = -10,-60
postype = p1
stateno = 1102
helpertype = normal
name = "Conquer_Dash"
keyctrl = 0
ownpal = 1
supermovetime = 1
size.xscale = 0.5
size.yscale = 0.5
ignorehitpause = 1

[State 1100, 1]
type = HitDef
trigger1 = AnimElem = 3 && anim = 1100
attr = S, SA
damage = 50,5
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10, 10
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -76
hitsound = S200,2
guardsound = S300,4
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4,-5
airguard.velocity = -2,-3
air.type = High
air.velocity = -2,-4
air.hittime = 12
fall = 1
fall.recovertime = 18
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 1100]
Type = ChangeAnim
Trigger1 = AnimTime = 0 && Anim = 1100
Value = 42
Elem = 2

[State 1100]
Type = ChangeAnim
Trigger1 = AnimTime = 0 && Anim = 42
Value = 45

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

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

[State 1101]
type = Gravity
trigger1 = 1

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

[State 1101]
Type = ChangeState
Trigger1 = Vel Y > 0
Trigger1 = Pos Y > 0
Value = 52

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

[State 1102, BindToParent]
type = BindToParent
trigger1 = 1
time = 11
facing = 1
ignorehitpause = 1
pos = -20,-20

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

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

[State 1102, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 55

[State 1102, end]
type = Destroyself
trigger1 = AnimTime = 0

[StateDef 1103]
type = U
movetype= A
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1100
poweradd = 30
sprpriority = 2

[State 1103, PlaySnd]
type = PlaySnd
trigger1 = Anim = 1100
trigger1 = AnimElem = 3
value = S400,7
channel = 0

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

[State 1103, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3 && Anim = 1100
value = S100,9

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

[State 1103, VelSet]
type = VelSet
trigger1 = AnimElem = 3 && Anim = 1100
x = 3
y = -8.5

[State 1103, Helper]
type = Helper
trigger1 = AnimElem = 3 && Anim = 1100
ID = 1102
pos = -10,-60
postype = p1
stateno = 1102
helpertype = normal
name = "Conquer_Dash"
keyctrl = 0
ownpal = 1
supermovetime = 1
size.xscale = 0.5
size.yscale = 0.5
ignorehitpause = 1

[State 1103, 1]
type = HitDef
trigger1 = AnimElem = 3 && Anim = 1100
attr = S, SA
damage = 75,10
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10, 10
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -76
hitsound = S200,2
guardsound = S300,4
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -2,-7
airguard.velocity = -2.5,-4
air.type = High
air.velocity = -2,-5
air.hittime = 12
fall = 1
fall.recovertime = 25
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 1103]
Type = ChangeAnim
Trigger1 = AnimTime = 0 && Anim = 1100
Value = 42
Elem = 2

[State 1103]
Type = ChangeAnim
Trigger1 = AnimTime = 0 && Anim = 42
Value = 45

[StateDef 1104]
type = U
movetype= A
physics = N
juggle = 1
velset = 0,0
ctrl = 0
anim = 1103
poweradd = 40
sprpriority = 2

[State 1104, PlaySnd]
type = PlaySnd
trigger1 = Anim = 1103
trigger1 = AnimElem = 3
value = S400,7
channel = 0

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

[State 1104, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3 && Anim = 1103
value = S100,9

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

[State 1104, VelSet]
type = VelSet
trigger1 = AnimElem = 3 && Anim = 1103
x = 4
y = -10

[State 1104, Helper]
type = Helper
trigger1 = AnimElem = 3 && Anim = 1103
ID = 1102
pos = -10,-60
postype = p1
stateno = 1102
helpertype = normal
name = "Conquer_Dash"
keyctrl = 0
ownpal = 1
supermovetime = 1
size.xscale = 0.5
size.yscale = 0.5
ignorehitpause = 1

[State 1104, 1]
type = HitDef
trigger1 = AnimElem = 3 && Anim = 1103
trigger2 = AnimElem = 4 && Anim = 1103
attr = S, SA
damage = 20,10
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10,10
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -76
hitsound = S200,2
guardsound = S300,4
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -2,-8
airguard.velocity = -3,-4.5
air.type = High
air.velocity = -2,-8
air.hittime = 15
fall = 1
fall.recover = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 1104, 1]
type = HitDef
trigger1 = AnimElem = 5 && Anim = 1103
attr = S, SA
damage = 20,10
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10,10
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -76
hitsound = S200,2
guardsound = S300,4
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -2,-8
airguard.velocity = -3,-4.5
air.type = High
air.velocity = -2,-8
air.hittime = 15
fall = 1
fall.recover = 0
yaccel = 0.5
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 1104]
Type = ChangeAnim
Trigger1 = AnimTime = 0 && Anim = 1103
Value = 42
Elem = 2

[State 1104]
Type = ChangeAnim
Trigger1 = AnimTime = 0 && Anim = 42
Value = 45

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

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S400,2
channel = 0

[State 1200, Helper]
type = Helper
trigger1 = AnimElem = 3
ID = 1201
pos = 20,-30
postype = p1
stateno = 1201
helpertype = normal
name = "Aerial_Gale"
keyctrl = 0
ownpal = 1
supermovetime = 1

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

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

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

[State 1200]
Type = Gravity
Trigger1 = Anim = 44

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

[StateDef 1201]
MoveType = A
Physics = N
Anim = 1202
SprPriority = 3

[State 1201, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S100,10

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

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

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

[State 1201]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo != 1002
Trigger1 = 1;IsHelper(1001)
X = 4

[State 1201]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo = 1002
Trigger1 = 1;IsHelper(1001)
X = 2
Y = 0

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

[State 1201]
Type = AngleDraw
Trigger1 = !MoveContact
Value = 0

[State 1201]
Type = AngleDraw
Trigger1 = MoveContact
Value = 0
Scale = 0.5,1

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

[State 1201, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NP,SP,HP
time = -1
ignorehitpause = 1

[State 1201]
type = HitDef
trigger1 = AnimElem = 1
attr = A, SA
damage = ceil(30*(root,fvar(6))),5
animtype = hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,0
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -20
hitsound = S200,2
guardsound = S300,4
Ground.SlideTime = 12
Ground.HitTime = 13
Air.HitTime = 13
Ground.Velocity  = -4
Guard.Velocity  = -3
Air.Velocity = -4,-5
AirGuard.Velocity = -3,-3
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
Airguard.CornerPush.VelOff = 0
air.fall = 1
Fall.RecoverTime = 15
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 1201]
Type = ChangeAnim
Trigger1 = MoveContact
Value = 1003
IgnoreHitPause = 1
Persistent = 0

[State 1201]
Type = DestroySelf
Trigger1 = Anim = 1003 && AnimTime = 0
Trigger2 = FrontEdgeBodyDist <= -120

[StateDef 1202]
type = A
movetype = A
physics = A
juggle = 0
anim = 1200
ctrl = 0
poweradd = 40

[State 1202, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S400,2
channel = 0

[State 1202, Helper]
type = Helper
trigger1 = AnimElem = 3
ID = 1203
pos = 20,-30
postype = p1
stateno = 1203
helpertype = normal
name = "Aerial_Gale"
keyctrl = 0
ownpal = 1
supermovetime = 1

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

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

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

[State 1202]
Type = Gravity
Trigger1 = Anim = 44

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

[StateDef 1203]
MoveType = A
Physics = N
Anim = 1202
SprPriority = 3

[State 1203, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S100,10

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

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

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

[State 1203]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo != 1002
Trigger1 = 1;IsHelper(1001)
X = 6

[State 1203]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo = 1002
Trigger1 = 1;IsHelper(1001)
X = 3
Y = 0

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

[State 1203]
Type = AngleDraw
Trigger1 = !MoveContact
Value = 0

[State 1203]
Type = AngleDraw
Trigger1 = MoveContact
Value = 0
Scale = 0.5,1

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

[State 1203, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NP,SP,HP
time = -1
ignorehitpause = 1

[State 1203]
type = HitDef
trigger1 = AnimElem = 1
attr = A, SA
damage = ceil(35*(root,fvar(6))),3
animtype = hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,0
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -20
hitsound = S200,2
guardsound = S300,4
Ground.SlideTime = 13
Ground.HitTime = 16
Air.HitTime = 15
Ground.Velocity  = -4.5
Guard.Velocity  = -3.3
Air.Velocity = -5,-5
AirGuard.Velocity = -4,-3
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
Airguard.CornerPush.VelOff = 0
air.fall = 1
Fall.RecoverTime = 23
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 1203]
Type = ChangeAnim
Trigger1 = MoveContact
Value = 1003
IgnoreHitPause = 1
Persistent = 0

[State 1203]
Type = DestroySelf
Trigger1 = Anim = 1003 && AnimTime = 0
Trigger2 = FrontEdgeBodyDist <= -120

[StateDef 1204]
type = A
movetype = A
physics = A
juggle = 0
anim = 1200
ctrl = 0
poweradd = 50

[State 1204, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S400,2
channel = 0

[State 1204, Helper]
type = Helper
trigger1 = AnimElem = 3
ID = 1205
pos = 20,-25
postype = p1
stateno = 1205
helpertype = normal
name = "Aerial_Gale"
keyctrl = 0
ownpal = 1
supermovetime = 1

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

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

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

[State 1204]
Type = Gravity
Trigger1 = Anim = 44

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

[StateDef 1205]
MoveType = A
Physics = N
Anim = 1201
SprPriority = 3

[State 1205, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S100,10

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

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

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

[State 1205]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo != 1002
Trigger1 = 1;IsHelper(1001)
X = 4
y = 4

[State 1205]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo = 1002
Trigger1 = 1;IsHelper(1001)
X = 2.5
Y = 2.5

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

[State 1205]
Type = AngleDraw
Trigger1 = !MoveContact
Value = 315

[State 1205]
Type = AngleDraw
Trigger1 = MoveContact
Value = 315
Scale = 0.5,1

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

[State 1205, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NP,SP,HP
time = -1
ignorehitpause = 1

[State 1205]
type = HitDef
trigger1 = AnimElem = 1
attr = A, SA
damage = ceil(35*(root,fvar(6))),3
animtype = hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,0
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -20
hitsound = S200,2
guardsound = S300,4
Ground.SlideTime = 13
Ground.HitTime = 16
Air.HitTime = 15
Ground.Velocity  = -4.5
Guard.Velocity  = -3.3
Air.Velocity = -5,-5
AirGuard.Velocity = -4,-3
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
Airguard.CornerPush.VelOff = 0
air.fall = 1
Fall.RecoverTime = 23
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 1205]
Type = ChangeAnim
Trigger1 = MoveContact
Value = 1003
IgnoreHitPause = 1
Persistent = 0

[State 1205, Helper]
Type = Helper
Trigger1 = Pos Y >= -40 && Anim = 1201
Name = "Ground_Gale"
Stateno = 1206
ID = 1206
Pos = 50,0
PosType = P1
OwnPal = 1

[State 1205]
Type = DestroySelf
Trigger1 = Anim = 1003 && AnimTime = 0 && movecontact
Trigger2 = FrontEdgeBodyDist <= -120
Trigger3 = Pos Y >= -40 && Anim = 1201

[StateDef 1206]
MoveType = A
Physics = N
Anim = 1001
SprPriority = 3

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

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

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

[State 1206]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo != 1002
Trigger1 = 1;IsHelper(1001)
X = 6

[State 1206]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo = 1002
Trigger1 = 1;IsHelper(1001)
X = 3
Y = 0

[State 1206]
Type = PosSet
Trigger1 = 1
Y = 0

[State 1206]
Type = PosAdd
Trigger1 = Time = 0 && PrevStateNo = 1002
X = 20

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

[State 1206]
Type = AngleDraw
Trigger1 = !MoveContact
Value = 0

[State 1206]
Type = AngleDraw
Trigger1 = MoveContact
Value = 0
Scale = 0.5,1

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

[State 1206, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NP,SP,HP
time = -1
ignorehitpause = 1

[State 1206]
type = HitDef
trigger1 = AnimElem = 1
attr = S, SA
damage = ceil(40*(root,fvar(6))),4
animtype = hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,0
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -20
hitsound = S200,2
guardsound = S300,4
Ground.SlideTime = 12
Ground.HitTime = 13
Air.HitTime = 13
Ground.Velocity  = -3,-4
Guard.Velocity  = -2
Air.Velocity = -3,-4
AirGuard.Velocity = -2,-3
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
Airguard.CornerPush.VelOff = 0
Fall = 1
Fall.RecoverTime = 20
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 1206]
Type = ChangeAnim
Trigger1 = MoveContact
Value = 1003
IgnoreHitPause = 1
Persistent = 0

[State 1206]
Type = DestroySelf
Trigger1 = Anim = 1003 && Animtime = 0
Trigger2 = FrontEdgeBodyDist <= -120

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

[State 1300, PlaySnd]
type = PlaySnd
trigger1 = Anim = 1301
trigger1 = AnimElem = 3
value = S400,8
channel = 0

[State 1300, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3 && Anim = 1301
value = S100,16

[State 1300, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 1 && anim = 1300
statetype = A       ;S,A,C,L
movetype = A        ;I,A,H
physics = N         ;A,C,S,N

[State 1300, VelSet]
type = VelSet
trigger1 = AnimElem = 1 && anim = 1300
x = 2
y = -4.5

[State 1300, VelMul]
type = VelMul
trigger1 = AnimElem = 1 && anim = 1300
y = 1.5

[State 1300, VelSet]
type = VelSet
trigger1 = AnimElem = 3 && anim = 1301
x = 2.5
y = 10

[State 1300]
type = HitDef
trigger1 = AnimElem = 4 && Anim = 1301
attr = S,SA
hitFlag = MAF
guardFlag = HA
animType = Herd
damage = 60,8
pauseTime = 10,10
sparkno = S8050*10**(random%4)
guard.SparkNo = S9000
sparkXY = 0,-30
hitSound = S200,12
guardSound = -1
ground.Type = High
ground.SlideTime = 16
ground.HitTime = 18
air.HitTime = 18
ground.Velocity = -4,7
guard.Velocity = -6
air.Velocity = -4,7
airGuard.Velocity = -4.5,-5
fall = 1
fall.RecoverTime = 15

[State 1300]
Type = ChangeAnim
Trigger1 = Anim = 1300 && Animtime = 0
Value = 1301

[State 1300]
Type = ChangeState
Trigger1 = Anim = 1301 && Pos Y >= 0
Value = 1301

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

[State 1301, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 1
anim = 1305
ID = 1305
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1.5,1
sprpriority = 3

[State 1301]
type = PosSet
y = 0
trigger1 = !time

[State 1301]
type = HitDef
trigger1 = AnimElem = 1
attr = S,SA
hitFlag = MAF
guardFlag = MA
animType = Heavy
damage = 15,5
pauseTime = 0,0
sparkno = S8050*10**(random%4)
guard.SparkNo = S9000
sparkXY = 0,0
hitSound = S200,2
guardSound = S300,4
ground.Type = High
ground.SlideTime = 14
ground.HitTime = 15
air.HitTime = 15
ground.Velocity = -8,-2
guard.Velocity = -4
air.Velocity = -6,-2
airGuard.Velocity = -6,-2
fall = 1
fall.RecoverTime = 15
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 1301]
type = EnvShake
Trigger1 = AnimElemTime(1) = 1
time = 10
ampl = 20
freq = 100

[State 1301, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(1) = 1
value = S200,11

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

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

[State 1302, PlaySnd]
type = PlaySnd
trigger1 = Anim = 1301
trigger1 = AnimElem = 3
value = S400,8
channel = 0

[State 1302, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3 && Anim = 1301
value = S100,16

[State 1302, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 1 && anim = 1300
statetype = A       ;S,A,C,L
movetype = A        ;I,A,H
physics = N         ;A,C,S,N

[State 1302, VelSet]
type = VelSet
trigger1 = AnimElem = 1 && anim = 1300
x = 2
y = -4.5

[State 1302, VelMul]
type = VelMul
trigger1 = AnimElem = 1 && anim = 1300
y = 1.5

[State 1302, VelSet]
type = VelSet
trigger1 = AnimElem = 3 && anim = 1301
x = 4
y = 10

[State 1302]
type = HitDef
trigger1 = AnimElem = 4 && Anim = 1301
attr = S,SA
hitFlag = MAF
guardFlag = HA
animType = Herd
damage = 50,8
pauseTime = 10,10
sparkno = S8050*10**(random%4)
guard.SparkNo = S9000
sparkXY = 0,-30
hitSound = S200,12
guardSound = S300,4
ground.Type = High
ground.SlideTime = 16
ground.HitTime = 18
air.HitTime = 18
ground.Velocity = -4,7
guard.Velocity = -6
air.Velocity = -4,7
airGuard.Velocity = -4.5,-5
fall = 1
fall.RecoverTime = 23
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 1302]
Type = ChangeAnim
Trigger1 = Anim = 1300 && Animtime = 0
Value = 1301

[State 1302]
Type = ChangeState
Trigger1 = Anim = 1301 && Pos Y >= 0
Value = 1303

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

[State 1303]
type = PosSet
y = 0
trigger1 = !time

[State 1303, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 1
anim = 1305
ID = 1305
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1.5,1
sprpriority = 3

[State 1303]
type = HitDef
trigger1 = AnimElem = 1
attr = S,SA
hitFlag = MAF
guardFlag = MA
animType = Heavy
damage = 15,5
pauseTime = 0,0
sparkno = S8050*10**(random%4)
guard.SparkNo = S9000
sparkXY = 0,0
hitSound = S200,2
guardSound = S300,4
ground.Type = High
ground.SlideTime = 14
ground.HitTime = 15
air.HitTime = 15
ground.Velocity = -1,-8
guard.Velocity = -4
air.Velocity = -1,-8
airGuard.Velocity = -1,-3
fall = 1
fall.RecoverTime = 23
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 1303]
type = EnvShake
trigger1 = AnimElemTime(1) = 1
time = 10
ampl = 20
freq = 127

[State 1303, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(1) = 1
value = S200,11

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

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

[State 1304, PlaySnd]
type = PlaySnd
trigger1 = Anim = 1303
trigger1 = AnimElem = 3
value = S400,8
channel = 0

[State 1304, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3 && Anim = 1303
value = S100,16

[State 1304, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 1 && anim = 1300
statetype = A       ;S,A,C,L
movetype = A        ;I,A,H
physics = N         ;A,C,S,N

[State 1304, VelSet]
type = VelSet
trigger1 = AnimElem = 1 && anim = 1300
x = 2
y = -4.5

[State 1304, VelMul]
type = VelMul
trigger1 = AnimElem = 1 && anim = 1300
y = 1.5

[State 1304, VelSet]
type = VelSet
trigger1 = AnimElem = 3 && anim = 1303
x = 4
y = 10

[State 1304]
Type = ChangeAnim
Trigger1 = Anim = 1300 && Animtime = 0
Value = 1303

[State 1304]
Type = ChangeState
Trigger1 = Anim = 1303 && Pos Y >= 0
Value = 1305

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

[State 1305, Helper]
type = Helper
trigger1 = AnimElemTime(1) = 1
ID = 1306
pos = 0,0
postype = p1
stateno = 1306
helpertype = normal
name = "Burst"
keyctrl = 0
ownpal = 1
supermovetime = 1

[State 1305, Helper]
type = Helper
trigger1 = AnimElemTime(1) = 1
ID = 1307
pos = 0,0
postype = p1
stateno = 1307
helpertype = normal
name = "Burst"
keyctrl = 0
ownpal = 1
supermovetime = 1

[State 1305]
type = PosSet
y = 0
trigger1 = !time

[State 1305, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 1
anim = 1305
ID = 1305
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1.5,1
sprpriority = 3

[State 1305]
type = EnvShake
trigger1 = AnimElemTime(1) = 1
time = 10
ampl = 20
freq = 127

[State 1305, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(1) = 1
value = S200,11

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

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

[State 1306, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S100,10

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

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

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

[State 1306]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo != 1002
Trigger1 = 1;IsHelper(1001)
X = 6

[State 1306]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo = 1002
Trigger1 = 1;IsHelper(1001)
X = 3
Y = 0

[State 1306]
Type = PosSet
Trigger1 = 1
Y = 0

[State 1306]
Type = PosAdd
Trigger1 = Time = 0 && PrevStateNo = 1002
X = 20

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

[State 1306]
Type = AngleDraw
Trigger1 = !MoveContact
Value = 0

[State 1306]
Type = AngleDraw
Trigger1 = MoveContact
Value = 0
Scale = 0.5,1

[State 1306]
type = HitDef
trigger1 = AnimElem = 1
attr = S, SA
damage = ceil(40*(root,fvar(6))),4
animtype = hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,0
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -20
hitsound = S200,2
guardsound = S300,4
Ground.SlideTime = 12
Ground.HitTime = 13
Air.HitTime = 13
Ground.Velocity = -6,-2
Guard.Velocity = -4
Air.Velocity = -5,-4
AirGuard.Velocity = -2,-5
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
Airguard.CornerPush.VelOff = 0
Fall = 1
Fall.Recover = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 1306]
Type = ChangeAnim
Trigger1 = MoveContact
Value = 1003
IgnoreHitPause = 1
Persistent = 0

[State 1306]
Type = DestroySelf
Trigger1 = Anim = 1003 && AnimTime = 0
Trigger2 = FrontEdgeBodyDist <= -120

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

[State 1307, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S100,10

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

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

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

[State 1307]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo != 1002
Trigger1 = 1;IsHelper(1001)
X = -6

[State 1307]
Type = VelSet
Trigger1 = Time = 0 && PrevStateNo = 1002
Trigger1 = 1;IsHelper(1001)
X = -3
Y = 0

[State 1307]
Type = PosSet
Trigger1 = 1
Y = 0

[State 1307]
Type = PosAdd
Trigger1 = Time = 0 && PrevStateNo = 1002
X = 20

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

[State 1307]
Type = AngleDraw
Trigger1 = !MoveContact
Value = 0

[State 1307]
Type = AngleDraw
Trigger1 = MoveContact
Value = 0
Scale = 0.5,1

[State 1307]
type = HitDef
trigger1 = AnimElem = 1
attr = S, SA
damage = ceil(40*(root,fvar(6))),4
animtype = hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,0
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -20
hitsound = S200,2
guardsound = S300,4
Ground.SlideTime = 12
Ground.HitTime = 13
Air.HitTime = 13
Ground.Velocity = 6,-2
Guard.Velocity = 4
Air.Velocity = 5,-4
AirGuard.Velocity = 4,-5
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
Airguard.CornerPush.VelOff = 0
Fall = 1
Fall.Recover = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 1307]
Type = ChangeAnim
Trigger1 = MoveContact
Value = 1003
IgnoreHitPause = 1
Persistent = 0

[State 1307]
Type = DestroySelf
Trigger1 = Anim = 1003 && AnimTime = 0
Trigger2 = BackEdgeBodyDist <= -120

[StateDef 2000]
type = S
movetype = A
physics = S
juggle = 0
anim = 2000
ctrl = 0
sprpriority = 2

[State 2000]
type = NotHitBy
trigger1 = !time
time = 9
value = SCA

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

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

[State 2000, AfterImage]
type = AfterImage
trigger1 = AnimElem = 4
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 2000, Helper]
type = Helper
trigger1 = AnimElem = 4
stateno = 20000
ID = 20100
name = "ex_effect"
ownpal = 1
supermovetime = 2**30*2-1
pausemovetime = 2**30*2-1
ignorehitpause = 1
persistent = 0

[State 2000, PlayerPush]
type = PlayerPush
trigger1 = Time = [22,120]
value = 0

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

[State 2000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 9
value = S410,5
channel = 0

[State 2000, Helper]
type = Helper
trigger1 = AnimElem = 9
ID = 2002
pos = 0,30
postype = p1
stateno = 2002
helpertype = normal
name = "Tempest"
keyctrl = 0
ownpal = 1
size.xscale = 2
size.yscale = 2
Ignorehitpause = 1

[State 2000, end]
type = ChangeState
trigger1 = Time = 120
value = 2001

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

[State 2001, Dust]
type = Explod
trigger1 = AnimElem = 9
anim = 6023
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1,1
sprpriority = 0
removeongethit = 0

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

[StateDef 2002]
type = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 2002
poweradd = 0
sprpriority = 5

[State 2002, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S100,17

[State 2002, pullhelper]
type = helper
trigger1 = 1
helpertype = normal
stateno = 2005
ID = 2005
name ="Vaccuum"
postype = p2
pos= enemynear,const(size.ground.back)-25,-ceil(enemy,pos y)
persistent = 0
size.ground.back = 5
size.ground.front = 5
size.height = 240

[State 2002]
Type = AssertSpecial
Trigger1 = 1
Flag = Noshadow
IgnoreHitPause = 1

[State 2002, 1]
type = HitDef
trigger1 = time%4 = 1
attr = S, HA
damage = ceil(10*(root,fvar(6))),2
animtype = Up
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = -10, -76
hitsound = S200,3
guardsound = S300,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -2,-3
airguard.velocity = -2,-3
air.type = High
air.velocity = 0.5,-2
air.hittime = 12
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
p1sprpriority = 5
envshake.time = 5
envshake.freq = 60
envshake.ampl = -3

[State 2002, Dust]
type = Explod
trigger1 = time = 6
trigger2 = time%7 = 1
anim = 6022
pos = -15,-30
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 3
removeongethit = 0
ignorehitpause = 1

[State 2002, Dust]
type = Explod
trigger1 = time = 13
trigger2 = time%7 = 1
anim = 6022
pos = 20,-30
postype = p1
facing = -1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 3
removeongethit = 0
ignorehitpause = 1

[State 2002, Explod]
type = Explod
trigger1 = movehit = 1
anim = 8053*10**(random%4)
pos = -35+random%60, -93+random%70
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 3

[State 2002, Explod]
type = Explod
trigger1 = moveguarded = 1
anim = 9000
pos = 15,-60
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 3

[State 2002, DestroySelf]
type = DestroySelf
trigger1 = Root,MoveType = H

[State 2002, Changestate]
type = changestate
trigger1 = time = 132
value = 2003

[StateDef 2003]
type = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 2003
poweradd = 0
sprpriority = 6

[State 2003, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S100,6

[State 2003, Velset]
type = Velset
trigger1 = time
x = 10
y = 0

[State 2003]
Type = AssertSpecial
Trigger1 = 1
Flag = Noshadow
IgnoreHitPause = 1

[State 2003, 1]
type = HitDef
trigger1 = AnimElem = 1
attr = S, HA
damage = ceil(100*(root,fvar(6))),25
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = -10, -76
hitsound = S200,5
guardsound = S300,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -9,-4
airguard.velocity = -1.9,-3
air.type = High
air.velocity = -8,-2
air.hittime = 12
fall = 1
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
p1sprpriority = 5
p2stateno = 2103
envshake.time = 10
envshake.freq = 90
envshake.ampl = -8

[State 2003, Explod]
type = Explod
trigger1 = movehit = 1
anim = 8053*10**(random%4)
pos = 0,-60
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 3

[State 2003, Explod]
type = Explod
trigger1 = moveguarded = 1
anim = 9000
pos = 15,-60
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 3

[State 2003, Changestate]
type = changestate
trigger1 = time = 72
value = 2004

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

[State 2004]
Type = AssertSpecial
Trigger1 = 1
Flag = Noshadow
IgnoreHitPause = 1

[State 2004, end]
type = Destroyself
trigger1 = AnimTime = 0

[Statedef 2005]
physics = N
velset = 0,0
anim = 2005

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

[State 2005, hitoverride]
type = hitoverride
trigger1 = 1
time = -1
attr = SCA,AA,AP,AT
stateno = 3205
ignorehitpause = 1

[State 2005, bound]
type = screenbound
trigger1 = 1
value = 0

[State 2005, turn]
type = turn
trigger1= rootdist x<5

[State 2005, push]
type = playerpush
trigger1 = p2bodydist x=[-10,10]
value = 1

[State 2005, pos]
type = posset
trigger1 = 1
y = 0

[State 2005, vel]
type = velset
trigger1 = root,var(1)=1
x = 250.0/(rootdist x+50.0)

[State 2005, vel]
type = velset
trigger1 = root,var(1)!=1
x = 500.0/(rootdist x+50.0)

[State 2005, pos]
type = posadd
trigger1 = p2bodydist x!=[-5,5]
x = ceil(p2dist x)-enemynear,const(size.ground.back)-5

[State 2005, end]
type = destroyself
trigger1 = root,stateno!=2000 || (root,anim!=2000) || root,movehit

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

[State 2100]
type = NotHitBy
trigger1 = !time
time = 16
value = SCA

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

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

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

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

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

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

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

[State 2101, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S410,0
channel = 0

[State 2101, Dust]
type = Explod
trigger1 = AnimElem = 1
anim = 6023
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1,1
sprpriority = 0
removeongethit = 0

[State 2101, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S100,13

[State 2101, VelSet]
type = VelSet
trigger1 = time
x = 15
y = 0

[State 2101, Explod]
type = Explod
trigger1 = time = 1
anim = 2104
ID = 2104
pos = -80,-50
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 30
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1.5,1.5
sprpriority = 5
removeongethit = 1
ignorehitpause = 1

[State 2101, Explod]
type = Explod
trigger1 = time = 29
anim = 2105
ID = 2105
pos = -80,-50
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 12
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1,1
sprpriority = 5
removeongethit = 1
ignorehitpause = 1

[State 2101, 1]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NA
damage = 200,50
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,0
sparkno = -1
guard.sparkno = S9000
sparkxy = -10, -76
hitsound = S200,20
guardsound = S300,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -2,-15
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -2,-15
air.hittime = 12
fall = 1
fall.recover = 0
getpower = 0
p2stateno = 2107
envshake.time = 10
envshake.freq = 90
envshake.ampl = 6

[State 2101, Explod]
type = Explod
trigger1 = movehit = 1
anim = 8050*10**(random%4)
ID = 8050
pos = 0,-50
postype = p2
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1.5,1.5
sprpriority = 4

[State 2101]
Type = ChangeState
Trigger1 = Time = 40
Value = 2102

[State 2101]
Type = ChangeState
Trigger1 = FrontEdgeDist <= 15
Trigger1 = Time >= 15
Value = 2108

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

[State 2102, VelAdd]
type = VelAdd
trigger1 = time
x = 1
y = 0

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

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

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

[State 2103]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 2104

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[State 2105]
type = ChangeState
trigger1 = AnimTime = 0
value = 2106

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

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

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

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

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

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

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

[State 2106]
type = AngleDraw
trigger1 = 1

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

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

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

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

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

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

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

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

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

[State 2107]
type = AngleDraw
trigger1 = 1

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

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

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

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

[State 2108]
Type = VelSet
Trigger1 = Time = 0
X = -2

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

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

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

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

[State 2200, PosFreeze]
type = PosFreeze
trigger1 = Anim = 2200
value = 1

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

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

[State 2200, AfterImage]
type = AfterImage
trigger1 = AnimElem = 5
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 2200, Helper]
type = Helper
trigger1 = AnimElem = 5
stateno = 20000
ID = 20100
name = "ex_effect"
ownpal = 1
supermovetime = 2**30*2-1
pausemovetime = 2**30*2-1
ignorehitpause = 1
persistent = 0

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

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

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

[State 2201, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S410,0
channel = 0

[State 2201, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S100,13

[State 2201, VelSet]
type = VelSet
trigger1 = time
x = 15
y = 0

[State 2201, Explod]
type = Explod
trigger1 = time = 1
anim = 2104
ID = 2204
pos = -80,-50
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 30
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1.5,1.5
sprpriority = 5
removeongethit = 1
ignorehitpause = 1

[State 2201, Explod]
type = Explod
trigger1 = time = 29
anim = 2105
ID = 2205
pos = -80,-50
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 12
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1,1
sprpriority = 5
removeongethit = 1
ignorehitpause = 1

[State 2201, 1]
type = HitDef
trigger1 = AnimElem = 1
attr = S, HA
damage = 200,50
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,0
sparkno = -1
guard.sparkno = S9000
sparkxy = -10, -76
hitsound = S200,20
guardsound = S300,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -2,-15
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -2,-15
air.hittime = 12
fall = 1
fall.recover = 0
p2stateno = 2107
getpower = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 6

[State 2201, Explod]
type = Explod
trigger1 = movehit = 1
anim = 8050*10**(random%4)
ID = 8050
pos = 0,-50
postype = p2
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1.5,1.5
sprpriority = 4

[State 2201, end]
type = ChangeState
trigger1 = Time = 40
value = 2202
ctrl = 1

[State 2201]
Type = ChangeState
Trigger1 = FrontEdgeDist <= 15
Trigger1 = Time >= 15
Value = 2108

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

[State 2202, VelAdd]
type = VelAdd
trigger1 = time
x = 1
y = 0

[State 2202]
Type = ChangeState
Trigger1 = Anim = 2202 && AnimTime = 0 && Pos Y != 0
Value = IfElse(Pos Y >= -5, 52, 51)
Anim = IfElse(Pos Y >= -5, 47, 45)
Ctrl = 0

[StateDef 3000]
type = S
movetype = A
physics = S
juggle = 0
anim = 3000
ctrl = 0
sprpriority = 2

[State 3000]
type = NotHitBy
trigger1 = !time
time = 18
value = SCA

[State 3000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 8
value = S100,7

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

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

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

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

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

[State 3000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 8
value = S410,5
channel = 0

[State 3000]
Type = Helper
Trigger1 = AnimElem = 8
Name = "Adverse_Wind"
StateNo = 3002
ID = 3002
Pos = 0,0
PosType = Back
OwnPal = 1
Size.Height = 999

[State 3000, end]
type = ChangeState
trigger1 = Time = 80
value = 3001
ctrl = 1

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

[State 3001, end]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1

[StateDef 3002]
Physics = N
Anim = 3011
SprPriority = -5
VelSet = 0,0

[State 3002]
Type = PlayerPush
Trigger1 = Time <= 200
Value = 1

[State 3002]
Type = PlayerPush
Trigger1 = Time >= 201
Value = 0

[State 3002]
Type = PosSet
Trigger1 = 1
Y = EnemyNear,Pos Y

[State 3002]
Type = NotHitBy
Trigger1 = 1
Value = SCA, NA, SA, HA, NP, SP, HP, NT, ST, HT

[State 3002]
Type = VelSet
Trigger1 = P2BodyDist X >= 30
X = 12

[State 3002]
Type = VelSet
Trigger1 = P2BodyDist X <= 30
X = 6

[State 3002]
Type = PosAdd
Trigger1 = P2BodyDist X < -30
X = -100

[State 3002]
Type = Helper
TriggerAll = Time <= 300
Trigger1 = Time = 0
Trigger2 = Time%16 = 0 && Random <= 800
Name = "Wind"
StateNo = 3003
ID = 3003
Pos = -20,0
PosType = Back
OwnPal = 1

[State 3002]
Type = Helper
TriggerAll = Time <= 300
Trigger1 = Time = 0
Trigger2 = (Time%4 = 0) && (Random <= 200)
Trigger3 = (Time%6 = 0) && (Random >= 700)
Name = "Rock"
StateNo = 3004
ID = 3004+Random%9
Pos = 0,0
PosType = Back
OwnPal = 1

[State 3002]
Type = ParentVarSet
Trigger1 = FVar(10) != 0
FV = 10
Value    = FVar(10)

[State 3002]
Type = VarSet
Trigger1 = FVar(10) != 0
FV = 10
Value = 0

[State 3002]
Type = ParentVarSet
Trigger1 = FVar(12) != 0
FV = 12
Value = FVar(12)

[State 3002]
Type = VarSet
Trigger1 = FVar(12) != 0
FV = 12
Value = 0

[State 3002]
Type = ParentVarAdd
Trigger1 = FVar(3) != 0
FV = 3
Value = FVar(3)

[State 3002]
Type = VarSet
Trigger1 = FVar(3) != 0
FV = 3
Value = 0

[State 3002]
Type = ParentVarAdd
Trigger1 = FVar(20) != 0
FV = 20
Value = FVar(3)

[State 3002]
Type = VarSet
Trigger1 = FVar(3) != 0
FV = 20
Value = 0

[State 3002]
Type = DestroySelf
Trigger1 = Time >= 350

[StateDef 3003]
Physics = N
Anim = 3002
SprPriority = 3
VelSet = 36,-12

[State 3003]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

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

[State 3003]
Type = VarRandom
Trigger1 = Time = 0
V = 0
Range = -319,40

[State 3003]
Type = PosSet
Trigger1 = Time = 0
Y = Var(0)

[State 3003]
Type = VarRandom
Trigger1 = Time = 0
V = 1
Range = 50,150

[State 3003]
Type = AngleDraw
Trigger1 = 1
Scale = 1+Var(1)*0.005,1+Var(1)*0.005
Value = ATan (Vel Y / Vel X) * (-180.0 / Pi)

[State 3003]
Type = DestroySelf
Trigger1 = Time >= 100
Trigger2 = FrontEdgeBodyDist <= -100

[StateDef 3004]
MoveType = A
Physics = N
Anim = 3004+Random%6
SprPriority = 1+Random%4

[State 3004]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 3004]
Type = VarRandom
Trigger1 = Time = 0
V = 0
Range = -260,0

[State 3004]
Type = PosSet
Trigger1 = Time = 0
Y = Var(0)

[State 3004]
Type = VarRandom
Trigger1 = Time = 0
V = 1
Range = 0,20

[State 3004]
Type = VarRandom
Trigger1 = Time = 0 && Pos Y <= -60
V = 2
Range = 0,20

[State 3004]
Type = VarRandom
Trigger1 = Time = 0 && Pos Y > -60
V = 2
Range = 10,30

[State 3004]
Type = VelSet
Trigger1 = Time = 0
X = 15+Var(1)*0.5
Y = -4+Var(2)*0.5

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

[State 3004]
Type = AngleSet
Trigger1 = Time = 0
Value = Random%359

[State 3004]
Type = AngleAdd
Trigger1 = Time >= 1
Value = IfElse(Var(3) = 0, 1, IfElse(Var(3) = 1, -1, IfElse(Var(3) = 2, 2, -2)))

[State 3004]
Type = AngleDraw
Trigger1 = Anim = 3004
Scale = 0.5,0.75

[State 3004]
Type = AngleDraw
Trigger1 = Anim = 3005
Scale = 0.55,0.8

[State 3004]
Type = AngleDraw
Trigger1 = Anim = 3006
Scale = 0.75,0.5

[State 3004]
Type = AngleDraw
Trigger1 = Anim = 3007
Scale = 1,1

[State 3004]
Type = AngleDraw
Trigger1 = Anim = 3008
Scale = 1.1,1.1

[State 3004]
Type = AngleDraw
Trigger1 = Anim = 3009
Scale = 1.0,1.5

[State 3004]
Type = AngleDraw
Trigger1 = Anim = 3010
Scale = 1.5,1.5

[State 3004]
Type = HitDef
Trigger1 = AnimElem = 1 && Anim >= 3008
ID = 3005
Attr = S, HP
HitFlag = MAF
GuardFlag = MA
AnimType = Hard
Damage = ceil(75*(root,fvar(6))),20
PauseTime = 0,0
sparkno = S8050*10**(random%4)
Guard.SparkNo = S9000
SparkXY = 0,0
HitSound = S200,16
GuardSound = S300,0
Ground.Type = High
Ground.SlideTime = 14
Guard.SlideTime = 10
Ground.HitTime = 16
Guard.HitTime = 12
Air.HitTime = 16
Ground.Velocity = -7.5,-5
Guard.Velocity = -6
Air.Velocity = -7.5,-5
AirGuard.Velocity = -4.5,-5
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
Airguard.CornerPush.VelOff = 0
Fall = 1
Air.Fall = 1
Fall.RecoverTime = 15
P2Facing = IfElse(Root,P2BodyDist X >= -5, 1, -1)
Guard.Kill = 0
GetPower = 0,0
Hitonce = 1
NumHits = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 3004]
Type = HitDef
Trigger1 = AnimElem = 1
Trigger1 = Anim = [3006,3007]
ID = 3005
Attr = S, HP
HitFlag = MAF
GuardFlag = MA
AnimType = Hard
Damage = ceil(50*(root,fvar(6))),10
PauseTime = 0,0
sparkno = S8050*10**(random%4)
Guard.SparkNo = S9000
SparkXY = 0,0
HitSound = S200,12
GuardSound = S300,0
Ground.Type = High
Ground.SlideTime = 14
Guard.SlideTime = 10
Ground.HitTime = 16
Guard.HitTime = 12
Air.HitTime = 16
Ground.Velocity = -4.5,0
Guard.Velocity = -6
Air.Velocity = -4.5,-5
AirGuard.Velocity = -4.5,-5
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
Airguard.CornerPush.VelOff = 0
Fall = 0
Air.Fall = 1
Fall.RecoverTime = 15
P2Facing = IfElse(Root,P2BodyDist X >= -5, 1, -1)
Guard.Kill = 0
GetPower = 0,0
Hitonce = 1
NumHits = 0
envshake.time = 10
envshake.freq = 80
envshake.ampl = -4

[State 3004]
Type = HitDef
Trigger1 = AnimElem = 1
Trigger1 = Anim <= 3005
ID = 3005
Attr = S, HP
HitFlag = MAF
GuardFlag = MA
AnimType = Hard
Damage = ceil(30*(root,fvar(6))),5
PauseTime = 0,0
sparkno = S8050*10**(random%4)
Guard.SparkNo = S9000
SparkXY = 0,0
HitSound = S200,2
GuardSound = S300,0
Ground.Type = High
Ground.SlideTime = 14
Guard.SlideTime = 10
Ground.HitTime = 16
Guard.HitTime = 12
Air.HitTime = 16
Ground.Velocity = -4.5,0
Guard.Velocity = -6
Air.Velocity = -4.5,-5
AirGuard.Velocity = -4.5,-5
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
Airguard.CornerPush.VelOff = 0
Fall = 0
Air.Fall = 1
Fall.RecoverTime = 15
P2Facing = IfElse(Root,P2BodyDist X >= -5, 1, -1)
Guard.Kill = 0
GetPower = 0,0
Hitonce = 1
NumHits = 0
envshake.time = 5
envshake.freq = 60
envshake.ampl = -3

[State 3004]
Type = TargetState
Trigger1 = Anim >= 3008
Trigger1 = MoveHit = 1
Trigger1 = P2MoveType = H
Trigger1 = P2StateNo != [120,159]
Trigger1 = P2StateNo != [4000,4001]
Trigger1 = P2StateNo != [5050,5300]
Value = 3005
ID = 3005
IgnoreHitPause = 1
Persistent = 0

[State 3004]
Type = HitAdd
Trigger1 = MoveHit && P2MoveType = H && P2StateNo != [120,159]
Value = 1
IgnoreHitPause = 1
Persistent = 0

[State 3004]
Type = DestroySelf
Trigger1 = Time >= 100
Trigger2 = MoveContact >= 1
Trigger3 = FrontEdgeBodyDist <= -100

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

[State 3005]
Type = VelSet
Trigger1 = !HitShakeOver
X = 0
Y = 0

[State 3005]
Type = HitVelSet
Trigger1 = HitShakeOver
X = 1
Y = 1
Persistent = 0

[State 3005]
Type = VelAdd
Trigger1 = HitShakeOver
Y  = 0.44

[State 3005]
Type = ChangeAnim
Trigger1 = Time >= 0 && !HitShakeOver
Trigger1 = SelfAnimExist(5030)
Value = 5030

[State 3005]
Type = ChangeAnim
Trigger1 = HitShakeOver
Trigger1 = SelfAnimExist(5030)
Value = 5030
Persistent = 0

[State 3005]
Type = ChangeAnim
Trigger1 = Anim = 5030 && Vel Y <= -1
Trigger1 = SelfAnimExist(5035)
Value = 5035
Persistent = 0

[State 3005]
Type = ChangeAnim
Trigger1 = SelfAnimExist(5035) && Anim = 5035 && AnimTime = 0
Trigger2 = Anim = 5030 && AnimTime = 0
Trigger2 = SelfAnimExist(5050) && !SelfAnimExist(5035)
Value = 5050
Persistent = 0

[State 3005]
Type = AngleSet
Trigger1 = 1
Value = 0

[State 3005]
Type = AngleDraw
Trigger1 = 1

[State 3005]
Type = SelfState
TriggerAll = Time >= 1
TriggerAll = Vel Y > 0
TriggerAll = Pos Y >= -20
TriggerAll = Alive
TriggerAll = CanRecover
Trigger1 = Command = "recovery"
Value = 5200

[State 3005]
Type = SelfState
TriggerAll = Time >= 1
TriggerAll = Vel Y > -1
TriggerAll = Alive
TriggerAll = CanRecover
Trigger1 = Command = "recovery"
Value = 5210

[State 3005]
Type = ChangeState
Trigger1 = HitShakeOver && BackEdgeBodyDist <= 12
Value = 3006

[State 3005~]
Type = SelfState
Trigger1 = Vel Y > 0 && Pos Y >= 15
Value = 5100

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

[State 3006]
Type = Turn
Trigger1 = Time = 0

[State 3006]
Type = EnvShake
Trigger1 = Time = 0
Time = 15
Freq = 80
Ampl = -2
Phase = 75

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

[State 3006]
Type = VelSet
Trigger1 = Time = 5
X = -3
Y = -3

[State 3006]
Type = Gravity
Trigger1 = Time >= 5

[State 3006]
Type = ChangeAnim
Trigger1 = Time <= 4
Value = 5030

[State 3006]
Type = ChangeAnim
Trigger1 = Time >= 5
Trigger1 = SelfAnimExist(5030)
Value = 5030
Persistent = 0

[State 3006]
Type = ChangeAnim
Trigger1 = Anim = 5030 && Vel Y <= -1
Trigger1 = SelfAnimExist(5035)
Value = 5035
Persistent = 0

[State 3006]
Type = ChangeAnim
Trigger1 = SelfAnimExist(5035) && Anim = 5035 && AnimTime = 0
Trigger2 = Anim = 5030 && AnimTime = 0
Trigger2 = SelfAnimExist(5050) && !SelfAnimExist(5035)
Value = 5050
Persistent = 0

[State 3006]
Type = SelfState
TriggerAll = Time >= 12
TriggerAll = Vel Y > 0
TriggerAll = Pos Y >= -20
TriggerAll = Alive
TriggerAll = CanRecover
Trigger1 = Command = "recovery"
Value = 5200

[State 3006]
Type = SelfState
TriggerAll = Time >= 12
TriggerAll = Vel Y > -1
TriggerAll = Alive
TriggerAll = CanRecover
Trigger1 = Command = "recovery"
Value = 5210

[State 3006]
Type = SelfState
Trigger1 = Vel Y > 0 && Pos Y >= 15
Value = 5100

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

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

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

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

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

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

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

[State 3501]
type = Gravity
trigger1 = 1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[State 3504, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S100,12

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

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

[State 3504, Explod]
type = Explod
trigger1 = AnimElem = 2
anim = 3510
ID = 3510
pos = 10,-30
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 1.5,1.5
sprpriority = 5
ignorehitpause = 0

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

[State 3504]
type = velset
trigger1 = animelem = 4
x = 1
y = -3

[State 3504]
type = velset
trigger1 = animelemtime(7) >= 0 && time
trigger1 = AnimElem = 15, < 0
x= 1
y = -3

[State 3504]
Type = Helper
Trigger1 = AnimElem = 11 && MoveHit
StateNo = 3514
ID = 3514
PosType = P1
Pos = 40,-30
OwnPal = 1
IgnoreHitPause = 1

[State 3504, Hitdef]
type = HitDef
trigger1 = AnimElem = 4
attr = A, SA
damage = 40,10
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10,10
sparkno = S8050
guard.sparkno = S9000
sparkxy = -10, -76
hitsound = S200,12
getpower = 0
guardsound = S300, 4
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -1,-7
airguard.velocity = -2,-2
air.type = High
air.velocity = -1,-7
air.hittime = 12
fall = 1
fall.recover = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 3504, Hitdef]
type = HitDef
trigger1 = AnimElem = 11
attr = A, SA
damage = 60,20
animtype = Up
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 20,20
guard.pausetime = 10,10
sparkno = S8050
guard.sparkno = S9000
sparkxy = -10, -76
hitsound = S200, 16
getpower = 0
guardsound = S300, 4
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -2,-12
airguard.velocity = -2,-5
air.type = High
air.velocity = -2,-12
air.hittime = 12
fall = 1
fall.recover = 0
p2stateno = 3515
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

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

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

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

[State 3505, VelSet]
type = VelSet
trigger1 = time
x = 2

[State 3505]
type = Gravity
trigger1 = 1

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

[State 3505]
Type = ChangeState
Trigger1 = Vel Y > 0
Trigger1 = Pos Y > 0
Value = 3506

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

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

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

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

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

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

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

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

[State 3507, end]
type = ChangeState
trigger1 = Time = 6
value = 3508
ctrl = 1

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

[State 3508, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S100,1
volume = 255

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

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

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

[State 3509, VelAdd]
type = VelAdd
trigger1 = AnimElem = 2
x = 5.6
y = 0

[State 3509, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
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 3509, DestroySelf]
type=DestroySelf
trigger1=pos x>=360
trigger2=time>=100

[Statedef 3510]
type = S
movetype = H
physics = S
velset = 0,0
poweradd = 0
ctrl = 0
anim = 3507
sprpriority = 1

[State 3510, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 0
Value = S3500,2+Random%2
channel = 5

[State 3510]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
trigger1 = Anim = 3507
trigger1 = AnimElemTime(1) > 0
trigger1 = Pos Y >= 0
Value = 3511

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

[State 3510, ChangeState]
type = ChangeState
trigger1 = Animtime = 0
value = 3509
ctrl = 1

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

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

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

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

[State 3511]
type = ChangeState
trigger1 = RoundState = 4
trigger1 = parent, stateno = [181,189]
value = 3512

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

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

[State 3512, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S100,1
volume = 255

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

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

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

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

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

[StateDef 3514]
Type = A
Physics = N
Anim = 3511
SprPriority = 8

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

[State 3514]
Type = AngleDraw
Trigger1 = 1
Value = 70
Scale = 1+FVar(20),1-FVar(21)

[State 3514]
Type = VarAdd
Trigger1 = 1
FV = 20
Value = 0.4
IgnoreHitPause = 1

[State 3514]
Type = VarAdd
Trigger1 = Time > 10
FV = 21
Value = 0.05
IgnoreHitPause = 1

[State 3514]
Type = VarAdd
Trigger1 = Time >= 14
V = 40
Value = 16

[State 3514]
Type = VarSet
Trigger1 = Var(40) >= 256
V = 40
Value = 256

[State 3514]
Type = PalFx
Trigger1 = Var(40) > 0
Time = 1
Add = 0,0,0
Mul = 256-Var(40),256-Var(40),256-Var(40)

[State 3514]
Type = AssertSpecial
Trigger1 = 1
Flag = Noshadow
IgnoreHitPause = 1

[State 3514]
Type = DestroySelf
Trigger1 = Time >= 30

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

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

[State 3515]
type = VelSet
trigger1 = Time = 0
y = -12

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

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

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

[State 3515]
type = AngleDraw
trigger1 = 1

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

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

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

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

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

[State 3600, Helper]
type = Helper
trigger1 = time = 0
ID = 3601
pos = 25,-300
postype = p1
stateno = 3601
helpertype = normal
name = "Suika"
keyctrl = 0
ownpal = 1
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
sprpriority = 3

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

[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, Velset]
type = Velset
trigger1 = time
x = 0
y = 15

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

[State 3601, Gravity]
type = Gravity
trigger1 = 1

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

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

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

[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
sprpriority = 3

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

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

[State 3603]
type = ChangeState
trigger1 = time = 6
value = 3604

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

[State 3604, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S3600,0+Random%2
channel = 6

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

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

[State 3604, Helper]
type = Helper
trigger1 = AnimElem = 7
ID = 3610
pos = 50,0
postype = p1
stateno = 3612
helpertype = normal
name = "Flame"
keyctrl = 0
ownpal = 1
supermovetime = 1
size.xscale = 1.5
size.yscale = 1.5

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

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

[State 3604, ChangeState]
type = ChangeState
trigger1 = Animtime = 0
value = 3605
ctrl = 1

[StateDef 3605]
type = S
movetype= i
physics = s
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3602
sprpriority = 3

[State 3605]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
trigger1 = Anim = 3602
trigger1 = AnimElemTime(1) > 0
trigger1 = Pos Y >= 0
Value = 3609

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

[State 3605]
type = ChangeState
trigger1 = time = 6
value = 3606

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

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

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

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

[State 3607, VelAdd]
type = VelAdd
trigger1 = AnimElem = 1
x = 4
y = 0

[state fadeout]
type=trans
trans=addalpha
alpha=ifelse(time>=93,32*(100-time),256),ifelse(time<=91,32*(time-85),256)
trigger1=time>=85

[State 3607, DestroySelf]
type=DestroySelf
trigger1=pos x>=360
trigger2=time>=100

[Statedef 3608]
type = S
movetype = H
physics = S
velset = 0,0
poweradd = 0
ctrl = 0
anim = 3606
sprpriority = 2

[State 3608, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S3600,2+Random%2
channel = 6

[State 3608]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
trigger1 = Anim = 3606
trigger1 = AnimElemTime(1) > 0
trigger1 = Pos Y >= 0
Value = 3609

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

[State 3608]
Type = changestate
Trigger1 = Animtime = 0
value = 3607

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

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

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

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

[State 3609]
type = ChangeState
trigger1 = RoundState = 4
trigger1 = parent, stateno = [181,189]
value = 3610

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

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

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

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

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

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

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

[StateDef 3612]
type = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 3609
poweradd = 0
sprpriority = 2

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

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

[State 3612]
type = hitdef
trigger1 = animelem = 2
trigger2 = animelem = 4
trigger3 = animelem = 6
trigger4 = animelem = 8
trigger5 = animelem = 10
trigger6 = animelem = 12
trigger7 = animelem = 14
trigger8 = animelem = 16
trigger9 = animelem = 18
trigger10 = animelem = 20
attr = S, SA
damage = 10,5
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0, 0
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -40
hitsound = S200,13                  ;
guardsound = S300,4
ground.type = High
ground.slidetime = 11
ground.hittime  = 22
ground.velocity = -2.5,-1.8
ground.cornerpush.veloff = (time > 50) * -6
air.cornerpush.veloff = (time > 50) * -6
down.cornerpush.veloff = (time > 50) * -6
guard.cornerpush.veloff = (time > 50) * -6
airguard.cornerpush.veloff = (time > 50) * -6
air.type = High
air.velocity = -2.5,-1.8
airguard.velocity = -2.5,-2.2
air.hittime = 22
fall = 1
air.fall = 1
fall.yvelocity = 0
down.velocity = -4,-1
fall.recovertime = 42
palfx.time = 30
palfx.mul = 220,0,0
palfx.sinadd = 80,80,80,6
guard.kill = 1

[State 3612]
type = destroyself
trigger1 = AnimTime = 0

[Statedef 4000]
type = S
movetype= A
physics = N
ctrl = 0
Velset = 0,0
anim = 4000
juggle = 0

[State 4000]
type = NotHitBy
trigger1 = !time
time = 11
value = SCA

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

[State 4000, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S410,1
channel = 0

[State 4000]
Type = Helper
Trigger1 = AnimElem = 4
Name = "Hyper"
Stateno = 10400
ID = 10400
Pos = -10,-30
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4000]
Type = Helper
Trigger1 = AnimElem = 4
Name = "Hyper"
Stateno = 10401
ID = 10401
Pos = -10,-30
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4000]
Type = Helper
Trigger1 = AnimElem = 4
Name = "Hyper"
Stateno = 10402
ID = 10402
Pos = -10,-30
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

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

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

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

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

[State 4000]
type = Nothitby
trigger1 = time = 12
value = SCA, AA, AP, AT
time = 40

[State 4000]
type = Velset
trigger1 = animelem = 7,0
x = 30
y = -8

[State 4000]
type = statetypeset
trigger1 = animelem = 7,0
statetype = A

[State 4000]
type = Velmul
trigger1 = time = 71
x = 0.1
y = 0.2

[State 4000]
type = Veladd
trigger1 = time > 70
y = 0.1

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

[State 4000]
type = HitDef
trigger1 = (!movecontact)*(!movereversed)
attr = A, HA
animtype  = Hard
damage = 50,5
hitflag = MAF
guardflag = MA
getpower = 0,0
sparkno= -1
guard.sparkno= S9000
pausetime = 0,2
guard.pausetime = 0,2
sparkxy = 0,0
hitsound = S200,20
guardsound = S300,0
ground.type = High
ground.slidetime = 30
ground.hittime  = 20
ground.velocity = 0,-14
air.animtype = Back
airguard.velocity = -2.5,-2.5
air.velocity = 0,-14
fall = 1
fall.recover = 0
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
AirGuard.CornerPush.VelOff = 0
kill = 0
guard.kill = 0
hitonce = 1
envshake.time = 10
envshake.freq = 90
envshake.ampl = 8

[State 4000]
Type = Helper
Trigger1 = movehit = 1
StateNo = 4010
ID = 4010
Name = "Dominance"
Pos = 0,-50
PosType = P2
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1

[State 4000]
Type = Helper
Trigger1 = movehit = 1
StateNo = 4010
ID = 4010
Name = "Dominance"
Pos = 0,-50
PosType = P2
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1

[State 4000]
type = Varadd
trigger1 = movehit
fvar(3) = 100*(1+(p2movetype = A)*0.333)*(1+(Var(35)=2)*0.25)
ignorehitpause = 1
persistent = 0

[State 4000]
type = Varadd
trigger1 = moveguarded
fvar(3) = 30*(1+(p2movetype = A)*0.333)*(1+(Var(35)=2)*0.25)
ignorehitpause = 1
persistent = 0

[State 4000]
type = TargetState
trigger1 = movehit
value = 4009
persistent = 0
ignorehitpause = 1

[State 4000]
type = ChangeState
trigger1 = movehit
value = 4002

[State 4000]
type = ChangeState
trigger1 = Vel y > 0
trigger1 = pos y > -5
value = 4001

[Statedef 4001]
type    = S
movetype= A
physics = N
sprpriority = 7
ctrl = 0
Velset = 0,0
anim = 4002

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

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

[State 4001]
type = posset
trigger1 = 1
y = 0

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

[Statedef 4002]
type    = A
movetype= A
physics = N
sprpriority = 7
ctrl = 0
anim = 4001

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

[State 4002]
type = posset
trigger1 = backedgedist >= 380
x = -215*ifelse((-enemynear,pos x) > 0,1,-1)

[State 4002]
type = Velset
trigger1 = pos x = 215
trigger2 = pos x = -215
x = 0

[State 4002]
type = AssertSpecial
trigger1 = vel x = 0
flag = invisible

[State 4002]
type = turn
triggerall = Vel x = 0
trigger1 = (-enemynear,pos x > 0)*(facing = 1)
trigger2 = (-enemynear,pos x <= 0)*(facing = -1)

[State 4002]
type = Varadd
trigger1 = Vel x = 0
trigger2 = Var(39)
v = 39
value = 1

[State 4002]
type = Varset
trigger1 = 1
v = 37
value = 0

[State 4002]
type = Varset
trigger1 = time = 65
v = 39
value = 60

[State 4002]
type = Varset
trigger1 = time = 65
fv = 18
value = ceil(enemynear,pos y)

[State 4002]
type = ChangeState
trigger1 = time = 65
value = 4003

[Statedef 4003]
type    = A
movetype= A
physics = N
sprpriority = 7
ctrl = 0
anim = 4003
juggle = 0

[State 4003, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,2

[State 4003]
type = turn
trigger1 = !time

[State 4003]
type = Varadd
trigger1 = Var(39) <= 30
v = 37
value = 1
persistent = 0

[State 4003]
type = Varset
trigger1 = Var(39) = 60
v = 39
value = 40

[State 4003]
type = Varset
trigger1 = Var(39) = 40
v = 39
value = 30

[State 4003]
type = Varadd
trigger1 = Var(37)%2 = 1
trigger1 = Var(39) = [18,30]
v = 39
value = -2
persistent = 0

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

[State 4003]
type = helper
trigger1 = !time*(Var(39) = 16)*(Var(37)%2 = 0)
pos = 0,0
postype = p1
ID=4006
pausemovetime = 0
name = "Finish"
sprpriority = 100
stateno = 4006
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1
IgnoreHitPause = 1

[State 4003, ChangeAnim]
type = ChangeAnim
trigger1 = !time*(Var(39) = 16)*(Var(37)%2 = 0)
value = 4012

[State 4003, PlaySnd]
type = PlaySnd
trigger1 = Anim = 4012
value = S410,4
channel = 0
persistent = 0

[State 4003]
type = posadd
trigger1 = (Var(39) = 16)*(Var(37)%2 = 0)
trigger1 = time = 16
x = ceil(p2dist x)
y = -800-ceil(pos y)

[State 4003]
type = ChangeState
trigger1 = (Var(39) = 16)*(Var(37)%2 = 0)
trigger1 = time = 16
value = 4008

[state 4003]
type = VarRandom
trigger1 = !time*(prevstateno != 4003)
v = 40
range = -100,100

[state 4003]
type = VarRandom
trigger1 = !time*(prevstateno = 4003)
v = 40
range = -100-(p2dist y<0)*100,100+(p2dist y>0)*100

[state 4003]
type = posadd
trigger1 = !time
y = ceil(Var(40)*0.1)

[State 4003]
type = AngleSet
trigger1 = 1
value = -var(40)*0.1

[state 4003]
type = Velset
trigger1 = !time
x = (p2dist X+72) / 8

[State 4003, PosSet]
type = PosSet
trigger1 = time = 0
y = enemynear,pos y

[State 4003]
type = Velset
trigger1 = backedgedist >= 380
x = 0

[State 4003]
type = AssertSpecial
trigger1 = vel x = 0
flag = invisible

[state 4003]
type = posset
trigger1 = vel x = 0
x = 215*facing

[State 4003]
type = AngleDraw
trigger1 = 1

[State 4003]
type = HitDef
trigger1 = AnimElem = 1
attr = A, HA
animtype = Hard
damage = 39,15
hitflag = MAF
guardflag = MA
getpower = 0,0
sparkno = -1
guard.sparkno= S9000
pausetime = 0,2
guard.pausetime = 0,2
sparkxy = 0,-40
hitsound = S200,20
guardsound = S300,0
ground.type = High
ground.slidetime = 30
ground.hittime  = 20
ground.velocity = 0,-6
air.animtype = Back
airguard.velocity = -2.5,-2.5
air.velocity = 0,-3.6
fall = 1
fall.recover = 0
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
AirGuard.CornerPush.VelOff = 0
kill = 0
hitonce = 1
envshake.time = 10
envshake.freq = 90
envshake.ampl = 6

[State 4003]
Type = Helper
Trigger1 = movehit = 1
StateNo = 4010
ID = 4010
Name = "Dominance"
Pos = 0,-50
PosType = P2
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1

[State 4003]
Type = Helper
Trigger1 = movehit = 1
StateNo = 4010
ID = 4010
Name = "Dominance"
Pos = 0,-50
PosType = P2
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1

[State 4003]
type = TargetState
trigger1 = movehit
value = 4009
persistent = 0
ignorehitpause = 1

[State 4003]
type = ChangeState
trigger1 = Var(39) >= 16
trigger1 = time = Var(39)
value = 4003

[Statedef 4004]
type    = A
movetype= I
physics = N
sprpriority = 7
ctrl = 0
anim = 4005

[State 4004]
type = turn
trigger1 = !time*ishelper(4005)

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

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

[State 4004]
type = Helper
trigger1 = !time
pos = 0,0
postype = p1
ID=4005
pausemovetime = 0
name = "Streak"
sprpriority = 100
stateno = 4005
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1
IgnoreHitPause = 1

[state 4004]
type = VarRandom
trigger1 = !time
v = 0
range = -50,50

[state 4004]
type = VarRandom
trigger1 = !time
v = 1
range = 200,500

[state 4004]
type = VarRandom
trigger1 = !time
v = 3
range = 75,250

[state 4004]
type = VarRandom
trigger1 = !time
v = 2
range = -20,20

[state -2, x]
type = VarRandom
trigger1 = !time
v = 4
range = -75,75

[state 4004]
type = posadd
trigger1 = !time
x = Var(4)
y = Var(0)

[State 4004]
type = Angleset
trigger1 = 1
value = -var(2)*0.1

[state 4004]
type = Velset
trigger1 = !time
x = cos((var(2)*0.1)*pi/180)*55*(1-ishelper(1655)*2)
y = sin((var(2)*0.1)*pi/180)*55

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

[State 4004]
type = Destroyself
trigger1 = time = 40

[Statedef 4005]
type    = A
movetype= A
physics = N
sprpriority = 7
ctrl = 0
anim = 4004

[state 4005]
type = Varset
trigger1 = 1
fv = 4
value = ceil(p2dist x)

[state 4005]
type = Varset
trigger1 = parent,p2dist x < -75*parent,Var(1)*0.01
fv = 4
value = -75*parent,Var(1)*0.01

[state 4005]
type = Varset
trigger1 = parent,p2dist x > 50*parent,Var(1)*0.01
fv = 4
value = 50*parent,Var(1)*0.01

[State 4005]
type = BindToParent
trigger1 = 1
pos = ceil(cos((parent,Var(2)*0.1)*pi/180)*fVar(4)),ceil(sin((parent,Var(2)*0.1)*pi/180)*fVar(4)*Var(3)*0.01)

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

[State 4005]
type = HitDef
trigger1 = numhelper(9139)
attr = A,NA
hitflag = P
guardflag =
guard.dist= 0

[State 4005]
type = HitDef
trigger1 = numhelper(9139) = 0
trigger1 = (!movecontact)*(!movereversed)
attr = SCA, HP
animtype  = Hard
damage    = 25
hitflag = MAFP
guardflag = MA
getpower = 0,0
sparkno= -1
guard.sparkno= -1
pausetime = 0,2
guard.pausetime = 0,2
sparkxy = 0,0
hitsound = S200,2
guardsound = -1
ground.type = High
ground.slidetime = 30
ground.hittime  = 20
ground.velocity = 0,-6
air.animtype = Back
airguard.velocity = -2.5,-2.5
air.velocity = 0,-6
fall = 1
fall.recover = 0
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
AirGuard.CornerPush.VelOff = 0
guard.dist = 160
numhits = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = -16

[State 4005]
type = HitAdd
trigger1 = movehit*!moveguarded
trigger1 = enemynear,movetype = H
value = 1
persistent = 0
IgnoreHitPause = 1

[State 4005]
type = TargetState
trigger1 = movehit
value = 4009
persistent = 0
ignorehitpause = 1

[State 4005]
type = TargetState
trigger1 = movehit*!moveguarded
trigger1 = enemynear,movetype = H
value = 4009
persistent = 0
ignorehitpause = 1

[State 4005]
type = ParentVaradd
trigger1 = movehit*!moveguarded
trigger1 = enemynear,movetype = H
fvar(3) = 15*(1+(p2movetype = A)*0.333)*(1+(root,Var(35)=2)*0.25)
ignorehitpause = 1
persistent = 0

[State 4005]
type = ParentVaradd
trigger1 = !movehit*moveguarded
trigger1 = enemynear,movetype = H
fvar(3) = 3*(1+(p2movetype = A)*0.333)*(1+(root,Var(35)=2)*0.25)
ignorehitpause = 1
persistent = 0

[State 4005]
type = Varset
trigger1 = var(51) = 0
trigger1 = movehit
var(51) = 1
ignorehitpause = 1

[State 4005]
type = Varset
trigger1 = var(52) = 0
trigger1 = Var(53) = 2
trigger1 = movehit
var(52) = 1
ignorehitpause = 1

[State 4005]
type = Varset
trigger1 = var(51) = 1
var(51) = 2
ignorehitpause = 1

[State 4005]
type = Varset
trigger1 = var(52) = 1
var(51) = 2
ignorehitpause = 1

[State 4005]
type = Destroyself
trigger1 = time = 39
trigger2 = movehit

[Statedef 4006]
type    = A
movetype= A
physics = N
sprpriority = 7
ctrl = 0
anim = 4006

[State 4006, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S100,13

[State 4006]
type = Helper
trigger1 = !time
pos = 0,0
postype = p1
ID=4007
pausemovetime = 0
name = "eff"
sprpriority = 100
stateno = 4007
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1

[State 4006]
type = HitDef
trigger1 = numhelper(9139)
attr = A,NA
hitflag =
guardflag =
guard.dist= 0

[State 4006]
type = HitDef
trigger1 = numhelper(9139) = 0
trigger1 = (!movecontact)*(!movereversed)
attr = SCA, HP
animtype  = Hard
damage = 100
hitflag = MAFP
guardflag = MA
getpower = 0,0
sparkno= -1
guard.sparkno= -1
pausetime = 0,2
guard.pausetime = 0,2
sparkxy = 0,0
hitsound = S200,4
guardsound = -1
ground.type = High
ground.slidetime = 30
ground.hittime  = 20
ground.velocity = 0,-15
air.animtype = Back
airguard.velocity = -2.5,-2.5
air.velocity = 0,-15
fall = 1
fall.recover = 0
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
AirGuard.CornerPush.VelOff = 0
numhits = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = -16

[State 4006]
Type = Helper
trigger1 = movehit = 1
StateNo = 4011
ID = 4011
Name = "DominanceFinish"
Pos = 0,-100
PosType = P2
Ownpal = 1
persistent = 20

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

[State 4006]
type = ParentVaradd
trigger1 = movehit*!moveguarded
trigger1 = enemynear,movetype = H
v = 56
value = 100
persistent = 0
IgnoreHitPause = 1

[State 4006]
type = ParentVarset
trigger1 = movehit*!moveguarded
trigger1 = enemynear,movetype = H
var(2) = 1
ignorehitpause = 1
persistent = 0

[State 4006]
type = TargetState
trigger1 = !movehit*moveguarded
trigger1 = enemynear,movetype = H
value = 4009
persistent = 0
ignorehitpause = 1

[State 4006]
type = TargetState
trigger1 = movehit*!moveguarded
trigger1 = enemynear,movetype = H
value = 4009
persistent = 0
ignorehitpause = 1

[State 4006]
type = ParentVaradd
trigger1 = movehit*!moveguarded
trigger1 = enemynear,movetype = H
fvar(3) = 150*(1+(p2movetype = A)*0.333)*(1+(root,Var(35)=2)*0.25)
ignorehitpause = 1
persistent = 0

[State 4006]
type = ParentVaradd
trigger1 = !movehit*moveguarded
trigger1 = enemynear,movetype = H
fvar(3) = 40*(1+(p2movetype = A)*0.333)*(1+(root,Var(35)=2)*0.25)
ignorehitpause = 1
persistent = 0

[State 4006]
type = Varset
trigger1 = var(51) = 0
trigger1 = movehit
var(51) = 1
ignorehitpause = 1

[State 4006]
type = Varset
trigger1 = var(52) = 0
trigger1 = Var(53) = 2
trigger1 = movehit
var(52) = 1
ignorehitpause = 1

[State 4006]
type = Varset
trigger1 = var(51) = 1
var(51) = 2
ignorehitpause = 1

[State 4006]
type = Varset
trigger1 = var(52) = 1
var(51) = 2
ignorehitpause = 1

[State 4006]
type = Destroyself
trigger1 = time = 2

[Statedef 4007]
type = A
physics = N
ctrl = 0
sprpriority = 7
anim = 99999

[State 4007]
type = Varset
trigger1 = !time
fv = 0
value = 20

[State 4007]
type = Varset
trigger1 = time
fv = 1
value = fVar(1)+fVar(0)*(50-time)*0.01

[State 4007]
type = Explod
trigger1 = 1
anim = 4008
ID = 4008
sprpriority = 8
postype = p1
pos = 0,-5-ceil(fvar(1))
Vel = 0,0
removetime = 1
ownpal = 0
scale = 100,1.25
ontop = 1

[State 4007]
type = Explod
trigger1 = 1
anim = 4007
ID = 4007
sprpriority = 8
postype = p1
pos = 0,5+ceil(fVar(1))
Vel = 0,0
removetime = 1
ownpal = 0
pausemovetime = 5
supermovetime = 5
scale = 100,1.25
ontop = 1

[State 4007]
type = PalFX
trigger1 = 1
time = 1
add = -((time+1)*5),-((time+1)*5),-((time+1)*5)
mul = 256,256,256
invertall = 0
color = 256

[State 4007]
type = Destroyself
trigger1 = time = 50

[Statedef 4008]
type    = S
movetype= A
physics = N
sprpriority = 7
ctrl = 0
Velset = 0,0
anim = 4009

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

[State 4008]
type = Gravity
trigger1 = 1

[State 4008]
type = ChangeState
trigger1 = Vel y > 0
trigger1 = pos y > -10
value = 4001

[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 = 6004

[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] ;Recover near ground
type = SelfState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 4009]; Recover in mid air
type = SelfState
triggerall = Vel Y > -1
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210

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

[Statedef 4010]
type = A
physics = N
ctrl = 0
anim = 4010
velset = 0,0

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

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

[State 4010]
type = SprPriority
trigger1 = 1
value = 4

[State 4010]
type = varrandom
trigger1 = Time = 0
v = 0
range = 20,60

[State 4010]
type = varrandom
trigger1 = Time = 0
v = 1
range = 1,360

[State 4010]
type = AngleSet
trigger1 = Time = 0
value = var(1)

[State 4010]
type = AngleDraw
trigger1 = 1
scale = 0.1+Time*0.4*var(0)*0.01,0.1+Time*0.4

[State 4010]
type = DestroySelf
trigger1 = time = 20

[Statedef 4011]
type = A
physics = N
ctrl = 0
anim = 4011
velset = 0,0

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

[State 4011]
type = null;Parentvaradd
trigger1 = Time = 0
var(0) = 1

[State 4011]
type = Trans
trigger1 = Time < 5
Trans = AddAlpha
Alpha = 256,256
time = 1

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

[State 4011]
type = SprPriority
trigger1 = 1
value = 4

[State 4011]
type = AngleDraw
trigger1 = parent,var(0) = 1
scale = Time*0.05,Time*0.15

[State 4011]
type = AngleDraw
trigger1 = parent,var(0) = 2
value = -30
scale = Time*0.1,Time*0.12

[State 4011]
type = AngleDraw
trigger1 = parent,var(0) = 3
value = -15
scale = Time*0.1,Time*0.08

[State 4011]
type = AngleDraw
trigger1 = parent,var(0) = 4
value = -30
scale = Time*0.06,Time*0.13

[State 4011]
type = AngleDraw
trigger1 = parent,var(0) = 5
value = 15
scale = Time*0.1,Time*0.15

[State 4011]
type = AngleDraw
trigger1 = 1;parent,var(0) = 6
value = -45
scale = Time*0.06,Time*0.2

[State 4011]
type = DestroySelf
trigger1 = time = 25

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

[State 4500, NotHitBy]
type = NotHitBy
trigger1 = AnimElem = 1
value = SCA
time = 9

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

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

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

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

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

[State 220, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S100,2
volume = 255

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

[State 4500, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = S, HT
animtype = Heavy
damage = 0
guardflag = MA
pausetime = 30,60
sparkno = S8053*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-70
hitsound   = S200,3
guardsound = S300,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -3
air.velocity = -4,-4
p2stateno = 4512

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

[State 4500]
type = Changestate
trigger1= AnimElem = 6 >= 0 && movehit
value = 4501
ctrl = 1

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

[State 4501, Helper]
type = Helper
trigger1 = Time = 0
helpertype = normal
stateno = 7000
id = 7000
postype = Left
pos = 0, 0
keyctrl = 0
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1
pausemovetime = 9999
supermovetime = 9999

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

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

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

[State 4501, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 1
statetype = A       ;S,A,C,L
movetype = i        ;I,A,H
physics = n         ;A,C,S,N

[State 4501, VelSet]
type = VelSet
trigger1 = animelem = 1
x = -4.5
y = -3

[State 4501]
type = ChangeState
trigger1 = AnimElemTime(1) > 0
trigger1 = Pos Y >= 0
value = 4502
Ctrl = 1

[StateDef 4502]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 4502
sprpriority = 0

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

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

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

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

[State 4502]
type = ChangeState
trigger1 = Animtime = 0
value = 4503
ctrl = 1

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

[State 4507, PlaySnd]
type = PlaySnd
trigger1 = Time = 250
value = S3600,4
channel = 6

[State 4503, Helper]
type = Helper
trigger1 = time = 325
ID = 4507
pos = 0,-300
postype = p2
stateno = 4507
helpertype = normal
name = "Giant_Suika"
keyctrl = 0
ownpal = 1
supermovetime = 1
size.xscale = 3
size.yscale = 3

[State 4503]
type = Explod
trigger1 = time = 30
trigger2 = time = 67
trigger3 = time = 107
trigger4 = time = 147
trigger5 = time = 187
anim = 4508
ID = 4508
postype = p2
pos = 0,0
bindtime = -1
sprpriority = 5
ownpal = 1
removetime = 30

[State 4503, PlaySnd]
type = PlaySnd
trigger1 = time = 30
trigger2 = time = 67
trigger3 = time = 107
trigger4 = time = 147
trigger5 = time = 187
value = S0,12

[State 4503, HitAdd]
type = HitAdd
trigger1 = time = 30
trigger2 = time = 67
trigger3 = time = 107
trigger4 = time = 147
trigger5 = time = 187
value = 1

[State 4503, Explod]
type = Explod
trigger1 = time = 300
anim = IfElse(Facing=1,4511,4513)
ID = 4511
pos = 25,-110
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 0.75,0.75
sprpriority = 3

[State 4503, PlaySnd]
type = PlaySnd
trigger1 = time = 250
value = S100,14

[State 4503, end]
type = ChangeState
trigger1 = Time = 357
value = 4504

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

[State 4504, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 4505

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

[State 4505, end]
type = ChangeState
trigger1 = Time = 30
value = 4506

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

[State 4506, Explod]
type = Explod
trigger1 = AnimElemTime(4) = 5
anim = IfElse(Facing=1,4512,4514)
ID = 4512
pos = 30,-95
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 0.75,0.75
sprpriority = 3

[State 4506, end]
type = ChangeState
trigger1 = Time = 150
value = 12
ctrl = 1

[StateDef 4507]
type = A
movetype= A
physics = N
juggle = 1
ctrl = 0
anim = 4509
sprpriority = 2

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

[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 4507, VelAdd]
type = Veladd
trigger1 = AnimElem = 1
x = 0
y = 4

[State 4507]
type = ChangeState
trigger1 = Pos Y >= 0
value = 4508

[State 4507, Gravity]
type = Gravity
trigger1 = 1

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

[State 4508]
type = HitDef
trigger1 = AnimElem = 1
attr = S, HA
damage = ceil(600*(root,fvar(6))),50
animtype = Heavy
guardflag =
hitflag = MAF
priority = 3, Hit
pausetime = 0,0
guard.pausetime = 0,20
sparkno = -1
guard.sparkno = S9000
sparkxy = -10, -76
hitsound = S200,12
guardsound = 6, 0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-12.5
airguard.velocity = -5,-5
air.type = High
air.velocity = 0,-15
air.hittime = 20
fall = 1
fall.recover = 0
air.fall = 1
getpower = 0
yaccel = 0.22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 4508]
type = targetstate
trigger1 = movehit = 1
trigger1 = numtarget
value = 4513

[State 4508]
Type = Explod
Trigger1 = AnimElem = 1
Anim = 6042
ID = 6042
Postype = P1
Pos = 0,0
Vel = 10,0
OwnPal = 1
SprPriority = 7
IgnoreHitPause = 1

[State 4508]
Type = Explod
Trigger1 = AnimElem = 1
Anim = 6042
ID = 6042
Postype = P1
Pos = 0,0
Vel = -10,0
OwnPal = 1
SprPriority = 7
IgnoreHitPause = 1

[State 4508]
Type = Explod
Trigger1 = AnimElem = 1
Anim = 6042
ID = 6042
Postype = P1
Pos = 0,0
Vel = 5,-2.5
OwnPal = 1
SprPriority = 8
IgnoreHitPause = 1

[State 4508]
Type = Explod
Trigger1 = AnimElem = 1
Anim = 6042
ID = 6042
Postype = P1
Pos = 0,0
Vel = -5,-2.5
OwnPal = 1
SprPriority = 8
IgnoreHitPause = 1

[State 4508, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S200,16

[State 4508]
Type = EnvShake
Trigger1 = AnimElem = 1
Time = 60
Freq = 40
Ampl = 40

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

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

[State 4508, ChangeState]
type = ChangeState
trigger1 = Animtime = 0
value = 4509

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

[State 4509, end]
type = ChangeState
trigger1 = Animtime = 0
value = 4510
ctrl = 1

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

[State 4510]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
trigger1 = Anim = 3608
trigger1 = AnimElemTime(1) > 0
trigger1 = Pos Y >= 0
Value = 4514

[State 4510, end]
type = ChangeState
trigger1 = Time = 60
value = 4511

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

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

[State 4511]
type = EnvShake
Trigger1 = AnimElem = 2
trigger2 = AnimElem = 5
time = 10
ampl = 20
freq = 127

[State 4511, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 5
value = S100,15

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

[Statedef 4512]
type = S
movetype = H
physics = S
velset = 0,0
poweradd = 0
ctrl = 0

[State 4512, PosSet]
type = PosSet
trigger1 = time = 0
y = 0

[State 4512]
type = NotHitBy
trigger1=!time
time = 420
value = SCA

[State 4512, PlayerPush]
type = PlayerPush
trigger1=time<=420
value = 0

[State 4512]
type = Changeanim2
trigger1 = time = 0
value = 4507

[State 4512]
type = SelfState
trigger1 = animtime = 0
value = 0
ctrl = 1

[Statedef 4513]
type = L
movetype = H
physics = N

[State 4513]
type = angledraw
trigger1 = 1
value = 0
scale = 1,0.1

[State 4513]
type = selfstate
trigger1 = Time > 360
value = 5120

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

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

[State 4513]
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170

[State 4513]
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)

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

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

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

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

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

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

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

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

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

[State 4514]
type = angledraw
trigger1 = time = [30,54]
scale = 1 - (time-30)*0.03,1 - (time-30)*0.03

[State 4514, PlaySnd]
type = PlaySnd
trigger1 = time = 30
value = S0,1

[State 4514, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,55]
flag = roundnotover

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

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

[State 4514]
type = Changestate
trigger1 = time = 55
value = 4515
ctrl = 1

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

[State 4515]
type = angledraw
trigger1 = 1
scale = 0.33,0.33

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

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

[State 4515, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,165]
flag = roundnotover

[statedef 4599]
type=s
movetype=h
physics=n
velset=0,0
ctrl=0

[state invincible]
type=hitby
value=
time=-1
trigger1=1
ignorehitpause=1

[state camera]
type=screenbound
value=0
trigger1=1
ignorehitpause=1

[state remove explods]
type=removeexplod
trigger1=!time
ignorehitpause=1

[state shut up]
type=stopsnd
channel=-1
trigger1=!time
ignorehitpause=1

[state fadeout]
type=trans
trans=addalpha
alpha=240-time*16,256
trigger1=time<16
ignorehitpause=1

[state invisible]
type=assertspecial
flag=invisible
trigger1=time>15
ignorehitpause=1

[state pos]
type=posset
x=0
y=0
trigger1=time=16
ignorehitpause=1

[statedef 4598]
type=l
movetype=i
physics=n
anim=5110
velset=0,0
ctrl=0

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

[state fadein]
type=trans
trans=addalpha
alpha=8*time,256
trigger1=time<32
ignorehitpause=1

[state wakeup]
type=selfstate
value=5120
trigger1=time>=120

[Statedef 7000]
type = A
movetype = I
physics = N
ctrl = 0
anim = 99999
velset = 0,0
ownpal = 1
sprpriority = 7

[State 7000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = TimerFreeze
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 7000]
type = DestroySelf
trigger1 = (Parent,Stateno != [4501,4599])
trigger2 = (Parent,Stateno = 4504) &&(Parent,time = 1)
trigger3 = (Parent,Anim = 4510)

[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 10400]
Type = A
MoveType = I
Physics = N
Anim = IfElse(IsHelper(10400),10400,10452)
SprPriority = 999

[State 10400]
Type = VarSet
Trigger1 = Time = 0
FV = 1
Value = 0.3

[State 10400]
Type = VarAdd
Trigger1 = Time = [1,4]
FV = 1
Value = 0.16

[State 10400]
Type = VarAdd
Trigger1 = Time = [5,8]
FV = 1
Value = 0.1

[State 10400]
Type = VarAdd
Trigger1 = Time > 8
FV = 1
Value = 0.02

[State 10400]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

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

[State 10400]
Type = AngleSet
Trigger1 = Time = 0
Value = 20

[State 10400]
Type = AngleAdd
Trigger1 = Time > 0
Value = 10

[State 10400]
Type = AngleDraw
Trigger1 = 1
Scale = 0.75*FVar(1),0.75*FVar(1)

[State 10400]
Type = DestroySelf
Trigger1 = Time = 32

[StateDef 10401]
Type = A
MoveType = I
Physics = N
Anim = 10401
SprPriority = 999

[State 10401]
Type = VarSet
Trigger1 = Time = 0
FV = 1
Value = 0.5

[State 10401]
Type = VarAdd
Trigger1 = Time = [1,4]
FV = 1
Value = 0.1

[State 10401]
Type = VarAdd
Trigger1 = Time > 4
FV = 1
Value = 0.01

[State 10401]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

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

[State 10401]
Type = AngleSet
Trigger1 = Time = 0
Value = 20

[State 10401]
Type = AngleAdd
Trigger1 = Time > 0
Value = 10

[State 10401]
Type = AngleDraw
Trigger1 = 1
Scale = 0.75*FVar(1),0.75*FVar(1)

[State 10401]
Type = DestroySelf
Trigger1 = Time = 32

[StateDef 10402]
Type = A
MoveType = I
Physics = N
Anim = 10402
SprPriority = 999

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

[State 10402]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 10402]
Type = VarSet
Trigger1 = Time = 0
FV = 1
Value = 0.5

[State 10402]
Type = VarAdd
Trigger1 = Time = [1,4]
FV = 1
Value = 0.1

[State 10402]
Type = VarAdd
Trigger1 = Time > 4
FV = 1
Value = 0.01

[State 10402]
Type = AngleDraw
Trigger1 = 1
Scale = 0.75*FVar(1),0.75*FVar(1)

[State 10402]
Type = DestroySelf
Trigger1 = Time = 32

[StateDef 10450]
Type = A
MoveType = I
Physics = N
Anim = 10451
SprPriority = 999

[State 10450]
Type = VarSet
Trigger1 = Time = 0
FV = 1
Value = 0.5

[State 10450]
Type = VarAdd
Trigger1 = Time = [1,4]
FV = 1
Value = 0.1

[State 10450]
Type = VarAdd
Trigger1 = Time > 4
FV = 1
Value = 0.01

[State 10450]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

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

[State 10450]
Type = AngleSet
Trigger1 = Time = 0
Value = 20

[State 10450]
Type = AngleAdd
Trigger1 = Time > 0
Value = 10

[State 10450]
Type = AngleDraw
Trigger1 = 1
Scale = 0.75*FVar(1),0.75*FVar(1)

[State 10450]
Type = DestroySelf
Trigger1 = Time = 32

[StateDef 10451]
Type = A
MoveType = I
Physics = N
Anim = 10450
SprPriority = 999

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

[State 10451]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 10451]
Type = VarSet
Trigger1 = Time = 0
FV = 1
Value = 0.5

[State 10451]
Type = VarAdd
Trigger1 = Time = [1,4]
FV = 1
Value = 0.1

[State 10451]
Type = VarAdd
Trigger1 = Time > 4
FV = 1
Value = 0.01

[State 10451]
Type = AngleDraw
Trigger1 = 1
Scale = 0.75*FVar(1),0.75*FVar(1)

[State 10451]
Type = DestroySelf
Trigger1 = Time = 32

[statedef 850]
type=u
movetype=i
physics=u
ctrl=!(var(31):=-1)
sprpriority=2

[state type]
type=statetypeset
statetype=s
physics=s
trigger1=!time
trigger1=statetype!=a
trigger1=command!="holddown"

[state type]
type=statetypeset
statetype=c
physics=c
trigger1=!time
trigger1=statetype!=a
trigger1=command="holddown"

[state type]
type=statetypeset
physics=a
trigger1=!time
trigger1=statetype=a

[state anim]
type=changeanim
value=ifelse(statetype=a,852,850+(statetype=c))
trigger1=!time

[state vel]
type=velset
x=0
y=0
trigger1=!time
trigger1=statetype!=a

[state success]
type=changestate
value=851
trigger1=numhelper(17000)
trigger1=helper(17000),stateno=17110
trigger2=time>=128
trigger3=time>4
trigger3=command!="hold_a"||power<=0

[state power]
type=poweradd
value=-8-(time%8=5)
trigger1=time>4
ignorehitpause=1

[statedef 851]
type=u
movetype=i
physics=n
anim=helper(17000),anim-16247
sprpriority=2
ctrl=0
facep2=(var(31):=var(31)-2)>=0

[state anim]
type=changeanim
value=853
trigger1=!time
trigger1=numhelper(17000)
trigger1=anim=855
trigger1=statetype!=a

[state type]
type=statetypeset
physics=a
triggerall=statetype=a
trigger1=!time
trigger1=var(31)<0
trigger2=time=17-4*!var(30)
trigger2=var(30)+(var(31)>=0)

[state invul]
type=hitby
value=
time=16-4*!var(30)
triggerall=!time
trigger1=var(30)
trigger2=var(31)>=0
ignorehitpause=1

[state vel]
type=velset
x=(statetype=a)*(vel x)
y=(statetype=a)*(-3+(vel y+3)*!var(30))
trigger1=!time

[state pause]
type=superpause
anim=-1
sound=-1,-1
darken=0
p2defmul=1
time=15-4*!var(30)
movetime=15-4*!var(30)
endcmdbuftime=15-4*!var(30)
pausebg=0
triggerall=!time
trigger1=var(30)
trigger2=var(31)>=0
ignorehitpause=1

[state type]
type=posfreeze
value=1
triggerall=time<17-4*!var(30)
triggerall=statetype=a
trigger1=var(30)
trigger2=var(31)>=0

[state type]
type=ctrlset
value=1
trigger1=time=15
trigger1=var(30)
trigger1=!(helper(17000),var(8)+var(36))

[state type]
type=explod
anim=99999
id=851
removetime=3
removeongethit=1
trigger1=!time
trigger1=var(30)

[state anim]
type=changeanim
value=44
elem=4
trigger1=time=16-4*!var(30)
trigger1=statetype=a

[state type]
type=changestate
value=helper(17000),var(8)+!helper(17000),var(8)*var(36)
triggerall=time>15-4*!var(30)
triggerall=var(31)>=0
trigger1=helper(17000),var(8)*(1-var(31)*(helper(17000),var(8)!=850)*(helper(17000),var(8)<1000))
trigger2=var(36)*(1-var(31)*(var(36)!=850)*(var(36)<1000))

[state end]
type=changestate
value=51*(statetype=a)+11*(statetype=c)
ctrl=1
trigger1=time>24-5*var(30)

[Statedef 860]
type    = S
movetype= H
physics = N
velset = 0,0

[state back]
type=changestate
value=150
trigger1=command="holdback"

[State 150, 1]
type = ChangeAnim
trigger1 = 1
value = 860

[State 150, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State 150, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 150, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 150, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 3

;---------------------------------------------------------------------------
; SGUARDHIT2 (knocked back)
[Statedef 861]
type    = S
movetype= H
physics = S
anim = 860

[state back]
type=changestate
value=151
trigger1=command="holdback"
trigger1=1||(var(34):=var(34)-time)||(var(35):=var(35)-time)

[State 151, 2]
type = VelSet
trigger1 = Time = var(34)
trigger2 = HitOver
x = 0

[State 151, 3]
type = CtrlSet
trigger1 = Time = var(35)
value = 1

[State 151, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 151, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 151, 4]
type = ChangeState
trigger1 = HitOver
value = 130
ctrl = 1

;---------------------------------------------------------------------------
; CGUARDHIT (shaking)
[Statedef 862]
type    = C
movetype= H
physics = N
velset = 0,0

[state back]
type=changestate
value=152
trigger1=command="holdback"

[State 152, 1]
type = ChangeAnim
trigger1 = 1
value = 861

[State 152, 3]
type = ChangeState
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State 152, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 152, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 152, 4]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

;---------------------------------------------------------------------------
; CGUARDHIT2 (knocked back)
[Statedef 863]
type    = C
movetype= H
physics = C
anim = 861

[state back]
type=changestate
value=153
trigger1=command="holdback"
trigger1=1||(var(34):=var(34)-time)||(var(35):=var(35)-time)

[State 153, 2]
type = VelSet
trigger1 = Time = var(34)
trigger2 = HitOver
x = 0

[State 153, 3]
type = CtrlSet
trigger1 = Time = var(35)
value = 1

[State 153, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 153, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 153, 4]
type = ChangeState
trigger1 = HitOver
value = 131
ctrl = 1

;---------------------------------------------------------------------------
; AGUARDHIT (shaking)
[Statedef 864]
type    = A
movetype= H
physics = N
velset = 0,0

[state back]
type=changestate
value=154
trigger1=command="holdback"

[State 154, 1]
type = ChangeAnim
trigger1 = 1
value = 862

[State 154, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 155 ;AGUARDHIT2

[State 154, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

;---------------------------------------------------------------------------
; AGUARDHIT2 (knocked away)
[Statedef 865]
type    = A
movetype= H
physics = N
anim = 862

[state back]
type=changestate
value=155
trigger1=command="holdback"
trigger1=1||(var(34):=var(34)-time)||(var(35):=var(35)-time)

[State 155, 2]
type = VelAdd
trigger1=1
y = Const(movement.yaccel)

[State 155, 3]
type = CtrlSet
trigger1 = Time = var(35)
value = 1

[State 155, 4]
type = VarSet
trigger1 = 1
sysvar(0) = (pos y >= 0) && (vel y > 0)

[State 155, 5]
type = VelSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = PosSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = ChangeState
trigger1 = sysvar(0)
trigger1 = command = "holdback"
trigger1 = inguarddist
value = 130

[State 155, 7]
type = ChangeState
trigger1 = sysvar(0)
value = 52

;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

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

[Statedef -2]

[State -2, PlaySnd]
type = playsnd
triggerall = alive && time = 1
triggerall = stateno = 5000 || stateno = 5010
trigger1 = gethitvar(animtype) >= 2 && random < 500
trigger2 = gethitvar(animtype) = 1 && random < 500
trigger3 = gethitvar(animtype) = 0 && random < 500
value = S5000,0+random%5
channel = 0
ignorehitpause = 1

[State -2, PlaySnd]
type = playsnd
triggerall = alive && time = 1
trigger1 = (stateno = 5000 || stateno = 5010) && numenemy
trigger1 = gethitvar(fall) || (enemynear, hitdefattr = SCA, SA, HA)
trigger2 = (stateno = 5020 || stateno = 5070 || stateno = 5080)
trigger3 = (stateno = 5050 || stateno = 5100) && (prevstateno != [5000, 5199])
value = S5000,0+random%5
channel = 0
ignorehitpause = 1

[State -2, PlaySnd]
type = PlaySnd
triggerall = time = 1
trigger1 = StateNo = [5200,5210]
value = S5200,0+Random%2
persistent = 0
channel = 0

[State -2, PlaySnd]
type = PlaySnd
triggerall = time = 1
trigger1 = stateno = 5120
value = S5200,0+Random%2
persistent = 0
channel = 0

[State -2, Striker Bars]
type = Helper
trigger1 = roundstate=2
trigger1 = numhelper(10900)=0
trigger1 = var(33)!=4444
id = 10900
name = "strikerbars"
stateno = 10900
ownpal = 1
postype = left
pos = 160
ignorehitpause = 1

[State -2, VarSet]
Type     = VarSet
Trigger1 = Var(12) > 0
Trigger1 = StateType != A
V        = 12
Value    = 0
IgnoreHitPause = 1

[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 Right.]
type=helper
id=17000
stateno=17000
name="Paint the man, cut the lines"
ownpal=1
pausemovetime=99999999
supermovetime=99999999
trigger1=var(36):=0
trigger2=!numhelper(17000)
ignorehitpause=1

[state Everyone]
type=assertspecial
flag=nowalk
trigger1=numexplod(851)

[state listening?]
type=hitoverride
attr=sa,ap
stateno=851
triggerall=var(30)=[0,1]
triggerall=helper(17000),stateno=17800
triggerall=helper(17000),anim=17100
trigger1=ctrl
trigger2=stateno=[850,851]

[state Here's]
type=hitoverride
attr=c,ap
stateno=851
triggerall=var(30)=[0,1]
triggerall=helper(17000),stateno=17800
triggerall=helper(17000),anim=17101
trigger1=ctrl
trigger2=stateno=[850,851]

[state the]
type=hitoverride
attr=sca,ap
stateno=851
triggerall=var(30)=[0,1]
triggerall=helper(17000),stateno=17800
triggerall=helper(17000),anim=17102
trigger1=ctrl
trigger2=stateno=[850,851]

[state campaign]
type=reversaldef
reversal.attr=sca,aa,ap
hitflag=mafdp
sparkno=-1
hitsound=-1,-1
numhits=0
p1stateno=851
trigger1=stateno=[860,865]
trigger1=helper(17000),stateno=17800

[state intro.]
type=reversaldef
reversal.attr=
trigger1=stateno=[860,865]
trigger1=helper(17000),stateno!=17800

[State striker var]
type=null
triggerall=var(33)!=4444
trigger1=var(33)>=1
trigger1=0&&var(33):=var(33)-1
trigger2=!var(33)
trigger2=!numhelper(3501)
trigger2=!numhelper(3601)
trigger2=0&&var(33):=-2

[state 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 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, VarSet]
type = Varset
trigger1 = numenemy
fvar(5) = enemynear,gethitvar(hitcount)
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = numenemy
trigger1 = (enemynear,movetype!=H)
trigger2 = !numenemy
fvar(5) = 1

[State -2, VarSet]
type = VarSet
trigger1 = 1
fvar(6) = ifelse(fvar(5) = 0, 1, ifelse(fvar(5) = 1, 1, .96875**fvar(5)))
ignorehitpause = 1

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = 1
value = fvar(6)
ignorehitpause = 1

[State -2, VarAdd]
type = VarAdd
trigger1 = 100*life/lifemax <= 30
v = 24
value = 1

[State -2, Helper]
type = Helper
trigger1 = Var(24) = 1
persistent = 0
id = 7050
name = "Face"
pos = 0,0
postype = P1
stateno = 7050
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State -2, LifeAdd]
type = LifeAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "VAkiha_K"
trigger1 = Enemy,Var(30) = 1
value = -5
kill = 0

[State -2, PowerAdd]
type = PowerAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "VAkiha_K"
trigger1 = Enemy,Var(30) = 1
value = -26

[State -2, Explod]
type = Explod
triggerall = (time%4)=0
triggerall = time >= 4
trigger1 = Stateno = 100
trigger2 = Stateno = 105
trigger3 = Stateno = 110 && Anim != 111
trigger4 = Stateno = 115
anim = 6102
postype = p1
pos = 40*ifelse(Stateno=100||Stateno=110,-1,1),-50
random = 0,80
ID = 6102
ownpal = 1
removetime = 9
sprpriority = 2
bindtime = 1

[State -2]
type = RemoveExplod
trigger1 = numexplod(2104)
trigger1 = Stateno != 2101
ID = 2104

[State -2]
type = RemoveExplod
trigger1 = numexplod(2105)
trigger1 = Stateno != 2101
ID = 2105

[State -2]
type = RemoveExplod
trigger1 = numexplod(2204)
trigger1 = Stateno != 2201
ID = 2204

[State -2]
type = RemoveExplod
trigger1 = numexplod(2205)
trigger1 = Stateno != 2201
ID = 2205

[state -2]
type = afterimagetime
trigger1 = stateno != [2000,4599]
time = 0

[State -1, parry]
type=selfstate
value=851
ctrl=0
trigger1=var(30)!=2
trigger1=var(31)>1
;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

[State -3, VarSet]
type = VarSet
trigger1 = 1
var(15) = 0

[State -3, VarSet]
type = VarSet
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = movecontact
trigger3 = Statetype = A
trigger3 = (Stateno = [600,699])
trigger3 = MoveContact
var(15) = 1

[State -3, VarSet]
type = VarSet
trigger1 = 1
var(16) = 0

[State -3, VarSet]
type = VarSet
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [1000,1999])
trigger2 = MoveContact
var(16) = 1

[State -3, VarSet]
type = VarSet
trigger1 = 1
var(17) = 0

[State -3, VarSet]
type = VarSet
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [2000,3999])
trigger2 = stateno != [4000,4999]
trigger2 = MoveContact
var(17) = 1

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