; Goku's constants:

[Data]
life = 1200
attack = 100
defence = 100
fall.defence_up = 50
liedown.time = 60
airjuggle = 15
sparkno = s555
guard.sparkno = s556
KO.echo = 1
volume = 0

[Size]
xscale = 1
yscale = 1
ground.back = 15
ground.front = 15
air.back = 12
air.front = 12
z.width = 3
height = 60
attack.width = 4,4
attack.dist = 160
proj.attack.dist = 90
proj.doscale = 0

[Velocity]
walk.fwd  = 2.3
walk.back = -2.2
run.fwd  = 4.6, 0
run.back = -4.5, 0
jump.neu = 0,-8.1
jump.back = -2.55
jump.fwd = 2.5
runjump.back = -2.55,-8.1
runjump.fwd = 4,-8.1
airjump.neu = 0,-8.1
airjump.back = -2.55
airjump.fwd = 2.5

[Movement]
airjump.num = 1
airjump.height = 35
yaccel = .43
stand.friction = .85
crouch.friction = .82

;---------------------------------------------------------------------------
; 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 = MatchOver = 1
trigger1 = Time = 0
trigger1 = Win = 1 
value = 181

[State 180, 2]
type = ChangeState
trigger1 = MatchOver = 0
trigger1 = Time = 0
trigger1 = Win = 1 
value = 182

[State 180, 1] ; Final
type = ChangeState
trigger1 = Time = 0
trigger1 = Win = 0
value = 183

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

[State 181]
type = PlaySnd
trigger1 = AnimElem = 5
value = 2, 2

;---------------------------------------------------------------------------
; WIN2
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0,0

[State 182]
type = PlaySnd
trigger1 = Time = 1
value = 12, 1

;---------------------------------------------------------------------------
; End
[Statedef 183]
type = S
ctrl = 0
anim = 183
velset = 0,0,0

[State 183, 1]
type = EnvColor
trigger1 = time = 0
value = 0, 0, 0
time = 400
under = 1

[State 191, 2]
type = explod
trigger1 = time = 1
anim = 184
facing = 1
postype = p1
sprpriority = 1
bindtime = 600
ownpal = 1
supermove = 1

;---------------------------------------------------------------------------
; High jump (start)
[Statedef 300]
type    = S
movetype = I
physics = S
juggle  = 0
ctrl = 0
velset = 0
anim = 40

[State 300, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 300, 2]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 300, 3]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

[State 300, 4]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[State 300, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 301
ctrl = 1

;---------------------------------------------------------------------------
; High jump (up)
[Statedef 301]
type = A
physics = N
anim = 301

[State 301, 2]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 301, ifelse((vel x)>0, 302, 303))

[State 301, 3]
type = VelSet
trigger1 = Time = 0
y = -14

[State 301, 4]
type = VelAdd
trigger1 = Time > 0
y = .35

[State 301, 5]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 305

;---------------------------------------------------------------------------
; High jump (fwd)
[Statedef 302]
type = A
physics = N
anim = 302

[State 302, 2]
type = VelSet
trigger1 = Time = 0
x = -3
y = -14

[State 302, 3]
type = VelAdd
trigger1 = Time > 0
y = .35

[State 302, 4]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 305

;---------------------------------------------------------------------------
; High jump (back)
[Statedef 303]
type = A
physics = N
anim = 303

[State 303, 2]
type = VelSet
trigger1 = Time = 0
x = 3
y = -14

[State 303, 3]
type = VelAdd
trigger1 = Time > 0
y = .35

[State 303, 4]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 305

;---------------------------------------------------------------------------
; High jump (end)
[Statedef 305]
type    = S
physics = S
ctrl = 0
anim = 47

[State 305, 1]
type = VelSet
trigger1 = Time = 0
y = 0

[State 305, 2]
type = PosSet
trigger1 = Time = 0
y = 0

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


[Statedef -2]

; Power bar sobe sozinha
[State -2,1]
type = poweradd
trigger1 = time >= 0
trigger1 = palno = 1
trigger2 = palno = 2
trigger3 = palno = 3
trigger4 = palno = 4
trigger5 = palno = 5
trigger6 = palno = 6
trigger7 = palno = 7
trigger8 = palno = 8
trigger9 = palno = 9
trigger10 = palno = 10
trigger11 = palno = 11
trigger12 = palno = 12
value = 1

[State -2,1]
type = VarSet
trigger1 = palno = 1
trigger2 = palno = 2
trigger3 = palno = 3
trigger4 = palno = 4
trigger5 = palno = 5
trigger6 = palno = 6
trigger7 = palno = 7
trigger8 = palno = 8
trigger9 = palno = 9
trigger10 = palno = 10
trigger11 = palno = 11
trigger12 = palno = 12
v = 1
value = 1
