; 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 = 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 = 0.3           ;Horizontal scaling factor.
yscale = 0.3           ;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.4      ;Walk forward
walk.back = -2.2     ;Walk backward
run.fwd  = 6.6, 0    ;Run forward (x, y)  - if y<0, player will hop
run.back = -6.5,-4 ;Run backward (x, y) - if y=0, player will run
jump.neu = 0,-8.5    ;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,-9.5 ;Running jump speeds (opt)
runjump.fwd = 4,-9.5      ;.
airjump.neu = 0,-9.5      ;.
airjump.back = -2.55,-9.5 ;Air jump speeds (opt)
airjump.fwd = 2.5,-9.5    ;.

[Movement]
airjump.num = 0      ;Number of air jumps allowed (opt)
airjump.height = 35  ;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

;---------------------------------------------------------------------------
; 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, VarRandom]
type = VarRandom
trigger1 = Time = 1
v = 10
range = 0,20

[State 180, Win 1] 
type = ChangeState
trigger1 = Time = 2
trigger1 = var(10) = [0,10]
value = 181

[State 180, Win 2] 
type = ChangeState
triggerall = Time = 2
trigger1 = var(10) = [11,20]
value = 182

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

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

;---------------------------------------------------------------------------
; WIN2
[Statedef 182]
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 = 190
velset = 0,0,0

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

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

;---------------------------------------------------------------------------
; TAUNT
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0,0

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

;---------------------------------------------------------------------------
; 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 = 2
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage    = 20                   ;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, 3                   ;Spark image group and no (Def: set above)
sparkxy = -10,-59                ;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 = Low                 ;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,-.8     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
; 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 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 = null; PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
animtype  = Medium
damage    = 40
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_C
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 60
ctrl = 0
velset = 0,0,0
anim = 220

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

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 5
attr = S, NA
animtype  = Medium
damage    = 60
guardflag = MA
pausetime = 11,11
sparkxy = -10,-42
hitsound   = 5,1
guardsound = 6,0
ground.type = Low
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 400, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 23
animtype  = Light
getpower  = 10
givepower = 8
hitflag = MA
guardflag = MAF
pausetime = 10,12
sparkxy = -10,-18
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 410]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 70
ctrl = 0
anim = 410

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

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

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

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

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

[State 410, 3]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 60
getpower  = 40
givepower = 40
hitflag = MAFD
guardflag = MAF
pausetime = 12,12
sparkxy = -10,-56
sparkno = 0,5
hitsound   = 5,2
guardsound = 6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -5,-5
air.velocity = -5,-5
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 600, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 20
getpower  = 10
givepower = 10
guardflag = HA
priority = 3
pausetime = 7,8
sparkxy = -10,-53
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    = 40
getpower  = 50
givepower = 25
guardflag = HA
priority = 3
pausetime = 9,10
sparkxy = -10,-74
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_C
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 55
ctrl = 0
anim = 620

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

[State 610, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 60
getpower  = 50
givepower = 25
guardflag = HA
priority = 3
pausetime = 9,10
sparkxy = -10,-14
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

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

[State 3000, Super A]
type = SuperPause
trigger1 = Time = 2
pos = 0, -60
anim = 30

[State 3000, Super B]
type = PlaySnd
trigger1 = Time = 2
value = F20, 0 ;Play fight sound of super

[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,68]
time = 2

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

[State 3000, 1]
type = HitDef
trigger1 = AnimElem = 1
attr = S, HA
animtype  = Hard
damage    = 72,4
getpower  = 0
priority  = 6
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 22
ground.hittime  = 22
ground.velocity = -6
air.velocity = -3,-3
fall.animtype = Hard
fall = 1

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

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

[State -3, One Sound]
type = PlaySnd
trigger1 = Time = 1
value = 1,0
loop = 1

