aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--players.lua5
-rw-r--r--ui.lua7
-rw-r--r--update.lua1
3 files changed, 6 insertions, 7 deletions
diff --git a/players.lua b/players.lua
index f16937a..0292568 100644
--- a/players.lua
+++ b/players.lua
@@ -51,11 +51,10 @@ function addplayer(x, y, sprite, spriteup, spritedwn, bulletsprite)
respawntimer = 5 --respawns all players in 5 seconds
player.inv = 20
killallenemies()
- currentscore-=10
sfx(11, 0) --killed
sfx(22, 1) --rewind beat
elseif player.health <= 0 then
- currentscore = currentscore \ 0.5 --halves score if coop
+ currentscore = currentscore \ 2 --halves score if coop (backslash to floor division)
sfx(11, 0)
player.inv = 5
end
@@ -133,7 +132,7 @@ function addplayer(x, y, sprite, spriteup, spritedwn, bulletsprite)
end
function isgameover()
- currentscore+=-10 --lose points if hit
+ currentscore -= 10 --lose points if hit
for i = 1, #players, 1 do
if players[i].health > 0 then
return
diff --git a/ui.lua b/ui.lua
index 12ec365..ff8aadd 100644
--- a/ui.lua
+++ b/ui.lua
@@ -64,9 +64,9 @@ end
function playerscore()
if coopmode then
- printdropshadow(scorewithzeros(tostring(currentscore),4),2,121,9,4) --2P current score
+ printdropshadow(scorewithzerosstore,2,121,9,4) --2P current score
else
- printdropshadow(scorewithzeros(tostring(currentscore),4),2,2,12,15) --1P current score
+ printdropshadow(scorewithzerosstore,2,2,12,15) --1P current score
end
end
@@ -108,7 +108,7 @@ function finalscorescreen(x)
poke(0x5f58, 0x9 | 0x4) --makes score BIG
printdropshadow("vICTORY!", x+32,18,6,5)
- printdropshadow(scorewithzeros(tostring(currentscore),4),x+48+circletimex,50+circletimey,playercolour0,playercolour1) --2P high score
+ printdropshadow(scorewithzerosstore,x+48+circletimex,50+circletimey,playercolour0,playercolour1) --2P high score
poke(0x5f58)
-- printdropshadow("fINAL sCORE", x+43,y+22,6,5)
if (coopmode and currentscore > highscore1) or (not coopmode and currentscore > highscore0) then
@@ -120,7 +120,6 @@ function finalscorescreen(x)
printdropshadow(" THANKS FOR PLAYING\nPRESS (❎ ⁙ πŸ…ΎοΈ) TO RETRY", x+15,80,11,3)
printdropshadow("MADE WITH β™₯ IN VANCOUVER\n β—† 2022 β—†", x+14,113,9,2)
- -- printdropshadow("β—† 2022 β—†", x+42,y+118,11,3)
end
--intro/ending acid effect
diff --git a/update.lua b/update.lua
index e2115aa..a0a8f92 100644
--- a/update.lua
+++ b/update.lua
@@ -5,6 +5,7 @@ circletimex = sin(t())*3 -- for elements that move in a circle (respawn timer)
circletimey = cos(t())*3
screenshakex = sin(shake+t())*shake
screenshakey = sin(shake+gt/2.1)*shake
+scorewithzerosstore = scorewithzeros(tostring(currentscore),4)
--stuff for scrolling background and respawning
if gameover then