; Player's constants.
; Format (case insensitive):
;  [groupname]
;  constname = "value"

[Data]
life = 1000          ;Amount of life to start with
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 = 15       ;Can do 15 points of juggling
sparkno = 2        ;Default spark number
guard.sparkno = 40 ;Default guard spark number
KO.echo = 1          ;1 to enable echo on KO
volume = 255           ;Volume offset (negative for softer)

[Size]
xscale = 1           ;Horizontal scaling factor.
yscale = 1           ;Vertical scaling factor.
ground.back = 15     ;Player width (back, ground)
ground.front = 15    ;Player width (front, ground)
air.back = 12        ;Player width (back, air)
air.front = 12       ;Player width (front, air)
z.width = 3          ;Player width (into and out)
height = 60	     ;Height of player (for opponent to jump over)
attack.width = 4,4   ;Default attack width: back, front
attack.dist = 160    ;Default attack distance
proj.attack.dist = 90 ;Default attack distance for projectiles
proj.doscale = 0     ;Set to 1 to scale projectiles too

[Velocity]
walk.fwd  = 2.3      ;Walk forward
walk.back = -2.2     ;Walk backward
run.fwd  = 4.6, 0    ;Run forward (x, y)  - if y<0, player will hop
run.back = -4.5,-3.8 ;Run backward (x, y) - if y=0, player will run
jump.neu = 0,-8.1    ;Neutral jumping velocity (x, y)
jump.back = -2.55    ;Jump back Speed (x, y)
jump.fwd = 2.5       ;Jump forward Speed (x, y)
runjump.back = -2.55,-8.1 ;Running jump speeds (opt)
runjump.fwd = 4,-8.1      ;.
airjump.neu = 0,-8.1      ;.
airjump.back = -2.55,-8.1 ;Air jump speeds (opt)
airjump.fwd = 2.5,-8.1    ;.

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

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

;---------------------------------------------------------------------------
; Stand
[Statedef 0]
type = S
physics = S
sprpriority = 0

[State 0, 1a]
type = ChangeAnim
triggerall = Var(5) = 0
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, 1b]
type = ChangeAnim
triggerall = Var(5) = 1
trigger1 = Anim != 1 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 1

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

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0
;---------------------------------------------------------------------------
; LOSE (Time over)
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0,0

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

;---------------------------------------------------------------------------
; WIN
[Statedef 180]
type = S

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

;---------------------------------------------------------------------------
; WIN1
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0,0

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

;---------------------------------------------------------------------------
; Introductions
; CNS difficulty: basic

[Statedef 190]
type = S

[State 190, 1]
type = VarRandom
trigger1 = Time = 0
v = 1
range = 0,200

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

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

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

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

[State 191, 1] ;Intro not yet over
type = VarSet
trigger1 = Time = 0
v = 9
value = 1

[State 191, 7] ;Intro over, set v9 to 1
type = VarSet
trigger1 = Time = 60
v = 9
value = 0

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

[State 192, PlaySnd]
type = PlaySnd
trigger1 = TIME = 0
value = S180,0

[State 192, 1] ;Intro not yet over
type = VarSet
trigger1 = Time = 0
v = 9
value = 1

[State 192, 7] ;Intro over, set v9 to 1
type = VarSet
trigger1 = Time = 60
v = 9
value = 0
;---------------------------------------------------------------------------
; STAND_A
[Statedef 200]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 200                       ;Change animation (Def: no change)
poweradd = 20                    ;Power to add (Def: 0)

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage    = 23                   ;Damage that move inflicts
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
;getpower = 30,15                 ;Power to get on hit, on guard
;                                 ;(Def Hit: 0)  (Def Guard: 1/2 of hit power)
;givepower = 15,8                 ;Power to give opponent on hit, on guard
;                                 ;(Def Hit: 0)  (Def Guard: 1/2 of hit power)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
                                 ;Hit/Miss/Dodge type (Def: Hit)
pausetime = 7,8                  ;Time attacker pauses, time victim shakes
numhits = 1                      ;Number of hits to count as (Def: 1)
sparkno = 0                   ;Spark image group and no (Def: set above)
sparkxy = -10,-70                ;X-offset for the "hit spark" rel. to p2,
                                 ;Y-offset for the spark rel. to p1
hitsound = 5,0                   ;Sound to play on hit
guardsound = 6,0                 ;Sound to play on guard
; mindist  = 0,0,0                 ;Min distance of p2 from p1 when hit
; maxdist  = 0,0,0                 ;Max distance of p2 from p1 when hit
; snap = 0,0,0                     ;Snaps p2 to position rel to p1
ground.type = High                 ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the victim slides back
ground.hittime  = 11             ;Time victim is in hit state
ground.velocity = -4             ;Velocity at which victim is pushed
; guard.slidetime = 5              ;Values for guarded attack (def: ground.slidetime)
; guard.hittime  = 15              ; (def: ground.hittime)
; guard.velocity = -4              ; (def: ground.velocity)
; guard.ctrltime = 7               ;Time to regain control after guard (def: guard.slidetime)
airguard.velocity = -1.9, -1.9         ;Guard velocity in air (def: (air.xvel*1.5
; airguard.ctrltime = 7            ;Time to regain control after air guard (def: ground.ctrltime)
; air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.3,-3           ;X-velocity at which victim is pushed,
                                 ;Y-velocity at which victim is pushed
;air.hittime = 20                  ;Time before oppoment regains control in air
; attack.width = 3, 3              ;Override default attack width
; fall = 0                         ;1 to cause opponent to fall (def: 0)
; fall.damage = 0                  ;Damage opponent takes on fall
; fall.velocity = n/a,-4.5         ;X, Y-velocity after bouncing off ground
; fall.animtype = Back             ;Animation type for falling people (def: Back)
; air.fall = 0                     ;1 to cause opponent to fall if in air (def: same as fall)
; down.velocity = ?,?              ;Velocity for opponents lying down (def: same as air.velocity)
; down.hittime = 20                ;Time opponent is stunned on ground (only for down.y-velocity = 0) (def: 20)
; down.bounce = 0                  ;Set to 1 for opponent to bounce on ground (def: 0)

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

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

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

[State 210, 1] ;Uncomment if you want to play a sound
type = PlaySnd
trigger1 = Time = 5
value = 0, 1

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 55
guardflag = MA
pausetime = 11,11
sparkxy = -10,-70
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_A
[Statedef 230]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 230                       ;Change animation (Def: no change)
poweradd = 20                    ;Power to add (Def: 0)

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

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage    = 23                   ;Damage that move inflicts
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
;getpower = 30,15                 ;Power to get on hit, on guard
;                                 ;(Def Hit: 0)  (Def Guard: 1/2 of hit power)
;givepower = 15,8                 ;Power to give opponent on hit, on guard
;                                 ;(Def Hit: 0)  (Def Guard: 1/2 of hit power)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
                                 ;Hit/Miss/Dodge type (Def: Hit)
pausetime = 7,8                  ;Time attacker pauses, time victim shakes
numhits = 1                      ;Number of hits to count as (Def: 1)
sparkno = 0                   ;Spark image group and no (Def: set above)
sparkxy = -10,-70                ;X-offset for the "hit spark" rel. to p2,
                                 ;Y-offset for the spark rel. to p1
hitsound = 5,0                   ;Sound to play on hit
guardsound = 6,0                 ;Sound to play on guard
; mindist  = 0,0,0                 ;Min distance of p2 from p1 when hit
; maxdist  = 0,0,0                 ;Max distance of p2 from p1 when hit
; snap = 0,0,0                     ;Snaps p2 to position rel to p1
ground.type = High                 ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the victim slides back
ground.hittime  = 11             ;Time victim is in hit state
ground.velocity = -4             ;Velocity at which victim is pushed
; guard.slidetime = 5              ;Values for guarded attack (def: ground.slidetime)
; guard.hittime  = 15              ; (def: ground.hittime)
; guard.velocity = -4              ; (def: ground.velocity)
; guard.ctrltime = 7               ;Time to regain control after guard (def: guard.slidetime)
airguard.velocity = -1.9, -1.9         ;Guard velocity in air (def: (air.xvel*1.5
; airguard.ctrltime = 7            ;Time to regain control after air guard (def: ground.ctrltime)
; air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.3,-3           ;X-velocity at which victim is pushed,
                                 ;Y-velocity at which victim is pushed
;air.hittime = 20                  ;Time before oppoment regains control in air
; attack.width = 3, 3              ;Override default attack width
; fall = 0                         ;1 to cause opponent to fall (def: 0)
; fall.damage = 0                  ;Damage opponent takes on fall
; fall.velocity = n/a,-4.5         ;X, Y-velocity after bouncing off ground
; fall.animtype = Back             ;Animation type for falling people (def: Back)
; air.fall = 0                     ;1 to cause opponent to fall if in air (def: same as fall)
; down.velocity = ?,?              ;Velocity for opponents lying down (def: same as air.velocity)
; down.hittime = 20                ;Time opponent is stunned on ground (only for down.y-velocity = 0) (def: 20)
; down.bounce = 0                  ;Set to 1 for opponent to bounce on ground (def: 0)

[State 200, 7]
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,0
anim = 240

[State 210, 1] ;Uncomment if you want to play a sound
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 55
guardflag = MA
pausetime = 11,11
sparkxy = -10,-70
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

;---------------------------------------------------------------------------
;CROUCH_A
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 15
ctrl = 0
anim = 400

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

[State 400, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 23
animtype  = Light
getpower  = 10
givepower = 8
hitflag = MAFD
guardflag = L
pausetime = 10,12
sparkxy = -2,-41
hitsound   = 5,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = -4
air.velocity = -1.3,-3
down.velocity = -4,0
down.hittime = 20

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

[State 400, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
;---------------------------------------------------------------------------
;CROUCH_A
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 15
ctrl = 0
anim = 410

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

[State 400, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 23
animtype  = Light
getpower  = 10
givepower = 8
hitflag = MAFD
guardflag = L
pausetime = 10,12
sparkxy = -2,-41
hitsound   = 5,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = -4
air.velocity = -1.3,-3
down.velocity = -4,0
down.hittime = 20

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

[State 400, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
;---------------------------------------------------------------------------
;CROUCH_A
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 15
ctrl = 0
anim = 430

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

[State 400, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 23
animtype  = Light
getpower  = 10
givepower = 8
hitflag = MAFD
guardflag = L
pausetime = 10,12
sparkxy = -2,-41
hitsound   = 5,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = -4
air.velocity = -1.3,-3
down.velocity = -4,0
down.hittime = 20

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

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

;---------------------------------------------------------------------------
;CROUCH_B
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 70
ctrl = 0
anim = 440

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

[State 410, 3]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 62
getpower  = 40
givepower = 40
hitflag = MAFD
guardflag = L
pausetime = 12,12
sparkxy = -5,-10
sparkno = 1
hitsound   = 5,2
guardsound = 6,0
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -1.5
air.velocity = -1.2,-3
guard.velocity = -5
fall = 1

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


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

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

[State 600, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 12
getpower  = 10
givepower = 10
guardflag = HA
priority = 3
pausetime = 7,8
sparkxy = -10,-58
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,-3

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

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

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

[State 610, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 610, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 70
getpower  = 50
givepower = 25
guardflag = HA
priority = 3
pausetime = 9,10
sparkxy = -10,-51
hitsound   = 5,2
guardsound = 6,0
ground.type = High
ground.slidetime = 9
ground.hittime  = 9
ground.velocity = -4
air.velocity = -1.3,-3

[State 610, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1
;---------------------------------------------------------------------------
;JUMP_A
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 630

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

[State 600, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 12
getpower  = 10
givepower = 10
guardflag = HA
priority = 3
pausetime = 7,8
sparkxy = -10,-58
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,-3

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

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

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

[State 610, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 610, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 70
getpower  = 50
givepower = 25
guardflag = HA
priority = 3
pausetime = 9,10
sparkxy = -10,-51
hitsound   = 5,2
guardsound = 6,0
ground.type = High
ground.slidetime = 9
ground.hittime  = 9
ground.velocity = -4
air.velocity = -1.3,-3

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

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

[State 1000, Helper]
type = Helper
trigger1 = animelem = 2
ID = 1001
pos = 55,0
postype = back
stateno = 1001
helpertype = normal
name = "PROJECTILE"
keyctrl = 0
ownpal = 1
supermovetime = 1

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

[Statedef 1001]
type = S
movetype = A
physics = S
juggle = 0
anim = 1001
ctrl = 0
velset = 00,0

[State 1001, 1]
type = VelSet
trigger1 = time >= 0
x = 7
y = 0


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

[State 1001, DestroySelf]
type = DestroySelf
trigger1 = time = 100

;---------------------------------------------------------------------------
; SONIC_ACROBATIC_RUSH (SDM - start)
[Statedef 3010]
type = S
movetype = A
physics = N
ctrl = 0
anim = 3000
velset = 0,0

[State 3010, Super A]
type = SuperPause
trigger1 = Time = 2
pos = 10, -19
anim = 102

[State 3010, Super B]
type = PlaySnd
trigger1 = Time = 2
value = S3000,1

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

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

[State 3010, Super E]
type = AfterImageTime
trigger1 = Time = [2,30]
time = 2

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

[State 3010, Snd]
type = PlaySnd
trigger1 = Time = 0
value = 191,0
volume = 0

[State 3010, 0b]
type = PlaySnd
trigger1 = Time = 5
value = 1000,1
volume = 0
channel = 1

[State 3010, 0c]
type = StopSnd
trigger1 = AnimElem = 8
channel = 1

[State 3010, 1]
type = VelSet
trigger1 = AnimElem = 4
x = 8
y = 0

[State 1000, 2]
type = PosAdd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
x = 6

[State 1000, 3]
type = VelAdd
trigger1 = Time >= 14
x = -.3

[State 1000, 3b]
type = HitDef
trigger1 = AnimElem = 5
attr = S, HA
animtype = Heavy
getpower = 0, 0
givepower = 10, 5
damage = 40, 15
pausetime = 5, 6
guardflag = M
sparkno = 2
sparkxy = 24,29
hitsound = S2,3
guardsound = 6,0
ground.type = High
ground.slidetime = 7
ground.hittime = 12
ground.velocity = -1
air.velocity = -1,-1
maxdist = 30, 0
p1stateno = 3011
kill = 0

[State 3010, Command]
type = ChangeState
persistent = 0
trigger1 = AnimElem = 5, = 1
trigger1 = Movehit = 1
trigger1 = Moveguarded = 0
value = 3011

[State 3010, end!!]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = Movehit = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; SONIC_ACROBATIC_RUSH (SDM - initial sucess)
[Statedef 3011]
type = S
movetype = A
physics = N
ctrl = 0
anim = 3011
velset = 0,0
poweradd = 0

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

[State 3011, Super E]
type = AfterImageTime
trigger1 = Time = [2,200]
time = 2

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

[State 3011, Pos]
type = PosAdd
trigger1 = Time = 0
x = 11

[State 3011, Blink]
type = EnvColor
trigger1 = AnimElem = 2
trigger2 = AnimElem = 7
trigger3 = AnimElem = 15
trigger4 = AnimElem = 19
add = 255,0,0
time = 4

[State 3011, Wind 1]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = Animelem = 7
value = 0,0

[State 3011, Voice 1]
type = PlaySnd
trigger1 = Animelem = 2
trigger2 = AnimElem = 7
value = 1,0
volume = 0

[State 3011, Wind 2]
type = PlaySnd
trigger1 = AnimElem = 15
trigger2 = AnimElem = 19
value = 0,2

[State 3011, Voice 2]
type = PlaySnd
trigger1 = AnimElem = 15
trigger2 = AnimElem = 19
value = 1,1
volume = 0

[State 3011, Hit1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, HA
animtype = Heavy
damage = 40, 15
getpower = 0, 0
givepower = 10, 5
guardflag = M
pausetime = 5,15
sparkxy = 26,-37
sparkno = 2
hitsound = S2,3
guardsound = 6,0
ground.type = High
ground.slidetime = 16
ground.hittime = 21
ground.velocity = -1
air.velocity = -1,-1
airguard.velocity = -1,-1
kill = 0

[State 3011, Pos2]
type = PosAdd
trigger1 = AnimElem = 7
x = 11

[State 3011, Hit2]
type = HitDef
trigger1 = AnimElem = 4
attr = S, HA
animtype = Heavy
damage = 40, 15
guardflag = M
getpower = 0,0
givepower = 12, 6
pausetime = 5, 28
sparkxy = 42,-39
hitsound = S2,3
sparkno = 2
guardsound = 6,0
ground.type = Low
ground.slidetime = 29
ground.hittime = 34
ground.velocity = -1
air.velocity = -1,-1
kill = 0

[State 3001, Hit 3]
type = HitDef
trigger1 = AnimElem = 15
attr = S, HA
animtype = Heavy
getpower = 0, 0
givepower = 20, 10
damage = 50, 25
guardflag = M
pausetime = 5,20
sparkno = 2
sparkxy = 32,-36
hitsound = S2,3
guardsound = 6,0
ground.type = High
ground.slidetime = 21
ground.hittime = 26
ground.velocity = -1
air.velocity = -1,-1
kill = 0

[State 3011, Hit4]
type = HitDef
trigger1 = AnimElem = 19
attr = C, HA
animtype = Hard
getpower = 0, 0
givepower = 20, 10
damage = 40, 15
guardflag = M
pausetime = 5, 16
sparkno = 2
sparkxy = 35,-2
hitsound = S2,3
sparkno = 2
guardsound = 6,0
ground.type = Low
ground.slidetime = 17
ground.hittime = 22
ground.velocity = -1
air.velocity = -1,-1
kill = 0

[State 3011, Change]
type = ChangeState
trigger1 = AnimTime = 0
value = 3012
ctrl = 0
;---------------------------------------------------------------------------
; SONIC_ACROBATIC_RUSH (SDM - final sucess)
[Statedef 3012]
type = S
movetype = A
physics = N
ctrl = 0
anim = 3001
velset = 0,0

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

[State 3012, Super E]
type = AfterImageTime
trigger1 = Time = [2,200]
time = 2

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

[State 3012, Blink]
type = EnvColor
trigger1 = AnimElem = 2
trigger2 = AnimElem = 5
trigger3 = AnimElem = 11
trigger4 = AnimElem = 24
trigger5 = AnimElem = 25
add = 255,0,0
time = 4

[State 3012, Blink2]
type = EnvColor
trigger1 = AnimElem = 29,= 0
add = 255,0,0
mul = 255,0,0
time = 15

[State 3012, Voice1]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 5
value = 1,0
volume = 0

[State 3012, Voice2]
type = PlaySnd
trigger1 = AnimElem = 11
trigger2 = AnimElem = 15
value = 1,1
volume = 0

[State 3012, Voice3]
type = PlaySnd
trigger1 = AnimElem = 29
value = 1,2
volume = 0

[State 3012, Wind1]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 5
value = 0,0
volume = 0

[State 3012, Wind2]
type = PlaySnd
trigger1 = AnimElem = 11
trigger2 = AnimElem = 16
value = 0,1
volume = 0

[State 3012, Wind3]
type = PlaySnd
trigger1 = AnimElem = 29
value = 0,2
volume = 0

[State 3012, ShortJump]
type = PlaySnd
trigger1 = AnimElem = 15
value = 40,1
volume = 0

[State 3012, Friction]
type = PlaySnd
trigger1 = AnimElem = 28
value = 1000,2
volume = 0

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

[State 3012, Extra]
type = PosAdd
trigger1 = Time = 0
x = 15

[State 3012, 2a]
type = PosAdd
trigger1 = AnimElem = 15
trigger2 = AnimElem = 20
trigger3 = AnimElem = 24
x = 6

[State 3012, 2b]
type = PosAdd
trigger1 = AnimElem = 21
trigger2 = AnimElem = 22
trigger3 = AnimElem = 23
x = 4

[State 3012, 2c]
type = PosAdd
trigger1 = AnimElem = 25
trigger2 = AnimElem = 27
x = 7

[State 3012, 2d]
type = PosAdd
trigger1 = AnimElem = 26
x = 8

[State 3012, 3]
type = VelSet
trigger1 = AnimElem = 20
x = 0
y = 0

[State 3012, Sweep1]
type = VelSet
trigger1 = AnimElem = 27
x = 5
y = 0

[State 3012, Sweep2]
type = VelAdd
trigger1 = Time >= 86
trigger1 = Time < 125
x = -0.1

[State 3012, Sweep3]
type = VelSet
trigger1 = Time = 125
x = 0
y = 0

[State 3012, 3]
type = Explod
trigger1 = AnimElem = 28,= 1
pos = -5,-2
anim = F120
removetime = 18

[State 3012, 3b]
type = Explod
trigger1 = AnimElem = 37,= 1
pos = -5,-2
anim = F120
removetime = 21

[State 3012, Hit1]
type = HitDef
trigger1 = AnimElem = 2
attr = C, HA
animtype = Heavy
damage = 40, 15
getpower = 0, 0
givepower = 10, 5
guardflag = M
pausetime = 5,9
sparkxy = 26,-25
hitsound = S2,3
sparkno = 2
guardsound = 6,0
ground.type = High
ground.slidetime = 9
ground.hittime = 14
guard.velocity = -2
ground.velocity = -2
air.velocity = -2,-1
airguard.velocity = -2,-1.2
kill = 0

[State 3012, Hit2]
type = HitDef
trigger1 = AnimElem = 5
attr = C, HA
animtype = Heavy
damage = 40,15
guardflag = M
getpower = 0,0
sparkno = 2
givepower = 12, 6
pausetime = 5,15
sparkxy = 35,-25
hitsound = S2,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime = 23
ground.velocity = -2
air.velocity = -2,-1
guard.velocity = -2
airguard.velocity = -2,-1.2
kill = 0

[State 3012, Hit3]
type = HitDef
trigger1 = AnimElem = 11
attr = C, HA
animtype = Heavy
damage   = 40, 15
getpower = 0, 0
givepower = 15, 7
guardflag = L
pausetime = 5, 33
sparkno = 2
sparkxy = 44,-13
hitsound   = S2,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 34
ground.hittime  = 40
guard.hittime = 12
ground.velocity = -2
guard.velocity = -2
air.velocity = -2.2,-1.5
airguard.velocity = -2,-1
kill = 0

[State 3012, Hit4]
type = HitDef
trigger1 = AnimElem = 24
attr = S, HA
animtype = Heavy
getpower = 0, 0
givepower = 10, 5
damage = 40, 15
guardflag = M
pausetime = 5,4
sparkno = 2
sparkxy = 55,-39
hitsound = S2,3
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime = 9
ground.velocity = -2.5
air.velocity = -2.2,-1.3
kill = 0

[State 3012, Hit5]
type = HitDef
trigger1 = AnimElem = 25
attr = S, HA
animtype = Heavy
getpower = 0, 0
givepower = 10, 5
damage = 40, 15
guardflag = M
pausetime = 5,13
sparkxy = 55,-39
sparkno = 2
hitsound = S2,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 13
ground.hittime = 19
ground.velocity = -6.5
air.velocity = -4,-2.5
kill = 0

[State 3012, Final Hit]
type = HitDef
trigger1 = AnimElem = 29
attr = S, HA
damage    = 100, 50
getpower = 0,0
givepower = 10, 5
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 45,35
sparkno = 2
sparkxy = 31,-10
hitsound = S2,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 35
ground.hittime  = 45
fall = 1
air.fall = 1
p2stateno = 1003
ground.velocity = 6,-8
air.velocity = 6,-8
palfx.time = 35
palfx.add = 255,0,0
palfx.mul = 255,0,0

[State 3012, end!!]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; SONIC_ACROBATIC_RUSH (DM - start)
[Statedef 3000]
type = S
movetype = A
physics = N
ctrl = 0
anim = 3000
velset = 0,0

[State 3000, Super A]
type = SuperPause
trigger1 = Time = 2
pos = 10, -19
anim = 100

[State 3000, Super B]
type = PlaySnd
trigger1 = Time = 2
value = 3000,0

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

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

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

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

[State 3000, Snd]
type = PlaySnd
trigger1 = Time = 0
value = 190,0
volume = 0

[State 3000, 0b]
type = PlaySnd
trigger1 = Time = 5
value = 1000,1
volume = 0
channel = 1

[State 3000, 0c]
type = StopSnd
trigger1 = AnimElem = 8
channel = 1

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

[State 1000, 2]
type = PosAdd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
x = 3

[State 1000, 3]
type = VelAdd
trigger1 = Time >= 14
x = -.3

[State 1000, 3b]
type = HitDef
trigger1 = AnimElem = 5
attr = S, HA
animtype = Hard
getpower = 0, 0
givepower = 10, 5
damage = 30, 12
pausetime = 5, 6
guardflag = M
sparkno = 2
sparkxy = 24,-19
guardsound = 6,0
ground.type = High
ground.slidetime = 7
ground.hittime = 12
ground.velocity = -6.5
air.velocity = -4,-2.5
maxdist = 30, 0
p1stateno = 3001
kill = 0

[State 3000, Command]
type = ChangeState
persistent = 0
trigger1 = AnimElem = 5, = 1
trigger1 = Movehit = 1
trigger1 = Moveguarded = 0
value = 3001

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

;---------------------------------------------------------------------------
; SONIC_ACROBATIC_RUSH (DM - sucess)
[Statedef 3001]
type = S
movetype = A
physics = N
ctrl = 0
anim = 3001
velset = 0,0

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

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

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

[State 3001, Blink]
type = EnvColor
trigger1 = AnimElem = 2
trigger2 = AnimElem = 5
trigger3 = AnimElem = 11
trigger4 = AnimElem = 24
trigger5 = AnimElem = 25
trigger6 = AnimElem = 29
add = 255,255,255
mul = 255,255,255
time = 4

[State 3001, Voice1]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 5
value = 1,0
volume = 0

[State 3001, Voice2]
type = PlaySnd
trigger1 = AnimElem = 11
trigger2 = AnimElem = 15
value = 1,1
volume = 0

[State 3001, Voice3]
type = PlaySnd
trigger1 = AnimElem = 29
value = 1,2
volume = 0

[State 3001, Wind1]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 5
value = 0,0
volume = 0

[State 3001, Wind2]
type = PlaySnd
trigger1 = AnimElem = 11
trigger2 = AnimElem = 16
value = 0,1
volume = 0

[State 3001, Wind3]
type = PlaySnd
trigger1 = AnimElem = 29
value = 0,2
volume = 0

[State 3001, ShortJump]
type = PlaySnd
trigger1 = AnimElem = 15
value = 40,1
volume = 0

[State 3001, Friction]
type = PlaySnd
trigger1 = AnimElem = 28
value = 1000,2
volume = 0

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

[State 3001, Extra]
type = PosAdd
trigger1 = Time = 0
x = 15

[State 3001, 2a]
type = PosAdd
trigger1 = AnimElem = 15
trigger2 = AnimElem = 20
trigger3 = AnimElem = 24
x = 6

[State 3001, 2b]
type = PosAdd
trigger1 = AnimElem = 21
trigger2 = AnimElem = 22
trigger3 = AnimElem = 23
x = 4

[State 3001, 2c]
type = PosAdd
trigger1 = AnimElem = 25
trigger2 = AnimElem = 27
x = 7

[State 3001, 2d]
type = PosAdd
trigger1 = AnimElem = 26
x = 8

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

[State 3001, Sweep1]
type = VelSet
trigger1 = AnimElem = 27
x = 5
y = 0

[State 3001, Sweep2]
type = VelAdd
trigger1 = Time >= 86
trigger1 = Time < 125
x = -0.1

[State 3001, Sweep3]
type = VelSet
trigger1 = Time = 125
x = 0
y = 0

[State 3001, 3]
type = Explod
trigger1 = AnimElem = 28,= 1
pos = -5,-2
anim = F120
removetime = 18

[State 3001, 3b]
type = Explod
trigger1 = AnimElem = 37,= 1
pos = -5,-2
anim = F120
removetime = 21

[State 3001, Hit1]
type = HitDef
trigger1 = AnimElem = 2
attr = C, HA
animtype = Light
damage = 32, 15
getpower = 0, 0
givepower = 10, 5
guardflag = M
pausetime = 5,9
sparkxy = 26,-25
sparkno = 0
hitsound = S2,0
guardsound = 6,0
ground.type = High
ground.slidetime = 9
ground.hittime = 14
guard.velocity = -2
ground.velocity = -2
air.velocity = -2,-1
airguard.velocity = -2,-1.2
kill = 0

[State 3001, Hit2]
type = HitDef
trigger1 = AnimElem = 5
attr = C, HA
animtype = Medium
damage = 32, 15
guardflag = M
getpower = 0,0
givepower = 12, 6
pausetime = 5,15
sparkxy = 35,-25
hitsound = S2,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime = 23
ground.velocity = -2
air.velocity = -2,-1
guard.velocity = -2
airguard.velocity = -2,-1.2
kill = 0

[State 3001, Hit3]
type = HitDef
trigger1 = AnimElem = 11
attr = C, HA
damage   = 34, 15
getpower = 0, 0
givepower = 15, 7
guardflag = L
pausetime = 5, 33
sparkno = 2
sparkxy = 44,-13
hitsound   = S2,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 34
ground.hittime  = 40
guard.hittime = 12
ground.velocity = -2
guard.velocity = -2
air.velocity = -2.2,-1.5
airguard.velocity = -2,-1
kill = 0

[State 3001, Hit4]
type = HitDef
trigger1 = AnimElem = 24
attr = S, HA
animtype = Hard
getpower = 0, 0
givepower = 10, 5
damage = 35, 13
guardflag = M
pausetime = 5,4
sparkno = 2
sparkxy = 55,-39
hitsound = S2,3
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime = 9
ground.velocity = -2.5
air.velocity = -2.2,-1.3
kill = 0

[State 3001, Hit5]
type = HitDef
trigger1 = AnimElem = 25
attr = S, HA
animtype = Hard
getpower = 0, 0
givepower = 10, 5
damage = 35, 13
guardflag = M
pausetime = 5,13
sparkno = 2
sparkxy = 55,-39
hitsound = S2,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 13
ground.hittime = 19
ground.velocity = -6.5
air.velocity = -4,-2.5
kill = 0

[State 3001, Final Hit]
type = HitDef
trigger1 = AnimElem = 29
attr = S, HA
damage    = 40, 15
getpower = 0,0
givepower = 10, 5
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 25,15
sparkno = 2
sparkxy = 31,-10
hitsound = S2,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
fall = 1
air.fall = 1
p2stateno = 1003
ground.velocity = 4,-6
air.velocity = 4,-6
palfx.time = 15
palfx.add = 255,255,255
palfx.mul = 255,255,255

[State 3001, end!!]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
; Hit by HARD_SWEEP_DASH (shake)
[Statedef 1003]
type    = A
movetype= H ;Get hit
physics = N

[State 1003, 1]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0
z = 0

[State 1003, 2]
type = ChangeAnim2
Trigger1 = Time >= 0
value = 1003

[State 1003, 2]
type = ChangeState
Trigger1 = HitShakeOver = 1
value = 1004

;---------------------------------------------------------------------------
; Hit by HARD_SWEEP_DASH (flying through air)
[Statedef 1004]
type    = A
movetype= H ;Get hit
physics = N

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

[State 1004, 2]
type = VelAdd
Trigger1 = Time >= 0
y = .41

[State 1004, 4]
type = AngleSet
Trigger1 = Time = 0
value = 0

[State 1004, 5]
type = AngleAdd
Trigger1 = Time >= 0
value = -22.5

[State 1004, 6]
type = AngleDraw
Trigger1 = Time >= 0
trigger1 = Pos Y <= 10

[State 1004, 7]
type = SelfState
Trigger1 = Vel Y > 0
trigger1 = Pos Y > 10
value = 5100


;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------
;================================================================
;SPECIAL STATES
;================================================================

[Statedef -2]

[State -2, 4]
type = VarSet
trigger1 = Life > 300
V = 5
value = 0

[State -2, 4b]
type = VarSet
trigger1 = Life <= 300
V = 5
value = 1

[State -2, 5]
type = palfx
trigger1 = var(5) = 1
trigger1 = TimeMod = 60,0
add = 32,64,224
mul = 32,64,224
blink = 1
time = 3
value = 1

[State -2, 6]
type = BGPalFX
trigger1 = stateno = 3011
invertall = 1
time = 190

[State -2, White]
type = BGPalFX
triggerall = WinKO
triggerall = roundstate = 3
trigger1 = time = 0
trigger2 = time = 6
trigger3 = time = 12
trigger4 = time = 18
trigger5 = time = 24
add = 255,255,255
mul = 255,255,255
time = 3
persistent = 0

[State -2, Red]
type = BGPalFX
triggerall = WinKO
triggerall = roundstate = 3
trigger1 = time = 3
trigger2 = time = 9
trigger3 = time = 15
trigger4 = time = 21
trigger5 = time = 27
add = 255,0,0
mul = 255,0,0
time = 3
persistent = 0

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