;hitspark = s7700, s7702, s7703
;wall hit = 6777
;launch = 4444 (chp)
;hyper background = 32710
;guard push = 7020
;recovery roll = check
;normal throw = check (F, HP)
;5300 (lame), 5500, 7696

;Var(54) = Flight State
;Var(55) = Air Dash Counter
;Var(59) = AI

[Data]
life = 1000  ; Amount of life to start with
power = 3000  ; Maximum power level (for supers)
attack = 100  ; 100% attack power (more is stronger)
defence = 100  ; 100% defensive power (more is stronger)
fall.defence_up = 50  ; Def goes up by 50% everytime player is hit on ground
liedown.time = 60  ; Time player takes before getting up from HIT_LIEDOWN
airjuggle = 20  ; Can do 20 points of juggling
sparkno = 2  ; Default spark number
guard.sparkno = 40  ; Default guard spark number
KO.echo = 0  ; Set to 1 to enable echo on KO
volume = 0  ; Volume offset (negative for softer)

; Variables with this index and above will not have their values
; 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.
IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = 1  ; Horizontal scaling factor.
yscale = 1  ; Vertical scaling factor.
ground.back = 24  ; Player width (back, ground)
ground.front = 25  ; Player width (front, ground)
air.back = 15  ; Player width (back, air)
air.front = 15  ; Player width (front, air)
height = 70  ; Height of player (for opponent to jump over)
attack.dist = 160  ; Default attack distance
proj.attack.dist = 100  ; 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.8           ;Walk forward
walk.back = -2.25         ;Walk backward
run.fwd  = 6, 0           ;Run forward (x, y)  - if y<0, player will hop
run.back = -5, 0          ;Run backward (x, y) - if y=0, player will run
jump.neu = 0,-8.7         ;Neutral jumping velocity (x, y)
jump.back = -3,-8.6       ;Jump back Speed (x, y)
jump.fwd = 3,-8.6         ;Jump forward Speed (x, y)
runjump.back = -4.5,-7.25 ;Running jump speeds (opt)
runjump.fwd = 4.5,-7.25   ;.
airjump.neu = 0,-7.75     ;.
airjump.back = -4,-7.5    ;Air jump speeds (opt)
airjump.fwd = 4,-7.5      ;.

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

[Quotes]
victory1 = "You are undertrained me boy-o!"
victory2 = "Ai, aren't you a weak one!"
victory3 = "The wail of the Banshee is too much for ye!"
victory4 = "If you think that's bad, you should hear me sing!"
victory5 = "The house of Cassidy is none to be triffled with!"
victory6 = "Try a we bit harder next time!"
victory7 = "Is that all you've got!"
victory8 = "You are no match for the Banshee of Ireland!"
victory9 = "And you call yourself a fighter!"
victory10 = "All this will be the death of me!"


;[ja.Quotes]
;victory1 = ""


;---------------------------------------------------------------------------
; 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 )
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 170, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S175,0
volume = 0
channel = 5
freqmul = 1.0
loop = 0
pan = 0

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

;---------------------------------------------------------------------------
;Draw ( by Time over )
[Statedef 175]
type = S
ctrl = 0
anim = 175
velset = 0,0

[State 175, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S180,2
channel = 4
volume = 255

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

;-----------------------------------------------------------------------------
;Win Poses
[Statedef 180]
type = S

[State 180, Death Scream]
type = ChangeState
trigger1 = (palno = 7)
value = 184

[State 180, Set Random]
type = VarRandom
trigger1 = Time = 0
v = 1
range = 0,2

[State 180, 0]
type = ChangeState
trigger1 = Var(1) = 0
value = 181

[State 180, 1]
type = ChangeState
trigger1 = Var(1) = 1
value = 182

[State 180, 1]
type = ChangeState
trigger1 = Var(1) = 2
value = 183

;-----------------------------------------------------------------------------
; Win pose 1
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

[state 181, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

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

[state 181, No Life Bar]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 181, Round Not Over Yet]
type = AssertSpecial
trigger1 = time < 180
flag = RoundNotOver

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

;-----------------------------------------------------------------------------
; Win pose 2
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0

[state 182, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 182, VelSet]
type = VelSet
trigger1 = animelem = 3
x = 0
y = -7

[State 182, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S13,1
channel = 4
volume = 255

[state 182, No Life Bar]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 182, Round Not Over Yet]
type = AssertSpecial
trigger1 = time < 180
flag = RoundNotOver

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

;-----------------------------------------------------------------------------
; Win pose 3
[Statedef 183]
type = S
ctrl = 0
anim = 183
velset = 0,0

[state 183, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 183, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S180,2
channel = 4
volume = 255

[state 183, No Life Bar]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 183, Round Not Over Yet]
type = AssertSpecial
trigger1 = time < 180
flag = RoundNotOver

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


;---------------------------------------------------------------------------
; Win pose 4 (Death Only pallete)
[Statedef 184]
type = S
ctrl = 0
anim = 184
velset = 0,0

[state 184, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

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

[State 184, 1]
type = EnvShake
trigger1 = AnimElem = 1
time = 20
ampl = -2

[State 184, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = S13,0
volume = 0
channel = 4

[State 184, 4]
type = Explod
trigger1 = animelem = 1
removetime = -2
id = 6003
anim = 4446
persistent = 0
pos = 30,-60
postype = p1
sprpriority = 2
ownpal = 1
bindtime = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64

[State 184, 5]
type = Explod
trigger1 =  animelem = 1
removetime = -2
id = 6003
anim = 4447
persistent = 0
pos = 30,-60
postype = p1
sprpriority = 2
ownpal = 1
bindtime = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64

[State 184, 2]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NA
animtype  = Heavy
damage = 0
numhits = 0
guardflag = MA
pausetime = 0,0
sparkno = s7702
ground.type = Low
ground.slidetime = 0
ground.hittime  = 90
ground.velocity = 0
air.velocity = -2.2,-3.2

[State 184, Sonics]
type = Explod
trigger1 = Time = 0
anim = 1310
postype = p1
pos = 1,-84
Vel = 0,-2.9

[State 184, Stop]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[state 184, No Life Bar]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 184, Round Not Over Yet]
type = AssertSpecial
trigger1 = time < 250
flag = RoundNotOver

[State 184, ChangeAnim]
type = ChangeAnim
trigger1 = animtime = 0
value = 0

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Introduction Randomizer
;---------------------------------------------------------------------------
;-------------------------------------------------------------------------------
[Statedef 190]
type = S

[State 190, Death]
type = ChangeState
trigger1 = (palno = 7)
value = 194

[State 190, Set Random]
type = VarRandom
trigger1 = Time = 0
v = 1
range = 0,3

[State 190, 0]
type = ChangeState
trigger1 = Var(1) = 0
value = 191

[State 190, 1]
type = ChangeState
trigger1 = Var(1) = 1
value = 192

[State 190, 2]
type = ChangeState
trigger1 = Var(1) = 2
value = 193

[State 190, 3]
type = ChangeState
trigger1 = Var(1) = 3
value = 194

[State 190, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

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

[State 190, PlaySnd]
type = PlaySnd
trigger1 = animelem = 11
value = S190,1
channel = 4
volume = 255

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

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

;---------------------------------------------------------------------------
; Intro 2
[Statedef 192]
type = S
movetype = I
physics = N
velset = 0,0
ctrl = 0
anim = 192

[State 190, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S190,2
channel = 4
volume = 255

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

[state 190, No Life Bar]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

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

;---------------------------------------------------------------------------
; Intro 3
[Statedef 193]
type = S
ctrl = 0
anim = 193
velset = 0,0

[State 190, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S190,3
channel = 4
volume = 255

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

[state 190, No Life Bar]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

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

;---------------------------------------------------------------------------
; Intro 4
[Statedef 194]
type = S
ctrl = 0
anim = 194
velset = 0,0

[State 190, PlaySnd]
type = PlaySnd
triggerall = (palno = 7) = 0
trigger1 = animelem = 13
value = S190,4
channel = 4
volume = 255

[State 190, PlaySnd]
type = PlaySnd
trigger1 = animelem = 24
value = S8400,2
channel = 5
volume = 255

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

[state 190, No Life Bar]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

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

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

[State 195, PlaySnd]
type = PlaySnd
triggerall = (palno = 7) = 1
trigger1 = animelem = 1
value = S13,3
channel = 4
volume = 255

[State 195, VarRandom]
type = VarRandom
trigger1 = 1
v = 3
range = 0,2

[State 195, PlaySnd]
type = PlaySnd
triggerall = (palno = 7) = 0
trigger1 = Var(3) = 0
trigger1 =  animelem = 2
value = S195,0
channel = 5
volume = 255

[State 195, PlaySnd]
type = PlaySnd
triggerall = (palno = 7) = 0
trigger1 = Var(3) = 1
trigger1 =  animelem = 2
value = S195,1
channel = 5
volume = 255

[State 195, PlaySnd]
type = PlaySnd
triggerall = (palno = 7) = 0
trigger1 = Var(3) = 2
trigger1 =  animelem = 2
value = S195,2
channel = 5
volume = 255

[State 195, 1]
type = CtrlSet
trigger1 = Time = 40
value = 1

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

;JUMP UP
[Statedef 50]
type    = A
physics = A

[State 50, VelSet]
type = VelSet
trigger1 = Command = "holdfwd"
trigger1 = Command != "holdback"
x = 3

[State 50, VelSet]
type = VelSet
trigger1 = Command != "holdfwd"
trigger1 = Command = "holdback"
x = -3

[State 50, 2]
type = ChangeAnim
trigger1 = Time = 0
value = IfElse((Vel x)=0, 41, IfElse((Vel x)>0, 42, 43))

[State 50, 3]
type = ChangeAnim
trigger1 = Anim = [41,43]
trigger1 = AnimTime = 0
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 105]
type    = S
physics = S
anim = 105
ctrl = 1

[State 105, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 105, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 105, 1]
type = VelSet
trigger1 = Time <= 12
x = Const(velocity.run.back.x)
y = 0

[State 105, 1]
type = VelSet
trigger1 = BackEdgeBodyDist <= 10
trigger2 = AnimElem = 7
x = 0

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



; Standing Normal Attacks
; Recommended State Numbers = 200 - 399
;---PUNCHES-----------------------------------------------------------------
; STAND_X
[Statedef 200]
type    = S                  
movetype= A                  
physics = S                   
juggle  = 1                     
velset = 0,0                   
ctrl = 0                        
anim = 200                   
poweradd = 20

[State 200, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,0

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA                     
damage = 17
animtype = Light           
guardflag = MA            
hitflag = MAF                 
pausetime = 8,8
numhits = 1                   
sparkno = s7700
sparkxy = -10, -76
;guard.sparkno = 8430
hitsound   = 5,0
guardsound = 6,0          
ground.type = High        
ground.slidetime = 5      
ground.hittime  = 11       
ground.velocity = -4       
airguard.velocity = -1.9,-.8     
air.velocity = -1.3,-3               

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

;---------------------------------------------------------------------------
; STAND_Y
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 60
ctrl = 0
velset = 0,0
anim = 210

[State 210, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,1

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 27
guardflag = MA
pausetime = 10,10
sparkno = s7700
sparkxy = -10,-63
;guard.sparkno = 8430
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2.2,-3.2

[State 210, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------------------------------------------
;STAND Z
[Statedef 220]
type = S
movetype = A
physics = N
juggle = 4
poweradd = 60
ctrl = 0
anim = 220

[State 220, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,2

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

[State 220, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Hard
damage    = 50
guardflag = MA
pausetime = 11,11
sparkno = s7700
;guard.sparkno = 8430
sparkxy = -10,-60
hitsound   = 5,2
guardsound = 6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -10
air.type = Low
air.hittime = 18
air.velocity = -6,-7
yaccel = 0.09+(enemynear,const(movement.yaccel)/2)
air.fall = 1
fall = 1

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

;---KICKS-------------------------------------------------------------------
;STAND A
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 60
ctrl = 0
velset = 0,0
anim = 230

[State 230, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,0

[State 230, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Light
damage    = 25
guardflag = MA
pausetime = 8,8
sparkno = s7700
;guard.sparkno = 8430
sparkxy = -10,-53
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2.2,-3.2

[State 230, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------------------------------------------------=
;STAND B
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 60
ctrl = 0
velset = 0,0
anim = 240

[State 240, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,2

[State 240, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 40
guardflag = MA
pausetime = 10,10
sparkno = s7700
;guard.sparkno = 8430
sparkxy = -10,-77
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2.2,-3.2

[State 240, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;STAND C
[Statedef 250]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 60
ctrl = 0
velset = 0,0
anim = 250

[State 250, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,2

[State 250, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Hard
damage    = 60
guardflag = MA
pausetime = 11,11
sparkno = s7700
;guard.sparkno = 8430
sparkxy = -10,-100
hitsound   = 5,2
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 15
ground.velocity = -8,-2
guard.velocity = -1   
air.velocity = -3.1,-3.3
airguard.velocity = -3.2     
fall.recover = 0
air.recover = 0
fall=1

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

;---------------------------------------------------------------------------------------------
;Crouching light punch

[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 400
poweradd = 15
sprpriority = 2

[State 400, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,0

[State 400, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 400, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = s7700
sparkxy = -10, -45
;guard.sparkno = 8430
hitsound = 5,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Crouching medium punch

[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 410
poweradd = 35
sprpriority = 2

[State 410, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,1

[State 410, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 410, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C,NA
damage = 35,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = s7700
sparkxy = -10,-45
;guard.sparkno = 8430
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Crouching strong punch

[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 420
poweradd = 55
sprpriority = 1

[State 420, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,2

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

;Launch circle
[State 450, 4]
type = Explod
trigger1 = MoveHit
removetime = -2
id = 6003
anim = 4444
persistent = 0
pos = 30,-60
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 1
;supermove = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64

[State 420, 5]
type = Explod
trigger1 = MoveHit
removetime = -2
id = 6003
anim = 4445
persistent = 0
pos = 30,-60
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 1
;supermove = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64

[State 620, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 54,4
volume = 255

[State 420, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 410, 2]
type = HitDef
triggerall = movecontact = 0
trigger1 = AnimElem = 2
attr = C, NA
damage    = 28 * var(22),15
animtype  = UP
hitflag = MAF
guardflag = M
pausetime = 4, 4
sparkno = s7700
;guard.sparkno = 8430
sparkxy = -10,-70
hitsound   = 5,2
guardsound = 6,0
ground.slidetime = 2
ground.hittime  = 5
ground.velocity = 0,-13.2
air.velocity = -3,-4
getpower = 15,5
givepower = 10, 5
fall.recover=0
fall = 1

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

;---------------------------------------------------------------------------------------------
;Crouching light kick

[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 430
poweradd = 15
sprpriority = 2

[State 430, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,0

[State 430, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 450, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 54,4
volume = 255

[State 430, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage = 15,1
animtype = Light
hitflag = MA
guardflag = L
priority = 4, Hit
pausetime = 8,8
sparkno = s7700
sparkxy = -10, 0
;guard.sparkno = 8430
hitsound = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Crouching medium kick

[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 440
poweradd = 35
sprpriority = 2

[State 440, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 440, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = S8400,1

[State 440, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 54,4
volume = 255

[State 440, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C,NA
damage = 35,1
animtype = Medium
hitflag = MA
guardflag = L
priority = 4, Hit
pausetime = 10,10
sparkno = s7700
sparkxy = -10,-85
;guard.sparkno = 8430
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Crouching strong kick

[Statedef 450]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 450
poweradd = 55
sprpriority = 2

[State 450, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,2

[State 450, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 450, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage = 45,1
animtype = High
hitflag = MA
guardflag = L
priority = 4, Hit
pausetime = 12,12
sparkno = s7700
sparkxy = -10, 0
;guard.sparkno = 8430
hitsound = 5,4
guardsound = 6,0
ground.type = trip
ground.slidetime = 13
ground.hittime = 13
ground.velocity = -5,-2
air.type = Low
air.hittime = 5
air.velocity = -7,3

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

;JUMP_X
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 600

[State 600, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,0

[State 600, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 12
getpower  = 10
givepower = 10
guardflag = HA
priority = 3
pausetime = 8,8
sparkno = s7700
;guard.sparkno = 8430
sparkxy = -10,-58
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = 0,((vel y)-.2)

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

;---------------------------------------------------------------------------
;JUMP_Y
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 55
ctrl = 0
anim = 610

[State 610, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,0

[State 610, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 55
getpower  = 50
givepower = 25
guardflag = HA
priority = 3
pausetime = 10,10
sparkno = s7700
;guard.sparkno = 8430
sparkxy = -10,-51
hitsound   = 5,2
guardsound = 6,0
ground.type = High
ground.slidetime = 9
ground.hittime  = 9
ground.velocity = -4
air.velocity = 0,((vel y)-.2)

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

;JUMP Z
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 620

[State 620, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,0

[State 620, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 40
getpower  = 10
givepower = 10
guardflag = HA
priority = 3
pausetime = 12,12
sparkno = s7700
;guard.sparkno = 8430
sparkxy = -10,-58
hitsound   = 5,0
guardsound = 6,0
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,10
fall = 1


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

;===KICKS========================
;JUMP A
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 630

[State 630, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,0

[State 630, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 12
getpower  = 10
givepower = 10
guardflag = HA
priority = 3
pausetime = 8,8
sparkno = s7700
;guard.sparkno = 8430
sparkxy = -7,-50
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = 0,((vel y)-.2)

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

;JUMP B
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 640

[State 640, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,2

[State 640, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 12
getpower  = 10
givepower = 10
guardflag = HA
priority = 3
pausetime = 10,10
sparkno = s7700
;guard.sparkno = 8430
sparkxy = -7,-35
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = 0,((vel y)-.2)

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

;JUMP C
[Statedef 650]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 650

[State 650, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,2

[State 650, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 35
getpower  = 10
givepower = 10
guardflag = HA
priority = 3
pausetime = 12,12
sparkno = s7700
;guard.sparkno = 8430
sparkxy = -7,-35
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,10
fall = 1

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

; Throws and Other Basic Attacks
; Recommended State Numbers = 800 - 999
;---------------------------------------------------------------------------

;---SONIC TOSS----------------------------
;attempt
[Statedef 800]
type = S
movetype = A
physics = S
velset = 0,0
poweradd = 60
anim = 800
ctrl = 0

[State 800, 1]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NT
priority = 2, miss
sparkno = -1
p1stateno = 820
p2stateno = 830

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

;success!!
[Statedef 820]
type = S
movetype = A
physics = S
anim = 800

[State 820, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S13,1
volume = 255

[State 820, 1]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 80

[State 820, 2]
type = PlayerPush
trigger1 = Time > 0
value = 0

[State 820, 3]
type = Explod
trigger1 = AnimElem = 3
anim = 810
sprpriority = 1
postype = p1
pos = 14,-83
bindtime = 120

[State 820, Shake]
type = EnvShake
trigger1 = AnimElem = 3
ampl = 4
freq = 90
time = 24

[State 820, 4]
type = TargetBind
trigger1 = AnimElem = 2
pos = 20,-10

[State 820, 5]
type = TargetState
trigger1 = AnimElem = 4
value = 840

[State 820, Flash]
type = BGPalFX
trigger1 = AnimElem = 4
add = 255,255,255
time = 1

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

;opponent bein' tossed
[Statedef 830]
type = S
movetype = H
physics = S
velset = 0,0
ctrl = 0

[State 830, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 850

[State 830, 2]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 36

[State 830, 3]
type = SprPriority
trigger1 = Time = 0
value = -2

;in the air (whee!)
[Statedef 840]
type = A
movetype = H
physics = N

[State 840, 1]
type = VelSet
trigger1 = Time = 0
x = -9.8
y = -4.0

[State 840, 1]
type = VelAdd
trigger1 = Time > 0
y = .2

[State 840, 1]
type = PosAdd
trigger1 = Time = 3
x = 10
y = 6

[State 840, 2]
type = LifeAdd
trigger1 = Time = 0
value = -120

[State 840, 3]
type = SelfState
trigger1 = Pos Y > 0
trigger1 = Vel Y > 0
value = 5100


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------

; Special Attacks
; Recommended State Numbers = 1000 - 2999
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;===Sonic Scream==================
[Statedef 1000]
type = S
movetype = A
physics = S
juggle = 4
ctrl = 0
anim = 1000

[State 1000, Shake]
type = EnvShake
trigger1 = Time = 0
time = 51
ampl = -3
freq = 90

[State 1000, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = S14,0
volume = 255
channel = 5

[State 1000, 1]
type = Projectile
trigger1 = AnimElem = 2
projanim = 1003
projhitanim = 1004
projhits = 5
offset = -3, -77
velocity = 4,-0.15
attr = S, SP
damage = 12,4
getpower = 10
givepower = 40
guardflag = MA
pausetime = 0,12
sparkno = S8880
sparkxy = 82,0
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8
airguard.velocity = -3.5,-2.75
air.velocity = -2.5,-5.5
air.juggle = 3
air.fall = 1

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

;CROUCHING
[Statedef 1001]
type = C
movetype = A
physics = C
juggle = 4
ctrl = 0
anim = 1001

[State 1001, Shake]
type = EnvShake
trigger1 = Time = 0
time = 51
ampl = -3
freq = 90

[State 1001, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = S14,1
volume = 255
channel = 5

[State 1001, 1]
type = Projectile
trigger1 = AnimElem = 1
projanim = 1003
projhitanim = 1004
projhits = 10
offset = 12, -55
velocity = 2.2,0.15
attr = C, SP
damage = 12,4
getpower = 5
givepower = 40
guardflag = MA
pausetime = 0,12
sparkno = s7702
sparkxy = 82, 0
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8
airguard.velocity = -3.5,-2.75
air.velocity = -2.5,-5.5
air.juggle = 3
air.fall = 1

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

;===Sonic Scream Upwards==================
[Statedef 1002]
type = S
movetype = A
physics = S
juggle = 4
ctrl = 0
anim = 1002

[State 1002, Shake]
type = EnvShake
trigger1 = Time = 0
time = 51
ampl = -3
freq = 90

[State 1002, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = S14,3
volume = 255
channel = 5

[State 1002, 1]
type = Projectile
trigger1 = AnimElem = 2
projanim = 1007
projhitanim = 1008
projhits = 5
offset = -19, -62
velocity = 3,-2.75
attr = S, SP
damage = 12,4
getpower = 10
givepower = 40
guardflag = MA
pausetime = 0,12
sparkno = S8880
sparkxy = 82,0
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8
airguard.velocity = -3.5,-2.75
air.velocity = -2.5,-5.5
air.juggle = 3
air.fall = 1

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

;AERIAL
[Statedef 1012]
type = A
movetype = A
physics = N
juggle = 4
ctrl = 0
velset = 0,0
anim = 1012

[State 1012, Shake]
type = EnvShake
trigger1 = Time = 0
time = 51
ampl = -3
freq = 90

[State 1012, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = S14,3
volume = 255
channel = 5

[State 1012, 1]
type = Projectile
trigger1 = AnimElem = 1
projanim = 1005
projhitanim = 1006
projhits = 5
offset = 23, -80
velocity = 2.2,2
attr = A, SP
damage = 12,4
getpower = 10
givepower = 40
guardflag = MA
pausetime = 0,12
sparkno = S8880
sparkxy = 82, 0
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8
airguard.velocity = -3.5,-2.75
air.velocity = -2.5,-5.5
air.juggle = 3
air.fall = 1

[State 1012, VelSet]
type = VelSet
trigger1 = Vel Y > 0
trigger1 = Pos Y > 0
y = 0

[State 1012, PosSet]
type = PosSet
trigger1 = Vel Y > 0
trigger1 = Pos Y > 0
y = 0

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

;AERIAL
[Statedef 1013]
type = A
movetype = A
physics = N
juggle = 4
ctrl = 0
velset = 0,0
anim = 1013

[State 1013, Shake]
type = EnvShake
trigger1 = Time = 0
time = 51
ampl = -3
freq = 90

[State 1013, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = S14,3
volume = 255
channel = 5

[State 1013, 1]
type = Projectile
trigger1 = AnimElem = 1
projanim = 1003
projhitanim = 1004
projhits = 5
offset = 13, -90
velocity = 2.2,0
attr = A, SP
damage = 12,4
getpower = 10
givepower = 40
guardflag = MA
pausetime = 0,12
sparkno = S8880
sparkxy = 82, 0
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8
airguard.velocity = -3.5,-2.75
air.velocity = -2.5,-5.5
air.juggle = 3
air.fall = 1

[State 1013, VelSet]
type = VelSet
trigger1 = Vel Y > 0
trigger1 = Pos Y > 0
y = 0

[State 1013, PosSet]
type = PosSet
trigger1 = Vel Y > 0
trigger1 = Pos Y > 0
y = 0

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

;AERIAL
[Statedef 1014]
type = A
movetype = A
physics = N
juggle = 4
ctrl = 0
velset = 0,0
anim = 1014

[State 1014, Shake]
type = EnvShake
trigger1 = Time = 0
time = 51
ampl = -3
freq = 90

[State 1014, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = S14,3
volume = 255
channel = 5

[State 1014, 1]
type = Projectile
trigger1 = AnimElem = 1
projanim = 1007
projhitanim = 1008
projhits = 5
offset = 23, -100
velocity = 2.2,-2
attr = A, SP
damage = 12,4
getpower = 10
givepower = 40
guardflag = MA
pausetime = 0,12
sparkno = S8880
sparkxy = 82, 0
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8
airguard.velocity = -3.5,-2.75
air.velocity = -2.5,-5.5
air.juggle = 3
air.fall = 1

[State 1014, VelSet]
type = VelSet
trigger1 = Vel Y > 0
trigger1 = Pos Y > 0
y = 0

[State 1014, PosSet]
type = PosSet
trigger1 = Vel Y > 0
trigger1 = Pos Y > 0
y = 0

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


;===Everything FLIGHT=====
[Statedef 1100]
type = A
movetype = I
physics = N
velset = 0, -7
ctrl = 0
anim = 1101

[State 1100, 1]
type = VelSet
trigger1 = AnimElem = 1
y = -5

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

[Statedef 1110]
type = A
movetype = I
physics = N
velset = 0,0
ctrl = 0
anim = 1110

[State -2, Dash Var]
type = VarSet
trigger1 = var(55) !=0
v = 55
value = 0

[State 1110, Flight Var]
type = VarSet
trigger1 = 1
v = 54
value = 1

[State 1110, 1]
type = VelSet
trigger1 = Command != "holddown"
trigger2 = Command != "holdup"
trigger3 = Command != "holdback"
trigger4 = Command != "holdfwd"
trigger5 = Pos Y < -200
trigger6 = Pos Y > -20
x = 0
y = 0

[State 1110, Stop]
type = ChangeAnim
triggerall = Anim != 1110
trigger1 = Command != "holddown"
trigger1 = Command != "holdup"
trigger1 = Command != "holdback"
trigger1 = Command != "holdfwd"
value = 1110

[State 1110, Upward]
type = ChangeAnim
trigger1 = Command = "holdup"
trigger1 = Anim != 1100
value = 1100

[State 1110, Downward]
type = ChangeAnim
trigger1 = Command = "holddown"
trigger1 = Anim != 46
value = 46

[State 1110, Fwd]
type = ChangeAnim
triggerall = Command != "holdup"
triggerall = Command != "holdback"
trigger1 = Command = "holdfwd"
trigger1 = Anim != 1120
value = 1120

[State 1110, Backward]
type = ChangeAnim
triggerall = Command != "holdup"
triggerall = Command != "holddown"
trigger1 = Command = "holdback"
trigger1 = Anim != 1130
value = 1130

[State 1110, Turn]
type = Turn
trigger1 = P2BodyDist X < -40

[State 1110, 2]
type = ChangeState
trigger1 = Time = 110
value = 50
ctrl = 1

[State 1110, UpVel]
type = VelSet
trigger1 = Command = "holdup"
y = -3

[State 1110, DownVel]
type = VelSet
trigger1 = Command = "holddown"
y = 3

[State 1110, FwdVel]
type = VelSet
trigger1 = Command = "holdfwd"
x = 3

[State 1110, BackVel]
type = VelSet
trigger1 = Command = "holdback"
x = -3

[State 1110, Border1]
type = PosSet
trigger1 = Pos Y < -260
y = -260

[State 1110, Border2]
type = PosSet
trigger1 = Pos Y > -20
y = -20

[State 1110, Drop]
type = ChangeState
trigger1 = Command = "Flight"
trigger1 = Command = "FlightEnd"
trigger2 = Win = 1
trigger3 = Lose = 1
value = 50
ctrl = 1

;---Chage states for FLIGHT ATTACKS-------
;---HYPERS----------------------------
[State 1110, SuperSonic]
type = ChangeState
triggerall = power >= 1000
trigger1 = Command = "SuperSonicScream"
value = 3002
ctrl = 1

;---SPECIALS------------------------------

[State 1110, Sonic Scream]
type = ChangeState
trigger1 = Command = "SonicScream_x"
trigger2 = Command = "SonicScream_y"
trigger3 = Command = "SonicScream_z"
value = 11000
ctrl = 1

;---NORMALS-------------------------------
[State 1110, X]
type = ChangeState
triggerall = Command = "x"
trigger1 = stateno = 1110
value = 10000
ctrl = 1

[State 1110, Y]
type = ChangeState
triggerall = Command = "y"
trigger1 = stateno = 1110
value = 10010
ctrl = 1

[State 1110, Z]
type = ChangeState
triggerall = Command = "z"
trigger1 = stateno = 1110
value = 10020
ctrl = 1

[State 1110, A]
type = ChangeState
triggerall = Command = "a"
trigger1 = stateno = 1110
value = 10030
ctrl = 1

[State 1110, B]
type = ChangeState
triggerall = Command = "b"
trigger1 = stateno = 1110
value = 10040
ctrl = 1

[State 1110, C]
type = ChangeState
triggerall = Command = "c"
trigger1 = stateno = 1110
value = 10050
ctrl = 1

;~O~O~O~O~O~O~O~O~O~O~O~O~O~O~O~O~O~O~O~
;-------------------------------------
;=== BEGIN FLIGHT ATTACK CODE=======================
;-------------------------------------
;FLY X
[Statedef 10000]
type    = A
movetype= A
physics = N
juggle  = 2
poweradd= 11
ctrl = 0
anim = 600

[State 10000, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,0

[State 10000, 2]
type = HitDef
trigger1 = AnimElem = 2
persistent = 0
attr = A, NA
damage    = 12
getpower  = 10
givepower = 10
guardflag = HA
pausetime = 8,8
sparkno = s7700
;guard.sparkno = 8430
sparkxy = -10,-68
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,-3

[State 10000, STOP]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 1110, Y]
type = ChangeState
trigger1 = Command = "y" && movecontact
value = 10010
ctrl = 1

[State 1110, Z]
type = ChangeState
trigger1 = Command = "z" && movecontact
value = 10020
ctrl = 1

[State 1110, A]
type = ChangeState
trigger1 = Command = "a" && movecontact
value = 10030
ctrl = 1

[State 1110, B]
type = ChangeState
trigger1 = Command = "b" && movecontact
value = 10040
ctrl = 1

[State 1110, C]
type = ChangeState
trigger1 = Command = "c" && movecontact
value = 10050
ctrl = 1

[State 1110, SuperSonic]
type = ChangeState
triggerall = power >= 1000
trigger1 = Command = "SuperSonicScream" && movecontact
value = 3002
ctrl = 1

[State 1110, Sonic Scream]
type = ChangeState
trigger1 = Command = "SonicScream_x" && movecontact
trigger2 = Command = "SonicScream_y" && movecontact
trigger3 = Command = "SonicScream_z" && movecontact
value = 11000
ctrl = 1

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

;FLY Y
[Statedef 10010]
type    = A
movetype= A
physics = N
juggle  = 3
poweradd= 55
ctrl = 0
anim = 610

[State 10010, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,1

[State 10000, STOP]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 10010, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 30
getpower  = 50
givepower = 25
guardflag = HA
pausetime = 10,10
sparkno = s7700
;guard.sparkno = 8430
sparkxy = -10,-101
hitsound   = 5,2
guardsound = 6,0
ground.type = High
ground.slidetime = 9
ground.hittime  = 9
ground.velocity = -4
air.velocity = -1.3,-3


[State 1110, Z]
type = ChangeState
trigger1 = Command = "z" && movecontact
value = 10020
ctrl = 1

[State 1110, B]
type = ChangeState
trigger1 = Command = "b" && movecontact
value = 10040
ctrl = 1

[State 1110, C]
type = ChangeState
trigger1 = Command = "c" && movecontact
value = 10050
ctrl = 1

[State 1110, SuperSonic]
type = ChangeState
triggerall = power >= 1000
trigger1 = Command = "SuperSonicScream" && movecontact
value = 3002
ctrl = 1

[State 1110, Sonic Scream]
type = ChangeState
trigger1 = Command = "SonicScream_x" && movecontact
trigger2 = Command = "SonicScream_y" && movecontact
trigger3 = Command = "SonicScream_z" && movecontact
value = 11000
ctrl = 1

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

;FLY Z
[Statedef 10020]
type    = A
movetype= A
physics = N
juggle  = 2
poweradd= 11
ctrl = 0
anim = 620

[State 10020, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,2

[State 10000, STOP]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 10020, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 50
getpower  = 10
givepower = 10
guardflag = HA
pausetime = 12,12
sparkno = s7700
;guard.sparkno = 8430
sparkxy = -10,-58
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,10
fall = 1

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

;FLY A
[Statedef 10030]
type    = A
movetype= A
physics = N
juggle  = 2
poweradd= 11
ctrl = 0
anim = 630

[State 10030, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,0

[State 10000, STOP]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 10030, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 16
getpower  = 10
givepower = 10
guardflag = HA
pausetime = 8,8
sparkno = s7700
;guard.sparkno = 8430
sparkxy = -10,-58
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,-3

[State 1110, Y]
type = ChangeState
trigger1 = Command = "y" && movecontact
value = 10010
ctrl = 1

[State 1110, Z]
type = ChangeState
trigger1 = Command = "z" && movecontact
value = 10020
ctrl = 1

[State 1110, B]
type = ChangeState
trigger1 = Command = "b" && movecontact
value = 10040
ctrl = 1

[State 1110, C]
type = ChangeState
trigger1 = Command = "c" && movecontact
value = 10050
ctrl = 1

[State 1110, SuperSonic]
type = ChangeState
triggerall = power >= 1000
trigger1 = Command = "SuperSonicScream" && movecontact
value = 3002
ctrl = 1

[State 1110, Sonic Scream]
type = ChangeState
trigger1 = Command = "SonicScream_x" && movecontact
trigger2 = Command = "SonicScream_y" && movecontact
trigger3 = Command = "SonicScream_z" && movecontact
value = 11000
ctrl = 1

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

;FLY B
[Statedef 10040]
type    = A
movetype= A
physics = N
juggle  = 2
poweradd= 11
ctrl = 0
anim = 640

[State 10040, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,1

[State 10000, STOP]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 10040, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 34
getpower  = 10
givepower = 10
guardflag = HA
pausetime = 10,10
sparkno = s7700
;guard.sparkno = 8430
sparkxy = -10,-58
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,-3

[State 1110, Z]
type = ChangeState
trigger1 = Command = "z" && movecontact
value = 10020
ctrl = 1

[State 1110, C]
type = ChangeState
trigger1 = Command = "c" && movecontact
value = 10050
ctrl = 1

[State 1110, SuperSonic]
type = ChangeState
triggerall = power >= 1000
trigger1 = Command = "SuperSonicScream" && movecontact
value = 3002
ctrl = 1

[State 1110, Sonic Scream]
type = ChangeState
trigger1 = Command = "SonicScream_x" && movecontact
trigger2 = Command = "SonicScream_y" && movecontact
trigger3 = Command = "SonicScream_z" && movecontact
value = 11000
ctrl = 1

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

;FLY C
[Statedef 10050]
type    = A
movetype= A
physics = N
juggle  = 2
poweradd= 11
ctrl = 0
anim = 650

[State 10050, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8400,2

[State 10000, STOP]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 10050, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 45
getpower  = 10
givepower = 10
guardflag = HA
pausetime = 12,12
sparkno = s7700
;guard.sparkno = 8430
sparkxy = -10,-58
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,10
fall = 1

[State 1110, SuperSonic]
type = ChangeState
triggerall = power >= 1000
trigger1 = Command = "SuperSonicScream" && movecontact
value = 3002
ctrl = 1

[State 1110, Sonic Scream]
type = ChangeState
trigger1 = Command = "SonicScream_x" && movecontact
trigger2 = Command = "SonicScream_y" && movecontact
trigger3 = Command = "SonicScream_z" && movecontact
value = 11000
ctrl = 1

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

;---FLY SPECIALS--------------------------
;---Sonic Scream--------------------------
[Statedef 11000]
type = A
movetype = A
physics = N
juggle = 4
ctrl = 0
anim = 1013

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

[State 11000, Shake]
type = EnvShake
trigger1 = Time = 0
time = 32
ampl = -2

[State 11000, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = S14,3
volume = 255
channel = 5

[State 11000, 1]
type = Projectile
trigger1 = AnimElem = 1
projanim = 1003
projhitanim = 1004
projhits = 5
offset = 13, -90
velocity = 2.2,0
attr = A, SP
damage = 12,4
getpower = 10
givepower = 40
guardflag = MA
pausetime = 0,12
sparkno = s7702
;guard.sparkno = 8430
sparkxy = 60, 0
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8
airguard.velocity = -3.5,-2.75
air.velocity = -2.5,-5.5
air.juggle = 3
air.fall = 1

[State 1110, SuperSonic]
type = ChangeState
triggerall = power >= 1000
trigger1 = Command = "SuperSonicScream" && movecontact
value = 3002
ctrl = 1

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

;---HYPERS--------------------------------
;---Super Sonic Scream
[Statedef 3002]
type    = A
movetype= A
physics = N
juggle  = 4
anim = 3001
ctrl = 0

;------------------------------Start of Hyper Effects

[State 3600, assertspecial]
type = assertspecial
triggerall = !Var(29)
trigger1 = time = 5
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3600, SuperPause]
type = SuperPause
triggerall = !Var(29)
trigger1 = time = 5
Time = 60
;anim =-1;s3012
pos = 25,-65
sound = S8889,0
poweradd = -1000
movetime = 60


[State -2, Helper]
type = Helper
triggerall = !Var(29)
triggerall = !numhelper(40001)
trigger1 = time = 5
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !Var(29)
triggerall = !numhelper(40003)
trigger1 = time = 5
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !Var(29)
triggerall = !numhelper(40004)
trigger1 = time = 5
helpertype = normal
name = "Player 1"
ID = 40004
stateno = 40004
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

;------------End of Hyper Effects
[State 3001, Shake]
type = EnvShake
trigger1 = time = 30; AnimElem = 2
time = 65
ampl = 4
freq = 90

[State 3001, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = S13,0
volume = 255
channel = 5

[State 3001, Super D]
type = AfterImage
trigger1 = Time = 2
time = 2

[State 3001, Super E]
type = AfterImageTime
trigger1 = Time = [2,68]
time = 2

[State 3001, Super F] ;Invunerable to normal and special attacks for a bit
type = NotHitBy
trigger1 = Time = 2
value = , NA, SA, AT
time = 12

[State 3001, 1]
type = Projectile
trigger1 = AnimElem = 2
projanim = 3002
projhitanim = 3003
projhits = 10
projscale = 1.75, 1.25
offset = 21, -80
velocity = 3.8,0
attr = A, HA
animtype  = Heavy
damage = 24,4
guardflag = MA
pausetime = 0,15
sparkno = S9990
;guard.sparkno = 8430
sparkxy = 100,0
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 22
ground.hittime  = 22
ground.velocity = -6
air.velocity = -3,-3
air.recover = 0
fall.animtype = Hard
air.fall = 1
fall = 1

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

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

;=========================================
;---END FLIGHT CODE-----------------------
;=========================================
;~O~O~O~O~O~O~O~O~O~O~O~O~O~O~O~O~O~O~O~O~O~


;---SONIC RUSH---------------------------------
[Statedef 1200]
type = A
movetype = A
physics = N
velset = 0,0
anim = 1200
ctrl = 0

[State 1200, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 3
value = S14,3
volume = 255
channel = 5

[State 1500, 1]
type = VelSet
trigger1 = Time = 0
y = -5

[State 1200, 2]
type = VelSet
trigger1 = Pos Y = -85
y = 0

[State 1200, 4]
type = AfterImage
trigger1 = AnimElem = 2
time = 60

[State 1200, 5]
type = VelSet
trigger1 = AnimElem = 3
x = 5
y = 5

[State 1200, 1]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
trigger3 = AnimElem = 5
attr = A, HA
animtype  = Heavy
damage = 17,2
guardflag = MA
hitflag = MAFL
pausetime = 2,15
sparkno = s7703
sparkxy = 0,0
hitsound = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 22
ground.hittime  = 22
ground.velocity = 14.2,-10
air.velocity = 12.4,-10
fall.animtype = Hard
fall = 1
getpower = 0

[State 1200, Sonics]
type = Explod
trigger1 = AnimElem = 3
postype = p1
pos = 59,-42
sprpriority = 2
anim = 1205
bindtime = -1
removetime = 25

[State 1200, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 1201
ctrl = 0

;---SONIC RUSH---------------------------------
[Statedef 1210]
type = A
movetype = A
physics = N
velset = 0,0
anim = 1200
ctrl = 0

[State 1210, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 3
value = S14,3
volume = 255
channel = 5

[State 1210, 1]
type = VelSet
trigger1 = Time = 0
y = -5

[State 1210, 2]
type = VelSet
trigger1 = Pos Y = -65
y = 0

[State 1510, 4]
type = AfterImage
trigger1 = AnimElem = 2
time = 60

[State 1210, 5]
type = VelSet
trigger1 = AnimElem = 3
x = 9
y = 3

[State 1210, 1]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
trigger3 = AnimElem = 5
attr = A, HA
animtype  = Heavy
damage = 17,2
guardflag = MA
hitflag = MAFL
pausetime = 2,15
sparkno = s7703
sparkxy = 0,0
hitsound = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 22
ground.hittime  = 22
ground.velocity = 14.2,-10
air.velocity = 12.4,-10
fall.animtype = Hard
fall = 1
getpower = 0

[State 1210, Sonics]
type = Explod
trigger1 = AnimElem = 3
postype = p1
pos = 59,-42
sprpriority = 2
anim = 1205
bindtime = -1
removetime = 25

[State 1210, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 1201
ctrl = 0

;---SONIC RUSH---------------------------------
[Statedef 1220]
type = A
movetype = A
physics = N
velset = 0,0
anim = 1200
ctrl = 0

[State 1220, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 3
value = S14,3
volume = 255
channel = 5

[State 1220, 1]
type = VelSet
trigger1 = Time = 0
y = -5

[State 1220, 2]
type = VelSet
trigger1 = Pos Y = -45
y = 0

[State 1220, 4]
type = AfterImage
trigger1 = AnimElem = 2
time = 60

[State 1220, 5]
type = VelSet
trigger1 = AnimElem = 3
x = 15
y = 2

[State 1520, 1]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
trigger3 = AnimElem = 5
attr = A, HA
animtype  = Heavy
damage = 17,2
guardflag = MA
hitflag = MAFL
pausetime = 2,15
sparkno = s7703
;guard.sparkno = 8430
sparkxy = 0,0
hitsound = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 22
ground.hittime  = 22
ground.velocity = 14.2,-10
air.velocity = 12.4,-10
fall.animtype = Hard
fall = 1
getpower = 0

[State 1220, Sonics]
type = Explod
trigger1 = AnimElem = 3
postype = p1
pos = 59,-42
sprpriority = 2
anim = 1205
bindtime = -1
removetime = 25

[State 1220, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 1201
ctrl = 0

;Sonic Rush Landing
[Statedef 1201]
type = S
physics = S
anim = 3101

[State 1201, 1]
type = PosSet
trigger1 = 1
y = 0

[State 1201, 2]
type = NotHitBy
trigger1 = Time = 0
value = SCA

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


;===SONIC DISRUPTION======================
;---20 Ticks-------
[Statedef 1300]
type = S 
movetype = A
physics = S
poweradd = -5
ctrl = 0
anim = 1300

[State 1300, 1]
type = EnvShake
trigger1 = AnimElem = 1
time = 20
ampl = -2

[State 3001, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = S13,1
volume = 255
channel = 5

[State 450, 4]
type = Explod
trigger1 = animelem = 1
removetime = -2
id = 6003
anim = 4446
persistent = 0
pos = 0,-70
postype = p1
sprpriority = 2
ownpal = 1
bindtime = 22
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 1.0, 0.64

[State 420, 5]
type = Explod
trigger1 =  animelem = 1
removetime = -2
id = 6003
anim = 4447
persistent = 0
pos = 0,-70
postype = p1
sprpriority = 2
ownpal = 1
bindtime = 22
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 1.0, 0.64

[State 1300, 2]
type = HitDef
trigger1 = AnimElem = 1
attr = S, SA
animtype  = Heavy
damage = 10,2
numhits = 1
givepower = 30,10
guardflag = MA
pausetime = 0,0
sparkno = s7702
palfx.time = 20
palfx.add = 52,162,148
sparkxy = -10, -58
ground.type = Low
ground.slidetime = 0
ground.hittime  = 50
ground.velocity = -4.2,-1.2
air.velocity = -4.2,-1.2

[State 1300, Sonics]
type = Explod
trigger1 = Time = 0
anim = 1310
postype = p1
pos = 1,-84
Vel = 0,-2.9

[State 1300, Stop]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

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

;---40 Ticks----------
[Statedef 1301]
type = S 
movetype = A
physics = S
poweradd = -5
ctrl = 0
anim = 1301

[State 3001, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = S13,2
volume = 255
channel = 5

[State 450, 4]
type = Explod
trigger1 = animelem = 1
removetime = -2
id = 6003
anim = 4446
persistent = 0
pos = 0,-70
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 22
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 0.70, 0.64

[State 420, 5]
type = Explod
trigger1 =  animelem = 1
removetime = -2
id = 6003
anim = 4447
persistent = 0
pos = 0,-70
postype = p1
sprpriority = 2
ownpal = 1
bindtime = 22
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = .70, 0.64

[State 1301, 1]
type = EnvShake
trigger1 = AnimElem = 1
time = 20
ampl = -4

[State 1301, 2]
type = HitDef
trigger1 = AnimElem = 1
attr = S, SA
animtype  = Heavy
damage = 20,5
numhits = 3
guardflag = MA
givepower = 30,10
pausetime = 0,0
sparkno = s7702
palfx.time = 40
palfx.add = 52,162,148
sparkxy = -10, -58
ground.type = Low
ground.slidetime = 0
ground.hittime  = 50
ground.velocity = -8.2,-3.2
air.velocity = -8.2,-3.2
p2stateno = 5070

[State 1301, Sonics]
type = Explod
trigger1 = Time = 0
anim = 1310
postype = p1
pos = 1,-84
Vel = 0,-2.9

[State 1301, Stop]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

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

;---60 Ticks--------
[Statedef 1302]
type = S 
movetype = A
physics = S
poweradd = -5
ctrl = 0
anim = 1302

[State 1302, 1]
type = EnvShake
trigger1 = AnimElem = 1
time = 20
ampl = -6

[State 3001, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = S13,3
volume = 255
channel = 5

[State 450, 4]
type = Explod
trigger1 = animelem = 1
removetime = -2
id = 6003
anim = 4446
persistent = 0
pos = 0,-70
postype = p1
sprpriority = 2
ownpal = 1
bindtime = 22
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 0.40, 0.64

[State 420, 5]
type = Explod
trigger1 =  animelem = 1
removetime = -2
id = 6003
anim = 4447
persistent = 0
pos = 0,-70
postype = p1
sprpriority = 2
ownpal = 1
bindtime = 22
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 0.40, 0.64

[State 1302, 2]
type = HitDef
trigger1 = AnimElem = 1
attr = S, SA
animtype  = Heavy
damage = 0
numhits = 0
guardflag = MA
givepower = 30,10
pausetime = 0,0
sparkno = s7702
sparkxy = -10, -58
ground.type = Low
ground.slidetime = 0
ground.hittime  = 0
ground.velocity = 0
air.velocity = -2.2,-3.2
p2stateno = ifelse(p2statetype = A, 1306,1305)

[State 1302, Sonics]
type = Explod
trigger1 = Time = 0
anim = 1310
postype = p1
pos = 1,-84
Vel = 0,-2.9

[State 1302, Stop]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

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

;----------------------------------------------------------------
;Sonic Disrupt P2
[Statedef 1305]
type = A
physics = N
movetype = H
velset = 0,0
ctrl = 0
anim = 5000
juggle = 0

[State 1305, Shock Animation]
type = ChangeAnim
trigger1 = AnimExist(5300)
trigger1 = Anim != 5300
value = 5300

[State 1305, Shock Animation]
type = ChangeAnim2
trigger1 = !AnimExist(5300)
trigger1 = Anim != 5300
value = 5300

[State 1305, PalFX]
type = PalFX
trigger1 = time = 0
time = 20
add = 52,162,148
mul = 256,256,256
sinadd = 0,50,0,10
invertall = 0
color = 106

[State 1305, Change]
type = Selfstate
trigger1 = time = 50
value = 5070

;----------------------------------------------------------------
;Sonic Disrupt P2 - Air
[Statedef 1306]
type = A
physics = N
movetype = H
velset = 0,0
ctrl = 0
anim = 5000
juggle = 0

[State 7600, Change]
type = Selfstate
trigger1 = time = 0
value = 5030

;----------------------------------------------------------
; Air Dash Forward
[Statedef 1340]
type    = A
physics = N
movetype = H
anim = 1340
sprpriority = 0
velset = 0,0
ctrl = 1

[State 1340, VarAdd]
type = VarAdd
trigger1 = time = 0
v = 55
value = 1

[State 1340, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
damage = 50,10
pausetime = 9,9
sparkno = 2
sparkxy = 0,-50
hitsound = 5,0
guardsound = 6,0
ground.type = High
air.hittime = 20
ground.velocity = -2,-2
air.velocity = -2,-2
sprpriority = 1
fall.recover = 0

[State 1340]
type = PlaySnd
trigger1 = Time = 1
value = 100,6

[State 1340, Helper]
type = Helper
trigger1 = time = 1
helpertype = normal
name = "Dash"
ID = 1350
stateno = 1350
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 0

[State 1340]
type = VelSet
trigger1 = AnimElemNo(0) = [1,2]
x = 9

[State 1340] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1340]
type = CtrlSet
trigger1 = Time = 4
value = 1

[State 1340]
type = ChangeState
trigger1 = Time = 20 && var(54)
value = 1110  ;Flight
ctrl = 1

[State 1340]
type = ChangeState
trigger1 = Time = 20 && !var(54)
value = 50
ctrl = 1

;----------------------------------------------------------
; Air Dash Forward Up
[Statedef 1341]
type    = A
physics = N
movetype = H
anim = 1340
sprpriority = 2
velset = 0,0

[State 1341, VarAdd]
type = VarAdd
trigger1 = time = 0
v = 55
value = 1

[State 1341, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
damage = 50,10
pausetime = 9,9
sparkno = 2
sparkxy = 0,-50
hitsound = 5,0
guardsound = 6,0
ground.type = High
air.hittime = 20
ground.velocity = -2,-2
air.velocity = -2,-2
sprpriority = 1
fall.recover = 0

[State 1341]
type = PlaySnd
trigger1 = Time = 2
value = 100,6

[State 1340, Helper]
type = Helper
trigger1 = time = 1
helpertype = normal
name = "Dash"
ID = 1350
stateno = 1350
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 0

[State 1341]
type = VelSet
trigger1 = 1
x = 7
y = -14

[State 1341] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1341]
type = CtrlSet
trigger1 = Time = 4
value = 1

[State 1341]
type = VelSet
trigger1 = ScreenPos Y < 120
x = 0
y = 0

[State 1341]
type = ChangeState
trigger1 = Time = 17 && var(54);Is Flight
value = 1110
ctrl = 1

[State 1341]
type = ChangeState
trigger1 = Time = 17 && !var(54) ;is not flight
value = 50
ctrl = 1

;----------------------------------------------------------
; Air Dash Up
[Statedef 1342]
type    = A
physics = N
movetype = H
anim = 1340
sprpriority = 0
velset = 0,0

[State 1342, VarAdd]
type = VarAdd
trigger1 = time = 0
v = 55
value = 1

[State 1342, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
damage = 50,10
pausetime = 9,9
sparkno = 2
sparkxy = 0,-50
hitsound = 5,0
guardsound = 6,0
ground.type = High
air.hittime = 20
ground.velocity = -2,-2
air.velocity = -2,-2
sprpriority = 1
fall.recover = 0

[State 1342]
type = PlaySnd
trigger1 = Time = 3
value = 100,6

[State 1340, Helper]
type = Helper
trigger1 = time = 1
helpertype = normal
name = "Dash"
ID = 1350
stateno = 1350
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 0

[State 1342]
type = VelSet
trigger1 = 1
x = 0
y = -12

[State 1342]
type = VelSet
trigger1 = ScreenPos Y < 120
x = 0
y = 0

[State 1342] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1342]
type = CtrlSet
trigger1 = Time = 4
value = 1

[State 1342]
type = ChangeState
trigger1 = Time = 17 && var(54)
value = 1110
ctrl = 1

[State 1342]
type = ChangeState
trigger1 = Time = 17 && !var(54)
value = 50
ctrl = 1

;----------------------------------------------------------
; Air Dash Forward Down
[Statedef 1343]
type    = A
physics = N
movetype = H
anim = 1340
sprpriority = 2
velset = 0,0

[State 1343, VarAdd]
type = VarAdd
trigger1 = time = 0
v = 55
value = 1

[State 1343, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
damage = 50,10
pausetime = 9,9
sparkno = 2
sparkxy = 0,-50
hitsound = 5,0
guardsound = 6,0
ground.type = High
air.hittime = 20
ground.velocity = -2,-2
air.velocity = -2,-2
sprpriority = 1
fall.recover = 0

[State 1343]
type = PlaySnd
trigger1 = Time = 3
value = 100,6

[State 1343, Helper]
type = Helper
trigger1 = time = 1
helpertype = normal
name = "Dash"
ID = 1350
stateno = 1350
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 0

[State 1343]
type = VelSet
trigger1 = 1
x = 7
y = 14

[State 1343] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1343]
type = CtrlSet
trigger1 = Time = 4
value = 1

[State 1343]
type = ChangeState
trigger1 = (Time = 17 || Pos Y >= 0) && var(54)
value = 1110
ctrl = 1

[State 1343]
type = ChangeState
trigger1 = (Time = 17 || Pos Y >= 0) && !var(54)
value = 50
ctrl = 1

;----------------------------------------------------------
; Air Dash Down
[Statedef 1344]
type    = A
physics = N
movetype = H
anim = 1340
sprpriority = 2
velset = 0,0

[State 1344, VarAdd]
type = VarAdd
trigger1 = time = 0
v = 55
value = 1

[State 1344, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
damage = 50,10
pausetime = 9,9
sparkno = 2
sparkxy = 0,-50
hitsound = 5,0
guardsound = 6,0
ground.type = High
air.hittime = 20
ground.velocity = -2,-2
air.velocity = -2,-2
sprpriority = 1
fall.recover = 0

[State 1344]
type = PlaySnd
trigger1 = Time = 3
value = 100,6

[State 1344, Helper]
type = Helper
trigger1 = time = 1
helpertype = normal
name = "Dash"
ID = 1350
stateno = 1350
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 0

[State 1344]
type = VelSet
trigger1 = 1
x = 0
y = 12

[State 1344] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1344]
type = CtrlSet
trigger1 = Time = 4
value = 1

[State 1344]
type = ChangeState
trigger1 = (Time = 17 || Pos Y >= 0) && var(54)
value = 1110
ctrl = 1

[State 1344]
type = ChangeState
trigger1 = (Time = 17 || Pos Y >= 0) && !var(54)
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; Air Dash Back
[Statedef 1345]
type    = A
physics = N
movetype = H
ctrl = 0
anim = 1341
sprpriority = 2

[State 1345, VarAdd]
type = VarAdd
trigger1 = time = 0
v = 55
value = 1

[State 1345, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
damage = 50,10
pausetime = 9,9
sparkno = 2
sparkxy = 0,-50
hitsound = 5,0
guardsound = 6,0
ground.type = High
air.hittime = 20
ground.velocity = -2,-2
air.velocity = -2,-2
sprpriority = 1
fall.recover = 0

[State 1345]
type = PlaySnd
trigger1 = Time = 3
value = 100,7

[State 1345, Helper]
type = Helper
trigger1 = time = 1
helpertype = normal
name = "Dash"
ID = 1350
stateno = 1350
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 0

[State 1345]
type = VelSet
trigger1 = AnimElemNo(0) = [1,2]
x = -9
y = 0

[State 1345] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1345]
type = CtrlSet
trigger1 = Time = 4
value = 1

[State 1345]
type = ChangeState
trigger1 = Time = 17 && var(54)
value = 1110
ctrl = 1

[State 1345]
type = ChangeState
trigger1 = Time = 17 && !var(54)
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; Air Dash Back Up
[Statedef 1346]
type    = A
physics = N
movetype = H
ctrl = 0
anim = 1341
sprpriority = 2

[State 1346, VarAdd]
type = VarAdd
trigger1 = time = 0
v = 55
value = 1

[State 1346, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
damage = 50,10
pausetime = 9,9
sparkno = 2
sparkxy = 0,-50
hitsound = 5,0
guardsound = 6,0
ground.type = High
air.hittime = 20
ground.velocity = -2,-2
air.velocity = -2,-2
sprpriority = 1
fall.recover = 0

[State 1346]
type = PlaySnd
trigger1 = Time = 3
value = 100,7

[State 1346, Helper]
type = Helper
trigger1 = time = 1
helpertype = normal
name = "Dash"
ID = 1350
stateno = 1350
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 0

[State 1346]
type = VelSet
trigger1 = 1
x = -7
y = -14

[State 1346] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1346]
type = CtrlSet
trigger1 = Time = 4
value = 1

[State 1346]
type = VelSet
trigger1 = ScreenPos Y < 120
x = 0
y = 0

[State 1346]
type = ChangeState
trigger1 = Time = 17 && var(54)
value = 1110
ctrl = 1

[State 1346]
type = ChangeState
trigger1 = Time = 17 && !var(54)
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; Air Dash Back Down
[Statedef 1347]
type    = A
physics = N
movetype = H
ctrl = 0
anim = 1341
sprpriority = 2

[State 1347, VarAdd]
type = VarAdd
trigger1 = time = 0
v = 55
value = 1

[State 1347, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
damage = 50,10
pausetime = 9,9
sparkno = 2
sparkxy = 0,-50
hitsound = 5,0
guardsound = 6,0
ground.type = High
air.hittime = 20
ground.velocity = -2,-2
air.velocity = -2,-2
sprpriority = 1
fall.recover = 0

[State 1347]
type = PlaySnd
trigger1 = Time = 3
value = 100,7

[State 1347, Helper]
type = Helper
trigger1 = time = 1
helpertype = normal
name = "Dash"
ID = 1350
stateno = 1350
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 0

[State 1347]
type = VelSet
trigger1 = 1
x = -7
y = 14

[State 1347] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1347]
type = CtrlSet
trigger1 = Time = 4
value = 1

[State 1347]
type = ChangeState
trigger1 = (Time = 17 || Pos Y >= 0) && var(54)
value = 1110
ctrl = 1

[State 1347]
type = ChangeState
trigger1 = (Time = 17  || Pos Y >= 0) && !var(54)
value = 50
ctrl = 1

;-----------------------
;Air Dash FX
[Statedef 1350]
type = S
movetype = I
physics =N
anim = 110
ctrl = 0
sprpriority = 2
velset = 0,0

[State 0, BindToParent Front]
type = BindToParent
trigger1 = parent,stateno = 1340
trigger2 = parent,stateno = 1341
trigger3 = parent,stateno = 1343
pos = 52,-82

[State 0, AngleDraw Back]
type = AngleDraw
trigger1 = parent,stateno = 1345
trigger2 = parent,stateno = 1346
trigger3 = parent,stateno = 1347
value =  180

[State 0, BindToParent Back]
type = BindToParent
trigger1 = parent,stateno = 1345
trigger2 = parent,stateno = 1346
trigger3 = parent,stateno = 1347
pos = -30,-82

[State 0, AngleDraw Up]
type = AngleDraw
trigger1 = parent,stateno = 1342
value =  90

[State 0, BindToParent Up]
type = BindToParent
trigger1 = parent,stateno = 1342
pos = 0,-115

[State 0, AngleDraw Down]
type = AngleDraw
trigger1 = parent,stateno = 1344
value =  -90

[State 0, BindToParent Down]
type = BindToParent
trigger1 = parent,stateno = 1344
pos = 0,-0

[State 1350, DestroySelf]
type = DestroySelf
trigger1 = parent,stateno != [1340,1347]

;---------------------------------------------------------------------------
;Thrust
[Statedef 1400]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= 60
ctrl = 0
velset = 3,0
anim = 1400

[State 100, 1] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, 3]
type = PlaySnd
trigger1 = time = 3
value = 1100,1
channel = 0

[State 100, 4]
type = PlaySnd
trigger1 = time = 19
value = 8100,0

[State 100, 5]
type = PlaySnd
trigger1 = AnimElem = 7
value = 2, 4

[State 100, 7]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
attr = A, SA
damage    = 40,35
getpower  = 30,10
givepower = 30 ,10
guardflag = M
priority = 3
pausetime = 7,8
sparkno = s7702
sparkxy = -10,-72
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -6
air.velocity = -2.3,-7
fall = 0;ifelse (hitcount >= 1,1,0)

[State 100, 8]
type = VelAdd
triggerall = Vel X > 0
trigger1 = time > 15
x = -.3

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

;---------------------------------------------------------------------------
;Thrust
[Statedef 1401]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= 60
ctrl = 0
velset = 5,0
anim = 1401

[State 100, 1] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, 3]
type = PlaySnd
trigger1 = time = 3
value = 1100,1
channel = 0

[State 100, 4]
type = PlaySnd
trigger1 = time = 19
value = 8100,0

[State 100, 5]
type = PlaySnd
trigger1 = AnimElem = 7
value = 2, 4

[State 100, 7]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = animelem = 5
attr = A, SA
damage    = 60,15
getpower  = 30,15
givepower = 30 ,15
guardflag = M
priority = 3
pausetime = 1,15
sparkno = s7702
sparkxy = -10,-72
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -6
air.velocity = -2.3,-7
fall = 1

[State 100, 8]
type = VelAdd
triggerall = Vel X > 0
trigger1 = time > 15
x = -.3

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

;---------------------------------------------------------------------------
;Thrust
[Statedef 1402]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= 60
ctrl = 0
velset = 4,0
anim = 1402

[State 100, 1] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, 3]
type = PlaySnd
trigger1 = time = 3
value = 1100,1
channel = 0

[State 100, 4]
type = PlaySnd
trigger1 = time = 19
value = 8100,0

[State 100, 5]
type = PlaySnd
trigger1 = AnimElem = 7
value = 2, 4

[State 100, 7]
type = HitDef
trigger1 = AnimElem = 2
attr = A, SA
damage    = 60,15
getpower  = 30,15
givepower = 30 ,15
guardflag = M
priority = 3
pausetime = 0,15
sparkno = s7702
sparkxy = -10,-72
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -3,0
air.velocity = -1.3,0
fall = 0

[State 100, 7]
type = HitDef
trigger1 = Animelem = 6
attr = A, SA
damage    = 60,15
getpower  = 30,15
givepower = 30 ,15
guardflag = M
priority = 3
pausetime = 0,0
sparkno = s7702
sparkxy = -10,-72
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = 0,-12.5
air.velocity = -1.3,-9
fall = 1

[State 100, 8]
type = VelAdd
triggerall = Vel X > 0
trigger1 = time > 15
x = -.3

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

[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl =1


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Super Attacks (DMs)
; Recommended State Numbers = 3000 - 3999
;---------------------------------------------------------------------------
;===Super Sonic Scream==================
;STANDING
[Statedef 3000]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3000
ctrl = 0

;------------------------------Start of Hyper Effects

[State 3600, assertspecial]
type = assertspecial
triggerall = !Var(29)
trigger1 = time = 5
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3600, SuperPause]
type = SuperPause
triggerall = !Var(29)
trigger1 = time = 5
Time = 60
;anim =-1;s3012
pos = 25,-65
sound = S8889,0
poweradd = -1000
movetime = 60


[State -2, Helper]
type = Helper
triggerall = !Var(29)
triggerall = !numhelper(40001)
trigger1 = time = 5
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !Var(29)
triggerall = !numhelper(40003)
trigger1 = time = 5
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !Var(29)
triggerall = !numhelper(40004)
trigger1 = time = 5
helpertype = normal
name = "Player 1"
ID = 40004
stateno = 40004
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

;------------End of Hyper Effects

[State 3000, 1]
type = EnvShake
trigger1 = AnimElem = 2
time = 65
ampl = 4
freq = 90

[State 3000, PlaySnd]
type = PlaySnd
trigger1 =  time = 30
value = S13,0
volume = 255
channel = 4

[State 3000, Super D]
type = AfterImage
trigger1 = Time = 2
time = 2

[State 3000, Super E]
type = AfterImageTime
trigger1 = Time = [2,68]
time = 2

[State 3000, Super F] ;Invunerable to normal and special attacks for a bit
type = NotHitBy
trigger1 = Time = 2
value = , NA, SA, AT
time = 12

[State 3000, 1]
type = Projectile
trigger1 = AnimElem = 2
projanim = 3002
projhitanim = 3003
projhits = 10
projscale = 1.75, 1.25
offset = 26,-75;97
velocity = 3.8,0
attr = S, HA
animtype  = Heavy
damage = 24,11
guardflag = MA
pausetime = 0,15
sparkno = s7703
;guard.sparkno = 8430
sparkxy = 100,0
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 22
ground.hittime  = 22
ground.velocity = -6
air.velocity = -3,-3
air.recover = 0
fall.animtype = Hard
fall = 1
getpower = 0

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

;AERIAL
[Statedef 3001]
type    = A
movetype= A
physics = N
juggle  = 4
velset = 0,0
anim = 3001
ctrl = 0

;------------------------------Start of Hyper Effects

[State 3600, assertspecial]
type = assertspecial
triggerall = !Var(29)
trigger1 = time = 5
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3600, SuperPause]
type = SuperPause
triggerall = !Var(29)
trigger1 = time = 5
Time = 60
;anim =-1;s3012
pos = 25,-65
sound = S8889,0
poweradd = -1000
movetime = 60


[State -2, Helper]
type = Helper
triggerall = !Var(29)
triggerall = !numhelper(40001)
trigger1 = time = 5
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !Var(29)
triggerall = !numhelper(40003)
trigger1 = time = 5
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !Var(29)
triggerall = !numhelper(40004)
trigger1 = time = 5
helpertype = normal
name = "Player 1"
ID = 40004
stateno = 40004
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

;------------End of Hyper Effects

[State 3001, Shake]
type = EnvShake
trigger1 = time = 40
time = 65
ampl = 4
freq = 90

[State 3001, PlaySnd]
type = PlaySnd
trigger1 =  time = 30
value = S13,0
volume = 255
channel = 4

[State 3001, Super C]
type = PowerAdd
trigger1 = Time = 2
value = -1000

[State 3001, Super D]
type = AfterImage
trigger1 = Time = 2
time = 2

[State 3001, Super E]
type = AfterImageTime
trigger1 = Time = [2,68]
time = 2

[State 3001, Super F] ;Invunerable to normal and special attacks for a bit
type = NotHitBy
trigger1 = Time = 2
value = , NA, SA, AT
time = 12

[State 3001, 1]
type = Projectile
trigger1 = AnimElem = 2
projanim = 3002
projhitanim = 3003
projhits = 10
projscale = 1.75, 1.25
offset = 21, -80
velocity = 3.8,0
attr = A, HA
animtype  = Heavy
damage = 24,4
guardflag = MA
pausetime = 0,15
sparkno = s7703
sparkxy = 100,0
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 22
ground.hittime  = 22
ground.velocity = -6
air.velocity = -3,-3
air.recover = 0
fall.animtype = Hard
air.fall = 1
fall = 1
getpower = 0

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

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


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;---SONIC RUSH---------------------------------
[Statedef 3100]
type    = A
movetype = A
physics = N
ctrl = 0
anim = 3100
velset = -5,-1
poweradd = 0
;------------------------------Start of Hyper Effects

[State 3600, assertspecial]
type = assertspecial
triggerall = !Var(29)
trigger1 = time = 5
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3600, SuperPause]
type = SuperPause
triggerall = !Var(29)
trigger1 = time = 5
Time = 60
;anim =-1;s3012
pos = 25,-65
sound = S8889,0
poweradd = -1000
movetime = 60


[State -2, Helper]
type = Helper
triggerall = !Var(29)
triggerall = !numhelper(40001)
trigger1 = time = 5
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !Var(29)
triggerall = !numhelper(40003)
trigger1 = time = 5
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !Var(29)
triggerall = !numhelper(40004)
trigger1 = time = 5
helpertype = normal
name = "Player 1"
ID = 40004
stateno = 40004
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

;------------End of Hyper Effects

[State 3100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 100,6
channel = 5
volume = 255

[State 3100, AfterImage]
type = AfterImage
trigger1 = AnimElem = 2
time = 40

[State 3100, VarSet]
type = VarSet
trigger1 = time = 0
v = 41
value = 0

[State 3100, back to stance]
type = ChangeState
trigger1 = AnimTime = 0
value = 3101
ctrl = 0

[StateDef 3101]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 3101
velset = -2,-1
sprpriority = -20
poweradd = 0

[State 3101, AfterImage]
type = AfterImage
trigger1 = AnimElem = 2
time = 40

[State 3101, PlaySnd]
type = PlaySnd
trigger1 = time = 6
value = 100,6
channel = 5
volume = 255

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

[State 3101, VelSet]
type = VelSet
trigger1 = time = 6
x = 22

[State 0, PosAdd]
type = PosAdd
trigger1 = time = 0
y = -20

[State 3101]
type = PlayerPush
trigger1 = 1
value = 0

[State -2]
type = ScreenBound
trigger1 = 1
value = p2bodydist x < 30 && BackEdgeDist < 30

[State 3101, VarAdd]
type = VarAdd
trigger1 = time = 0
v = 41
value = 1

[State 3101, HitDef]
type = HitDef
trigger1 = time=0
attr = S,HA
air.cornerpush.veloff = -20
damage = 50,5
animtype = hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 5,5
sparkno = S3104
sparkxy = -40, -20
hitsound = 5,0
guardsound = 6,0
ground.type = low
ground.slidetime = 65
ground.hittime  = 65
ground.velocity = 1,-9
air.type = Low
air.hittime = 50
air.velocity = 2,-7
fall = 0
envshake.time = 7
envshake.ampl = 3
getpower = 0

[State 3101, PlaySnd]
type = PlaySnd
trigger1 = var(41) > 3
value = 14,1
channel = 4
volume = 255

[State 3101, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 100,6
channel = 5
volume = 255

[State 3101, back to stance]
type = ChangeState
trigger1 = moveguarded
trigger2 = time = 25 && !movehit
value = 50
ctrl = 1

[State 3101, back to stance]
type = ChangeState
trigger1 = var(41) > 3
value = 3103
ctrl = 0

[State 3101, Turn]
type = Turn
trigger1 = time > 25

[State 3101, back to stance]
type = ChangeState
trigger1 = time > 25
value = 3102
ctrl = 0

[StateDef 3102]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 3101
velset = -2,-1
sprpriority = 20
poweradd = 0

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

[State 3102, AfterImage]
type = AfterImage
trigger1 = AnimElem = 2
time = 40

[State 3102, VelSet]
type = VelSet
trigger1 = time = 6
x = 22

[State 3102, PlaySnd]
type = PlaySnd
trigger1 = var(41) > 3
value = 14,1
channel = 3
volume = 255

[State 3102, PosAdd]
type = PosAdd
trigger1 = time = 0
y = -20

[State 3102, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 100,6
channel = 5
volume = 255

[State 3102]
type = PlayerPush
trigger1 = 1
value = 0

[State -2]
type = ScreenBound
trigger1 = 1
value = p2bodydist x < 30 && BackEdgeDist < 30

[State 3102, back to stance]
type = ChangeState
trigger1 = moveguarded
trigger2 = time = 25 && !movehit
value = 50
ctrl = 1

[State 3102, back to stance]
type = ChangeState
trigger1 = var(41) > 3
value = 3103
ctrl = 0

[State 3102, VarAdd]
type = VarAdd
trigger1 = time = 0
v = 41
value = 1

[State 3102, HitDef]
type = HitDef
trigger1 = time=0
attr = S,HA
air.cornerpush.veloff = -20
damage = 50,5
animtype = hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 5,5
sparkno = S3104
sparkxy = -40, -20
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 65
ground.hittime  = 65 ;2
ground.velocity = 1,-9
air.type = Low
air.hittime = 50
air.velocity = 2,-7
fall = 0
envshake.time = 7
envshake.ampl = 3
getpower = 0

[State 3102, Turn]
type = Turn
trigger1 = time > 25

[State 3102, back to stance]
type = ChangeState
trigger1 = time > 25
value = 3101
ctrl = 0

[StateDef 3103]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 3102
sprpriority = 20
poweradd = 0

[State 3103, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 14,2
channel = 4
volume = 255

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

[State 3103, PosAdd]
type = Posset
trigger1 = time = 0
x = enemynear,pos x - 10*facing

[State 3103, PosAdd]
type = PosAdd
trigger1 = time = 0
x = 100
y = 178

[State 3103, HitDef]
type = HitDef
trigger1 = time=0
attr = S,HA
air.cornerpush.veloff = -20
damage = 120,5
animtype = hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 5,5
sparkno = S3104
sparkxy = -40, -25
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 65
ground.hittime  = 65
ground.velocity = -5,19
air.type = Low
air.hittime = 40
air.velocity = -7,19
fall = 1
envshake.time = 10
envshake.ampl = 5
getpower = 0

[State 3103, VelSet]
type = VelSet
trigger1 = animelem= 21
x = 0
y = 2

[State 3103, back to stance]
type = ChangeState
trigger1 = pos y > 0
value = 50; 3104
ctrl = 0

[Statedef 3104]
type    = C
movetype= I
physics = C
juggle  = 0
velset = 0,0
ctrl = 0
anim = 3103
sprpriority = 2
poweradd = 0

[State 3104, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 10
freq = 60
ampl = 4

[State 3104, PosSet]
type = PosSet
trigger1 = time = 0
y = 0

[State 3104, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 11
ctrl = 1



;===HYPER SONIC DISRUPTION======================

[Statedef 3200]
type = S
movetype = A
physics = S
poweradd = -5
ctrl = 0
anim = 3200

;------------------------------Start of Hyper Effects

[State 3600, assertspecial]
type = assertspecial
triggerall = !Var(29)
trigger1 = time = 5
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3600, SuperPause]
type = SuperPause
triggerall = !Var(29)
trigger1 = time = 5
Time = 60
;anim =-1;s3012
pos = 25,-65
sound = S8889,0
poweradd = -1000
movetime = 60


[State -2, Helper]
type = Helper
triggerall = !Var(29)
triggerall = !numhelper(40001)
trigger1 = time = 5
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !Var(29)
triggerall = !numhelper(40003)
trigger1 = time = 5
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !Var(29)
triggerall = !numhelper(40004)
trigger1 = time = 5
helpertype = normal
name = "Player 1"
ID = 40004
stateno = 40004
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

;------------End of Hyper Effects

[State 3200, 1]
type = EnvShake
trigger1 = AnimElem = 1
time = 80
ampl = -12

[State 3200, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = S13,0
volume = 255
channel = 5

[State 3200, 4]
type = Explod
trigger1 = animelem = 1
removetime = -2
id = 3200
anim = 1206
persistent = 0
pos = 0,-60
postype = p1
sprpriority = 2
ownpal = 1
bindtime = 18
supermovetime = 20
ontop = 1
ignorehitpause = 1

[State 3200, 5]
type = Explod
trigger1 =  animelem = 1
removetime = -2
id = 3200
anim = 1206
persistent = 0
pos = 0,-60
postype = p1
sprpriority = 2
ownpal = 1
bindtime = 18
supermovetime = 20
ontop = 1
ignorehitpause = 1

[State 3200, 2]
type = HitDef
trigger1 = Timemod = 2,1
attr = S, HA
animtype  = Heavy
damage = 10,2
numhits = 1
givepower = 30,10
guardflag = MA
pausetime = 0,0
sparkno = s7702
sparkxy = -10, -58
palfx.time = 60
palfx.add = 52,162,148
ground.type = High
ground.slidetime = 2
ground.hittime  = 2
ground.velocity = -1.4,-8
air.velocity = -1.4,-8
air.recover = 0
fall.animtype = Hard
air.fall = 1
fall = 1

[State 3200, Sonics]
type = Explod
trigger1 = Time = 0
anim = 1206
postype = p1
pos = 1,-84
Vel = 0,-2.9

[State 3200, Stop]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 3200, Change]
type = ChangeState
trigger1 = AnimTime = 0
value = 3201
ctrl = 1

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

[State 3200, Change]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;==============================
;--CASSIDY DEATH WAIL (booyah!)---
;==============================
[Statedef 3300]
type = A
movetype = A
physics = N
velset = 0,0
anim = 43
ctrl = 0

;------------------------------Start of Hyper Effects

[State 3300, assertspecial]
type = assertspecial
triggerall = !Var(29)
trigger1 = time = 5
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3300, SuperPause]
type = SuperPause
triggerall = !Var(29)
trigger1 = time = 5
Time = 60
pos = 25,-65
sound = S8889,0
poweradd = -1000
movetime = 60


[State -2, Helper]
type = Helper
triggerall = !Var(29)
triggerall = !numhelper(40001)
trigger1 = time = 5
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !Var(29)
triggerall = !numhelper(40003)
trigger1 = time = 5
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !Var(29)
triggerall = !numhelper(40004)
trigger1 = time = 5
helpertype = normal
name = "Player 1"
ID = 40004
stateno = 40004
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

;------------End of Hyper Effects

[State 3300, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 13,4
volume = 255
channel = 4

[State 3300, 1]
type = VelSet
trigger1 = Time = 0
x = ifelse(backedgedist < 100,3,-3)
y = -1

[State 3300, 2]
type = VelSet
trigger1 = Pos Y = -35
y = 0

[State 3300, 2]
type = VelSet
trigger1 = backedgedist = [90,110]
x = 0

[State 3300, Siryn]
type = Helper
trigger1 = Time = 0
ID = 9500
pos = -55, 0
postype = back
stateno = 3302
helpertype = normal
name = "Siryn"
keyctrl = 0
ownpal = 1
supermovetime = 9999

[State 3300, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 3301
ctrl = 0

[Statedef 3301]
type = A
movetype = A
physics = N
velset = 0,0
anim = 3300
ctrl = 0

[State 3301, Stop]
type = VelSet
trigger1 = AnimElem = 1
y = 0

[State 3301, 1]
type = Projectile
trigger1 = AnimElem = 2
projanim = 3302
projhitanim = 3303
projhits = 3
projscale = 1.45, 1.15
offset = 13,-84
velocity = 1.5,0
remvelocity = 1.5,0
attr = A, HA
animtype  = Light
damage = 90,25
sparkno = s7703
hitsound = 5,4
guardsound = 6,0
guardflag = MA
pausetime = 5,15
palfx.time = 40
palfx.add = 52,162,148
ground.type = High
ground.slidetime = 22
ground.hittime  = 22
ground.velocity = -1.1,-8
air.velocity = -1.1,-8
air.recover = 0
fall.animtype = Hard
air.fall = 1
fall = 1
getpower = 0

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

;SIRYN
[Statedef 3302]
type = A
movetype = I
physics = N
velset = 4,-4
anim = 3301

[State 3302, 2]
type = VelSet
trigger1 = Pos Y <= -100
y = 0

[State 3302, 1]
type = Projectile
trigger1 = AnimElem = 3
projanim = 3302
projhitanim = 3303
projhits = 1
projscale = 1.75, 1.25
offset = 10,-94
velocity = 2.5,0
remvelocity = 2.5,0
attr = A, HA
animtype  = Light
damage = 45,12
sparkno = s7703
hitsound = 5,4
guardsound = 6,0
guardflag = MA
pausetime = 5,15
palfx.time = 40
palfx.add = 52,162,148
ground.type = High
ground.slidetime = 22
ground.hittime  = 22
ground.velocity = -1.1,-8
air.velocity = -1.1,-8
air.recover = 0
fall.animtype = Hard
air.fall = 1
fall = 1
getpower = 0

[State 3302, 2]
type = VelSet
trigger1 = backedgedist >= 60
x = 0

[State 3302, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 15,0
volume = 0
channel = -1
freqmul = 1.0
loop = 0
pan = 0

[State 3302, Front]
type = SprPriority
trigger1 = Time = 0
value = 5

[State 3302, 1]
type = VelSet
trigger1 = Pos Y = -35
trigger1 = Pos X = 10
x = 0
y = 0

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

;===SIRYN'S CODE===============================
;---ENTRANCE-----------------------------------
[Statedef 9500]
type = S
movetype = I
physics = N
anim = 9500
velset = 5,0
ctrl = 0

[State 9500, PlaySnd]
type = PlaySnd
trigger1 = time = 20
value = S15,0
channel = 10

[State 9500, 1]
type = HitOverride
trigger1 = Time = 0
time = -1
attr = SCA, AA, AT, AP
slot = 0
stateno = 9504

[State 9500, 2]
type = SprPriority
trigger1 = Time = 0
value = 5

[State 9500, 3]
type = ChangeState
trigger1 = backedgeDist > 75
value = 9501

[State 9500, 4]
type = VelSet
trigger1 = backedgeDist > 75
x = 0
y = 0

;---Siryn Stands------------------------
[Statedef 9501]
type = A
movetype = A
physics = N
velset = 0,0
ctrl = 0
anim = 9501

[State 9500, 1]
type = HitOverride
trigger1 = Time = 0
time = -1
attr = SCA, AA, AT, AP
slot = 0
stateno = 9504

[State 9501, 3]
type = SprPriority
trigger1 = Time = 0
value = 5

[State 9501, 5]
type = ChangeState
trigger1 = animtime = 0
value = 9502


;---SIRYN ATTACKS-------------------------------
[Statedef 9502]
type = S
movetype = A
physics = S
velset = 0,0
juggle = 4
poweradd = 30
anim = 9502
ctrl = 0

[State 9500, 1]
type = HitOverride
trigger1 = Time = 0
time = -1
attr = SCA, AA, AT, AP
slot = 0
stateno = 9504

[State 9502, 2]
type = SprPriority
trigger1 = Time = 0
value = 5

[State 9502, Shake]
type = EnvShake
trigger1 = Time = 0
time = 75
ampl = -2

[State 9502, 3]
type = Projectile
trigger1 = Time = 0
projsprpriority = 10
projanim = 1003
projhitanim = 1004
projremovetime = 30
offset = -12,-89
velocity = 3,0
attr = S, SA
animtype  = Hard
damage = 35,10
guardflag = MA
pausetime = 35,20
sparkno = s7703

scale = 1.5,1.5
sparkxy = 100,0
hitsound = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 22
ground.hittime  = 22
ground.velocity = -6
air.velocity = -3,-3
fall.animtype = Hard
air.fall = 1

[State 9502, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 9503

;---SIRYN LEAVES--------------------------
[Statedef 9503]
type = S
movetype = I
physics = N
velset = -10,-8
anim = 9503

[State 9500, 1]
type = HitOverride
trigger1 = Time = 0
time = -1
attr = SCA, AA, AT, AP
slot = 0
stateno = 9504

[State 9503, 2]
type = SprPriority
trigger1 = Time = 0
value = 5

[State 9503, 3]
type = Gravity
trigger1 = Time > 0

[State 9503, 4]
type = DestroySelf
trigger1 = time = 200

;---SIRYN GET HIT CODE----------------------------
[Statedef 9504]
type = A
movetype = I
physics = N
anim = 9504
velset = 0,0

[State 9504, StopSnd]
type = StopSnd
trigger1 = time = 0
channel = 10

[State 9504, 1]
type = Gravity
trigger1 = Time = 0

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

[Statedef 9505]
type = A
movetype = I
physics = N
anim = 9505
velset = 0,0

[State 9505,1]
type = VelSet
trigger1 = Time = 0
x = -10
y = -8

[State 9505, 2]
type = DestroySelf
trigger1 = Pos X < -500
trigger2 = Pos Y < -100

;----------------------------[2002 UM MAX2 BG]----------------------------------
[Statedef 40001]
anim = 9999

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noBG
flag2 = noFG

;[State 40001, Tile #1-7]
;type = Explod
;triggerall = !numexplod(15600)
;trigger1 = !time
;anim = 15600
;ID = 15600
;pos = 0,0
;postype = left  ;p2,front,back,left,right
;removetime = 10
;pausemovetime = -1
;supermovetime = -1
;scale = 1.1,1.1
;sprpriority = -20
;ownpal = 1
;ignorehitpause = 1
;bindtime = -1
;persistent = 0

[State 40001, Tile #1-7]
type = Explod
trigger1 = !time
trigger2 = numexplod(15601) = 0
anim = 15600
ID = 15601
pos = 0,0
postype = left  ;p2,front,back,left,right
removetime = -1
pausemovetime = -1
supermovetime = -1
scale = 1.1,1.1
sprpriority = -9999
ownpal = 1
ignorehitpause = 1
bindtime = -1

[State 40001, Glass Break]
type = ChangeState
;trigger1 = root, stateno != 3300 && root, stateno != 3350
;trigger2 = root, stateno = 3300 && root,animelemtime(61) = 1  || root, stateno = 3350 && root,animelemtime(50) = 1
trigger1 = root, stateno !=[3000,4999]
;trigger2 = root, NumHelper(8400) !=0|| root, NumHelper(8420) !=0
value = stateno+1

[Statedef 40002]
anim = 9999

;[State 40002, RemoveExplod]
;type = RemoveExplod
;trigger1 = !time
;id = 15600

[State 40002, RemoveExplod]
type = RemoveExplod
trigger1 = !time
id = 15601

[State 40002, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S14001,0
volume = 200

[State 40001, Glass Break]
type = Explod
triggerall = !numexplod(15640)
trigger1 = !time
anim = 15604
ID = 15640
pos = 0,0
postype = left  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
scale = 1,1
sprpriority = -20
ownpal = 1
bindtime = -1
ignorehitpause = 1

[State 40001, DestroySelf]
type = DestroySelf
trigger1 = time = 1

;--------------------------[2002 UM MAX2 PORTRAIT]------------------------------
[Statedef 40003]
anim = 9999

[State 40001, P1 BG]
type = Explod
triggerall = !numexplod(15650)
triggerall = teamside = 1
trigger1 = !time
anim = 15605
ID = 15650
pos = 0,abs((240*var(0))-81)
postype = left  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
sprpriority = -20
ownpal = 1
ignorehitpause = 1

[State 40001, P2 BG]
type = Explod
triggerall = !numexplod(15651)
triggerall = teamside = 2
trigger1 = !time
anim = 15606
ID = 15651
pos = 0,abs((240*var(0))-81)
postype = right  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
facing = -1
sprpriority = -20
ownpal = 1
ignorehitpause = 1

[State 40001, P1 PORTRAIT]
type = Explod
triggerall = !numexplod(15660)
triggerall = teamside = 1
trigger1 = !time
anim = 15607
ID = 15660
pos = 0,abs((240*var(0))-81)
postype = left  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
sprpriority = -19
ownpal = 1
ignorehitpause = 1

[State 40001, P2 PORTRAIT]
type = Explod
triggerall = !numexplod(15661)
triggerall = teamside = 2
trigger1 = !time
anim = 15607
ID = 15661
pos = 0,abs((240*var(0))-81)
postype = right  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
facing = -1
sprpriority = -19
ownpal = 1
ignorehitpause = 1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15650
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15650
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15650
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15650
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15650
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15650
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15650
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15650
scale = 1,1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15651
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15651
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15651
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15651
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15651
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15651
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15651
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15651
scale = 1,1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15660
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15660
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15660
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15660
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15660
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15660
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15660
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15660
scale = 1,1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15661
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15661
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15661
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15661
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15661
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15661
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15661
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15661
scale = 1,1

[State 40001, DestroySelf]
type = DestroySelf
trigger1 = time = 60

[Statedef 40004]
anim = 9999

[State 40001, DestroySelf]
type = DestroySelf
trigger1 = time = 1

;-------------------------------------------------------------------------------



;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 100]
type    = S
physics = N
anim = 100
sprpriority = 1
velset = 7, 0

[State 100, 1] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, 3]
type = PlaySnd
trigger1 = time = 3
value = 1100,1
channel = 0

[State 100, 4]
type = PlaySnd
trigger1 = time = 19
value = 8100,0

[State 100, 5]
type = PlaySnd
trigger1 = AnimElem = 7
value = 2, 4

[State 100, 6]
type = Explod
trigger1 = time < 15
trigger1 = (time % 4) = 1
ID = 41
anim = 2222
postype = p1
pos = -20, -40
bindtime = 1
removetime = -2
vel = -1, 0
ownpal = 1
random = 20, 60
sprpriority = 2

[State 100, 7]
type = Explod
trigger1 = time < 15
trigger1 = (time % 4) = 0
ID = 42
anim = 2222
postype = p1
pos = -20, -40
bindtime = 1
removetime = -2
vel = -.8, 0
ownpal = 1
random = 20, 60
sprpriority = 2

[State 100, 8]
type = VelAdd
triggerall = Vel X > 0
trigger1 = time > 15
x = -.3

[State 100, 9]
type = Explod
trigger1 = time = [16,35]
trigger1 = (time % 4) = 0
ID = 43
anim = 6000
postype = p1
pos = 10, 0
bindtime = 1
removetime = -2
vel = -.2, 0
ownpal = 1
sprpriority = 2 

[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------------------------
;RUN_BACK
[Statedef 105]
type    = A
physics = A
ctrl = 0
anim = 105
sprpriority = 1

[State 105, VelSet]
type = VelSet
trigger1 = Time = 2
x = -10
y = const(velocity.run.back.y)

[State 105, ChangeState]
type = ChangeState
trigger1 = Time > 15
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 106


;---------------------------------------------------------------------------------------------
;RUN_BACK
[Statedef 106]
type    = S
physics = S
ctrl = 0
anim = 106
sprpriority = 1

[State 106, VelSet]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 106, posset]
type = posset
trigger1 = time = 0
y = 0

[State 106, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 8100,0


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

;-----------------------------------------------
[Statedef 193]; Move around before match
type = S
physics =S
sprpriority = 0

[State 0]
type = varset
trigger1 = time = 1
var(50) = 0

[State 0]
type = posset
trigger1 = 1
y = 0

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

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = 2.4

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = -2.0

[State 2]
type = ChangeAnim
trigger1 = command = "holdfwd"
trigger1 = Anim != 20
value = 20

[State 2]
type = ChangeAnim
trigger1 = command = "holdback"
trigger1 = Anim != 21
value = 21

[State 2]
type = ChangeAnim
trigger1 = command != "holdback"
trigger1 = command != "holdfwd"
trigger1 = Anim != 0
value = 0

[State 20, 2]
type = VelSet
trigger1 = command != "holdback"
trigger1 = command != "holdfwd"
x = 0

[State var]
type = VarSet
trigger1 = roundstate != 2
var(9) = floor(pos x)

[State F]
type = posset
trigger1 = roundstate = 2
trigger1 = var(9) != 0
x = var(9)

[State F]
type = varset
trigger1 = roundstate = 2
var(9) = 0

[State F]
type = changestate
trigger1 = ctrl
value = ifelse((command = "holdfwd") || (command ="holdback"),20,0)

;---------------------------------------------------------------------------
;Falling

[Statedef 1201]
type    = A
movetype= I
physics = A
anim = 1201
sprpriority = 1

[State 1201, Ctrl]
type = CtrlSet
trigger1 = prevstateno = 4100
value = 0

[State 1201, Ctrl]
type = CtrlSet
triggerall = prevstateno != 4100
trigger1 = Var(12) = 0
value = 0

[State 1201, Ctrl]
type = CtrlSet
triggerall = prevstateno != 4100
trigger1 = Var(12) = 1
value = 1

[State 1201, Turn]
type = Turn
trigger1 = P2Dist X < -5

[State 1201, VelSet]
type = VelSet
trigger1 = FrontEdgeBodyDist <= 0
x = 0

[State 1201, ChangeState]
type = ChangeState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 52

;---------------------------------------------------------------------------------------------
;Beginning of the super jump
[Statedef 7000]
type = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 7000, VarSet]
type = VarSet
trigger1 = Time = 0
v = 11
value = 0

[State 7000, VarSet]
type = VarSet
trigger1 = command = "holdfwd"
v = 11
value = 1

[State 7000, VarSet]
type = VarSet
trigger1 = command = "holdback"
v = 11
value = -1

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

;---------------------------------------------------------------------------------------------
[Statedef 4210]
type    = A
movetype= H
physics = N
poweradd= 0
ctrl = 0
velset = 0,-16
sprpriority = 0

[State 4210, VelSet 2]
type = VelSet
trigger1 = (Pos Y >= 10) && (Vel Y > 0)
y = 0

[State 4210, VelSet]
type = VelSet
trigger1 = (Pos Y >= 10) && (Vel Y > 0)
y = 10

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

[State 4210, SelfState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100
ctrl = 0

[State 4210, ChangeState]
type = ChangeState
trigger1 = Time = 40
value = 4211
ctrl = 0

;---------------------------------------------------------------------------------------------

[Statedef 4211]
type    = A
movetype= H
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 3

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

[State 4211, VelAdd]
type = VelAdd
trigger1 = Time > 49
y = 0.5

[State 4211, SelfState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100
ctrl = 0

;---------------------------------------------------------------------------------------------

[Statedef 4212]
type    = A
movetype= H
physics = N
poweradd= 0
ctrl = 0
sprpriority = 0

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

;---------------------------------------------------------------------------------------------

[Statedef 4213]
type    = L
movetype= H
physics = N
poweradd= 0
ctrl = 0
sprpriority = 0

[State 4213, SelfState]
type = SelfState
trigger1 = Time = 0
value = 5100
ctrl = 0




;---------------------------------------------------------------------------------------------
;Super Jump

[Statedef 7001]
type = A
physics = A
ctrl = 1
anim = 41
velset = 0,-13.8;-16.3

[State 7001, VelAdd]
type = VelAdd
triggerall = Vel X >= -2
trigger1 = command = "holdback"
trigger1 = Anim != 43
x = -0.1

[State 7001, VelAdd]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = command = "holdfwd"
trigger1 = Anim != 42
x = 0.25

[State 7001, VelSet]
type = VelSet
trigger1 = Anim = 42
trigger1 = Time = [0,5]
x = 4

[State 7001, VelSet]
type = VelSet
trigger1 = Anim = 43
trigger1 = Time = [0,5]
x = -3.5

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(11) = 0
trigger1 = Time = [0,4]
value = 41

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(11) = 1
trigger1 = Time = [0,4]
value = 42

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(11) = -1
trigger1 = Time = [0,4]
value = 43

[State 7001, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 9999,5

[State 7001, explod]
type = Explod
trigger1 = Time = 0
ID = 474
anim = 9995
postype = p1
pos = 5, 10
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = .5,.5

[State 7001, explod]
type = Explod
trigger1 = Time = 0
ID = 474
anim = 9006
postype = p1
pos = 0, 0
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = .5,.5
 
[State 7001, Variavelzinha muito útil]
type = VarSet
trigger1 = Time = 0
v = 12
value = 1

;---------------------------------------------------------------------------------------------
;Super Jump

[Statedef 7002]
type    = A
physics = A
ctrl = 1

[State 7005, Vel]
type = VelAdd
triggerall = Vel X >= -2
trigger1 = command = "holdback"
trigger1 = Anim != 43
x = -0.1

[State 7005, Vel]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = command = "holdfwd"
trigger1 = Anim != 42
x = 0.25


;---------------------------------------------------------------------------------------------
[Statedef 8882]
type = S
physics = S
anim = 0
sprpriority = 1
ctrl = 0

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

[State 8882, ChangeState]
type = Changestate
trigger1 = time = 30
value = 8883

[Statedef 8883]
type = S
physics = S
anim = 100
sprpriority = 1
ctrl = 0

[State 8883, PlaySnd]
type = PlaySnd
trigger1 = (AnimElem = 5) || (AnimElem = 9)
value = 8100,0

[State 8883, VelSet]
type = VelSet
trigger1 = 1
x = 8

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

[State 8883, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 8883, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 8883, ChangeState]
type = ChangeState
trigger1 = p2bodydist x <= 190
value = 101
ctrl = 0

;---------------------------------------------------------------------------------------------
[Statedef -3]

[State -3, VarAdd]
type = VarAdd
trigger1 = (HitPauseTime = 1) && (P2MoveType = H) && (MoveHit = 1) && (StateNo < 3000)
trigger2 = ProjHitTime(0) = 1
v = 21
value = 1
ignorehitpause = 1

[State -3, VarReset]
type = VarSet
trigger1 = P2MoveType != H
v = 21
value = 0

[State -3, AttackMulSet]
type = AttackMulSet
trigger1 = StateNo >= 3000
value = 1

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) <= 1
value = 1

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) = 2
value = 0.8

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) = 3
value = 0.6

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) = 4
value = 0.4

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) >= 5
value = .2


[State 8510, Pó]
type = Explod
trigger1 = Stateno = 52 && time = 1
trigger2 = Stateno = 240 && animelem = 8
trigger3 = Stateno = 1102 && time = 1
trigger4 = Stateno = 1112 && time = 1
trigger5 = Stateno = 1122 && time = 1
trigger6 = Stateno = 106 && time = 1
trigger7 = Stateno = 352 && AnimElemTime(2) = 1
anim = 8510
ID = 8510
postype = P1
pos = 0,4
sprpriority = -1
ownpal = 1
scale = 1.4, 1.2

[State -3, Aterrisagem]
type = PlaySnd
trigger1 = StateNo = 52 && Time = 1 
value = 8100,0

[State -3, Explod]
type = RemoveExplod
trigger1 = StateNo != [3000,4999]
ID = 8900

[State -3, Explod]
type = RemoveExplod
trigger1 = Roundstate = 4
ID = 8901

[State -3, Explod]
type = RemoveExplod
trigger1 = Var(20) > 0
ID = 8900

[State -3, Explod]
type = RemoveExplod
trigger1 = StateNo != [3000,4999]
ID = 8998

[State -3, Explod]
type = RemoveExplod
trigger1 = Roundstate = 4
ID = 8998

[State -3, Explod]
type = RemoveExplod
trigger1 = Var(20) > 0
ID = 8998

[State -3, Explod]
type = RemoveExplod
trigger1 = StateNo != [3000,4999]
ID = 8997

[State -3, Explod]
type = RemoveExplod
trigger1 = Roundstate = 4
ID = 8997

[State -3, Explod]
type = RemoveExplod
trigger1 = Var(20) > 0
ID = 8997

[State -3, Explod]
type = RemoveExplod
trigger1 = StateNo != [3000,4999]
ID = 8999

[State -3, Explod]
type = RemoveExplod
trigger1 = Roundstate = 4
ID = 8999

[State -3, Explod]
type = RemoveExplod
trigger1 = Var(20) > 0
ID = 8999

[State -3, MSSM]
type = VarRandom
trigger1 = 1
v = 23
range = 0,8

[State -3, Super Jump]
type = VarSet
trigger1 = Stateno = 0
v = 12
value = 0

;[State -3, Afterimagetime]
type = Afterimagetime
trigger1 = stateno != [3000,4999] 
time = 0

[State -3, ctrl set]
type = ctrlset
trigger1 = roundstate = 4
value = 0

;---------------------------------------------------------------------------
;Guard Push (Stand)
[Statedef 6300]
type    = S
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 1111
sprpriority = 2

[State 6300, a1]
type = VelMul
trigger1 = 1
x = 0.75

[State 6300, a2]
type = VelSet
trigger1 = Time = 10
x = 0

[State 6300, a3]
type = Width
trigger1 = 1
value = 10,0

[State 6300, a4]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 25

[State 6300, a5]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 6350
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 6300, a6]
type = Explod
trigger1 = Time = 0
anim = 7020
postype = p1
pos = 53,-50
ownpal = 1
vel = 2,0
ignorehitpause = 1
sprpriority = 7
scale = .5,.5

[State 6300, a7]
type = PlaySnd
trigger1 = Time = 0
value = 54,3
volume = 255
channel = 1

[State 6300, a8]
type = PlaySnd
trigger1 = Time = 0
value = 1,0
channel = 0

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

[Statedef 6310];--------------crouch
type    = C
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 121
sprpriority = 2

[State 6310, a1]
type = VelMul
trigger1 = 1
x = 0.75

[State 6310, a2]
type = VelSet
trigger1 = Time = 10
x = 0

[State 6310, a3]
type = Width
trigger1 = 1
value = 10,0

[State 6310, a4]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 25

[State 6310, a5]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 6350
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 6310, a6]
type = Explod
trigger1 = Time = 0
anim = 7020
postype = p1
pos = 33,-45
ownpal = 1
vel = 2,0
ignorehitpause = 1
sprpriority = 7
scale = .5,.5

[State 6310, a7]
type = PlaySnd
trigger1 = Time = 0
value = 54,3
volume = 255
channel = 1

[State 6310, a8]
type = PlaySnd
trigger1 = Time = 0
value = 50,0
channel = 0

[State 6310, a9]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1


[Statedef 6320];------------air
type    = S
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 122
sprpriority = 2

[State 6320, a1]
type = VelMul
trigger1 = 1
x = 0.75

[State 6320, a2]
type = VelSet
trigger1 = Time = 10
x = 0

[State 6320, a3]
type = Width
trigger1 = 1
value = 10,0

[State 6320, a4]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 25

[State 6320, a5]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 6350
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 6320, a6]
type = Explod
trigger1 = Time = 0
anim = 7020
postype = p1
pos = 33,-55
ownpal = 1
vel = 2,0
ignorehitpause = 1
sprpriority = 7
scale = .5,.5

[State 6320, a7]
type = PlaySnd
trigger1 = Time = 0
value = 54,3
volume = 255
channel = 1

[State 6320, a8]
type = PlaySnd
trigger1 = Time = 0
value = 50,0
channel = 0

[State 6320, a9]
type = ChangeState
trigger1 = AnimTime = 0
value = 51
ctrl = 1

[Statedef 6350];guard push helper
type    = S
movetype= I
physics = N
poweradd= 0
ctrl = 0
anim = 1112
sprpriority = -4

[State 6350, a1]
type = PlayerPush
trigger1 = Time >= 0
value = 1

[State 6350, a2]
type = VelSet
trigger1 = Time = [0,10]
x = 30

[State 6350, a3]
type = VelSet
trigger1 = Time = [11,13]
x = 20

[State 6350, a4]
type = VelSet
trigger1 = Time >= 14
x = 10

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

[State 6350, a6]
type = DestroySelf
trigger1 = Time >= 18



;---------------------------------------------------------------------------
;--------------------------------- Roll ------------------------------------
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Near Roll

[Statedef 890]
type    = S
movetype= I
physics = S
juggle  = 0
poweradd= 20
velset = 4,0
ctrl = 0
anim = 810
sprpriority = -1

[State 890, 1]
type = VelSet
trigger1 = Time != 1
x = 4

[State 890, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 890, 4]
type = NotHitBy
trigger1 = 1
value = SCA

[State 890, 5]
type = VarRandom
trigger1 = Time = 0
v = 4
range = 0,1

[State 890, 6.1]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 0
value = 810,0

[State 890, 6.2]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 1
value = 810,1

[State 890, 7]
type = AfterImage
trigger1 = AnimElem = 2
time = 999
length = 20
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
FrameGap = 3
trans = add1
ignorehitpause = 1

[State 890, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Medium Roll

[Statedef 895]
type    = S
movetype= I
physics = S
juggle  = 0
poweradd= 20
velset = 4,0
ctrl = 0
anim = 810
sprpriority = -1

[State 895, 1]
type = VelSet
trigger1 = Time != 1
x = 5

[State 895, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 815, 4]
type = NotHitBy
trigger1 = 1
value = SCA

[State 895, 5]
type = VarRandom
trigger1 = Time = 0
v = 4
range = 0,1

[State 895, 6.1]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 0
value = 810,0

[State 895, 6.2]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 1
value = 810,1

[State 895, 7]
type = AfterImage
trigger1 = AnimElem = 2
time = 999
length = 20
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
FrameGap = 3
trans = add1
ignorehitpause = 1

[State 895, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Far Roll

[Statedef 898]
type    = S
movetype= I
physics = S
juggle  = 0
poweradd= 20
velset = 4,0
ctrl = 0
anim = 810
sprpriority = -1

[State 898, 1]
type = VelSet
trigger1 = Time != 1
x = 6

[State 898, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 898, 4]
type = NotHitBy
trigger1 = 1
value = SCA

[State 898, 5]
type = VarRandom
trigger1 = Time = 0
v = 4
range = 0,1

[State 898, 6.1]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 0
value = 810,0

[State 898, 6.2]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 1
value = 810,1

[State 898, 7]
type = AfterImage
trigger1 = AnimElem = 2
time = 999
length = 20
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
FrameGap = 3
trans = add1
ignorehitpause = 1

[State 898, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;------------------------------ Recovery Roll ------------------------------
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Near Foward Recovery Roll

[Statedef 831]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 831
sprpriority = -1

[State 831, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 831, 3]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 831, 4]
type = MakeDust
trigger1 = Time >= 0
pos = -16,0
spacing = 6

[State 831, 5]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 831, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

;---------------------------------------------------------------------------
; Medium Foward Recovery Roll

[Statedef 832]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 8,0
ctrl = 0
anim = 832
sprpriority = -1

[State 832, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 832, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 832, 3]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 832, 4]
type = MakeDust
trigger1 = Time >= 0
pos = -16,0
spacing = 6

[State 832, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 10

[State 832, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

;---------------------------------------------------------------------------
; Far Foward Recovery Roll

[Statedef 840]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 8,0
ctrl = 0
anim = 840
sprpriority = -1

[State 840, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 840, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 840, 3]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 840, 4]
type = MakeDust
trigger1 = Time >= 0
pos = -16,0
spacing = 6

[State 840, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 15

[State 840, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0


;---------------------------------------------------------------------------
; Near Backward Recovery Roll

[Statedef 850]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 850
sprpriority = -1

[State 850, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 850, 3]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 850, 4]
type = MakeDust
trigger1 = Time >= 0
pos = 16,0
spacing = 6

[State 850, 5]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 850, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0


;---------------------------------------------------------------------------
; Medium Backward Recovery Roll

[Statedef 855]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = -8,0
ctrl = 0
anim = 855
sprpriority = -1

[State 855, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 855, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 855, 3]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 855, 4]
type = MakeDust
trigger1 = Time >= 0
pos = 16,0
spacing = 6

[State 855, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 10

[State 855, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0


;---------------------------------------------------------------------------
; Far Backward Recovery Roll

[Statedef 860]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = -8,0
ctrl = 0
anim = 860
sprpriority = -1

[State 860, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 860, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 860, 3]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 860, 4]
type = MakeDust
trigger1 = Time >= 0
pos = 16,0
spacing = 6

[State 860, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 15

[State 860, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0


;---------------------------------------------------------------------------
; Recovery Roll - Variable "Reset"

[State -2, 1]
type = VarSet
trigger1 = (StateNo != 5050) && (StateNo != 5071)
v = 30
value = 0

;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 5030]
type    = A
movetype= H
physics = N
ctrl = 0

[State 5030, 1]
type = VelAdd;Gravity
trigger1 = 1
y = GetHitVar(yaccel)

[State 5030, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5030, snd]
type = PlaySnd
triggerall = vel x != 0
triggerall = numexplod(72) <= 0
trigger1 = backedgebodydist <= 5
trigger2 = frontedgebodydist <= 5
persistent = 0
;value = F7, 0 ;Hit ground
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5030, GMA]
type = Explod
triggerall = vel x != 0
triggerall = backedgebodydist <= 5
trigger1 = numexplod(72) <= 0
persistent = 0
ignorehitpause = 1
id = 72
anim = 6777
pos = -20,-75
postype = p1
bindtime = 1
scale = .5,.5

[State 5030, GMA]
type = Explod
triggerall = vel x != 0
triggerall = frontedgebodydist <= 5
trigger1 = numexplod(72) <= 0
persistent = 0
ignorehitpause = 1
id = 72
anim = 6777
pos = 20,-75
sprpriority = 2
facing = -1
bindtime = 1
ownpal = 1
scale = .5,.5

[State 5030, 3]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5040 ;HITA_RECOV

[State 5030, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5050 ;HITA_FALL

[State 5030, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 5035 ;HITA_UP (transition)

;---------------------------------------------------------------------------

; HITA_UP_T (transition)
[Statedef 5035]
type    = A
movetype= H
physics = N

[State 5035, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059] ;Not if in hit up anim
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5035

[State 5035, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5035, snd]
type = PlaySnd
triggerall = vel x != 0
triggerall = numexplod(72) <= 0
trigger1 = backedgebodydist <= 5
trigger2 = frontedgebodydist <= 5
persistent = 0
;value = F7, 0 ;Hit ground
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5035, GMA]
type = Explod
triggerall = vel x != 0
triggerall = backedgebodydist <= 5
trigger1 = numexplod(72) <= 0
persistent = 0
ignorehitpause = 1
id = 72
anim = 6777
pos = -20,-75
postype = p1
bindtime = 1
scale = .5,.5

[State 5035, GMA]
type = Explod
triggerall = vel x != 0
triggerall = frontedgebodydist <= 5
trigger1 = numexplod(72) <= 0
persistent = 0
ignorehitpause = 1
id = 72
anim = 6777
pos = 20,-75
sprpriority = 2
facing = -1
bindtime = 1
ownpal = 1
scale = .5,.5

[State 5035, 3]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Animation over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5040 ;HITA_RECOV

[State 5035, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Anim is over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5050 ;HITA_FALL

;---------------------------------------------------------------------------
; HITA_FALL (knocked up, falling)
[Statedef 5050]
type    = A
movetype= H
physics = N

[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 5050, 3] ;Gravity
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5050, snd]
type = PlaySnd
triggerall = vel x != 0
triggerall = numexplod(72) <= 0
trigger1 = backedgebodydist <= 5
trigger2 = frontedgebodydist <= 5
persistent = 0
;value = F7, 0 ;Hit ground
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5050, GMA]
type = Explod
triggerall = vel x != 0
triggerall = backedgebodydist <= 5
trigger1 = numexplod(72) <= 0
persistent = 0
ignorehitpause = 1
id = 72
anim = 6777
pos = -20,-75
postype = p1
bindtime = 1
scale = .5,.5

[State 5050, GMA]
type = Explod
triggerall = vel x != 0
triggerall = frontedgebodydist <= 5
trigger1 = numexplod(72) <= 0
persistent = 0
ignorehitpause = 1
id = 72
anim = 6777
pos = 20,-75
sprpriority = 2
facing = -1
bindtime = 1
ownpal = 1
scale = .5,.5

[State 5050, 4] ;Recover near ground
type = null;ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 5050, 5]; Recover in mid air
type = null;ChangeState
triggerall = Vel Y > -1
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 5050, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 5100 ;HIT_BOUNCE

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

[State -2, Debug Info]
type = DisplayToClipboard
trigger1 = roundstate > 0
text = "Hits: %d, Flight %d, AI On %d, AirDash %d, Recovery Roll %d"
params = var(8), var(54), var(59), var(55), var(5)

; Misc SCtrls Section ==================================================
[State -2, Lie Down Snd]
type = PlaySnd
trigger1 = Time = 1
trigger1 = anim = 5300
value = 3,21
channel = 0

; ----------------------------------------------------------------------
[State -2, NoHitBy]
Type = NotHitBy
trigger1 = (NumHelper(9985) = 1) && (NumHelper(9986) = 1)
trigger1 = Time = 0
value = SCA
Time = 30

[State -2, PalFX]
type = PalFX
trigger1 = (NumHelper(9985) = 1) && (NumHelper(9986) = 1)
time = 1
add = 0, 0, 256
mul = 256,256,256
persistent = 0

[State 1110, Border1]
type = PosSet
triggerall = Pos Y < -260
trigger1 = stateno = [1340,1347]
trigger2 = prevstateno = [1340,1347]
y = -260

[State 1110, Border2]
type = PosSet
triggerall = Pos Y > -20
trigger1 = stateno = [1340,1347]
y = -20

[State -2, Remove Hyper Explod]
type = RemoveExplod
trigger1 = stateno != [3000,4999]
id = 305

[State -2, AssertSpecial]
type = AssertSpecial
trigger1 = stateno = [3000,4999]
flag = nobardisplay
flag2 = noBG
flag3 = noFG
ignorehitpause = 1

[State -2, Siryn]
type = Helper
triggerall = roundstate = 2
triggerall = numhelper (9500) = 0
triggerall = movetype != H
trigger1 = command = "Siryn"
ID = 9500
pos = -55, 0
postype = back
stateno = 9500
helpertype = normal
name = "Siryn"
keyctrl = 0
ownpal = 1

[State -2, VarSet]
type = VarSet
triggerall = var(55) !=0
trigger1 = statetype != A
v = 55
value = 0

; ----------------------------------------------------------------------
[State -2, PosAdd]
type = PosAdd
trigger1 = Stateno = [5030, 5040]
trigger1 = (anim = 5040) && (AnimElem = 1, < 2)
y = -20
persistent = 0

; Reset Super Jump var
[State -2, Super Jump Reset]
type = VarSet
trigger1 = stateno = 52
trigger2 = stateno = 0
var(0) = 0

; Remove Explods Section ==============================================
; Remove Special BG if ------------------------------------------------
; State != 3100:
[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 3100
id = 9052

; Combo Messages and Score control =====================================
;>3 Yes
;>4 Good
;>5 Great
;>7 Very Good
;>9 Wonderful
;>11 Fantastic
;>14 Monster
;>20 Marvelous


[State -2, VS_Combo]
type = VarSet
trigger1 = var(8) >= 3
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
var(9) = 1+(var(8)>3)+(var(8)>4)+(var(8)>6)+(var(8)>8)+(var(8)>10)+(var(8)>13)+(var(8)>19)-(var(8)=-1)
ignorehitpause = 1

[State -2, Danger]
type = VarSet
trigger1 = var(10) !=1 && roundstate=2 && life = [1,250]
var(9) = 9
ignorehitpause = 1

[State -2, First Attack]
type = PlaySnd
triggerall = var(8)=-1
triggerall = NumExplod(8701) = 0
trigger1 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
persistent = 0
value = 230,0
volume=255
ignorehitpause = 1

[State -2, Combo Sound]
type = PlaySnd
trigger1 = NumExplod(8701) = 0
trigger1 = var(8)=0 && var(9)!=0
persistent = 0;1
value = 230,var(9)
volume=255
ignorehitpause = 1

[State -2, Left]
type = explod
trigger1 = var(8)=0 && var(9)!=0
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
triggerall = TeamSide = 1 && NumExplod(8701) = 0
anim = (8000 + var(9))
ID = 8701
postype = left
pos = 0,80
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0
ignorehitpause = 1

[State -2, Right]
type = explod
trigger1 = var(8)=0 && var(9)!=0
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
triggerall = TeamSide = 2 && NumExplod(8701) = 0
anim = (8100+ var(9))
ID = 8701
postype = right
pos = -1,80
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0;1
ignorehitpause = 1

[State -2, VS_Combo]
type = VarAdd
trigger1 = enemynear, time = 0
trigger1 = enemynear, Hitshakeover = 0
trigger1 = p2stateno = 6300 || p2stateno = [5000,5899]
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
var(8) = 1 + (var(8)=-1)
ignorehitpause = 1

[State -2, VS_Combo]
type = VarSet
trigger1 = var(8)!=-1 && (p2movetype!=H || enemynear, ctrl)
trigger2 = var(8)=-1 && stateno = [5000,5899]
var(8) = 0 - (roundstate<2)
ignorehitpause = 1

[State -2, VS_Combo]
type = VarSet
triggerall = numexplod(8701)!=0
trigger1 = var(8)=0
var(9) = 0
ignorehitpause = 1

[State -2, Score]
type = Varadd
trigger1 = enemynear, time=0
trigger1 = enemynear, Hitshakeover=0
trigger1 = moveguarded || p2stateno = 6300 || p2stateno = [5000,5899]
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
trigger3 = roundstate=4 && time=0 && stateno = [180,189]
var(11) = ceil(stateno/50)*var(8) + (life)*(roundstate=4) + (moveguarded)
ignorehitpause = 1

[State -2, Normalize Score]
type = Varset
triggerall = numpartner=1
trigger1 = var(11)< partner, var(11)
var(11) = partner, var(11)

[State -2, Is Danger]
type = VarSet
trigger2 = var(10) = 0 && life <= 250
trigger1 = var(10) = 1 && roundstate!=2
var(10) = (roundstate>1)
ignorehitpause = 1

[State -2, Is First Attack p3]
type = VarSet
triggerall = numpartner=1
trigger1 = partner, movehit
trigger1 = partner, var(8) != -1
var(8) = 0
ignorehitpause = 1



; ---------------------------------------------------------
; Down message (Appears when partner dies)
; sound First attack
[State -2, Finish]
type = PlaySnd
triggerall = numexplod(8580) = 0
triggerall = roundstate = 2 && p2life = 0
trigger1 = (movehit) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger2 = (numproj > 0) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger3 = (numhelper(3001) >= 1) && (p2stateno = 8000 || p2stateno = [5000,5899])
persistent = 0
value = f8560, 0
volume = 255
ignorehitpause = 1

[State -2, Left]
type = explod
triggerall = teamside = 2 && numexplod(8580) = 0
triggerall = roundstate = 2 && p2life = 0
trigger1 = (movehit) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger2 = (numproj > 0) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger3 = (numhelper(3001) >= 1) && (p2stateno = 8000 || p2stateno = [5000,5899])
anim = f221
ID = 8580
postype = left
pos = 0,100
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0
ignorehitpause = 1

[State -2, Right]
type = explod
triggerall = teamside = 1 && numexplod(8580) = 0
triggerall = roundstate = 2 && p2life = 0
trigger1 = (movehit) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger2 = (numproj > 0) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger3 = (numhelper(3001) >= 1) && (p2stateno = 8000 || p2stateno = [5000,5899])
anim = f222
ID = 8580
postype = right
pos = -9,100
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0;1
ignorehitpause = 1

[state 19]
type = varadd
trigger1 = RoundState = 2
var(17) = 1

;Hover
[State -2, VelAdd]
type = VelAdd
triggerall = statetype = A
triggerall = vel y > 2
triggerall = movetype != A
triggerall = movetype != H
triggerall = ctrl
trigger1= command = "holdup"
y = -0.75

[State -3, 2]
type = PlaySnd
triggerall = Time = 1
triggerall = Life
triggerall = random % 10 > 5
trigger1 = stateno = 5000 || stateno = 5020
trigger1 = anim != 5000 && anim != 5010
trigger2 = stateno = 5010
trigger2 = anim != 5020
value = 11,1
channel = 0
ignorehitpause = 1
volume = 255

[State -3, 2]
type = PlaySnd
triggerall = Time = 1
triggerall = Life
triggerall = random % 10 > 5
trigger1 = stateno = 5000 || stateno = 5020
trigger1 = anim != 5000 && anim != 5010
trigger2 = stateno = 5010
trigger2 = anim != 5020
value = 11,2
channel = 0
ignorehitpause = 1
volume = 255

