Compare commits
7 Commits
b227844d12
...
gun_upgrad
Author | SHA1 | Date | |
---|---|---|---|
b7c3e6ee92
|
|||
c91e5f4bd1
|
|||
ea2ddadb15
|
|||
9333c03bf3
|
|||
1b45bd3dc3
|
|||
71a7351d77
|
|||
80bb848468
|
@ -730,7 +730,7 @@ function gun_base:ammo_upgrade_opt()
|
|||||||
return {
|
return {
|
||||||
icon=self.icon,
|
icon=self.icon,
|
||||||
hdr=self.hdr,
|
hdr=self.hdr,
|
||||||
body=[[----------AMMO
|
body=[[--------AMMO
|
||||||
|
|
||||||
more shots
|
more shots
|
||||||
before you
|
before you
|
||||||
@ -754,20 +754,20 @@ function gun_base:rate_upgrade_opt()
|
|||||||
return {
|
return {
|
||||||
icon=self.icon,
|
icon=self.icon,
|
||||||
hdr=self.hdr,
|
hdr=self.hdr,
|
||||||
body=[[----------RATE
|
body=[[--------RATE
|
||||||
|
|
||||||
reduce delay
|
reduce delay
|
||||||
between shots
|
between each
|
||||||
in frames.
|
shot when
|
||||||
|
firing.
|
||||||
|
|
||||||
fractions
|
is: ]]..tostr(c)..[[f
|
||||||
add up across
|
minus: ]]..tostr(c-newc)..[[f
|
||||||
upgrades.
|
|
||||||
|
|
||||||
is: ]]..tostr(c)..[[
|
|
||||||
minus: ]]..tostr(c-newc)..[[
|
|
||||||
----------
|
----------
|
||||||
total: ]]..tostr(newc),
|
total: ]]..tostr(newc)..[[f
|
||||||
|
|
||||||
|
remainder:
|
||||||
|
]]..sub(tostr(newc-rawnewc),0,5),
|
||||||
action=function()
|
action=function()
|
||||||
self.cooldown=newc>>16
|
self.cooldown=newc>>16
|
||||||
self.cd_remainder=newc-rawnewc
|
self.cd_remainder=newc-rawnewc
|
||||||
@ -916,7 +916,7 @@ blast_gun = mknew(gun_base.new{
|
|||||||
maxammo = 5,
|
maxammo = 5,
|
||||||
munition = blast,
|
munition = blast,
|
||||||
hdr = "bLASTER",
|
hdr = "bLASTER",
|
||||||
body= [[-----------GUN
|
body= [[---------GUN
|
||||||
|
|
||||||
plasma orb
|
plasma orb
|
||||||
cuts through
|
cuts through
|
||||||
@ -990,7 +990,7 @@ protron_gun_p = mknew(protron_gun_e.new{
|
|||||||
maxammo = 20,
|
maxammo = 20,
|
||||||
cooldown = 0x0.0018,
|
cooldown = 0x0.0018,
|
||||||
hdr = "pROTRON",
|
hdr = "pROTRON",
|
||||||
body = [[-----------GUN
|
body = [[---------GUN
|
||||||
|
|
||||||
spray shots
|
spray shots
|
||||||
in a dense
|
in a dense
|
||||||
@ -1053,10 +1053,10 @@ vulcan_gun_p = mknew(vulcan_gun_e.new{
|
|||||||
munition=vulcan_p,
|
munition=vulcan_p,
|
||||||
maxammo = 100,
|
maxammo = 100,
|
||||||
hdr = "vULCAN",
|
hdr = "vULCAN",
|
||||||
body = [[-----------GUN
|
body = [[---------GUN
|
||||||
|
|
||||||
rapid fire in
|
rapidly fire
|
||||||
a v shape.
|
in a v.
|
||||||
|
|
||||||
ammo: 100
|
ammo: 100
|
||||||
rate: 20/sec
|
rate: 20/sec
|
||||||
@ -1147,7 +1147,7 @@ function player:small_upgrade_opts()
|
|||||||
local ret = {{
|
local ret = {{
|
||||||
icon=53,
|
icon=53,
|
||||||
hdr="hull",
|
hdr="hull",
|
||||||
body=[[----------SHIP
|
body=[[--------SHIP
|
||||||
|
|
||||||
survive more
|
survive more
|
||||||
unshielded
|
unshielded
|
||||||
@ -1161,7 +1161,7 @@ survive more
|
|||||||
},{
|
},{
|
||||||
icon=52,
|
icon=52,
|
||||||
hdr="capacity",
|
hdr="capacity",
|
||||||
body=[[--------SHIELD
|
body=[[------SHIELD
|
||||||
|
|
||||||
shield can
|
shield can
|
||||||
absorb more
|
absorb more
|
||||||
@ -1176,10 +1176,11 @@ recharging.
|
|||||||
},{
|
},{
|
||||||
icon=1,
|
icon=1,
|
||||||
hdr="thrusters",
|
hdr="thrusters",
|
||||||
body=[[----------SHIP
|
body=[[--------SHIP
|
||||||
|
|
||||||
move faster,
|
move faster,
|
||||||
steer faster.]],
|
steer more
|
||||||
|
sharply.]],
|
||||||
action=function()
|
action=function()
|
||||||
--maxspd thrust drag
|
--maxspd thrust drag
|
||||||
self.maxspd += 0.5
|
self.maxspd += 0.5
|
||||||
@ -1189,7 +1190,7 @@ steer faster.]],
|
|||||||
},{
|
},{
|
||||||
icon=20,
|
icon=20,
|
||||||
hdr="magnet",
|
hdr="magnet",
|
||||||
body=[[----------SHIP
|
body=[[--------SHIP
|
||||||
|
|
||||||
pick up xp
|
pick up xp
|
||||||
from further
|
from further
|
||||||
@ -1197,17 +1198,20 @@ from further
|
|||||||
action=function ()
|
action=function ()
|
||||||
self.magnet += 2
|
self.magnet += 2
|
||||||
end,
|
end,
|
||||||
}}
|
},
|
||||||
|
self.main_gun:rate_upgrade_opt(),
|
||||||
|
}
|
||||||
|
|
||||||
if cdr > 0 then
|
if cdr > 0 then
|
||||||
add(ret, {
|
add(ret, {
|
||||||
icon = 6,
|
icon = 6,
|
||||||
hdr = "recharge",
|
hdr = "recharge",
|
||||||
body=[[--------SHIELD
|
body=[[------SHIELD
|
||||||
|
|
||||||
shield energy
|
shield will
|
||||||
refill rate
|
recharge at
|
||||||
improves.
|
a faster
|
||||||
|
pace.
|
||||||
|
|
||||||
]] .. tostr(ceil(100 * cdr / self.shieldcooldown)) .. "% faster",
|
]] .. tostr(ceil(100 * cdr / self.shieldcooldown)) .. "% faster",
|
||||||
action = function()
|
action = function()
|
||||||
@ -1220,13 +1224,14 @@ shield energy
|
|||||||
add(ret, {
|
add(ret, {
|
||||||
icon = 6,
|
icon = 6,
|
||||||
hdr = "recovery",
|
hdr = "recovery",
|
||||||
body=[[--------SHIELD
|
body=[[------SHIELD
|
||||||
|
|
||||||
reduce the
|
reduce the
|
||||||
delay before
|
delay after
|
||||||
shield starts
|
a hit before
|
||||||
recovering
|
shield will
|
||||||
after a hit.
|
start to
|
||||||
|
recharge.
|
||||||
|
|
||||||
]] .. tostr(ceil(100 * pr / self.shieldpenalty)) .. "% shorter",
|
]] .. tostr(ceil(100 * pr / self.shieldpenalty)) .. "% shorter",
|
||||||
action = function()
|
action = function()
|
||||||
@ -1892,6 +1897,7 @@ function small_opts()
|
|||||||
for g in all(primary_ship.special_guns) do
|
for g in all(primary_ship.special_guns) do
|
||||||
add(opts, rnd(g:small_upgrade_opts()))
|
add(opts, rnd(g:small_upgrade_opts()))
|
||||||
end
|
end
|
||||||
|
return pick(opts, 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
-->8
|
-->8
|
||||||
@ -1900,7 +1906,7 @@ end
|
|||||||
rearm_mode = mknew{
|
rearm_mode = mknew{
|
||||||
sel=1,
|
sel=1,
|
||||||
bfm=1,
|
bfm=1,
|
||||||
crt_frm = 1,
|
crt_frm = 0,
|
||||||
pos=-1,
|
pos=-1,
|
||||||
init=function(this)
|
init=function(this)
|
||||||
poke(0x5f5c, 255) --no btnp repeat
|
poke(0x5f5c, 255) --no btnp repeat
|
||||||
@ -1915,7 +1921,7 @@ function rearm_mode:glow_box(x0, y0, x1, y1, c, cf)
|
|||||||
i -= 1
|
i -= 1
|
||||||
rect(x0+i,y0+i,x1-i,y1-i,v)
|
rect(x0+i,y0+i,x1-i,y1-i,v)
|
||||||
end
|
end
|
||||||
fillp(crt[self.crt_frm&0xff])
|
fillp(crt[1+(self.crt_frm&7)])
|
||||||
rectfill(x0+4, y0+4, x1-4, y1-4, cf)
|
rectfill(x0+4, y0+4, x1-4, y1-4, cf)
|
||||||
fillp()
|
fillp()
|
||||||
end
|
end
|
||||||
@ -1947,7 +1953,7 @@ end
|
|||||||
|
|
||||||
function rearm_mode:draw_option(id)
|
function rearm_mode:draw_option(id)
|
||||||
local rec = self.options[id]
|
local rec = self.options[id]
|
||||||
self:glow_box(0,0,55,100,self:frame_col(self.sel == id),1)
|
self:glow_box(0,0,55,101,self:frame_col(self.sel == id),1)
|
||||||
spr(rec.icon,5, 5)
|
spr(rec.icon,5, 5)
|
||||||
print(rec.hdr, 13, 8, 7)
|
print(rec.hdr, 13, 8, 7)
|
||||||
print(rec.body, 5, 15, 6)
|
print(rec.body, 5, 15, 6)
|
||||||
@ -1983,9 +1989,9 @@ function rearm_mode:draw()
|
|||||||
camera(frac * -128 + (1-frac) * -56, 0)
|
camera(frac * -128 + (1-frac) * -56, 0)
|
||||||
self:draw_option(2)
|
self:draw_option(2)
|
||||||
camera(0, -28 * frac)
|
camera(0, -28 * frac)
|
||||||
self:glow_box(0,101,111,127,self:frame_col(self.sel < 0),1)
|
self:glow_box(0,102,111,127,self:frame_col(self.sel < 0),1)
|
||||||
spr(96,15,107,4,2)
|
spr(96,15,107,4,2)
|
||||||
print("full ammo\nfull shield\n+50% health",54, 106, 6)
|
print("full ammo\nfull shield\n+50% health",54, 107, 6)
|
||||||
end
|
end
|
||||||
|
|
||||||
function rearm_mode:update_pos()
|
function rearm_mode:update_pos()
|
||||||
@ -2005,6 +2011,7 @@ function rearm_mode:update_pos()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function rearm_mode:update()
|
function rearm_mode:update()
|
||||||
|
self.crt_frm+=0.25
|
||||||
self:update_pos()
|
self:update_pos()
|
||||||
if self.pos > 1 then
|
if self.pos > 1 then
|
||||||
mode = game_mode
|
mode = game_mode
|
||||||
|
Reference in New Issue
Block a user