bonus shield powerup
mostly to test whether redistributing the shield and health meters works
This commit is contained in:
parent
4ca3913637
commit
b379e47dbf
@ -1283,7 +1283,17 @@ function spawn_bonus_vulcan_chasey()
|
|||||||
end
|
end
|
||||||
c.sprite=4
|
c.sprite=4
|
||||||
return c
|
return c
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function spawn_bonus_shield_chasey()
|
||||||
|
local c = spawn_chasey()
|
||||||
|
c.die = function(self)
|
||||||
|
spawn_shield_upgrade_at(self.x-1, self.y-1)
|
||||||
|
chasey.die(self)
|
||||||
|
end
|
||||||
|
c.sprite=4
|
||||||
|
return c
|
||||||
|
end
|
||||||
|
|
||||||
helpers = {
|
helpers = {
|
||||||
spawn_frownie,
|
spawn_frownie,
|
||||||
@ -1374,7 +1384,7 @@ example_level_csv=[[1,spawn_frownie
|
|||||||
115,spawn_spewy
|
115,spawn_spewy
|
||||||
130,spawn_bonus_frownie
|
130,spawn_bonus_frownie
|
||||||
145,spawn_spewy
|
145,spawn_spewy
|
||||||
200,spawn_chasey
|
200,spawn_bonus_shield_chasey
|
||||||
250,spawn_blocking_blocky
|
250,spawn_blocking_blocky
|
||||||
285,spawn_spec_gun_at,35,-11,blast_gun
|
285,spawn_spec_gun_at,35,-11,blast_gun
|
||||||
310,spawn_blocking_blocky
|
310,spawn_blocking_blocky
|
||||||
@ -1391,8 +1401,9 @@ example_level_csv=[[1,spawn_frownie
|
|||||||
500,multi,20,12,spawn_blocking_blocky
|
500,multi,20,12,spawn_blocking_blocky
|
||||||
501,spawn_bonus_frownie
|
501,spawn_bonus_frownie
|
||||||
620,spawn_blocking_blocky
|
620,spawn_blocking_blocky
|
||||||
700,spawn_blocking_boss_chasey
|
630,spawn_bonus_shield_chasey
|
||||||
701,eol]]
|
720,spawn_blocking_boss_chasey
|
||||||
|
721,eol]]
|
||||||
|
|
||||||
-->8
|
-->8
|
||||||
-- readme.md
|
-- readme.md
|
||||||
@ -1914,13 +1925,14 @@ repair = mknew(powerup.new{
|
|||||||
x_off = 4,
|
x_off = 4,
|
||||||
y_off = 0,
|
y_off = 0,
|
||||||
sprites = sheen8x8,
|
sprites = sheen8x8,
|
||||||
|
icon = 53,
|
||||||
hitship = function(self, ship)
|
hitship = function(self, ship)
|
||||||
if (ship ~= primary_ship) return false
|
if (ship ~= primary_ship) return false
|
||||||
primary_ship.hp = min(primary_ship.maxhp, primary_ship.hp + 1)
|
primary_ship.hp = min(primary_ship.maxhp, primary_ship.hp + 1)
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
draw = function(self)
|
draw = function(self)
|
||||||
spr(53, self.x, self.y, self.width, self.height)
|
spr(self.icon, self.x, self.y, self.width, self.height)
|
||||||
powerup.draw(self)
|
powerup.draw(self)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
@ -1929,6 +1941,20 @@ function spawn_repair_at(x, y)
|
|||||||
repair.new():spawn_at(x, y)
|
repair.new():spawn_at(x, y)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
shield_upgrade = mknew(repair.new{
|
||||||
|
icon=52
|
||||||
|
})
|
||||||
|
|
||||||
|
function shield_upgrade:hitship(ship)
|
||||||
|
if (ship ~= primary_ship) return false
|
||||||
|
primary_ship.maxshield += 1
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
function spawn_shield_upgrade_at(x, y)
|
||||||
|
shield_upgrade.new():spawn_at(x,y)
|
||||||
|
end
|
||||||
|
|
||||||
gun_swap = mknew(powerup.new{
|
gun_swap = mknew(powerup.new{
|
||||||
hurt = {
|
hurt = {
|
||||||
x_off = -2,
|
x_off = -2,
|
||||||
@ -2010,14 +2036,14 @@ __gfx__
|
|||||||
00000000000000000000000000000000000000000009080000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
00000000000000000000000000000000000000000009080000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
00000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
00000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
00000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
00000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000cccccccc77000000007700000000770000000077000000000000000000000000000000000000000000000000
|
00000000000000000000000000000000cccccccccccccccc77000000007700000000770000000077000000000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000c11ee11d70000000077000000007700000000770000000070000000000000000000000000000000000000000
|
00000000000000000000000000000000c116611dc11ee11d70000000077000000007700000000770000000070000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000c11ee11d00000000770000000077000000007700000000770000000700000000000000000000000000000000
|
00000000000000000000000000000000c1611c1dc11ee11d00000000770000000077000000007700000000770000000700000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000ceeeeeed00000000700000000770000000077000000007700000007700000000000000000000000000000000
|
00000000000000000000000000000000c61111cdceeeeeed00000000700000000770000000077000000007700000007700000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000ceeeeeed00000000000000007700000000770000000077000000077000000007000000000000000000000000
|
00000000000000000000000000000000c6111bcdceeeeeed00000000000000007700000000770000000077000000077000000007000000000000000000000000
|
||||||
0000000000000000000000000000000000000000c11ee11d00000000000000007000000007700000000770000000770000000077000000000000000000000000
|
00000000000000000000000000000000c161bbbdc11ee11d00000000000000007000000007700000000770000000770000000077000000000000000000000000
|
||||||
0000000000000000000000000000000000000000c11ee11d00000000000000000000000077000000007700000007700000000770000000070000000000000000
|
00000000000000000000000000000000c11ccb1dc11ee11d00000000000000000000000077000000007700000007700000000770000000070000000000000000
|
||||||
0000000000000000000000000000000000000000cddddddd00000000000000000000000070000000077000000077000000007700000000770000000000000000
|
00000000000000000000000000000000cdddddddcddddddd00000000000000000000000070000000077000000077000000007700000000770000000000000000
|
||||||
cccccccccccc0000cccccccccccc0000cccccccccccc0000cccccccccccc0000cccccccccccc0000cccccccccccc0000cccccccccccc0000cccccccccccc0000
|
cccccccccccc0000cccccccccccc0000cccccccccccc0000cccccccccccc0000cccccccccccc0000cccccccccccc0000cccccccccccc0000cccccccccccc0000
|
||||||
c1111111111d0000c1111111111d0000c1111111111d0000c1111111111d0000c1111111111d0000c111eeee111d0000ceee2222eeed0000c2221111222d0000
|
c1111111111d0000c1111111111d0000c1111111111d0000c1111111111d0000c1111111111d0000c111eeee111d0000ceee2222eeed0000c2221111222d0000
|
||||||
c1111111111d0000c1111111111d0000c1111111111d0000c1111111111d0000c111eeee111d0000c1ee2222ee1d0000ce22111122ed0000c2111111112d0000
|
c1111111111d0000c1111111111d0000c1111111111d0000c1111111111d0000c111eeee111d0000c1ee2222ee1d0000ce22111122ed0000c2111111112d0000
|
||||||
|
Loading…
Reference in New Issue
Block a user