;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(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,-7.7         ;Neutral jumping velocity (x, y)
jump.back = -3,-7.6       ;Jump back Speed (x, y)
jump.fwd = 3,-7.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 = 1  ; 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 = "Can't wait for the X-Men anymore. Switching to Plan "B", and I'm Making up Plan "B" as I go."
victory2 = "A shady government operation with questionable approval and a suspicious agenda, That's X-Factor"
victory3 = "I kept my word. I didn't break faith. Alive and safe and whole... I brought my people home!"
victory4 = "Much as I hate the expression, but it's time to.. call in the cavalry!"
victory5 = "My name is Forge. Building is what I do. But sometimes one must first destroy before one can create"
victory6 = "I think it's a bit late for the two of us to have a little chat"
victory7 = "Something big is in the wind, and it's got global ramifications"
victory8 = "Johathan Slivercloud is my name, my friends call me Forge, you may call me neither"


;[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 170, PlaySnd]
type = PlaySnd
trigger1 = animelem = 8
value = S175,0
volume = 0
channel = 5
freqmul = 1.0
loop = 0
pan = 0

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

;-----------------------------------------------------------------------------
;Win Poses

[Statedef 180]
type = S

[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
movetype = I
physics = S
ctrl = 0
anim = 181
velset = 0,0

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

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

[State 180, VarRandom]
type = VarRandom
trigger1 = 1
v = 4
range = 0,2

[State 180, PlaySnd]
type = PlaySnd
trigger1 = Var(4) = 0
trigger1 = time = 1
value = S180,2
volume = 255
channel = 0

[State 180, PlaySnd]
type = PlaySnd
trigger1 = Var(4) = 1
trigger1 = time = 1
value = S180,3
volume = 255
channel = 0

[State 180, PlaySnd]
type = PlaySnd
trigger1 = Var(4) = 2
trigger1 = time = 1
value = S180,4
volume = 255
channel = 0


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

;-----------------------------------------------------------------------------
;Win Pose 2

[Statedef 182]
type = S
movetype = I
physics = S
ctrl = 0
anim = 182
velset = 0,0

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

[State 180, VarRandom]
type = VarRandom
trigger1 = 1
v = 4
range = 0,2

[State 180, PlaySnd]
type = PlaySnd
triggerall = Var(4) = 0
trigger1 = time = 1
value = S180,0
volume = 255
channel = 0

[State 180, PlaySnd]
type = PlaySnd
triggerall = Var(4) = 1
trigger1 = time = 1
value = S180,1
volume = 255
channel = 0

[State 180, PlaySnd]
type = PlaySnd
triggerall = Var(4) = 2
trigger1 = time = 1
value = S195,3
volume = 255
channel = 0

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

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

;-----------------------------------------------------------------------------
;-----------------------------------------------------------------------------
;Win Pose 2

[Statedef 183]
type = S
movetype = I
physics = S
ctrl = 0
anim = 170
velset = 0,0

[State 183, Explod]
type = Explod
trigger1 = time = 55
anim = 183
ID = 183
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
;scale = 0.5,1.225
sprpriority = 1
;ontop = 1
;shadow = 100,100,100
ownpal = 1

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

[State 183, VarRandom]
type = VarRandom
trigger1 = 1
v = 4
range = 0,1

[State 180, PlaySnd]
type = PlaySnd
triggerall = Var(4) = 0
trigger1 = time = 35
value = S180,1
volume = 255
channel = 0

[State 180, PlaySnd]
type = PlaySnd
triggerall = Var(4) = 1
trigger1 = time = 35
value = S180,5
volume = 255
channel = 0

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

[State 183, Not Hit]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;-----------------------------------------------------------------------------
;INTROS
;-------------------------------------------------------------------------------
[Statedef 190]
type = S

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

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

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

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

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

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

[State 191, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 191

[State 191, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1900,0
volume = 255
channel = 4

[State 190, VarRandom]
type = VarRandom
trigger1 = 1
v = 4
range = 0,2

[State 190, PlaySnd]
type = PlaySnd
triggerall = Var(4) = 0
trigger1 = time = 1
value = S190,0
volume = 255
channel = 0

[State 190, PlaySnd]
type = PlaySnd
triggerall = Var(4) = 1
trigger1 = time = 1
value = S190,2
volume = 255
channel = 0

[State 190, PlaySnd]
type = PlaySnd
triggerall = Var(4) = 2
trigger1 = time = 1
value = S190,4
volume = 255
channel = 0

;---------------------------
[State 3000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S1900,2
volume = 10
channel = 3

[State 3000, Explod]
type = Explod
trigger1 = animelem = 5
anim = 21115
ID = 21115
pos = -40,-45
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.75,1.75
sprpriority = 1
ontop = 1
ownpal = 1
;============================

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

[State 191, ChangeState]
type = ChangeState
trigger1 = !Animtime
value = 0
ctrl = 0


;---------------------------------------------------------------------------
;INTRO 2
[Statedef 192]
type = S
ctrl = 0
anim = 192
velset = 0,0

[State 192, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 192

[State 190, VarRandom]
type = VarRandom
trigger1 = 1
v = 4
range = 0,2

[State 190, PlaySnd]
type = PlaySnd
triggerall = Var(4) = 0
trigger1 = time = 1
value = S190,1
volume = 255
channel = 0

[State 190, PlaySnd]
type = PlaySnd
triggerall = Var(4) = 1
trigger1 = time = 1
value = S195,2
volume = 255
channel = 0

[State 190, PlaySnd]
type = PlaySnd
triggerall = Var(4) = 2
trigger1 = time = 1
value = S190,3
volume = 255
channel = 0

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

[State 192, ChangeState]
type = ChangeState
trigger1 = !Animtime
value = 0
ctrl = 0

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

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay

[State 193, 7]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 193, PosSet]
type = PosSet
trigger1 = time = 0
y = -300
ignorehitpause =1
persistent =1

[State 193, PosSet]
type = PosSet
trigger1 =  time= 0;animelem = 1
triggerall = P1name = "forge"
triggerall = P3name = "forge"
x = 70
ignorehitpause =1
persistent =1

[State 193, PosSet]
type = PosSet
trigger1 =  time= 0;animelem = 1
triggerall = P2name = "forge"
triggerall = P4name = "forge"
x = -70
ignorehitpause =1
persistent =1

[State 193, PlaySnd]
type = PlaySnd
trigger1 = time = 50
value = S190,1
volume = 255
channel = 0

;jetpack
[State 193, 4]
type = Explod
trigger1 =  time= 0;AnimElem = 1
anim = 3201
id = 3201
postype = P1
;pos = 0,0
ownpal = 1
removetime = 150
bindtime = 150

;straps
[State 193, 4]
type = Explod
trigger1 =  time= 0;AnimElem = 1
anim = 3202
id = 3202
postype = P1
;pos = 0,0
ontop = 1
ownpal = 1
removetime = 150
bindtime = 150

;shoulder
[State 193, 4]
type = Explod
trigger1 =  time= 0;AnimElem = 1
anim = 3203
id = 3203
postype = P1
;pos = 0, 0
ontop = 1
ownpal = 1
removetime = 150
bindtime = 150

[State 193, 4]
type = Explod
trigger1 = time = 150
anim = 3204
id = 3204
postype = P1
vel = 0,-3
;pos = 0,0
ownpal = 1
removetime = 132

[State 193, VelSet]
type = VelSet
trigger1 = time = 30
trigger2 = time = 35
trigger3 = time = 40
trigger4 = time = 45
trigger5 = time = 50
trigger6 = time = 55
trigger7 = time = 60
trigger8 = time = 65
trigger9 = time = 70
trigger10 = time = 75
trigger11 = time = 80
trigger12 = time = 85
trigger13 = time = 90
trigger14 = time = 95
trigger15 = time = 100
trigger16 = time = 105
trigger17 = time = 110
trigger18 = time = 115
trigger19 = time = 120
trigger20 = time = 125
;x = -0.265
y = 2

[State 193, ChangeState]
type = ChangeState
trigger1 = !Animtime
value = 0
ctrl = 0

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

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

[State 195, PlaySnd]
type = PlaySnd
trigger1 = Var(4) = 0
trigger1 = time = 1
value = S195,0
volume = 255
channel = 4

[State 195, PlaySnd]
type = PlaySnd
trigger1 = Var(4) = 1
trigger1 = time = 1
value = S300,0
volume = 255
channel = 4

[State 195, PlaySnd]
type = PlaySnd
trigger1 = Var(4) = 2
trigger1 = time = 1
value = S195,2
volume = 255
channel = 4

[State 195, PlaySnd]
type = PlaySnd
trigger1 = Var(4) = 3
trigger1 = time = 1
value = S195,3
volume = 255
channel = 4

[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

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

; 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 = time = 0
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 = time = 0
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 = 2
y = 0

[State 220, 1]
type = HitDef
trigger1 = time = 0
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 = -13
air.type = Low
air.hittime = 18
air.velocity = -6,-9
yaccel = 0.39+(enemynear,const(movement.yaccel)/2)
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 420, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
damage    = 28,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

[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
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Throw Attempt
[Statedef 800]
type = S
movetype = A
physics = S
juggle = 0
ctrl = 0
velset = 0,0
anim = 800
hitcountpersist = var(10) && p2movetype = H

[State 800, 1]
type = HitDef
trigger1 = animelem = 2,=1
trigger1 = P2BodyDist X <= 20
attr = S, NT
p2facing = -1
p1facing = ifelse(command="holdfwd",-1,1)
hitflag = M-
priority = 2, Miss
sparkno = -1
hitsound = S8600,0
p1stateno = 810
p2stateno = 820
p2getp1state = 1
fall = 1
id = 800
fall.recover = 0

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

;---------------------------------------------------------------------------
; Throw
[Statedef 810]
type = S
movetype = A
physics = S
anim = 810
velset = 0,0
ctrl = 0
hitcountpersist = var(10) && p2movetype = H

[State 810, 2]
type = playsnd
trigger1 = time = 0
value = 800,0
volume = 255
channel = 0

[State 810, Width]
type = width
trigger1 = 1
edge = 80,30

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

[State 810, x]
type = varset
trigger1 = time = 5
fvar(4) = pos x

[State 810, Head Value x]
type = varset
trigger1 = time = 0
var(17) = target(800),const(size.head.pos.x)

[State 810, Head Value y]
type = varset
trigger1 = time = 0
var(18) = target(800),const(size.head.pos.y)

[State 810, GrenadeHelper]
type = helper
trigger1 = time = 1
name = "Grenades"
id = 21100
postype = p2
facing = 1
pos = -10,0
stateno = 815
ownpal = 1

[State 810, GrenadeHelper]
type = helper
trigger1 = time = 1
name = "Grenades"
id = 21100
postype = p2
facing = 1
pos = 0,0
stateno = 815
ownpal = 1

[State 810, GrenadeHelper]
type = helper
trigger1 = time = 1
name = "Grenades"
id = 21100
postype = p2
facing = 1
pos = 12,0
stateno = 815
ownpal = 1

[State 810, Voice]
type = PlaySnd
trigger1 = time = 0
value = 1,5
channel = 0

[State 810, T1]
type = targetbind
trigger1 = 1
pos = 59, 0
time = 1

[State 810, Spr2]
type = SprPriority
trigger1 = animelem = 2
value = 0

[State 810, 9]
type = ChangeState
trigger1 = animelem = 3
value = 811

; Jump Away!
[Statedef 811]
type = A
movetype = I
physics = N
sprpriority = 0

[State 811, 0]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 811, 2]
type = velset
trigger1 = time = 1
x = 15.6
y = -4.4

[State 811, 3]
type = veladd
trigger1 = time > 0
y = 0.55

[State 811, 4]
type = velmul
trigger1 = time > 0
x = 0.96

[State 811, Fire!]
type = PlaySnd
trigger1 = time = 0
value = 1,12
channel = 0

[State 811, 9]
type = ChangeState
trigger1 = pos y >= 0 && vel y > 0
value = 812

; Land from Jump Away
[Statedef 812]
type = C
movetype = I
physics = C
velset = 0,0
sprpriority = 1

[State 812, 0]
type = changeanim
trigger1 = time = 0 && prevstateno = 981
value = 981

[State 812, 1]
type = posset
trigger1 = time = 0
y = 0

[State 812, LandTap]
type = PlaySnd
trigger1 = time = 0
value = 8100,0

[State 812, 2]
type = NotHitBy
trigger1 = 1
value = SCA

[State 812, 3]
type = turn
trigger1 = p2dist x < 0

[State 812, 4]
type = PlayerPush
trigger1 = 1
value = 1

[State 812, x2]
type = displaytoclipboard
trigger1 = time = 1
text = "distance covered = %d"
params = abs(floor(pos x)-floor(fvar(4)))

[State 812, 9]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

; Grenades--------------------------------
[Statedef 815]
type = A
movetype = I
physics = N
anim = 815
sprpriority = 3

[State 815, 0]
type = PosAdd
trigger1 = time = 0
x = parent,var(17)
y = parent,var(18)+10

[State 815, 1]
type = PosAdd
trigger1 = (parent, anim=810)
trigger1 = parent, animelemtime(2)=0
x = -5
y = 5

[State 815, 2]
type = PosAdd
trigger1 = (parent, anim=810)
trigger1 = parent, animelemtime(3)=0
x = -12
y = 1

[State 815, 3]
type = palfx
trigger1 = (parent, anim=810)
trigger1 = parent, animelemtime(3)=6
time = 30
add = 192,159,4
mul = 198,89,6
sinadd =  1,2,10,1
invertall = 1
color = 15

[State 815, 4]
type = changeanim
trigger1 = (parent, anim=810)
trigger1 = parent, animelemtime(3)=11
value = 9999

[State 815, BombSound]
type = PlaySnd
trigger1 = (parent, anim=810)
trigger1 = parent, animelemtime(3)=11
value = 1000,8

[State 815, flame explode]
type = explod
trigger1 = (parent, anim=810)
trigger1 = parent, animelemtime(3)=11
id = 21101
anim = 21101
pos = 0,0
postype = p1
random = 80,70
ownpal = 1
sprpriority = 3

[State 815,9]
type = destroyself
trigger1 = time = 50

;------------------------------------
;------------------------------------
; Thrown by
[Statedef 820]
type = S
movetype = H
physics = N
velset = 0,0
ctrl = 0
sprpriority = 1

[State 820, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 820

[State 820, 2]
type = ScreenBound
trigger1 = animelemtime(4) < 0
value = 0

[State 820, 4]
type = sprpriority
trigger1 = animelem = 2
value = 2

[State 820, 6]
type = palfx
trigger1 = time = 29
time = 30
add = 192,159,4
mul = 198,89,6
sinadd =  1,2,10,1
invertall = 1
color = 15

[State 820, Life]
type = LifeAdd
trigger1 = time = 30
value = -133

[State 820, 9]
type = ChangeState
trigger1 = time = 30
value = 821

; Explode into the air
[Statedef 821]
type = A
movetype = H
physics = N

[State 821, 1]
type = ChangeAnim
trigger1 = time = 0
value = 5050

[State 821, 2]
type = velset
trigger1 = time = 1
x = -4
y = -7.7

[State 821, 3]
type = VelAdd
trigger1 = time > 0
y = 0.55

[State 821, 9]
type = SelfState
trigger1 = pos y >= 0 && vel y > 0
value = 5100

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Special Attacks
; Recommended State Numbers = 1000 - 2999
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Gun shot Z

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

;=========================
[State 1000, Explod]
type = Explod
trigger1 = animelem = 1
anim = 21115
ID = 21115
pos = 0,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.5,1.5
sprpriority = 1
ontop = 1
ownpal = 1

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1900,1
volume = 10
channel = 3
;---------------------------
[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 9
value = S1900,2
volume = 10
channel = 3

[State 1000, Explod]
type = Explod
trigger1 = animelem = 9
anim = 21115
ID = 21115
pos = 0,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.5,1.5
sprpriority = 1
ontop = 1
ownpal = 1
;============================


[State 1000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1900,0
channel = 4

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
trigger2 = animelem = 6
trigger3 = animelem = 8
value = 1000,1

[State 1000, superportrait]
type = Explod
trigger1 = AnimElem = 4
anim = 1003
ID = 1003
pos = 56,-78
postype = p1
bindtime = 999
scale = 0.5,0.5
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 1000, 2]
type = Projectile
trigger1 = AnimElem = 4
ProjID = 10011
projanim = 10011
projhitanim = 1002
projremanim = 1002
projcancelanim = 1002
projscale = 0.5,0.25
velocity = 12,-2 +(random/500)
offset = 56,-78
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 8,1
pausetime = 14,4
sparkno = -1
guard.sparkno = -1
hitsound = S1000,2
guardsound = S1000,3
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -8,4
air.velocity = -8,4
;fall = 1
;air.fall = 1

[State 1000, 2]
type = Projectile
trigger1 = AnimElem = 5
ProjID = 10011
projanim = 10011
projhitanim = 1002
projremanim = 1002
projcancelanim = 1002
projscale = 0.5,0.25
velocity = 12,-1 +(random/500)
offset = 56,-78
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 8,1
pausetime = 14,4
sparkno = -1
guard.sparkno = -1
hitsound = S1000,2
guardsound = S1000,3
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -8,4
air.velocity = -8,4
;fall = 1
;air.fall = 1

[State 1000, 2]
type = Projectile
trigger1 = AnimElem = 6
ProjID = 10011
projanim = 10011
projhitanim = 1002
projremanim = 1002
projcancelanim = 1002
projscale = 0.5,0.25
velocity = 12,0
offset = 56,-78
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 8,1
pausetime = 14,4
sparkno = -1
guard.sparkno = -1
hitsound = S1000,2
guardsound = S1000,3
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -8,4
air.velocity = -8,4
;fall = 1
;air.fall = 1

[State 1000, 2]
type = Projectile
trigger1 = AnimElem = 7
ProjID = 10011
projanim = 10011
projhitanim = 1002
projremanim = 1002
projcancelanim = 1002
projscale = 0.5,0.25
velocity = 12,1 +(random/500)
offset = 56,-78
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 8,1
pausetime = 14,4
sparkno = -1
guard.sparkno = -1
hitsound = S1000,2
guardsound = S1000,3
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -8,4
air.velocity = -8,4
;fall = 1
;air.fall = 1

[State 1000, 2]
type = Projectile
trigger1 = AnimElem = 8
ProjID = 10011
projanim = 10011
projhitanim = 1002
projremanim = 1002
projcancelanim = 1002
projscale = 0.5,0.25
velocity = 12,2 +(random/500)
offset = 56,-78
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 8,1
pausetime = 14,4
sparkno = -1
guard.sparkno = -1
hitsound = S1000,2
guardsound = S1000,3
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -8,4
air.velocity = -8,4
;fall = 1
;air.fall = 1

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


;Gun shot Y
[StateDef 1020]
type = S
movetype = A
physics = S
anim = 1020
ctrl = 0
velset = 0,0

;=========================
[State 1000, Explod]
type = Explod
trigger1 = animelem = 3
anim = 21115
ID = 21115
pos = -30,-50
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
;scale = 1.5,1.5
sprpriority = 1
ontop = 1
ownpal = 1

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = time = 21
value = S1900,1
volume = 10
channel = 3
;---------------------------
[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 15
value = S1900,2
volume = 10
channel = 3

[State 1000, Explod]
type = Explod
trigger1 = animelem = 15
anim = 21115
ID = 21115
pos = 30,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
;scale = 1.5,1.5
sprpriority = 1
ontop = 1
ownpal = 1
;============================

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1900,0
channel = 4

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 10
trigger2 = animelem = 11
value = 1000,1

[State 1020, superportrait]
type = Explod
trigger1 = AnimElem = 10
anim = 1003
ID = 1003
pos = 65,-80
postype = p1
bindtime = 999
scale = 0.5,0.5
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 1020, superportrait]
type = Explod
trigger1 = AnimElem = 11
anim = 1003
ID = 1003
pos = 55,-70
postype = p1
bindtime = 999
scale = 0.5,0.5
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 1020, 2]
type = Projectile
trigger1 = AnimElem = 10
trigger2 = AnimElem = 12
trigger3 = AnimElem = 14
ProjID = 10011
projanim = 10011
projhitanim = 1002
projremanim = 1002
projcancelanim = 1002
projscale = 0.5,0.25
velocity = 15,-0.5 +(random/500)
offset = 65,-80
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 8,1
pausetime = 4,4
sparkno = -1
guard.sparkno = -1
hitsound = S1000,2
guardsound = S1000,3
ground.type = Low
ground.slidetime = 8
ground.hittime  = 5
ground.velocity = -4,2
air.velocity = -4,2

[State 1020, 2]
type = Projectile
trigger1 = AnimElem = 11
trigger2 = AnimElem = 13
trigger3 = AnimElem = 15
ProjID = 10011
projanim = 10011
projhitanim = 1002
projremanim = 1002
projcancelanim = 1002
projscale = 0.5,0.25
velocity = 15,-0.5 +(random/500)
offset = 55,-70
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 8,1
pausetime = 4,4
sparkno = -1
guard.sparkno = -1
hitsound = S1000,2
guardsound = S1000,3
ground.type = Low
ground.slidetime = 8
ground.hittime  = 5
ground.velocity = -4,2
air.velocity = -4,2

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

[Statedef 1030]
type    = C
movetype= A
physics = C
juggle  = 4
velset = 0,0
ctrl = 0
anim = 1030

;=========================
[State 1000, Explod]
type = Explod
trigger1 = animelem = 3
anim = 21115
ID = 21115
pos = 40,-55
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
;scale = 1.5,1.5
sprpriority = 1
ontop = 1
ownpal = 1

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = time = 21
value = S1900,1
volume = 10
channel = 3
;---------------------------
[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 18
value = S1900,2
volume = 10
channel = 3

[State 1000, Explod]
type = Explod
trigger1 = animelem = 18
anim = 21115
ID = 21115
pos = 40,-55
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
;scale = 1.5,1.5
sprpriority = 1
ontop = 1
ownpal = 1
;============================

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1900,0
channel = 4

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 10
value = 1000,1

[State 1030, superportrait]
type = Explod
trigger1 = AnimElem = 8
trigger2 = AnimElem = 10
trigger3 = AnimElem = 12
trigger4 = AnimElem = 14
trigger5 = AnimElem = 16
anim = 1003
ID = 1003
pos = 62,-47
postype = p1
bindtime = 999
scale = 0.25,0.25
removetime = -2
sprpriority = -5
ownpal = 1
removeongethit = 1

[State 1030, 2]
type = Projectile
trigger1 = AnimElem = 8
trigger2 = AnimElem = 16
ProjID = 10011
projanim = 10011
projhitanim = 1002
projremanim = 1002
projcancelanim = 1002
projscale = 0.5,0.25
velocity = 18,0
offset = 62,-47
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 8,1
pausetime = 4,4
sparkno = -1
guard.sparkno = -1
hitsound = S1000,2
guardsound = S1000,3
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -4,2
air.velocity = -4,2


[State 1030, 2]
type = Projectile
trigger1 = AnimElem = 10
trigger2 = AnimElem = 14
ProjID = 10011
projanim = 10011
projhitanim = 1002
projremanim = 1002
projcancelanim = 1002
projscale = 0.5,0.25
velocity = 18,2
offset = 62,-47
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 8,1
pausetime = 4,4
sparkno = -1
guard.sparkno = -1
hitsound = S1000,2
guardsound = S1000,3
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -4,2
air.velocity = -4,2

[State 1030, 2]
type = Projectile
trigger1 = AnimElem = 12
ProjID = 10011
projanim = 10011
projhitanim = 1002
projremanim = 1002
projcancelanim = 1002
projscale = 0.5,0.25
velocity = 18,4
offset = 62,-47
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 8,1
pausetime = 4,4
sparkno = -1
guard.sparkno = -1
hitsound = S1000,2
guardsound = S1000,3
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -4,2
air.velocity = -4,2
fall=1

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

;---------------------------------------------------------------------------
;Pulse Cannon A

[StateDef 1040]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 1040
velset = 0,0
sprpriority = 10

;=========================
[State 1000, Explod]
type = Explod
trigger1 = animelem = 1
anim = 21115
ID = 21115
pos = 20,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.75,1.25
sprpriority = 1
ontop = 1
ownpal = 1

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1900,1
volume = 10
channel = 3


[State 1040, EnvShake]
type = EnvShake
trigger1 = Animelem = 7
trigger2 = Animelem = 8
time = 3
freq = 26
ampl = -5
phase = 20

[State 1040, Explod]
type = Explod
trigger1 = AnimElem = 8
anim = 1042
ID = 1402
pos = 81,-81
postype = p1
bindtime = 10
removetime = 10
sprpriority = 3
ownpal = 1
removeongethit = 1
scale = .25,.25

[State 1040, 2]
type = HitDef
trigger1 = time = 0
attr = S, HA
animtype = Light
damage    = 10,2
guardflag = MA
pausetime = 11,1
sparkno = s7700
sparkxy = -10,-100
hitsound   = 5,2
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 10
ground.velocity = -2,-2
guard.velocity = -1
air.velocity = -2.1,-2.3
airguard.velocity = -2.2
fall.recover = 0
air.recover = 0
;fall=1

[State 1040, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S300,1
volume = 255
channel = 4

[State 1040, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = 1900,0
channel = 5

[State 1040, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
trigger2 = AnimElem = 8
value = 3100,3

[State 1040, 2]
type = Projectile
trigger1 = AnimElem = 7
trigger2 = AnimElem = 8
ProjID = 1005
projanim = 1005
projhitanim = 21104
projremanim = 21104
projcancelanim = 1302
projscale = 0.75,0.05
velocity = 22,0
offset = 70,-82
attr = S,HP
hitflag = MAF
guardflag = MA
animtype = hard
priority = 4,Hit
damage = 7,1
pausetime = 1,4
sparkno = -1
guard.sparkno = -1
hitsound = S1000,3
guardsound = S1000,3
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -2,-0.1
air.velocity = -2,-0.8
fall = 1
air.fall = 1

[State 1040, back to stance]
type = ChangeState
trigger1 = time >= 65
value = 1041

[StateDef 1041]
type    = S
physics = S
ctrl = 0
anim = 1041
velset = 0,0

;---------------------------
[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S1900,2
volume = 10
channel = 3

[State 1000, Explod]
type = Explod
trigger1 = animelem = 3
anim = 21115
ID = 21115
pos = 20,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.5,1.5
sprpriority = 1
ontop = 1
ownpal = 1
;============================

[State 1041, RemoveExplod]
type = RemoveExplod
trigger1 = time = 0
id = 1042

[State 1041, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 0,1
channel=-1

[State 1041, back to stance]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1


;-------------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Pulse Cannon B

[StateDef 1050]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 1050
velset = 0,0
sprpriority = 10

;=========================
[State 1000, Explod]
type = Explod
trigger1 = animelem = 1
anim = 21115
ID = 21115
pos = 20,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.25,1.75
sprpriority = 1
ontop = 1
ownpal = 1

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1900,1
volume = 10
channel = 3

[State 1050, EnvShake]
type = EnvShake
trigger1 = Animelem = 7
trigger2 = Animelem = 8
time = 3
freq = 26
ampl = -5
phase = 20

[State 1050, Explod]
type = Explod
trigger1 = AnimElem = 8
anim = 1042
ID = 1042
pos = 73,-73
postype = p1
bindtime = 10
removetime = 10
sprpriority = 3
ownpal = 1
removeongethit = 1
scale = .25,.25

[State 1050, 2]
type = HitDef
trigger1 = time = 0
attr = S, HA
animtype = Light
damage    = 10,2
guardflag = MA
pausetime = 11,1
sparkno = s7700
sparkxy = -10,-100
hitsound   = 5,2
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 10
ground.velocity = -2,-2
guard.velocity = -1
air.velocity = -2.1,-2.3
airguard.velocity = -2.2
fall.recover = 0
air.recover = 0

[State 1050, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S300,2
volume = 255
channel = 4

[State 1050, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = 1900,0
channel = 5

[State 1050, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
trigger2 = AnimElem = 8
value = 3000,0

[State 1050, 2]
type = Projectile
trigger1 = AnimElem = 7
trigger2 = AnimElem = 8
ProjID = 1006
projanim = 1006
projhitanim = 21103
projremanim = 21103
projcancelanim = 21103
projscale = 0.65,0.65
velocity = 9,0
offset = 73,-73
attr = S,HP
hitflag = MAF
guardflag = MA
animtype = hard
priority = 4,Hit
damage = 7,1
pausetime = 1,4
sparkno = -1
guard.sparkno = -1
hitsound = S1000,8
guardsound = S1000,3
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -2,-0.1
air.velocity = -2,-0.8
fall = 1
air.fall = 1

[State 1050, back to stance]
type = ChangeState
trigger1 = time >= 55
value = 1051

[StateDef 1051]
type    = S
physics = S
ctrl = 0
anim = 1051
velset = 0,0

;---------------------------
[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S1900,2
volume = 10
channel = 3

[State 1000, Explod]
type = Explod
trigger1 = animelem = 3
anim = 21115
ID = 21115
pos = 20,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.5,1.5
sprpriority = 1
ontop = 1
ownpal = 1
;============================

[State 1051, RemoveExplod]
type = RemoveExplod
trigger1 = time = 0
id = 1052

[State 1051, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 0,1
channel=-1

[State 1051, back to stance]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1


;-------------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Pulse Cannon C

[StateDef 1060]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 1060
velset = 0,0
sprpriority = 10

;=========================
[State 1000, Explod]
type = Explod
trigger1 = animelem = 1
anim = 21115
ID = 21115
pos = 20,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.75,1.25
sprpriority = 1
ontop = 1
ownpal = 1

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1900,1
volume = 10
channel = 3

[State 1060, EnvShake]
type = EnvShake
trigger1 = Animelem = 7
trigger2 = Animelem = 8
time = 3
freq = 26
ampl = -5
phase = 20

[State 1060, Explod]
type = Explod
trigger1 = AnimElem = 8
anim = 1042
ID = 1042
pos = 73,-73
postype = p1
bindtime = 10
removetime = 10
sprpriority = 3
ownpal = 1
removeongethit = 1
scale = .25,.25

[State 1060, 2]
type = HitDef
trigger1 = time = 0
attr = S, HA
animtype = Light
damage    = 10,2
guardflag = MA
pausetime = 11,1
sparkno = s7700
sparkxy = -10,-100
hitsound   = 5,2
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 10
ground.velocity = -2,-2
guard.velocity = -1
air.velocity = -2.1,-2.3
airguard.velocity = -2.2
fall.recover = 0
air.recover = 0
fall = 1

[State 1060, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S300,7
volume = 255
channel = 4

[State 1060, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = 1900,0
channel = 5

[State 1060, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
trigger2 = AnimElem = 8
value = 3000,0

[State 1060, 2]
type = Projectile
trigger1 = AnimElem = 7
ProjID = 1004
projanim = 1004
projhitanim = 21111
projremanim = 21111
projcancelanim = 21111
projscale = 0.85,0.85
velocity = 7,0
offset = 73,-73
attr = S,HP
hitflag = MAF
guardflag = MA
animtype = hard
priority = 4,Hit
damage = 7,1
pausetime = 1,4
sparkno = -1
guard.sparkno = -1
hitsound = S1000,3
guardsound = S1000,3
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = 5,-7
air.velocity = 5,-7
fall = 1
air.fall = 1

[State 1060, back to stance]
type = ChangeState
trigger1 = time >= 55
value = 1061

[StateDef 1061]
type    = S
physics = S
ctrl = 0
anim = 1061
velset = 0,0

;---------------------------
[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S1900,2
volume = 10
channel = 3

[State 1000, Explod]
type = Explod
trigger1 = animelem = 3
anim = 21115
ID = 21115
pos = 20,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.5,1.5
sprpriority = 1
ontop = 1
ownpal = 1
;============================

[State 1061, RemoveExplod]
type = RemoveExplod
trigger1 = time = 0
id = 1062

[State 1061, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 0,1
channel=-1

[State 1061, back to stance]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

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


;---------------------------------------------------------------------------
;Grenade Roll
[Statedef 1100]
type    = U
movetype= A
physics = S
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1100
sprpriority = 0
facep2 = 1

[State 1101]
type = PlaySnd
trigger1 = time = 0
value = 300,3
channel = 0

[State 1100, VelSet]
type = VelSet
trigger1 = animelem = 4
x = -10
y = 0

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

[State 1100]
type = Helper
trigger1 = AnimElem = 2 && StateType != A
stateno = 21100
id = 21100
ownpal = 1
ignorehitpause = 1
pos = 44,-6

[State 1100]
type = ChangeState
trigger1 = AnimTime = 0 && StateType != A
value = 0
ctrl = 1

[State 1100]
type = ChangeState
trigger1 = AnimTime = 0 && StateType = A
value = 1130
ctrl = 0

[State 1100]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0

;---------------------------------------------------------------------------
;Grenade AIR A
[Statedef 1101]
type    = U
movetype= A
physics = S
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1101
sprpriority = 0
facep2 = 1

[State 1101]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1100,0

[State 1101]
type = PlaySnd
trigger1 = time = 0
value = 300,3
channel = 0

[State 1101]
type = Helper
trigger1 = AnimElem = 3 && StateType = A
stateno = 21100
id = 21100
ownpal = 1
ignorehitpause = 1
pos = 17,-99

[State 1101]
type = ChangeState
trigger1 = AnimTime = 0 && StateType = A
value = 1130
ctrl = 0

[State 1101]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0

;---------------------------------------------------------------------------
;Grenade B
[Statedef 1110]
type    = U
movetype= A
physics = S
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1100+(StateType = A)
sprpriority = 0
facep2 = 1

[State 1101]
type = PlaySnd
trigger1 = time = 0
value = 300,3
channel = 0

[State 1100, VelSet]
type = VelSet
trigger1 = animelem = 4
x = -10
y = 0

[State 1110]
type = PlaySnd
trigger1 = AnimElem = 2 && StateType = A
value = 1100,0

[State 1110]
type = PlaySnd
trigger1 = AnimElem = 3 && StateType != A
value = 1100,0

[State 1110]
type = PlaySnd
trigger1 = AnimElem = 8
value = 1000,5

[State 1110]
type = Helper
trigger1 = AnimElem = 8 && StateType != A
stateno = 21100
id = 21100
ownpal = 1
ignorehitpause = 1
pos = 44,-86

[State 1110]
type = Helper
trigger1 = AnimElem = 3 && StateType = A
stateno = 21100
id = 21100
ownpal = 1
ignorehitpause = 1
pos = 17,-99

[State 1110]
type = ChangeState
trigger1 = AnimTime = 0 && StateType != A
value = 0
ctrl = 1

[State 1110]
type = ChangeState
trigger1 = AnimTime = 0 && StateType = A
value = 1130
ctrl = 0

[State 1110]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0

;---------------------------------------------------------------------------
;Grenade C
[Statedef 1120]
type    = U
movetype= A
physics = S
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1100+(StateType = A)
sprpriority = 0
facep2 = 1

[State 1101]
type = PlaySnd
trigger1 = time = 0
value = 300,3
channel = 0

[State 1100, VelSet]
type = VelSet
trigger1 = animelem = 4
x = -6
y = 0

[State 1101]
type = PlaySnd
trigger1 = AnimElem = 2 && StateType = A
value = 1100,0

[State 1101]
type = PlaySnd
trigger1 = AnimElem = 3 && StateType != A
value = 1100,0

[State 1120]
type = PlaySnd
trigger1 = AnimElem = 8
value = 1000,5

[State 1120]
type = Helper
trigger1 = AnimElem = 8 && StateType != A
stateno = 21100
id = 21100
ownpal = 1
ignorehitpause = 1
pos = 44,-86

[State 1120]
type = Helper
trigger1 = AnimElem = 3 && StateType = A
stateno = 21100
id = 21100
ownpal = 1
ignorehitpause = 1
pos = 17,-99

[State 1120]
type = ChangeState
trigger1 = AnimTime = 0 && StateType != A
value = 0
ctrl = 1

[State 1120]
type = ChangeState
trigger1 = AnimTime = 0 && StateType = A
value = 1130
ctrl = 0

[State 1120]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0

;------------------------------------------------------------------------------------------------------------
[Statedef 1130]
type = A
movetype = I
physics = N
anim = 48
sprpriority = 0
velset = 0,0
facep2 = 1

[State 1130]
type = VelAdd
trigger1 = anim = 48
y = 0.4

[State 1130]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0

;-------------------------------------------------------------------------------
;Grenade
[Statedef 21100]
type = U
movetype = A
physics = N
ctrl = 0
sprpriority = 2
velset = 0,0
hitcountpersist = 1

[State 21100]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 21100
value = 21100

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

[State 21100]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21100]
type = HitOverride
trigger1 = 1
stateno = 21101
attr = SCA,AP
slot = 0
time = -1

[State 21100]
type = VarSet
trigger1 = Time = 0
var(1) = 60

[State 21100]
type = VelSet
trigger1 = Time = 0 && Parent,Stateno = 1100
x = 1.5
y = 0

[State 21100]
type = VelSet
trigger1 = Time = 0 && Parent,Stateno = 1101
x = 1.5
y = -0.5

[State 21100]
type = VelSet
trigger1 = Time = 0 && Parent,Stateno = 1110
x = 2.5
y = -1

[State 21100]
type = VelSet
trigger1 = Time = 0 && Parent,Stateno = 1120
x = 4
y = -2

[State 21100]
type = VelAdd
trigger1 = 1
y = 0.3

[State 21100]
type = HitDef
attr = S, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 50,5
animtype = Light
priority  = 5, Hit
guardflag = MA
pausetime = 0,1
sparkxy = -10,-50+floor(P2Dist Y)
hitsound   = S1100,2
guardsound = S3,0
sparkno = 2
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 5
ground.velocity = -6,-4
air.velocity = -6,-4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
sprpriority = 2
p1stateno = 21150
p2stateno = 21160
fall = 1
air.fall=1
id = 21100

[State 21100]
type = ChangeState
trigger1 = MoveContact
trigger2 = Time > 30 + 12*(Parent,StateType = A)
trigger3 = Pos Y >= 0
trigger3 = Vel Y > 0
ignorehitpause = 1
value = 21101

;------------------------------------------------------------------------------------------------------------
;Grenade Helper
[Statedef 21101]
type = U
movetype = A
physics = N
ctrl = 0
sprpriority = 2
velset = 0,0
hitcountpersist = 1

[State 21101]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 21102
value = 21102

[State 21101]
type = PlaySnd
trigger1 = AnimElem = 4
value = 1000,5
volume = 255
channel = 5

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

[State 21101]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21101]
type = HitOverride
trigger1 = 1
stateno = 21101
attr = SCA,AP
slot = 0
time = -1

[State 21101]
type = HitDef
attr = S, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 50,5
animtype = Light
priority  = 5, Hit
guardflag = MA
pausetime = 0,1
sparkxy = -10,-10+floor(Parent,P2Dist Y)
hitsound   = S172,5
guardsound = S3,0
sparkno = 2
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 5
ground.velocity = -7,-5
air.velocity = -7,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
sprpriority = 2
p1stateno = 21150
p2stateno = 21160
id = 21100
fall = 1
air.fall=1

[State 21101]
type = ChangeState
trigger1 = Time > 12
value = 21109

[State 21101]
type = Trans
trigger1 = 1
trans = add

[State 21101]
type = Helper
trigger1 = animelem = 5
stateno = 21102
ownpal = 1

;------------------------------------------------------------------------------------------------------------
;Grenade Helper
[Statedef 21102]
type = U
movetype = I
physics = N
anim = 21104
ctrl = 0
sprpriority = 3
velset = 0,0

[State 21102]
type = Varset
trigger1 = Time = 0
var(0) = floor(360/(random%10+1))

[State 21102]
type = Varset
trigger1 = Time = 0
var(3) = parent,id

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

[State 21102]
type = DestroySelf
trigger1 = !PlayerIDExist(var(3))
trigger2 = Time >30

[State 21102]
type = BindToParent
trigger1 = PlayerIDExist(var(3))

[State 21102]
type = Trans
trigger1 = Parent,Stateno = 21109
trans = addalpha
alpha = 256-time*28,time*28

;-------------------------------------------------------------------------------
;Grenade Helper
[Statedef 21103]
type = U
movetype = I
physics = N
anim = 21104
ctrl = 0
sprpriority = 3
velset = 0,0

[State 21103, PalFX]
type = PalFX
trigger1 = time = 1
time = 33
add = 0,30,70
mul = 16,156,356
sinadd = 0,20,60,10
invertall = 1
color = 116

[State 21103]
type = DestroySelf
trigger1 = Time > 33
;------------------------------------------------------------------------------------------------------------
;Grenade Helper
[Statedef 21109]
type = U
movetype = I
physics = N
anim = 21102
ctrl = 0
sprpriority = 2
velset = 0,0

[State 21109, PlaySnd]
type = PlaySnd
trigger1 = animelem =1
value = 1000,5
volume = 255

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

[State 21109]
type = DestroySelf
trigger1 = Time > 6

;---------------------------------------------------------------------------
;Grenade

[Statedef 21150]
type    = S
movetype= A
physics = N
anim = 21104
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 0

[State 21150]
type = BindToTarget
trigger1 = 1
pos = 0,-abs(EnemyNear, const(size.mid.pos.y))

[State 21150]
type = VelAdd
trigger1 = enemynear,Pos Y < 0
y = 0.4

[State 21150]
type = VelSet
trigger1 = enemynear,Pos Y >= 0
y = 0

[State 21150]
type = PosSet
trigger1 = Pos Y >= 0 && Vel Y > 0
y = 0

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

[State 21150]
type = Trans
trigger1 = 1
trans = add

[State 21150]
type = Helper
trigger1 = animelem = 1
stateno = 21103
ownpal = 1

[State 21150]
type = TargetState
trigger1 = Time >= var(1)
value = 21165

[State 21150]
type = ChangeState
trigger1 = Time >= var(1)
value = 21109
ctrl = 0

[State 21150]
type = ChangeState
trigger1 = !NumTarget(21100)
value = 21109
ctrl = 1


;------------------------------------------------------------------------------------------------------------
;Grenade End
[Statedef 21155]
type = S
movetype = I
physics = N
anim = 21102
ctrl = 0
sprpriority = 2
velset = 0,0

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

[State 21055]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
;Trap by Grenade

[Statedef 21160]
type    = U
movetype= H
physics = N
velset = 0,0
sprpriority = -1

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

[State 21101, PalFX]
type = PalFX
trigger1 = time = 1
time = 33
add = 0,30,70
mul = 16,156,356
sinadd = 0,20,60,10
invertall = 1
color = 116

[State 21160]
type = ChangeAnim2
trigger1 = Time = 0
value = 5000

[State 21160]
type = DestroySelf
trigger1 = ishelper


;---------------------------------------------------------------------------
;Trap By Grenade

[Statedef 21165]
type    = U
movetype= H
physics = N
velset = 0,0


[State 21165]
type = SelfState
trigger1 = Time > 1
value = 5000+40*(Pos Y < 0)
ctrl = 1

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Travelling Mine (Spider)
[Statedef 1200]
type    = U
movetype= A
physics = S
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1200
sprpriority = 0

[State 1200, ChangeState]
type = ChangeState
trigger1 = AnimElem = 9 &&  command = "holdx"
value = 1012
ctrl = 0

;=========================
[State 1000, Explod]
type = Explod
trigger1 = animelem = 1
anim = 21115
ID = 21115
pos = 0,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.5,1.5
sprpriority = 1
ontop = 1
ownpal = 1

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1900,1
volume = 10
channel = 3

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 14
value = S1900,2
volume = 10
channel = 3

[State 1000, Explod]
type = Explod
trigger1 = animelem = 14
anim = 21115
ID = 21115
pos = 0,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.5,1.5
sprpriority = 1
ontop = 1
ownpal = 1
;============================

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1900,0
channel = 4

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 10
value = S300,5
volume = 255
channel = 4

[State 1200]
type = Helper
trigger1 = AnimElem = 11 && StateType != A
stateno = 22100
id = 22100
ownpal = 1
ignorehitpause = 1
pos = 64,-16

[State 1200]
type = ChangeState
trigger1 = AnimTime = 0 && StateType != A
value = 0
ctrl = 1

[State 1200]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Travelling Mine (Spider)
[Statedef 1210]
type    = U
movetype= A
physics = S
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1200
sprpriority = 0

[State 1210, ChangeState]
type = ChangeState
trigger1 = AnimElem = 9 &&  command = "holdy"
value = 1010
ctrl = 0

;=========================
[State 1000, Explod]
type = Explod
trigger1 = animelem = 1
anim = 21115
ID = 21115
pos = 0,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.5,1.5
sprpriority = 1
ontop = 1
ownpal = 1

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1900,1
volume = 10
channel = 3

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 14
value = S1900,2
volume = 10
channel = 3

[State 1000, Explod]
type = Explod
trigger1 = animelem = 14
anim = 21115
ID = 21115
pos = 0,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.5,1.5
sprpriority = 1
ontop = 1
ownpal = 1
;============================

[State 1210, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1900,0
channel = 4

[State 1210, PlaySnd]
type = PlaySnd
trigger1 = animelem = 10
value = S300,5
volume = 255
channel = 4

[State 1210]
type = Helper
trigger1 = AnimElem = 11 && StateType != A
stateno = 22200
id = 22200
ownpal = 1
ignorehitpause = 1
pos = 64,-16

[State 1210]
type = ChangeState
trigger1 = AnimTime = 0 && StateType != A
value = 0
ctrl = 1

[State 1210]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0

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

;---------------------------------------------------------------------------
;Travelling Mine (Spider)
[Statedef 1220]
type    = U
movetype= A
physics = S
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1200
sprpriority = 0

[State 1220, ChangeState]
type = ChangeState
trigger1 = AnimElem = 9 &&  command = "holdz"
value = 1014
ctrl = 0

;=========================
[State 1000, Explod]
type = Explod
trigger1 = animelem = 1
anim = 21115
ID = 21115
pos = 0,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.5,1.5
sprpriority = 1
ontop = 1
ownpal = 1

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1900,1
volume = 10
channel = 3
;---------------------------
[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 14
value = S1900,2
volume = 10
channel = 3

[State 1000, Explod]
type = Explod
trigger1 = animelem = 14
anim = 21115
ID = 21115
pos = 0,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.5,1.5
sprpriority = 1
ontop = 1
ownpal = 1
;============================

[State 1220, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1900,0
channel = 4

[State 1220, PlaySnd]
type = PlaySnd
trigger1 = animelem = 10
value = S300,5
volume = 255
channel = 4

[State 1220]
type = Helper
trigger1 = AnimElem = 11 && StateType != A
stateno = 22300
id = 22300
ownpal = 1
ignorehitpause = 1
pos = 64,-16

[State 1220]
type = ChangeState
trigger1 = AnimTime = 0 && StateType != A
value = 0
ctrl = 1

[State 1220]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0

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

;-------------------------------------------------------------------------------
;Mine
[Statedef 22100]
type = U
movetype = A
physics = N
ctrl = 0
sprpriority = 2
velset = 0,0
hitcountpersist = 1

[State 22100]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 22100
value = 1202

[State 22100, Explod]
type = Explod
trigger1 = time = 1
anim = 12041
ID = 22101
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0.75,0.25
removetime = 10
scale = 0.75,0.75
sprpriority = 22
;ontop = 1

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

[State 22100]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 22100]
type = HitOverride
trigger1 = 1
stateno = 22101
attr = SCA,AP
slot = 0
time = -1

[State 22100]
type = VarSet
trigger1 = Time = 0
var(1) = 60

[State 22100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,1
channel = 4

[State 22100]
type = VelSet
trigger1 = Time = 0 && Parent,Stateno = 1200
x = 3
y = 0

[State 22100]
type = VelAdd
trigger1 = 1
y = 0.3

[State 22100]
type = HitDef
attr = S, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 50,5
animtype = Light
priority  = 5, Hit
guardflag = MA
pausetime = 0,1
sparkxy = -10,-50+floor(P2Dist Y)
hitsound   = S2,0
guardsound = S3,0
sparkno = 2
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 5
ground.velocity = -6,-4
air.velocity = -6,-4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
sprpriority = 2
palfx.time = 40
palfx.add = 2,79,154
palfx.mul = 8,79,156
palfx.sinadd = 61,20,10,15
palfx.invertall = 1
palfx.color = 115

[State 22100]
type = ChangeState
trigger1 = MoveContact
trigger2 = Time > 60
trigger3 = Pos Y >= 0
trigger3 = Vel Y > 0
ignorehitpause = 1
value = 22101

[State 22101]
type = Helper
trigger1 = moveguarded = 1
stateno = 22102
ownpal = 1

;------------------------------------------------------------------------------------------------------------
;Mine Helper
[Statedef 22101]
type = U
movetype = A
physics = N
ctrl = 0
sprpriority = 2
velset = 0,0
hitcountpersist = 1

[State 22101]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 22100
value = 1203

[State 22101, Explod]
type = Explod
trigger1 = time = 1
anim = 12011
ID = 22101
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 4.5,0
removetime = 54
;scale = 0.33,0.33
;sprpriority = 22
;ontop = 1

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

[State 22101]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 22101]
type = HitOverride
trigger1 = 1
stateno = 22101
attr = SCA,AP
slot = 0
time = -1

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

[State 22101, VelSet]
type = VelSet
trigger1 = time = 20
x = 2
y = 0

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

[State 22101, VelSet]
type = VelSet
trigger1 = animelem = 17
x = 0
y = 0

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,2

[State 22101]
type = HitDef
attr = S, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 50,5
animtype = Light
priority  = 5, Hit
guardflag = MA
pausetime = 0,1
sparkxy = -10,-10+floor(Parent,P2Dist Y)
hitsound   = 5,0
guardsound = 6,0
sparkno = 2
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 5
ground.velocity = -7,-5
air.velocity = -7,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
sprpriority = 2
palfx.time = 40
palfx.add = 2,79,154
palfx.mul = 8,79,156
palfx.sinadd = 61,20,10,15
palfx.invertall = 1
palfx.color = 115

[State 22101]
type = ChangeState
trigger1 = Time > 52
trigger2 != movecontact = 1
value = 22109

[State 22101, RemoveExplod]
type = RemoveExplod
trigger1 = movecontact = 1
trigger1 = moveguarded < 1
id = 22101

[State 22101]
type = Helper
trigger1 = movecontact = 1
trigger1 = moveguarded < 1
stateno = 22102
ownpal = 1

;------------------------------------------------------------------------------------------------------------
;Mine Helper
[Statedef 22102]
type = U
movetype = I
physics = N
anim = 21103
ctrl = 0
sprpriority = 3
velset = 0,0

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,3

[State 22102]
type = Varset
trigger1 = Time = 0
var(0) = floor(360/(random%10+1))

[State 22102]
type = Varset
trigger1 = Time = 0
var(3) = parent,id

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

[State 22102]
type = DestroySelf
trigger1 = !PlayerIDExist(var(3))
trigger2 = Time >48

[State 22102]
type = BindToParent
trigger1 = PlayerIDExist(var(3))

[State 22102]
type = Trans
trigger1 = Parent,Stateno = 22109
trans = addalpha
alpha = 256-time*22,time*22

;-------------------------------------------------------------------------------
;Mine Helper
[Statedef 22109]
type = U
movetype = I
physics = N
anim = 21104
ctrl = 0
sprpriority = 2
velset = 0,0

[State 22109, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,3

[State 22109, RemoveExplod]
type = RemoveExplod
trigger1 = time = 1
id = 22101

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

[State 22109]
type = DestroySelf
trigger1 = Time > 16

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

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;Mine B
[Statedef 22200]
type = U
movetype = A
physics = N
ctrl = 0
sprpriority = 2
velset = 0,0
hitcountpersist = 1

[State 22200]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 22200
value =  1202

[State 22200, Explod]
type = Explod
trigger1 = time = 1
anim = 12041
ID = 22101
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0.75,0.25
removetime = 10
scale = 0.75,0.75
sprpriority = 22
;ontop = 1

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

[State 22200]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 22200]
type = HitOverride
trigger1 = 1
stateno = 22201
attr = SCA,AP
slot = 0
time = -1

[State 22200]
type = VarSet
trigger1 = Time = 0
var(1) = 60

[State 22200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,1
channel = 4

[State 22200]
type = VelSet
trigger1 = Time = 0 && Parent,Stateno = 1200
x = 3
y = 0

[State 22200]
type = VelAdd
trigger1 = 1
y = 0.3

[State 22200]
type = HitDef
attr = S, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 50,5
animtype = Light
priority  = 5, Hit
guardflag = MA
pausetime = 0,1
sparkxy = -10,-50+floor(P2Dist Y)
hitsound   = S2,0
guardsound = S3,0
sparkno = 2
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 5
ground.velocity = -6,-4
air.velocity = -6,-4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
sprpriority = 2
palfx.time = 30
palfx.add = 172,119,4
palfx.mul = 98,89,6
palfx.sinadd = 61,20,10,15
palfx.invertall = 1
palfx.color = 15

[State 22200]
type = ChangeState
trigger1 = MoveContact
trigger2 = Time > 60
trigger3 = Pos Y >= 0
trigger3 = Vel Y > 0
ignorehitpause = 1
value = 22201

[State 22101]
type = Helper
trigger1 = moveguarded = 1
stateno = 22202
ownpal = 1

;------------------------------------------------------------------------------------------------------------
;Mine Helper
[Statedef 22201]
type = U
movetype = A
physics = N
ctrl = 0
sprpriority = 2
velset = 0,0
hitcountpersist = 1

[State 22201]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 22200
value = 1203

[State 22201, Explod]
type = Explod
trigger1 = time = 1
anim = 12011
ID = 22201
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 4.5,0
removetime = 54
;scale = 0.33,0.33
;sprpriority = 22
;ontop = 1

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

[State 22201]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 22201]
type = HitOverride
trigger1 = 1
stateno = 22201
attr = SCA,AP
slot = 0
time = -1

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

[State 22201, VelSet]
type = VelSet
trigger1 = time = 20
x = 2
y = 0

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

[State 22201, VelSet]
type = VelSet
trigger1 = animelem = 17
x = 0
y = 0

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,2

[State 22201]
type = HitDef
attr = S, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 50,5
animtype = Light
priority  = 5, Hit
guardflag = MA
pausetime = 0,1
sparkxy = -10,-10+floor(Parent,P2Dist Y)
hitsound   = s1000,8
guardsound = s1000,3
sparkno = s21109
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 5
ground.velocity = -7,-5
air.velocity = -7,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
sprpriority = 2
palfx.time = 30
palfx.add = 172,119,4
palfx.mul = 98,89,6
palfx.sinadd = 61,20,10,15
palfx.invertall = 1
palfx.color = 15

[State 22201]
type = ChangeState
trigger1 = Time > 52
trigger2 != movecontact = 1
value = 22209

[State 22201, RemoveExplod]
type = RemoveExplod
trigger1 = movecontact = 1
trigger1 = moveguarded < 1
id = 22201

[State 22201]
type = Helper
trigger1 = movecontact = 1
trigger1 = moveguarded < 1
stateno = 22202
ownpal = 1
;------------------------------------------------------------------------------------------------------------
;Mine Helper
[Statedef 22202]
type = U
movetype = I
physics = N
anim = 21112
ctrl = 0
sprpriority = 3
velset = 0,0

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,3

[State 22202]
type = Varset
trigger1 = Time = 0
var(0) = floor(360/(random%10+1))

[State 22202]
type = Varset
trigger1 = Time = 0
var(3) = parent,id

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

[State 22202]
type = DestroySelf
trigger1 = !PlayerIDExist(var(3))
trigger2 = Time >48

[State 22202]
type = BindToParent
trigger1 = PlayerIDExist(var(3))

[State 22202]
type = Trans
trigger1 = Parent,Stateno = 22209
trans = addalpha
alpha = 256-time*22,time*22

;-------------------------------------------------------------------------------
;Mine Helper
[Statedef 22209]
type = U
movetype = I
physics = N
anim = 21112
ctrl = 0
sprpriority = 2
velset = 0,0

[State 22209, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,3

[State 22209, RemoveExplod]
type = RemoveExplod
trigger1 = time = 1
id = 22201

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

[State 22209]
type = DestroySelf
trigger1 = Time > 16

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;Mine C
[Statedef 22300]
type = U
movetype = A
physics = N
ctrl = 0
sprpriority = 2
velset = 0,0
hitcountpersist = 1

[State 22300]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 22300
value = 1202

[State 22300, Explod]
type = Explod
trigger1 = time = 1
anim = 12041
ID = 22301
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0.75,0.25
removetime = 10
scale = 0.75,0.75
sprpriority = 22
;ontop = 1

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

[State 22300]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 22300]
type = HitOverride
trigger1 = 1
stateno = 22301
attr = SCA,AP
slot = 0
time = -1

[State 22300]
type = VarSet
trigger1 = Time = 0
var(1) = 60

[State 22300, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,1
channel = 4

[State 22300]
type = VelSet
trigger1 = Time = 0 && Parent,Stateno = 1200
x = 3
y = 0

[State 22300]
type = VelAdd
trigger1 = 1
y = 0.3

[State 22300]
type = HitDef
attr = S, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 50,5
animtype = Light
priority  = 5, Hit
guardflag = MA
pausetime = 0,1
sparkxy = -10,-50+floor(P2Dist Y)
hitsound   = S2,0
guardsound = S3,0
sparkno = 2
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 5
ground.velocity = -6,-4
air.velocity = -6,-4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
sprpriority = 2
palfx.time = 40
palfx.add = 2,179,54
palfx.mul = 8,179,56
palfx.sinadd = 61,20,10,15
palfx.invertall = 1
palfx.color = 95
p2stateno = 5990

[State 22300]
type = ChangeState
trigger1 = MoveContact
trigger2 = Time > 60
trigger3 = Pos Y >= 0
trigger3 = Vel Y > 0
ignorehitpause = 1
value = 22301

[State 22301]
type = Helper
trigger1 = moveguarded = 1
stateno = 22302
ownpal = 1

;------------------------------------------------------------------------------------------------------------
;Mine Helper
[Statedef 22301]
type = U
movetype = A
physics = N
ctrl = 0
sprpriority = 2
velset = 0,0
hitcountpersist = 1

[State 22301]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 22300
value = 1203

[State 22301, Explod]
type = Explod
trigger1 = time = 1
anim = 12011
ID = 22301
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 4.5,0
removetime = 54
;scale = 0.33,0.33
;sprpriority = 22
;ontop = 1

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

[State 22301]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 22301]
type = HitOverride
trigger1 = 1
stateno = 22301
attr = SCA,AP
slot = 0
time = -1

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

[State 22301, VelSet]
type = VelSet
trigger1 = time = 20
x = 2
y = 0

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

[State 22301, VelSet]
type = VelSet
trigger1 = animelem = 17
x = 0
y = 0

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,2

[State 22301]
type = HitDef
attr = S, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 50,5
animtype = Light
priority  = 5, Hit
guardflag = MA
pausetime = 0,1
sparkxy = -10,-10+floor(Parent,P2Dist Y)
hitsound   = 5,0
guardsound = 6,0
sparkno = 2
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 5
ground.velocity = -7,-5
air.velocity = -7,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
sprpriority = 2
palfx.time = 40
palfx.add = 120,125,135
palfx.mul = 120,125,135
palfx.sinadd = 61,20,10,15
palfx.invertall = 1
palfx.color = 111
p2stateno = 5990

[State 22301]
type = ChangeState
trigger1 = Time > 52
trigger2 != movecontact = 1
value = 22309

[State 22301, RemoveExplod]
type = RemoveExplod
trigger1 = movecontact = 1
trigger1 = moveguarded < 1
id = 22301

[State 22301]
type = Helper
trigger1 = movecontact = 1
trigger1 = moveguarded < 1
stateno = 22302
ownpal = 1

;------------------------------------------------------------------------------------------------------------
;Mine Helper
[Statedef 22302]
type = U
movetype = I
physics = N
anim = 21113
ctrl = 0
sprpriority = 3
velset = 0,0

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,3

[State 22302]
type = Varset
trigger1 = Time = 0
var(0) = floor(360/(random%10+1))

[State 22302]
type = Varset
trigger1 = Time = 0
var(3) = parent,id

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

[State 22302]
type = DestroySelf
trigger1 = !PlayerIDExist(var(3))
trigger2 = Time >48

[State 22302]
type = BindToParent
trigger1 = PlayerIDExist(var(3))

[State 22302]
type = Trans
trigger1 = Parent,Stateno = 22109
trans = addalpha
alpha = 256-time*22,time*22

;-------------------------------------------------------------------------------
;Mine Helper
[Statedef 22309]
type = U
movetype = I
physics = N
anim = 21113
ctrl = 0
sprpriority = 2
velset = 0,0

[State 22309, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,3

[State 22309, RemoveExplod]
type = RemoveExplod
trigger1 = time = 1
id = 22301

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

[State 22309]
type = DestroySelf
trigger1 = Time > 16

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;------------------------------------------
; Stun Gas
[Statedef 5990]
type = S
movetype= U
physics = N
anim = 5300
velset = 0,0

[State 5990, Varset]
type = Varset
trigger1 = time = 0
V = 27
Value = Anim

[State 5990, anim]
type = Changeanim
trigger1 = time != 0
value = Var(27)

[State 5990, color]
type = palFX
trigger1 = time != 0
add = 120,125,135
mul = 120,125,135
color = 111
time = 7

[State 5990, SelfState]
type = SelfState
trigger1 = time = 50
trigger1 = Pos Y > -1
value = 5100
ctrl = 1

[State 5990, End]
type = ChangeState
trigger1 = time = 20
trigger1 = Pos Y < 0
value = 5991

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

[Statedef 5991]
type    = S
movetype= H
physics = N
velset = 0,2
ctrl = 0
anim = 5070

[State 5991, 0]
type = Veladd
trigger1 = Pos Y < 0
Y = .75

[State 5991, 1]
type = Velset
trigger1 = Pos Y > 0
Y = 0

[State 5991, 2]
type = Posset
trigger1 = Pos Y > 0
trigger1 = Vel Y = 0
Y = 0

[State 5991, 3]
type = SelfState
trigger1 = vel Y = 0
trigger1 = Pos Y = 0
value = 5100
ctrl = 1

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


;spec ops

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

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S300,4

[State 1010, changestate]
type = ChangeState
trigger1 = command != "holdy"
trigger2 = var(59) && time > 30
value = 1011
ctrl = 0

[State 1010, 2]
type = Explod
trigger1 = AnimElem = 1
anim = 21102
ID = 1011
pos = 38,-80
scale = .25,.25
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1


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

;---------------------------
[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = S1900,2
volume = 10
channel = 3

[State 1000, Explod]
type = Explod
trigger1 = animelem = 6
anim = 21115
ID = 21115
pos = 0,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.5,1.5
sprpriority = 1
ontop = 1
ownpal = 1
;============================


[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 1000,3

[State 1011, 2]
type = Projectile
trigger1 = AnimElem = 1
Projscale = 0.75,0.75
ProjID =21110
projanim = 21110
projhitanim = 21101
projremanim = 21101
projcancelanim = 21101
velocity = 7,0
offset = 58,-80
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 50,5
pausetime = 24,24
sparkno = -1
guard.sparkno = -1
hitsound = S1000,8
guardsound = S1000,3
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -3,-4
air.velocity = -3,-4
fall = 1
air.fall = 1
palfx.time = 30
palfx.add = 192,159,4
palfx.mul = 198,89,6
palfx.sinadd = 1,2,10,1
palfx.invertall = 1
palfx.color = 15

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


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

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S300,4

[State 1012, changestate]
type = ChangeState
trigger1 = command != "holdx"
trigger2 = var(59) && time > 30
value = 1013
ctrl = 0

[State 1012, 2]
type = Explod
trigger1 = AnimElem = 1
anim = 21102
ID = 1011
pos = 38,-80
scale = .25,.25
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

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

;---------------------------
[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = S1900,2
volume = 10
channel = 3

[State 1000, Explod]
type = Explod
trigger1 = animelem = 6
anim = 21115
ID = 21115
pos = 0,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.5,1.5
sprpriority = 1
ontop = 1
ownpal = 1
;============================


[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 1000,4

[State 1013, 2]
type = Projectile
trigger1 = AnimElem = 1
ProjID = 1005
projanim = 1005
projhitanim = 21104
projremanim = 21104
projcancelanim = 21104
velocity = 14,-2
offset = 48,-80
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 50,5
pausetime = 54,54
sparkno = -1
guard.sparkno = -1
hitsound = S1000,5
guardsound = S1000,5
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -6,2
air.velocity = -6,2
fall = 1
air.fall = 1
p2stateno = 7696


[State 1013, 2]
type = Projectile
trigger1 = AnimElem = 1
ProjID = 1005
projanim = 1005
projhitanim = 21104
projremanim = 21104
projcancelanim = 21104
velocity = 14,2
offset = 48,-80
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 50,5
pausetime = 54,54
sparkno = -1
guard.sparkno = -1
hitsound = S1000,5
guardsound = S1000,5
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -6,2
air.velocity = -6,2
fall = 1
air.fall = 1
p2stateno = 7696


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

;------------------------------------------
; Electrocution
[Statedef 7696]
type = S
movetype= U
physics = N
anim = 7696
velset = 0,0

[State 7696, color]
type = palFX
trigger1 = time != 0
add = 10,75,105
mul = 160, 118, 220
sinadd = 1,10,5,10
invertall = 1
color = 156
time = 1

[State 7696, SelfState]
type = SelfState
trigger1 = time = 30
trigger1 = Pos Y > -4
value = 5070
ctrl = 1

[State 7696, End]
type = ChangeState
trigger1 = time = 50
trigger1 = Pos Y < 0
value = 76961

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

[Statedef 76961]
type    = S
movetype= H
physics = N
velset = 0,2
ctrl = 0
anim = 7696

[State 7696, 0]
type = Veladd
trigger1 = Pos Y < 0
Y = .75

[State 7696, 1]
type = Velset
trigger1 = Pos Y > 0
Y = 0

[State 7696, 2]
type = Posset
trigger1 = Pos Y > 0
trigger1 = Vel Y = 0
Y = 0

[State 7696, 3]
type = SelfState
trigger1 = vel Y = 0
trigger1 = Pos Y = 0
value = 5100
ctrl = 1

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

; Ice balls
;-------------------------------------------------------------------------------

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

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S300,4

[State 1014, changestate]
type = ChangeState
trigger1 = command != "holdz"
trigger2 = var(59) && time > 30
value = 1015
ctrl = 0

[State 1014, 2]
type = Explod
trigger1 = AnimElem = 1
anim = 21102
ID = 1011
pos = 38,-80
scale = .25,.25
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

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

;---------------------------
[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = S1900,2
volume = 10
channel = 3

[State 1000, Explod]
type = Explod
trigger1 = animelem = 6
anim = 21115
ID = 21115
pos = 0,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.5,1.5
sprpriority = 1
ontop = 1
ownpal = 1
;============================

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 1000,6

[State 1015, 2]
type = Projectile
trigger1 = AnimElem = 1
ProjID = 21107
projanim = 21107
projhitanim = 21108
projremanim = 21108
projcancelanim = 21108
velocity = 14,-3
offset = 48,-80
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 50,5
pausetime = 54,54
sparkno = -1
guard.sparkno = -1
hitsound = S1000,7
guardsound = S1000,7
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -6,2
air.velocity = -6,2
fall = 1
air.fall = 1
p2stateno = 7990

[State 1015, 2]
type = Projectile
trigger1 = AnimElem = 1
ProjID = 21107
projanim = 21107
projhitanim = 21108
projremanim = 21108
projcancelanim = 21108
velocity = 14,0
offset = 48,-80
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 50,5
pausetime = 54,54
sparkno = -1
guard.sparkno = -1
hitsound = S1000,7
guardsound = S1000,7
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -6,2
air.velocity = -6,2
fall = 1
air.fall = 1
p2stateno = 7990

[State 1015, 2]
type = Projectile
trigger1 = AnimElem = 1
ProjID = 21107
projanim = 21107
projhitanim = 21108
projremanim = 21108
projcancelanim = 21108
velocity = 14,3
offset = 48,-80
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 50,5
pausetime = 54,54
sparkno = -1
guard.sparkno = -1
hitsound = S1000,7
guardsound = S1000,7
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -6,2
air.velocity = -6,2
fall = 1
air.fall = 1
p2stateno = 7990

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

;------------------------------------------
; Freeze
[Statedef 7990]
type = S
movetype= U
physics = N
anim = 7990
velset = 0,0

[State 7990, Varset]
type = Varset
trigger1 = time = 0
V = 27
Value = Anim

[State 7990, anim]
type = Changeanim
trigger1 = time != 0
value = Var(27)

[State 7990, color]
type = palFX
trigger1 = time != 0
add = 150,155,255
mul = 60, 180, 200
time = 7

[State 7990, SelfState]
type = SelfState
trigger1 = time = 50
trigger1 = Pos Y > -1
value = 0
ctrl = 1

[State 7990, End]
type = ChangeState
trigger1 = time = 20
trigger1 = Pos Y < 0
value = 7991

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

[Statedef 7991]
type    = S
movetype= H
physics = N
velset = 0,2
ctrl = 0
anim = 5070

[State 7991, 0]
type = Veladd
trigger1 = Pos Y < 0
Y = .75

[State 7991, 1]
type = Velset
trigger1 = Pos Y > 0
Y = 0

[State 7991, 2]
type = Posset
trigger1 = Pos Y > 0
trigger1 = Vel Y = 0
Y = 0

[State 7991, 3]
type = SelfState
trigger1 = vel Y = 0
trigger1 = Pos Y = 0
value = 5100
ctrl = 1


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


;---------------------------------------------------------------------------
; Tornado Kick A
[Statedef 1300]
type    = A
movetype= A
physics = N
juggle  = 1
velset = 0,0
poweradd = 120
anim = 1300
ctrl = 0
sprpriority = 2

[State 1300, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1300,0
channel = 4

[State 1300, VelSet]
type = VelSet
trigger1 = animelem = 4
x = 3
y = 0

[State 1302, Explod]
type = Explod
trigger1 = animelem = 3
anim = 1301
ID =1301
pos = -70,10
postype = p1
facing = -1
vfacing = 1
bindtime = 14
vel = -3,0
accel = -0.25,0
random = 0,0
removetime = 21
scale = 0.75,0.5
sprpriority = -2
ontop = 1

[State 1302, Explod]
type = Explod
trigger1 = animelem = 4
anim = 1301
ID =1301
pos = 70,10
postype = p1
facing = 1
vfacing = 1
bindtime = 14
vel = 3,0
accel = -0.25,0
random = 0,0
removetime = 21
scale = 0.75,0.5
sprpriority = -2
ontop = 1

[State 1300, HitDef]
type = HitDef
trigger1 = animelem = 4
attr = A,NA
damage = 27,5
animtype = hard
guardflag = HA
hitflag = MAF
priority = 4, Hit
pausetime = 10,2
sparkno = 1
sparkxy = -10, -53
hitsound = 1300,1
guardsound = 1300,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 14
ground.velocity = 0
air.type = High
air.velocity = -12,10
air.fall = 1
air.hittime = 25

[State 1300, HitDef]
type = HitDef
trigger1 = animelem = 5
trigger2 = animelem = 6
trigger3 = animelem = 7
attr = A,NA
damage = 27,5
animtype = hard
guardflag = HA
hitflag = MAF
priority = 4, Hit
pausetime = 10,2
sparkno = 1
sparkxy = -10, -53
hitsound = 1300,1
guardsound = 1300,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 14
ground.velocity = -25
air.type = High
air.velocity = -12,10
air.fall = 1
air.hittime = 25
fall = 1

[State 1300, Change]
type = ChangeState
triggerall = movehit = 3
trigger1 = moveguarded = 1
value = 1310

[State 1300, End]
type = ChangeState
trigger1 = FrontEdgeBodyDist < 0
value = 1320

[State 1300, Fin]
type = ChangeState
trigger1 = time > 24
value = 1320
ctrl = 1

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

; Tornado Kick B
[Statedef 1301]
type    = A
movetype= A
physics = N
juggle  = 1
velset = 0,0
poweradd = 120
anim = 1300
ctrl = 0
sprpriority = 2

[State 1300, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1300,0
channel = 4

[State 1301, VelSet]
type = VelSet
trigger1 = animelem = 4
x = 6
y = 0

[State 1302, Explod]
type = Explod
trigger1 = animelem = 3
anim = 1301
ID =1301
pos = -70,10
postype = p1
facing = -1
vfacing = 1
bindtime = 14
vel = -4,0
accel = -0.35,0
random = 0,0
removetime = 21
scale = 0.88,0.75
sprpriority = -2
ontop = 1

[State 1302, Explod]
type = Explod
trigger1 = animelem = 4
anim = 1301
ID =1301
pos = 70,10
postype = p1
facing = 1
vfacing = 1
bindtime = 14
vel = 4,0
accel = 0.35,0
random = 0,0
removetime = 21
scale = 0.88,0.75
sprpriority = -2
ontop = 1

[State 1301, HitDef]
type = HitDef
trigger1 = animelem = 4
attr = A,NA
damage = 27,5
animtype = hard
guardflag = HA
hitflag = MAF
priority = 4, Hit
pausetime = 10,2
sparkno = 1
sparkxy = -10, -53
hitsound = 1300,1
guardsound = 1300,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 14
ground.velocity = 0
air.type = High
air.velocity = -12,10
air.fall = 1
air.hittime = 25

[State 1301, HitDef]
type = HitDef
trigger1 = animelem = 5
trigger2 = animelem = 6
trigger3 = animelem = 7
attr = A,NA
damage = 27,5
animtype = hard
guardflag = HA
hitflag = MAF
priority = 4, Hit
pausetime = 10,2
sparkno = 1
sparkxy = -10, -53
hitsound = 1300,1
guardsound = 1300,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 14
ground.velocity = -25
air.type = High
air.velocity = -12,10
air.fall = 1
air.hittime = 25
fall = 1

[State 1301, Change]
type = ChangeState
triggerall = movehit = 3
trigger1 = moveguarded = 1
value = 1310

[State 1301, End]
type = ChangeState
trigger1 = FrontEdgeBodyDist < 0
value = 1320

[State 1301, Fin]
type = ChangeState
trigger1 = time > 24
value = 1320
ctrl = 1

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

; Tornado Kick C
[Statedef 1302]
type    = A
movetype= A
physics = N
juggle  = 1
velset = 0,0
poweradd = 120
anim = 1300
ctrl = 0
sprpriority = 2

[State 1302, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1300,0
channel = 4

[State 1302, VelSet]
type = VelSet
trigger1 = animelem = 4
x = 9
y = 0

[State 1302, Explod]
type = Explod
trigger1 = animelem = 3
anim = 1301
ID =1301
pos = -70,10
postype = p1
facing = -1
vfacing = 1
bindtime = 14
vel = -5,0
accel = -0.5,0
random = 0,0
removetime = 21
scale = 1,1
sprpriority = -2
ontop = 1

[State 1302, Explod]
type = Explod
trigger1 = animelem = 4
anim = 1301
ID =1301
pos = 70,10
postype = p1
facing = 1
vfacing = 1
bindtime = 14
vel = 5,0
accel = 0.5,0
random = 0,0
removetime = 21
scale = 1,1
sprpriority = -2
ontop = 1



[State 1302, HitDef]
type = HitDef
trigger1 = animelem = 4
attr = A,NA
damage = 27,5
animtype = hard
guardflag = HA
hitflag = MAF
priority = 4, Hit
pausetime = 10,2
sparkno = 1
sparkxy = -10, -53
hitsound = 1300,1
guardsound = 1300,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 14
ground.velocity = 0
air.type = High
air.velocity = -12,10
air.fall = 1
air.hittime = 25

[State 1302, HitDef]
type = HitDef
trigger1 = animelem = 5
trigger2 = animelem = 6
trigger3 = animelem = 7
attr = A,NA
damage = 27,5
animtype = hard
guardflag = HA
hitflag = MAF
priority = 4, Hit
pausetime = 10,2
sparkno = 1
sparkxy = -10, -53
hitsound = 1300,1
guardsound = 1300,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 14
ground.velocity = -25
air.type = High
air.velocity = -12,10
air.fall = 1
air.hittime = 25
fall = 1

[State 1302, Change]
type = ChangeState
triggerall = movehit = 3
trigger1 = moveguarded = 1
value = 1310

[State 1302, End]
type = ChangeState
trigger1 = FrontEdgeBodyDist < 0
value = 1320

[State 1302, Fin]
type = ChangeState
trigger1 = time > 24
value = 1320
ctrl = 1

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

;Tornado Kick Hit

[Statedef 1310]
type = A
physics = N
velset = 4,-1
anim = 1310
ctrl = 0

[State 1310, VarSet]
type = VarSet
trigger1 = var(40)!=1
v = 40
value = 1

[State 1310, Gravity]
type = Gravity
trigger1 = Time >= 0

[State 1310, Sound]
type = PlaySnd
trigger1 = TimeMod = 8, 0
value = 1300, 1

[State 1310, Change]
type = ChangeState
trigger1 = Pos Y > 1
value = 811

;-----------------------------
;Tornado Kick Miss

[Statedef 1320]
type = S
physics = S
velset = 0,0
anim = 1320
ctrl = 0

[State 1320, ChangeAnim]
type = ChangeAnim
triggerall = anim != 1052
trigger1 = prevstateno = 1050
value = 1052

[State 1320, Possition]
type = posset
trigger1 = Time = 0
y = 0

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

;-----------------------------
;-----------------------------
;-----------------------------
;-----------------------------
;-----------------------------
;Hatchet Harry Uppercut

[Statedef 1400]
type    = A
movetype= A
physics = N
juggle  = 16
ctrl = 0
velset = 0,0
anim = 1400
poweradd = 55
sprpriority = 0

[State 1400, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 1400,0

[State 1400, VelSet]
type = VelSet
trigger1 = animelem = 3
x = 2

[State 1400, VelSet]
type = VelSet
trigger1 = animelem = 4
x = 2
y = -5

[State 1400, VelSet]
type = VelSet
trigger1 = animelem = 5
x = 1
y = -1

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

[State 1400, VelSet]
type = VelSet
trigger1 =  animelem = 7
x = 0
y = 0

[State 1400, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA
damage = 50,5
animtype = High
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 4,4
sparkno = 2
sparkxy = -10, -100
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = 1,-11
air.velocity = 2,-11

[State 1400, ChangeState]
type = ChangeState
trigger1 = movehit
value = 1401
ctrl = 0

[State 1400, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1402

[Statedef 1401]
type    = A
movetype= A
physics = N
juggle  = 7
ctrl = 0
anim = 1401
poweradd = 15
sprpriority = 2

[State 1600, Explod]
type = Explod
trigger1 = animelem = 1
anim = 1603
ID =  1600
pos = 60,30
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 0.5,1.225
sprpriority = 1
;ontop = 1
;shadow = 100,100,100
ownpal = 1

[State 1401, Explod]
type = Explod
trigger1 = animelem = 1
anim = 1403
ID =1401
pos = 20,-90
postype = p1
facing = 1
vfacing = 1
bindtime = 6
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1,1
sprpriority = -1

[State 1401, Explod]
type = Explod
trigger1 = animelem = 3
anim = 1404
ID =1401
pos = 20,-90
postype = p1
facing = 1
vfacing = 1
bindtime = 10
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1,1
sprpriority = -2
;ontop = 1


[State 1401, VelSet]
type = VelSet
trigger1 = animelem = 1
x = 2
y = -7

[State 1401, VelSet]
type = VelSet
trigger1 =  animelem = 2
x = 5
y = -5

[State 1401, VelSet]
type = VelSet
trigger1 =  animelem = 3
x = 0
y = 0

[State 1401, HitDef]
type = HitDef
trigger1 = animelem = 3
attr = S,NA
damage = 50,5
animtype = High
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 4,4
sparkno = 2
sparkxy = -10, -100
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -1,-11
air.velocity = -2,-11
air.fall = 1
fall = 1
palfx.time = 60
palfx.add = 170,195,355
palfx.mul = 60, 180, 200
palfx.sinadd = 61,20,10,15
palfx.color = 125

[State 1401, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 1400,0

[State 1401, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1402

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

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

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

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

;---------------------------------------------------------------------------
; Time Jump (Teleport) 1
;---------------------------------------------------------------------------

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

[State 1500, No scroll]
type = ScreenBound
trigger1 = 1
value = 1

[State 1500, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S1500,1
volume = 255
channel = -1

[State 1500, PlaySnd]
type = PlaySnd
trigger1 = animelem = 8
value = S3100,2
volume = 155
channel = -1

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

[State 1500, Explod]
type = Explod
trigger1 = Animelem = 9
anim = 1501
ID = 1501
pos = 0,-210
postype = p1
facing = 1
vfacing = -1
vel = 0,2
accel = 0,0.5
bindtime = 12
removetime = 12
scale = 0.45,2.2
sprpriority = 0
ontop = 1

[State 1500, Explod]
type = Explod
trigger1 = Animelem = 10
anim = 1602
ID = 1501
pos = 0,-200
postype = p1
facing = 1
vfacing = -1
vel = 0,2
accel = 0,0.5
bindtime = 22
removetime = 22
scale = 1.5,1.2
sprpriority = 0
ontop = 1

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

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

[State 1501, Explod]
type = Explod
trigger1 = Animelem = 2
anim = 1501
ID = 1501
pos = 0,-210
postype = p1
facing = 1
vfacing = -1
vel = 0,2
accel = 0,0.5
bindtime = 12
removetime = 12
scale = 0.45,2.2
sprpriority = 0
ontop = 1

[State 1501, Explod]
type = Explod
trigger1 = Animelem = 2
anim = 1602
ID = 1501
pos = 10,-200
postype = p1
facing = 1
vfacing = -1
vel = 0,2
accel = 0,0.5
bindtime = 22
removetime = 22
scale = 1.5,1.2
sprpriority = 0
ontop = 1
shadow = 100,100,100

[State 1501, No scroll]
type = ScreenBound
trigger1 = 1
value = 1

[State 1501, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 2
value = S3100,3
volume = 255
channel = -1

[State 1501, PosSet]
type = PosSet
triggerall = numenemy >0
trigger1 = time = 0
x = ifelse((enemy(0),facing = -1),(enemy(0),Pos x)+350,(enemy(0),Pos x)-350)
y = 0

[State 1501, CtrlSet]
type = CtrlSet
triggerall = ctrl = 0
trigger1 = animelem >= 10
value = 1

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

;---------------------------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Time Jump (Teleport) 2
;---------------------------------------------------------------------------

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

[State 1510, No scroll]
type = ScreenBound
trigger1 = 1
value = 1

[State 1510, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S1500,1
volume = 255
channel = -1

[State 1510, PlaySnd]
type = PlaySnd
trigger1 = animelem = 8
value = S3100,2
volume = 155
channel = -1

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

[State 1510, Explod]
type = Explod
trigger1 = Animelem = 9
anim = 1501
ID = 1501
pos = 0,-210
postype = p1
facing = 1
vfacing = -1
vel = 0,2
accel = 0,0.5
bindtime = 12
removetime = 12
scale = 0.45,2.2
sprpriority = 0
ontop = 1

[State 1510, Explod]
type = Explod
trigger1 = Animelem = 10
anim = 1602
ID = 1511
pos = 0,-200
postype = p1
facing = 1
vfacing = -1
vel = 0,2
accel = 0,0.5
bindtime = 22
removetime = 22
scale = 1.5,1.2
sprpriority = 0
ontop = 1

[State 1510,1]
type=ChangeState
trigger1 = AnimTime = 0
value = 1511

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

[State 1511, Explod]
type = Explod
trigger1 = Animelem = 2
anim = 1501
ID = 1501
pos = 0,-210
postype = p1
facing = 1
vfacing = -1
vel = 0,2
accel = 0,0.5
bindtime = 12
removetime = 12
scale = 0.45,2.2
sprpriority = 0
ontop = 1

[State 1511, Explod]
type = Explod
trigger1 = Animelem = 2
anim = 1602
ID = 1511
pos = 10,-200
postype = p1
facing = 1
vfacing = -1
vel = 0,2
accel = 0,0.5
bindtime = 22
removetime = 22
scale = 1.5,1.2
sprpriority = 0
ontop = 1
shadow = 100,100,100

[State 1511, No scroll]
type = ScreenBound
trigger1 = 1
value = 1

[State 1511, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 2
value = S3100,3
volume = 255
channel = -1

[State 1511, PosSet]
type = PosSet
triggerall = numenemy >0
trigger1 = time = 0
x = ifelse((enemy(0),facing = -1),(enemy(0),Pos x)-150,(enemy(0),Pos x)-150)
y = 0

[State 1511, CtrlSet]
type = CtrlSet
triggerall = ctrl = 0
trigger1 = animelem >= 10
value = 1

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

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

;---------------------------------------------------------------------------
; Time Jump (Teleport) 3
;---------------------------------------------------------------------------

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

[State 1520, No scroll]
type = ScreenBound
trigger1 = 1
value = 1

[State 1520, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S1500,1
volume = 255
channel = -1

[State 1520, PlaySnd]
type = PlaySnd
trigger1 = animelem = 8
value = S3100,2
volume = 155
channel = -1

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

[State 1520, Explod]
type = Explod
trigger1 = Animelem = 9
anim = 1501
ID = 1501
pos = 0,-210
postype = p1
facing = 1
vfacing = -1
vel = 0,2
accel = 0,0.5
bindtime = 12
removetime = 12
scale = 0.45,2.2
sprpriority = 0
ontop = 1

[State 1520, Explod]
type = Explod
trigger1 = Animelem = 10
anim = 1602
ID = 1521
pos = 0,-200
postype = p1
facing = 1
vfacing = -1
vel = 0,2
accel = 0,0.5
bindtime = 22
removetime = 22
scale = 1.5,1.2
sprpriority = 0
ontop = 1

[State 1520,1]
type=ChangeState
trigger1 = AnimTime = 0
value = 1521

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

[State 1521, Explod]
type = Explod
trigger1 = Animelem = 2
anim = 1501
ID = 1501
pos = 0,-210
postype = p1
facing = 1
vfacing = -1
vel = 0,2
accel = 0,0.5
bindtime = 12
removetime = 12
scale = 0.45,2.2
sprpriority = 0
ontop = 1

[State 1521, Explod]
type = Explod
trigger1 = Animelem = 2
anim = 1602
ID = 1521
pos = 10,-200
postype = p1
facing = 1
vfacing = -1
vel = 0,2
accel = 0,0.5
bindtime = 22
removetime = 22
scale = 1.5,1.2
sprpriority = 0
ontop = 1
shadow = 100,100,100


[State 1521, No scroll]
type = ScreenBound
trigger1 = 1
value = 1

[State 1521, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 2
value = S3100,3
volume = 255
channel = -1

[State 1521, PosSet]
type = PosSet
triggerall = numenemy >0
trigger1 = time = 0
x = ifelse((enemy(0),facing = -1),(enemy(0),Pos x)-550,(enemy(0),Pos x)+550)
y = 0

[State 1521, CtrlSet]
type = CtrlSet
triggerall = ctrl = 0
trigger1 = animelem >= 10
value = 1

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

;---------------------------------------------------------------------------------------------
[Statedef 1600]
type = S
movetype = A
physics = S
anim = 1600
velset = 0,0
poweradd = 60
ctrl = 0

[State 1600, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1600,1
channel = 5

[State 1600, PlaySnd]
type = PlaySnd
trigger1 = animelem = 8
value = 1600,0
channel = 4

[State 1600, EnvShake]
type = EnvShake
trigger1 = timemod = 9,0
time = 3
freq = 13
ampl = -3
phase = 10

[State 1600, Explod]
type = Explod
trigger1 = animelem = 6
anim = 1601
ID =  1600
pos = 10,60
postype = p1
facing = 1
vfacing =1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1,1.33
sprpriority = 20
ontop = 1
shadow = 0,0,0
ownpal = 0

[State 1600, Explod]
type = Explod
trigger1 = animelem = 7
anim = 3303
ID =  1600
pos = 0,-35
postype = p1
facing = 1
vfacing =1
bindtime = 15
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1,1
sprpriority = 55
ontop = 1
shadow = 0,0,0
ownpal = 0

[State 1600, Explod]
type = Explod
trigger1 = animelem = 11
trigger2 = animelem = 10
trigger3 = animelem = 14
anim = 3304
ID =  1600
pos = -20,-20
postype = p2
vel = 0,-6
accel = 0,-1
random = 1,0
removetime = -2
scale = 1,1.15
sprpriority = 55
ontop = 1

[State 1600, Explod]
type = Explod
trigger1 = animelem = 9
trigger2 = animelem = 13
anim = 3304
ID =  1600
pos = 10,-10
postype = p2
vel = 0,-5
accel = 0,-1
random = 5,0
removetime = -2
scale = 1.5,1
sprpriority = 55
ontop = 1

[State 1600, Explod]
type = Explod
trigger1 = animelem = 10
trigger2 = animelem = 12
anim = 3304
ID =  1600
pos = 40,-30
postype = p2
vel = 0,-9
accel = 0,-1
random = 3,0
removetime = -2
scale = 1,1.25
sprpriority = 55
ontop = 1

[State 1600, Helper]
type = Helper
trigger1 = time = 60
stateno = 1601
postype = p2
pos = 0,50
bindtime = 1
ownpal = 1
name = "Ancient One"
id = 1601

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

;---------------------------------------------------------------------------
;Effects
[Statedef 1601]
type = A
movetype = A
physics = N
anim = 3301
sprpriority = 2
ctrl = 0

[State 1600, Explod]
type = Explod
trigger1 = animelem = 1
anim = 1603
ID =  1600
pos = 0,30
postype = p1
facing = -1
vfacing =1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 0.66,0.66;1,2
sprpriority = 10
ontop = 1
shadow = 0,0,0
ownpal = 0

[State 1601, Turn]
type = Turn
trigger1 = !Time
trigger1 = facing != parent, facing

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

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

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

[State 1601, HitDef]
type = HitDef
triggerall = p2statetype != L
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
attr = S, HP
animtype = Up
damage = 20,3
sprpriority = 2
hitflag = MAFP
guardflag = MA
pausetime = 0, 9
sparkno = 3
sparkxy = -20,-70
hitsound = S1600,1
guardsound = 6,0
ground.type = Low
guard.slidetime = 12
guard.hittime = 12
guard.velocity = -7
airguard.velocity = -2
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
palfx.time = 60
palfx.add = 4,119,172
palfx.mul = 49,149,186
palfx.sinadd = 20,62,10,15
palfx.invertall = 1
palfx.color = 135
p2stateno = 1602

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

;Hitstate for P2
[Statedef 1602]
type = A
movetype = H
physics = N
anim = IfElse(SelfAnimExist(5052),5052,(IfElse(SelfAnimExist(5051),5051,5050)))
velset = 0,0
facep2 = 1
ctrl = 0

[State 1602, velset]
type = velset
trigger1 = time = 5
x = -.25
y = -11

[State 1602, Gravity]
type = Gravity
trigger1 = Time > 5


[State 1602, SelfState]
type = SelfState
trigger1 = Vel Y > 0
value = 5070
ctrl = 1


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

 ;END OF SPECIALS

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;HYPERS
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Plan B
[Statedef 3000]
type    = U
movetype= A
physics = S
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 3000
sprpriority = 0

[State 3000, assertspecial]
type = assertspecial
triggerall = !Var(29)
trigger1 = AnimElem = 6
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3000, SuperPause]
type = SuperPause
triggerall = !Var(29)
trigger1 = AnimElem = 6
Time = 50
;anim =-1;s3012
pos = 9,-25
sound = S8889,0
poweradd = -1000
movetime = 50

[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    ;p2,front,back,left,right
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    ;p2,front,back,left,right
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    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
;supermovetime = 999999999999
;pausemovetime = 999999999999
ignorehitpause = 1

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


[State 3000, Gadget Table Entry]
type = Explod
trigger1 = animelem = 8
anim = 3003
ID = 3003
pos = 75,15
postype = p1
;bindtime = 20
;removetime = 20
sprpriority = 3
ownpal = 1
removeongethit = 1
;scale = .5,.5
;ontop = 1

[State 3000, Gadget Table Entry]
type = Explod
trigger1 = animelem = 9
anim = 3005
ID = 3005
pos = 75,15
postype = p1
;bindtime = 20
;removetime = 20
;sprpriority = 3
ownpal = 1
removeongethit = 1
;scale = .5,.5
ontop = 1

[State 3000, EnvShake]
type = EnvShake
trigger1 = Animelem = 9
trigger2 = Animelem = 10
trigger3 = Animelem = 11
trigger4 = Animelem = 12
trigger5 = Animelem = 13
trigger6 = Animelem = 14
time = 3
freq = 26
ampl = -5
phase = 20

[State 3000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 8
value = 1900,0
channel = 4

[State 3000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7
value = S195,1
volume = 255
channel = 3

[State 3000]
type = Helper
trigger1 = AnimElem = 14 && StateType != A
stateno = 22400
id = 22400
ownpal = 1
ignorehitpause = 1
pos = 80,-16

[State 3000]
type = Helper
trigger1 = AnimElem = 13 && StateType != A
stateno = 22400
id = 22400
ownpal = 1
ignorehitpause = 1
pos = 80,-16
sprpriority = 3

[State 3000]
type = Helper
trigger1 = AnimElem = 12 && StateType != A
stateno = 22400
id = 22400
ownpal = 1
ignorehitpause = 1
pos = 88,-16
sprpriority = 3

[State 3000]
type = Helper
trigger1 = AnimElem = 11 && StateType != A
stateno = 22400
id = 22400
ownpal = 1
ignorehitpause = 1
pos = 84,-16

[State 3000]
type = Helper
trigger1 = AnimElem = 10 && StateType != A
stateno = 22400
id = 22400
ownpal = 1
ignorehitpause = 1
pos = 84,-16

[State 3000]
type = Helper
trigger1 = AnimElem = 9 && StateType != A
stateno = 22400
id = 22400
ownpal = 1
ignorehitpause = 1
pos = 84,-16


[State 3000]
type = ChangeState
trigger1 = AnimTime = 0 && StateType != A
value = 3001
ctrl = 1

[State 3000]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0

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

[StateDef 3001]
type    = S
physics = S
ctrl = 0
anim = 3001
velset = 0,0

[State 3001, RemoveExplod]
type = RemoveExplod
trigger1 = time = 0
id = 3002

[State 3001, RemoveExplod]
type = RemoveExplod
trigger1 = animelem = 1
id = 3003

[State 3001, Gadget Table Exit]
type = Explod
trigger1 = animelem =1;animelem =1
anim = 3004
ID = 3004
pos = 75,15
postype = p1
bindtime = 10
removetime = 10
sprpriority = -3
ownpal = 1
;removeongethit = 1
;scale = .5,.5

[State 3001, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 0,1
channel=-1

[State 3001, back to stance]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;Plan B
[Statedef 22400]
type = U
movetype = A
physics = N
ctrl = 0
sprpriority = 2
velset = 0,0
hitcountpersist = 1

[State 22400]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 22400
value =  1202

[State 22400, Explod]
type = Explod
trigger1 = time = 1
anim = 1204
ID = 22401
pos = -10,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 2,-3.5
removetime = -2
;scale = 0.5,0.5
sprpriority = 12
;ontop = 1

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

[State 22400]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 22400]
type = HitOverride
trigger1 = 1
stateno = 22401
attr = SCA,AP
slot = 0
time = -1

[State 22400]
type = VarSet
trigger1 = Time = 0
var(1) = 60

[State 22400, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,1
channel = 4

[State 22400]
type = VelSet
trigger1 = Time = 0 && Parent,Stateno = 1200
x = 2
y = 0

[State 22400]
type = VelAdd
trigger1 = 1
y = 0.3

[State 22400]
type = HitDef
attr = S, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 50,5
animtype = Light
priority  = 5, Hit
guardflag = MA
pausetime = 0,1
sparkxy = -10,-50+floor(P2Dist Y)
hitsound   = S1000,8
guardsound = S1000,3
sparkno = s21105
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 5
ground.velocity = -6,-4
air.velocity = -6,-4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
sprpriority = 2
palfx.time = 30
palfx.add = 172,119,4
palfx.mul = 98,89,6
palfx.sinadd = 61,20,10,15
palfx.invertall = 1
palfx.color = 15
fall = 1
air.fall = 1

[State 22400]
type = ChangeState
trigger1 = MoveContact
trigger2 = Time > 160
trigger3 = Pos Y >= 0
trigger3 = Vel Y > 0
ignorehitpause = 1
value = 22401

[State 22401]
type = Helper
trigger1 = moveguarded = 1
stateno = 22402
ownpal = 1

;------------------------------------------------------------------------------------------------------------
;Mine Helper
[Statedef 22401]
type = U
movetype = A
physics = N
ctrl = 0
sprpriority = 2
velset = 0,0
hitcountpersist = 1

[State 22401]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 22400
value = 3002

[State 22401, Explod]
type = Explod
trigger1 = time = 1
anim = 1201
ID = 22401
pos = 20,10
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 3,0
removetime = 88
scale = 0.75,0.75
;sprpriority = 22
ontop = 1

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

[State 22401]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 22401]
type = HitOverride
trigger1 = 1
stateno = 22401
attr = SCA,AP
slot = 0
time = -1

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

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

[State 22401, VelSet]
type = VelSet
trigger1 = time = 30
x = 2
y = 0

[State 22401, VelSet]
type = VelSet
trigger1 = animelem = 17
x = 1
y = 0

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,2

[State 22401]
type = HitDef
attr = S, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 50,5
animtype = Light
priority  = 5, Hit
guardflag = MA
pausetime = 0,1
sparkxy = -10,-10+floor(Parent,P2Dist Y)
hitsound   = S1000,8
guardsound = S1000,3
sparkno = s21109
ground.type = Hard
ground.slidetime = 6
ground.hittime  = 5
ground.velocity = -4,-2
air.velocity = -4,-2
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
sprpriority = 2
palfx.time = 30
palfx.add = 172,119,4
palfx.mul = 98,89,6
palfx.sinadd = 61,20,10,15
palfx.invertall = 1
palfx.color = 15

[State 22401]
type = ChangeState
trigger1 = Time > 88
trigger2 != movecontact = 1
value = 22409

[State 22401, RemoveExplod]
type = RemoveExplod
trigger1 = movecontact = 1
trigger1 = moveguarded < 1
id = 22401

[State 22401]
type = Helper
trigger1 = movecontact = 1
trigger1 = moveguarded < 1
stateno = 22402
ownpal = 1

;------------------------------------------------------------------------------------------------------------
;Mine Helper
[Statedef 22402]
type = U
movetype = I
physics = N
anim = 21103
ctrl = 0
sprpriority = 3
velset = 0,0

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,3

[State 22402]
type = Varset
trigger1 = Time = 0
var(0) = floor(360/(random%10+1))

[State 22402]
type = Varset
trigger1 = Time = 0
var(3) = parent,id

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

[State 22402]
type = DestroySelf
trigger1 = !PlayerIDExist(var(3))
trigger2 = Time >48

[State 22402]
type = BindToParent
trigger1 = PlayerIDExist(var(3))

[State 22402]
type = Trans
trigger1 = Parent,Stateno = 22109
trans = addalpha
alpha = 256-time*22,time*22

;-------------------------------------------------------------------------------
;Mine Helper
[Statedef 22409]
type = U
movetype = I
physics = N
anim = 21109
ctrl = 0
sprpriority = 2
velset = 0,0

[State 22400, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,3

[State 22401, RemoveExplod]
type = RemoveExplod
trigger1 = time = 1
id = 22401

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

[State 22409]
type = DestroySelf
trigger1 = Time > 16


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Hyper 2
;---------------------------------------------------------------------------
[Statedef 3100]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3100
ctrl = 0

[State 3000, assertspecial]
type = assertspecial
triggerall = !Var(29)
trigger1 = AnimElem = 6
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3000, SuperPause]
type = SuperPause
triggerall = !Var(29)
trigger1 = AnimElem = 6
Time = 60
;anim =-1;s3012
pos = 55,-75
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    ;p2,front,back,left,right
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    ;p2,front,back,left,right
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    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

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

;=========================
[State 3000, Explod]
type = Explod
trigger1 = animelem = 1
anim = 21115
ID = 21115
pos = 20,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.75,1.75
sprpriority = 1
ontop = 1
ownpal = 1

[State 3000, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1900,1
volume = 10
channel = 3
;---------------------------
[State 3000, PlaySnd]
type = PlaySnd
trigger1  = time = 120;= animelem = 11
value = S1900,2
volume = 10
channel = 3

[State 3000, Explod]
type = Explod
trigger1 = time = 120;animelem = 11
anim = 21115
ID = 21115
pos = 20,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1.75,1.75
sprpriority = 1
ontop = 1
ownpal = 1
;============================

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

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

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

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

[State 3100, 4]
type = Explod
trigger1 = AnimElem = 11
anim = 3104
id = 3104
postype = P1
pos = 34,-75
vel = 1,0
accel = 1,0
ownpal = 1
removetime = 12
ontop = 1


[State 3100, 1]
type = Projectile
trigger1 = AnimElem = 11
projanim = 3103
projhitanim = 3104
projhits = 10
offset = 53,-75
velocity = 5,0
attr = S, HP
animtype  = Heavy
damage = 55,3
guardflag = MA
pausetime = 25,35
sparkno = s7703
sparkxy = 100,0
hitsound = s3100,4
guardsound = s3100,5
ground.type = High
ground.slidetime = 22
ground.hittime  = 22
ground.velocity = -36
air.velocity = -3,-3
air.recover = 0
fall.animtype = Hard
getpower = 0
fall= 1
air.fall = 1
p1stateno = 3104
p2stateno = 3105

[State 3100, PlaySnd]
type = PlaySnd
trigger1 = Animelem= 2
value = S3100,0
volume = 255
channel = 3

[State 3100, PlaySnd]
type = PlaySnd
trigger1 = Animelem= 7
value = S1900,0
volume = 255
channel = 4

[State 3100, RemoveExplod]
type = RemoveExplod
trigger1 = animelem = 9
id = 3003

[State 3100, RemoveExplod]
type = RemoveExplod
trigger1 = animelem = 11
id = 3004

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


;---------------------------------------------------------------------------
[Statedef 3104]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
ctrl = 0


[State 3104, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S3100,3
volume = 255
channel = 4

[State 3104, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S3300,0
volume = 255
channel = 0

[State 3104, sense bar]
type = Explod
trigger1 = time = 1
anim = 3101
id = 3104
pos = ifelse(TeamSide = 1, 1, 319), 240
postype = left
facing = ifelse(TeamSide = 1, 1, -1)
bindtime = -1
removetime = -2
sprpriority = 90
ignorehitpause = 1
ownpal = 1

[State 3104, sense bar]
type = Explod
trigger1 = time = 1
anim = 3102
id = 3104
pos = ifelse(TeamSide = 1, 48, 271), 240
postype = left
facing = 1
bindtime = -1
removetime = -2
sprpriority = 92
ignorehitpause = 1
ownpal = 1

[State 3104, PlaySnd]
type = PlaySnd
trigger1 = time = 230
value = s3100,3
volume = 255

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

;---------------------------------------------------------------------------
[Statedef 3105]
type = S
movetype= U
physics = N
velset = 0,0

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

[State 3105, VelSet]
type = VelSet
trigger1 = 1
x = -30
y = 0

[State 3105, PalFX]
type = PalFX
trigger1 = time =0
time = 410
add = 50,70,10
mul = 126,126,26
sinadd = 50,-20,110,40

[State -2, PowerAdd]
type =  PowerAdd
trigger1 = 1
value = -5000

[State 3105, SelfState]
type = SelfState
trigger1 = time = 1
trigger1 = Pos Y > -1
value = 5100
ctrl = 1

[State 3105, End]
type = ChangeState
trigger1 = time = 1
trigger1 = Pos Y < 0
value = 3106

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

[Statedef 3106]
type    = S
movetype= H
physics = N
velset = 0,2
ctrl = 0
anim = 5070

[State 3106, 0]
type = Veladd
trigger1 = Pos Y < 0
Y = .75

[State 3106, 1]
type = Velset
trigger1 = Pos Y > 0
Y = 0

[State 3106, 2]
type = Posset
trigger1 = Pos Y > 0
trigger1 = Vel Y = 0
Y = 0

[State 3106, 3]
type = SelfState
trigger1 = vel Y = 0
trigger1 = Pos Y = 0
value = 5100
ctrl = 1

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;HYPER 3
;---------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------

; ENTER Jetpack
[Statedef 3200]
type    = S
movetype= A
physics = S
juggle  = 3
poweradd = 50
ctrl = 0
anim = 3200
sprpriority = 0

[State 3000, assertspecial]
type = assertspecial
triggerall = !Var(29)
trigger1 = AnimElem = 6
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3000, SuperPause]
type = SuperPause
triggerall = !Var(29)
trigger1 = AnimElem = 6
Time = 60
;anim =-1;s3012
pos = 0,-125
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    ;p2,front,back,left,right
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    ;p2,front,back,left,right
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    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

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

[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, NotHitBy]
type = NotHitBy
trigger1 = time = 2
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 250


[State 3000, PlaySnd]
type = PlaySnd
trigger1 = time = 130
trigger2 = time = 135
trigger3 = time = 140
trigger4 = time = 145
trigger5 = time = 150
trigger6 = time = 155
trigger7 = time = 160
trigger8 = time = 165
trigger9 = time = 170
trigger10 = time = 175
trigger11 = time = 180
trigger12 = time = 185
value = 1000,8
channel = 5

[State 3000, PlaySnd]
type = PlaySnd
trigger1 = time = 130
trigger2 = time = 135
trigger3 = time = 140
trigger4 = time = 145
trigger5 = time = 150
trigger6 = time = 155
trigger7 = time = 160
trigger8 = time = 165
trigger9 = time = 170
trigger10 = time = 175
trigger11 = time = 180
trigger12 = time = 185
value = 1000,3
channel = 3

[State 3000, PlaySnd]
type = PlaySnd
trigger1 = time = 100
trigger2 = time = 105
trigger3 = time = 110
trigger4 = time = 115
trigger5 = time = 120
trigger6 = time = 125
trigger7 = time = 130
trigger8 = time = 135
trigger9 = time = 140
trigger10 = time = 145
trigger11 = time = 150
trigger12 = time = 155
trigger13 = time = 160
trigger14 = time = 165
trigger15 = time = 170
trigger16 = time = 175
trigger17 = time = 180
trigger18 = time = 185
trigger19 = time = 190
trigger20 = time = 195
trigger21 = time = 200
trigger22 = time = 205
trigger23 = time = 210
trigger24 = time = 215
trigger25 = time = 220
value = 3000,0
channel = 2

[State 3000, 2]
type = Projectile
trigger1 = time = 100
trigger2 = time = 105
trigger3 = time = 110
trigger4 = time = 115
trigger5 = time = 120
trigger6 = time = 125
trigger7 = time = 130
trigger8 = time = 135
trigger9 = time = 140
trigger10 = time = 145
trigger11 = time = 150
trigger12 = time = 155
trigger13 = time = 160
trigger14 = time = 165
trigger15 = time = 170
trigger16 = time = 175
trigger17 = time = 180
trigger18 = time = 185
trigger19 = time = 190
trigger20 = time = 195
trigger21 = time = 200
trigger22 = time = 205
trigger23 = time = 210
trigger24 = time = 215
trigger25 = time = 220
ProjID = 10011
projanim = 10011
projhitanim = 1002
projremanim = 1002
projcancelanim = 1002
projscale = 0.5,0.25
velocity = 10,0.05 +(random/250)
offset = 35,-112
attr = S,HP
hitflag = MAF
guardflag = MA
animtype = hard
priority = 4,Hit
damage = 4,1
pausetime = 4,4
sparkno = -1
guard.sparkno = -1
hitsound = S1000,1
guardsound = S1000,3
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -6,2
air.velocity = -6,2
palfx.time = 30
palfx.add = 172,119,4
palfx.mul = 98,89,6
palfx.sinadd = 61,20,10,15
palfx.invertall = 1
palfx.color = 15

[State 3000, 2]
type = Projectile
trigger1 = time = 100
trigger2 = time = 105
trigger3 = time = 110
trigger4 = time = 115
trigger5 = time = 120
trigger6 = time = 125
trigger7 = time = 130
trigger8 = time = 135
trigger9 = time = 140
trigger10 = time = 145
trigger11 = time = 150
trigger12 = time = 155
trigger13 = time = 160
trigger14 = time = 165
trigger15 = time = 170
trigger16 = time = 175
trigger17 = time = 180
trigger18 = time = 185
trigger19 = time = 190
trigger20 = time = 195
trigger21 = time = 200
trigger22 = time = 205
trigger23 = time = 210
trigger24 = time = 215
trigger25 = time = 220
ProjID = 10011
projanim = 10011
projhitanim = 1002
projremanim = 1002
projcancelanim = 1002
projscale = 0.5,0.25
velocity = 10,0.05 +(random/250)
offset = 5,-112
attr = S,HP
hitflag = MAF
guardflag = MA
animtype = hard
priority = 4,Hit
damage = 4,1
pausetime = 4,4
sparkno = -1
guard.sparkno = -1
hitsound = S1000,1
guardsound = S1000,3
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -6,2
air.velocity = -6,2
palfx.time = 30
palfx.add = 172,119,4
palfx.mul = 98,89,6
palfx.sinadd = 61,20,10,15
palfx.invertall = 1
palfx.color = 15

[State 3000, 2]
type = Projectile
trigger1 = time = 225
ProjID = 1004
projanim = 1004
projhitanim = 21111
projremanim = 21111
projcancelanim = 21111
;projscale = 0.5,0.250
velocity = 15,2.5 +(random/250)
offset = -45,-142
attr = S,HP
hitflag = MAF
guardflag = MA
animtype = hard
priority = 4,Hit
damage = 54,4
pausetime = 24,24
sparkno = -1
guard.sparkno = -1
hitsound = S1000,7
guardsound = S1000,6
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = 4,-12
air.velocity = 4,-12
fall= 1
air.fall= 1



[State 3000, 2]
type = Projectile
trigger1 = time = 130
trigger2 = time = 140
trigger3 = time = 150
trigger4 = time = 160
trigger5 = time = 170
trigger6 = time = 180
trigger7 = time = 190
ProjID = 1006
projanim = 1006
projhitanim = 21105
projremanim = 21109
projcancelanim = 21109
projsprpriority = 22
;projscale = 0.75,0.5
velocity = 8,0.5 +(random/250)
offset = 65,-142
attr = S,HP
hitflag = MAF
guardflag = MA
animtype = hard
priority = 4,Hit
damage = 7,1
pausetime = 4,4
sparkno = -1
guard.sparkno = -1
hitsound = S1000,8
guardsound = S1000,3
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -2,-0.1
air.velocity = -2,-0.8

[State 3000, 2]
type = Projectile
trigger1 = time = 135
trigger2 = time = 145
trigger3 = time = 155
trigger4 = time = 165
trigger5 = time = 175
trigger6 = time = 185
trigger7 = time = 195
ProjID = 1006
projanim = 1006
projhitanim = 21105
projremanim = 21109
projcancelanim = 21109
projsprpriority = 22
;projscale = 0.75,0.5
velocity = 8,0.5 +(random/250)
offset = 25,-157
attr = S,HP
hitflag = MAF
guardflag = MA
animtype = hard
priority = 4,Hit
damage = 7,1
pausetime = 4,4
sparkno = -1
guard.sparkno = -1
hitsound = S1000,8
guardsound = S1000,3
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -2,-0.1
air.velocity = -2,-0.8

[State 3200, 4]
type = Explod
trigger1 = AnimElem = 1
anim = 3204
id = 3204
postype = P1
pos = 0,-250
vel = 0,0.75
accel = 0,0.5
ownpal = 1
removetime = 32

[State 3200, 4]
type = Explod
trigger1 = AnimElem = 8
anim = 3204
id = 3204
postype = P1
pos = 0,0
vel = 0,-1
accel = 0,-1
ownpal = 1
removetime = 32

;jetpack
[State 3200, 4]
type = Explod
trigger1 = AnimElem = 7
anim = 3201
id = 3201
postype = P1
pos = 0,0
ownpal = 1
removetime = 150
bindtime = 150

;straps
[State 3200, 4]
type = Explod
trigger1 = AnimElem = 7
anim = 3202
id = 3202
postype = P1
pos = 0,0
sprpriority = 20
;ontop = 1
ownpal = 1
removetime = 150
bindtime = 150

;shoulder
[State 3200, 4]
type = Explod
trigger1 = AnimElem = 7
anim = 3203
id = 3203
postype = P1
pos = 0, 0
sprpriority = 20
;ontop = 1
ownpal = 1
removetime = 150
bindtime = 150

[State 3200, VelSet]
type = VelSet
trigger1 = time = 130
trigger2 = time = 135
trigger3 = time = 140
trigger4 = time = 145
trigger5 = time = 150
trigger6 = time = 155
trigger7 = time = 160
trigger8 = time = 165
trigger9 = time = 170
trigger10 = time = 175
trigger11 = time = 180
trigger12 = time = 185
x = 2
y = 0

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

;---------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;HYPER 4
;---------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------

;Summoning the Ancient One
[Statedef 3300]
type = S
movetype = A
physics = S
anim = 3300
velset = 0,0
poweradd = 60
ctrl = 0

[State 3300, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 3300,0
channel = 5

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

[State 3000, SuperPause]
type = SuperPause
triggerall = !Var(29)
trigger1 = AnimElem = 1
Time = 60
;anim =-1;s3012
pos = 0,0;-35,-85
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    ;p2,front,back,left,right
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    ;p2,front,back,left,right
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    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

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

[State 3000, EnvShake]
type = EnvShake
trigger1 = timemod = 5,0
time = 3
freq = 26
ampl = -5
phase = 20

[State 3300, Explod]
type = Explod
trigger1 = time = 50
anim = 33011
ID =  3300
pos = 0,0
postype = p1
facing = 1
vfacing =1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1,1.33
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0

[State 3300, Explod]
type = Explod
trigger1 = animelem = 4
anim = 33011
ID =  3300
pos = 0,0
postype = p2
facing = 1
vfacing =1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1,1.33
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0

[State 3300, Explod]
type = Explod
trigger1 = animelem = 3
anim = 3302
ID =  3300
pos = 0,20
postype = p1
facing = 1
vfacing =1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1,1.33
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0

[State 3300, Explod]
type = Explod
trigger1 = animelem = 8
anim = 3303
ID =  3300
pos = 0,-35
postype = p1
facing = 1
vfacing =1
bindtime = 15
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1,1
sprpriority = 55
ontop = 1
shadow = 0,0,0
ownpal = 0

[State 3300, Explod]
type = Explod
trigger1 = animelem = 11
trigger2 = animelem = 10
trigger3 = animelem = 14
anim = 3304
ID =  3300
pos = -20,-20
postype = p2
vel = 0,-6
accel = 0,-1
random = 1,0
removetime = -2
scale = 1,1.15
sprpriority = 55
ontop = 1

[State 3300, Explod]
type = Explod
trigger1 = animelem = 9
trigger2 = animelem = 13
anim = 3304
ID =  3300
pos = 10,-10
postype = p2
vel = 0,-5
accel = 0,-1
random = 5,0
removetime = -2
scale = 1.5,1
sprpriority = 55
ontop = 1

[State 3300, Explod]
type = Explod
trigger1 = animelem = 10
trigger2 = animelem = 12
anim = 3304
ID =  3300
pos = 40,-30
postype = p2
vel = 0,-9
accel = 0,-1
random = 3,0
removetime = -2
scale = 1,1.25
sprpriority = 55
ontop = 1


[State 3300, Helper]
type = Helper
trigger1 = time = 100
stateno = 3301
postype = p2
pos = -5,0
bindtime = 1
ownpal = 1
name = "Ancient One"
id = 3301

[State 3300, Helper]
type = Helper
trigger1 = time = 115
stateno = 3301
postype = p2
pos = 17,-50
bindtime = 1
ownpal = 1
name = "Ancient One"
id = 3301

[State 3300, Helper]
type = Helper
trigger1 = time = 130
stateno = 3301
postype = p2
pos = 0,50
bindtime = 1
ownpal = 1
name = "Ancient One"
id = 3301

[State 3300, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 3300,1
channel = 4

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

;---------------------------------------------------------------------------
;Effects
[Statedef 3301]
type = A
movetype = A
physics = N
anim = 3301
sprpriority = 2
ctrl = 0

[State 3301, Turn]
type = Turn
trigger1 = !Time
trigger1 = facing != parent, facing

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

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

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

[State 3300, Explod]
type = Explod
trigger1 = animelem = 1
anim = 1603
ID =  3300
pos = 0,60
postype = p1
facing = -1
vfacing =1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
sprpriority = 10
ontop = 1
shadow = 0,0,0
ownpal = 0

[State 3300, Explod]
type = Explod
trigger1 = animelem = 1
anim = 1603
ID =  3300
pos = 0,60
postype = p1
facing = 1
vfacing =1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
sprpriority = 10
ontop = 1
shadow = 0,0,0
ownpal = 0

[State 3301, Explod]
type = Explod
trigger1 = AnimElem = 5, = 0
anim = 3301
sprpriority = 2
postype = p1
pos = 0,-134
bindtime = -1
id = 3301

[State 3301, Explod]
type = Explod
trigger1 = AnimElem = 5, = 0
anim = 3301
sprpriority = 2
postype = p1
pos = 0,-270
bindtime = -1
id = 3301

[State 3301, Explod]
type = Explod
trigger1 = AnimElem = 5, = 0
anim = 3301
sprpriority = 2
postype = p1
pos = 0,-406
bindtime = -1
id = 3301

[State 3301, Explod]
type = Explod
trigger1 = AnimElem = 5, = 0
anim = 3301
sprpriority = 2
postype = p1
pos = 0,-540
bindtime = -1
id = 3301

[State 3301, Explod]
type = Explod
trigger1 = AnimElem = 5, = 0
anim = 3301
sprpriority = 2
postype = p1
pos = 0,-677
bindtime = -1
id = 3301

[State 3301, Explod]
type = Explod
trigger1 = AnimElem = 5, = 0
anim = 3301
sprpriority = 2
postype = p1
pos = 0,-812
bindtime = -1
id = 3301

[State 3301, Explod]
type = Explod
trigger1 = AnimElem = 5, = 0
anim = 3301
sprpriority = 2
postype = p1
pos = 0,-950
bindtime = -1
id = 3301

[State 3301, Explod]
type = Explod
trigger1 = AnimElem = 5, = 0
anim = 3301
sprpriority = 2
postype = p1
pos = 0,-1085
bindtime = -1
id = 3301

[State 3301, Explod]
type = Explod
trigger1 = AnimElem = 5, = 0
anim = 3301
sprpriority = 2
postype = p1
pos = 0,-1220
bindtime = -1
id = 3301

[State 3301, Explod]
type = Explod
trigger1 = AnimElem = 5, = 0
anim = 3301
sprpriority = 2
postype = p1
pos = 0,-1357
bindtime = -1
id = 3301

[State 3301, HitDef]
type = HitDef
triggerall = p2statetype != L
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
attr = S, HP
animtype = Up
damage = 10,3
sprpriority = 2
hitflag = MAFP
guardflag = MA
pausetime = 0, 9
sparkno = 3
sparkxy = 20,-170
hitsound = S1600,1
guardsound = 6,0
ground.type = Low
guard.slidetime = 12
guard.hittime = 12
guard.velocity = -15
airguard.velocity = -6
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1


[State 3301, HitDef]
type = HitDef
triggerall = p2statetype != L
triggerall = enemyNear, Anim != 5070
trigger1 = animelem = 5
trigger2 = animelem = 6
trigger3 = animelem = 7
attr = S, HP
animtype = Up
damage = 13,3
sprpriority = 2
hitflag = MAFP
guardflag = MA
pausetime = 0, 9
sparkno = 3
sparkxy = 0,-70
hitsound = S1600,1
guardsound = 6,0
ground.type = Low
guard.slidetime = 12
guard.hittime = 12
guard.velocity = -15
airguard.velocity = -6
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1

[State 3301, HitDef]
type = HitDef
triggerall = p2statetype != L
triggerall = enemyNear, Anim != 5070
trigger1 = animelem = 8
trigger2 = animelem = 9
attr = S, HP
animtype = Up
damage = 17,3
sprpriority = 2
hitflag = MAFP
guardflag = MA
pausetime = 0, 9
sparkno = 3
sparkxy = -20,-20
hitsound = S1600,1
guardsound = 6,0
ground.type = Low
guard.slidetime = 12
guard.hittime = 12
guard.velocity = -15
airguard.velocity = -6
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
palfx.time = 75
palfx.add = 4,119,172
palfx.mul = 6,149,198
palfx.sinadd = 21,60,10,15
palfx.invertall = 1
palfx.color = 135
p2stateno = 3302

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

;Hitstate for P2
[Statedef 3302]
type = A
movetype = H
physics = N
anim = IfElse(SelfAnimExist(5052),5052,(IfElse(SelfAnimExist(5051),5051,5050)))
velset = 0,0
facep2 = 1
ctrl = 0

[State 3302, velset]
type = velset
trigger1 = time = 10
x = -.5
y = -15

[State 3302, Gravity]
type = Gravity
trigger1 = Time > 10


[State 3302, SelfState]
type = SelfState
trigger1 = Vel Y > 0
value = 5070
ctrl = 1

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;END OF HYPERS
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
; 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 = 100,6
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_BKWD
[Statedef 105]
type    = S
movetype = I
physics = N
anim = 105
sprpriority = 1
velset = -15,0

[State 105, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 100,6

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

[State 105, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 105, VelSet]
type = VelSet
trigger1 = animelem = 3
x = 0
y = 0

[State 105, 4]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;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

;----------------------------[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



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

;[State -2, TargetPowerAdd]
;type =  TargetPowerAdd
;trigger1 = 1
;triggerall = numexplod(3102)=1
;value = -3000
;ID = 3105

[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(27), 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

;Stop Sound in intro from running
[State -2, StopSnd]
type = StopSnd
trigger1 = roundstate = 2
channel = 5

;Stop Sound in taunt from running
[State -2, StopSnd]
type = StopSnd
trigger1 = command = "start"
channel = 4

; ----------------------------------------------------------------------
[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, 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

[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



