Compare commits
No commits in common. "33fede4ed82f277b0dc8e7b9cc34fe96ee75b2df" and "78b200272e54973b37a91005dbff43080bcd1353" have entirely different histories.
33fede4ed8
...
78b200272e
@ -378,10 +378,8 @@ function drawhud()
|
|||||||
else
|
else
|
||||||
vertmeter(115,58,118,117,primary_ship.xp, primary_ship.xptarget, powcols)
|
vertmeter(115,58,118,117,primary_ship.xp, primary_ship.xptarget, powcols)
|
||||||
end
|
end
|
||||||
-- 60 px vertically. note that
|
-- 59 px vertically? or 60? off-by-1 error somewhere here or in vertmeter?
|
||||||
-- there was at one point an
|
-- it's here. I think
|
||||||
-- off-by-one and I'm not sure
|
|
||||||
-- it's actually fixed
|
|
||||||
local mxs, cs, mxh, ch = primary_ship.maxshield, primary_ship.shield, primary_ship.maxhp, primary_ship.hp
|
local mxs, cs, mxh, ch = primary_ship.maxshield, primary_ship.shield, primary_ship.maxhp, primary_ship.hp
|
||||||
if (mxs > 0) and (mxh > 0) then
|
if (mxs > 0) and (mxh > 0) then
|
||||||
local split = 59 * (mxs / (mxs + mxh)) \ 1 + 64
|
local split = 59 * (mxs / (mxs + mxh)) \ 1 + 64
|
||||||
@ -487,15 +485,14 @@ function ship_m:die()
|
|||||||
local sz4 = self.size * 4
|
local sz4 = self.size * 4
|
||||||
local cx, cy, xp, z = self.x + sz4, self.y + sz4, self.xp or 0, 0
|
local cx, cy, xp, z = self.x + sz4, self.y + sz4, self.xp or 0, 0
|
||||||
boom(cx, cy, 3*sz4, self.boss)
|
boom(cx, cy, 3*sz4, self.boss)
|
||||||
if xp > 0x0.01f3 then -- dec 499
|
if xp > 499 then
|
||||||
-- spawn a huge gem with all
|
-- spawn a huge gem with all
|
||||||
-- overage XP, min 100
|
-- overage XP, min 100
|
||||||
spawn_xp_at(cx, cy, 0, xp-0x0.18f)
|
spawn_xp_at(cx, cy, 0, xp-399)
|
||||||
xp = 0x0.18f -- dec 399
|
xp = 399
|
||||||
z += 1
|
z += 1
|
||||||
end
|
end
|
||||||
-- 100, 25, 5, 1
|
for gsz in all{100, 25, 5, 1} do
|
||||||
for gsz in all{0x0.0064, 0x0.0019, 0x0.0005, 0x0.0001} do
|
|
||||||
while xp >= gsz do
|
while xp >= gsz do
|
||||||
spawn_xp_at(cx, cy, z, gsz)
|
spawn_xp_at(cx, cy, z, gsz)
|
||||||
xp -= gsz
|
xp -= gsz
|
||||||
@ -953,9 +950,9 @@ player = mknew(ship_m.new{
|
|||||||
shield = 2, -- regenerates
|
shield = 2, -- regenerates
|
||||||
maxshield = 2,
|
maxshield = 2,
|
||||||
|
|
||||||
-- xp in increments of 0x0.0001
|
-- xp; watch out for 16-bit range limits
|
||||||
xp = 0,
|
xp = 0,
|
||||||
xptarget = 0x0.0004,
|
xptarget = 4,
|
||||||
level = 1,
|
level = 1,
|
||||||
|
|
||||||
-- gun
|
-- gun
|
||||||
@ -1013,7 +1010,7 @@ frownie = mknew(ship_m.new{
|
|||||||
sparkodds = 8,
|
sparkodds = 8,
|
||||||
|
|
||||||
hp = 0.5, -- enemy ships need no max hp
|
hp = 0.5, -- enemy ships need no max hp
|
||||||
xp = 0x0.0001,
|
xp = 1,
|
||||||
|
|
||||||
-- position
|
-- position
|
||||||
x=60, -- x and y are for upper left corner
|
x=60, -- x and y are for upper left corner
|
||||||
@ -1035,7 +1032,7 @@ frownie = mknew(ship_m.new{
|
|||||||
blocky = mknew(frownie.new{
|
blocky = mknew(frownie.new{
|
||||||
sprite = 10,
|
sprite = 10,
|
||||||
hp = 1.5,
|
hp = 1.5,
|
||||||
xp = 0x0.0002,
|
xp = 2,
|
||||||
hurt = {
|
hurt = {
|
||||||
x_off = 0,
|
x_off = 0,
|
||||||
y_off = 0,
|
y_off = 0,
|
||||||
@ -1055,7 +1052,7 @@ blocky = mknew(frownie.new{
|
|||||||
|
|
||||||
spewy = mknew(frownie.new{
|
spewy = mknew(frownie.new{
|
||||||
sprite=26,
|
sprite=26,
|
||||||
xp = 0x0.0003,
|
xp = 3,
|
||||||
hurt = {
|
hurt = {
|
||||||
x_off=0,
|
x_off=0,
|
||||||
y_off=1,
|
y_off=1,
|
||||||
@ -1076,7 +1073,7 @@ spewy = mknew(frownie.new{
|
|||||||
|
|
||||||
chasey = mknew(ship_m.new{
|
chasey = mknew(ship_m.new{
|
||||||
sprite = 5,
|
sprite = 5,
|
||||||
xp = 0x0.0004,
|
xp = 4,
|
||||||
size = 1,
|
size = 1,
|
||||||
hurt = {
|
hurt = {
|
||||||
x_off = 1,
|
x_off = 1,
|
||||||
@ -1111,7 +1108,7 @@ end
|
|||||||
|
|
||||||
xl_chasey=mknew(chasey.new{
|
xl_chasey=mknew(chasey.new{
|
||||||
size=2,
|
size=2,
|
||||||
xp = 0x0.000a,
|
xp = 10,
|
||||||
maxspd=1.25,
|
maxspd=1.25,
|
||||||
hurt = {
|
hurt = {
|
||||||
x_off = 2,
|
x_off = 2,
|
||||||
@ -1609,7 +1606,7 @@ function spawn_xp_at(x, y, off, amt)
|
|||||||
x += rnd(off+off)-off
|
x += rnd(off+off)-off
|
||||||
y += rnd(off+off)-off
|
y += rnd(off+off)-off
|
||||||
xp_gem.new{
|
xp_gem.new{
|
||||||
qsprite=amt == 0x0.0001 and 32 or amt == 0x0.0005 and 33 or amt == 0x0.0019 and 34 or 35,
|
qsprite=amt == 1 and 32 or amt == 5 and 33 or amt == 25 and 34 or 35,
|
||||||
val = amt,
|
val = amt,
|
||||||
}:spawn_at(mid(x, 0, 124),mid(y,-4,125))
|
}:spawn_at(mid(x, 0, 124),mid(y,-4,125))
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user