Compare commits
2 Commits
a90caeba85
...
gun_picker
Author | SHA1 | Date | |
---|---|---|---|
26c3a5b91e
|
|||
44c70a028f
|
@ -688,10 +688,12 @@ gun_base = mknew{
|
|||||||
-- as an action, assign
|
-- as an action, assign
|
||||||
-- themselves to the player
|
-- themselves to the player
|
||||||
function gun_base:action()
|
function gun_base:action()
|
||||||
|
local item = self.new()
|
||||||
|
item.ammo = item.maxammo
|
||||||
if not primary_ship.special_guns then
|
if not primary_ship.special_guns then
|
||||||
primary_ship.special_guns = {self.new()}
|
primary_ship.special_guns = {item}
|
||||||
else
|
else
|
||||||
add(primary_ship.special_guns, self.new())
|
add(primary_ship.special_guns, item)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -844,8 +846,9 @@ blast_gun = mknew(gun_base.new{
|
|||||||
actually_shoot = spawn_one(blast),
|
actually_shoot = spawn_one(blast),
|
||||||
hdr = "bLASTER",
|
hdr = "bLASTER",
|
||||||
body= [[plasma orb
|
body= [[plasma orb
|
||||||
floats through
|
cuts through
|
||||||
enemies.
|
enemies.
|
||||||
|
slow.
|
||||||
|
|
||||||
ammo: 5
|
ammo: 5
|
||||||
rate: 1/2sec
|
rate: 1/2sec
|
||||||
@ -915,7 +918,8 @@ protron_gun_p = mknew(protron_gun_e.new{
|
|||||||
cooldown = 0x0.0018,
|
cooldown = 0x0.0018,
|
||||||
hdr = "pROTRON",
|
hdr = "pROTRON",
|
||||||
body = [[spray shots
|
body = [[spray shots
|
||||||
in a dense arc.
|
in a dense
|
||||||
|
arc.
|
||||||
|
|
||||||
ammo: 20
|
ammo: 20
|
||||||
rate: 2/sec
|
rate: 2/sec
|
||||||
@ -975,7 +979,8 @@ vulcan_gun_p = mknew(vulcan_gun_e.new{
|
|||||||
maxammo = 100,
|
maxammo = 100,
|
||||||
hdr = "vULCAN",
|
hdr = "vULCAN",
|
||||||
body = [[rapid fire
|
body = [[rapid fire
|
||||||
in a v shape.
|
in a v
|
||||||
|
shape.
|
||||||
|
|
||||||
ammo: 100
|
ammo: 100
|
||||||
rate: 20/sec
|
rate: 20/sec
|
||||||
@ -1843,8 +1848,8 @@ function rearm_mode:update()
|
|||||||
-- todo: rewrite for three guns
|
-- todo: rewrite for three guns
|
||||||
local specs = primary_ship.special_guns
|
local specs = primary_ship.special_guns
|
||||||
if specs then
|
if specs then
|
||||||
specs[1].ammo = specs[1].max_ammo
|
specs[1].ammo = specs[1].maxammo
|
||||||
if (specs[2]) specs[2].ammo = specs[2].max_ammo
|
if (specs[2]) specs[2].ammo = specs[2].maxammo
|
||||||
end
|
end
|
||||||
primary_ship.hp = min(primary_ship.maxhp, primary_ship.hp + primary_ship.maxhp/2)
|
primary_ship.hp = min(primary_ship.maxhp, primary_ship.hp + primary_ship.maxhp/2)
|
||||||
primary_ship.xp -= primary_ship.xptarget / 2
|
primary_ship.xp -= primary_ship.xptarget / 2
|
||||||
|
Reference in New Issue
Block a user