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