; Bub's cns {by patman}
; 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 = 0,7        ;Default spark number
guard.sparkno = 0,20 ;Default guard spark number
KO.echo = 0          ;1 to enable echo on KO
volume = 0           ;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 = 13    ;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 = 1      ;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 = ?
; ...

;---------------------------------------------------------------------------
; 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

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


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

;---------------------------------------------------------------------------
;Bubble shoot
[Statedef 1000]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 100
ctrl = 0
velset = 0
anim = 1000


[State 1000, 1]
type = Projectile
trigger1 = Time = 6
projanim = 1005
projhitanim = 1006
offset = 0, -8
velocity = 4.05, 0
remvelocity = 3, 0
;velmul = 1.01, 1
;accel = 0, 0
; HitDef part of projectile info
attr = S, SP
damage    = 16,4
animtype = Medium
guardflag = MA
pausetime = 0,12
;sparkno = 0,1
sparkxy = 0, 0
hitsound   = 5,1
guardsound = 6,0
ground.type        = high
ground.slidetime = 14
ground.hittime  = 16
ground.velocity = -8
air.type = low
air.velocity = -2.5,-5
air.juggle = 3

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

;Bubble burst!
[Statedef 1010]
type    = S
movetype= A
physics = S
poweradd= 300
ctrl = 0
velset = 0
anim = 1000


[State 1010, 4]
type = Projectile
trigger1 = AnimElem = 1
projanim = 1015
projhitanim = 1016
offset = 0, -8
velocity = 0.55, 0
remvelocity = 3, 0
;velmul = 1.01, 1
accel = 0.3, 0
; HitDef part of projectile info
attr = S, SP
damage    = 46,4
animtype = Hard
guardflag = MA
pausetime = 0,9
;sparkno = 0,1
sparkxy = 10, 0
hitsound   = 5,3
guardsound = 6,0
ground.type        = Low
ground.slidetime = 14
ground.hittime  = 16
ground.velocity = -8
air.animtype = Back
air.velocity = -2.5,-5
air.juggle = 3

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


;Flame shoot
[Statedef 1020]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 100
ctrl = 0
velset = 0
anim = 1000


[State 1020, 1]
type = Projectile
trigger1 = Time = 6
projanim = 1025
projhitanim = 1006
offset = 0, -8
velocity = 4.05, 0
remvelocity = 3, 0
;velmul = 1.01, 1
;accel = 0, 0
; HitDef part of projectile info
attr = S, SP
damage    = 36,4
animtype = Medium
guardflag = MA
pausetime = 0,12
;sparkno = 0,1
sparkxy = 0, 0
hitsound   = 5,1
guardsound = 6,0
ground.type        = high
ground.slidetime = 14
ground.hittime  = 16
ground.velocity = -8
air.type = low
air.velocity = -2.5,-5
air.juggle = 3

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


;---------------------------------------------------------------------------
;AIRSONICBOOM_X
[Statedef 1005]
type    = A
movetype= A
physics = N
poweradd= 100
ctrl = 0
anim = 1000

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

[State 1005, 2]
type = VelMul
trigger1 = Time = 0
x = .025
y = .1

[State 1005, 3]
type = VelAdd
trigger1 = Time >= 0
trigger1 = Pos Y < 0
y = .02

[State 1005, 4]
type = PosSet
trigger1 = Pos Y >= -1
y = 0

[State 1005, 5]
type = VelSet
trigger1 = Pos Y >= -1
y = 0

[State 1005, 7]
type = PlaySnd
trigger1 = Time = 1
value = 1,0

[State 1005, 4]
type = Projectile
trigger1 = Time = 9
projanim = 1005
projhitanim = 1006
projremovetime = 5
offset = 25, -56
velocity = 1.1
velmul = 1.02, 1
xaccel = .01
; HitDef part of projectile info
attr = S, SP
damage    = 36,4
guardflag = MA
pausetime = 0,12
;sparkno = 0,5
sparkxy = 10, 0
hitsound   = 5,3
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -8
air.velocity = -2.5,-5.5
air.juggle = 2

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