aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bullets.lua2
-rw-r--r--enemies.lua14
-rw-r--r--players.lua2
-rw-r--r--update.lua2
-rw-r--r--waves.lua2
5 files changed, 11 insertions, 11 deletions
diff --git a/bullets.lua b/bullets.lua
index 5d050a2..6686a7e 100644
--- a/bullets.lua
+++ b/bullets.lua
@@ -128,7 +128,7 @@ function addmissile(x, y, target) --basic small weak enemy
}
function enemy.draw()
- if enemy.inv < 0 or ceil(enemy.inv*10%2) == 1 then
+ if enemy.inv < 0 or flashtime then
spr(12, enemy.x, enemy.y, 2, 1)
end
end
diff --git a/enemies.lua b/enemies.lua
index a7ccf90..faca5c1 100644
--- a/enemies.lua
+++ b/enemies.lua
@@ -390,18 +390,18 @@ function addwallboss(x, y, length, points, speed, stay, move, isboss)
enemy.x -= speed
else
enemy.x = lerp(enemy.x, 102, 0.025) --lerp if boss
- enemy.move = flr((currentwavetime/5)%5) -- loops through moveset
+ enemy.move = currentwavetime\5%5 -- loops through moveset
end
if enemy.shootcooldown < 0 then
enemy.shootcooldown = 0.095
if enemy.x < canshootatx then
local function attack(i, move) -- these are all the conditions to shoot depending on what "move" this guys on
- if move == 0 and (flr((t()*4)%length) == i or flr((-t()*4)%length) == i) and i%2 == 1 then --this one shoots lines in a pattern
+ if move == 0 and (t()\0.25%length == i or -t()\0.25%length == i) and i%2 == 1 then --this one shoots lines in a pattern
return true
elseif move == 1 then -- this one targets the players and shoots some random ones
for p = 1, #players, 1 do
- if flr(players[p].y/8) == i-1 and everysecondtimer < 0.7 then
+ if players[p].y\8 == i-1 and everysecondtimer < 0.7 then
return true
end
end
@@ -532,7 +532,7 @@ function addmissileboss(x, y) --boss that shoots missiles!!!
enemy.targetchangetimer -= ft
--some cool different moves, shout out to dont get a virus fans!
if currentwavetime%18 > 8 and currentwavetime%20 < 12 then
- enemy.targety = flr(everysecondtimer*1.99)*96
+ enemy.targety = everysecondtimer\0.501*96
elseif currentwavetime%18 > 17.3 then --INTIMIDATION TACTICS!!!!!
enemy.targety = players[targetplayer].y
enemy.targetx = players[targetplayer].x+24
@@ -677,12 +677,12 @@ function addfinalboss() --THE FINAL BOSS!!!!!!! WOOOAAAHHHHHH!!!!!!!!!!!!!!!!!!!
end
end
}
- moves[flr((currentwavetime/14)%#moves+1)]()
+ moves[(currentwavetime\14)%#moves+1]()
end
end
enemydie(enemy,17,2,1000,true,1) --die!!!!!!!
else
- music(-1,1000)
+ playsong(-1,1000)
killallenemies()
despawnallbullets = true
speed += 0.0003
@@ -697,7 +697,7 @@ function addfinalboss() --THE FINAL BOSS!!!!!!! WOOOAAAHHHHHH!!!!!!!!!!!!!!!!!!!
sfx(21,3)
end
end
- if dramaticdeathtimer < 0 then music(63,3) end --final big boom
+ if dramaticdeathtimer < 0 then playsong(63,3) end --final big boom
enemymisc(enemy)
end
diff --git a/players.lua b/players.lua
index bc5a095..4765096 100644
--- a/players.lua
+++ b/players.lua
@@ -55,7 +55,7 @@ function addplayer(x, y, sprite, spriteup, spritedwn, bulletsprite)
sfx(11, 0) --killed
sfx(22, 1) --rewind beat
elseif player.health <= 0 then
- currentscore = ceil(currentscore * 0.5) --halves score if coop
+ currentscore = currentscore \ 0.5 --halves score if coop
sfx(11, 0)
player.inv = 5
end
diff --git a/update.lua b/update.lua
index abe39b6..79bbeb0 100644
--- a/update.lua
+++ b/update.lua
@@ -1,6 +1,6 @@
respawntimer -= ft
--similar math elements grouped to lower tokens
-flashtime = ceil(t()*10%2) == 1 --for flashing elements (ship, score)
+flashtime = t()\0.1%2 == 1 --for flashing elements (ship, score)
circletimex = sin(t())*3 -- for elements that move in a circle (respawn timer)
circletimey = cos(t())*3
screenshakex = sin(shake+t())*shake
diff --git a/waves.lua b/waves.lua
index 720b58f..60d7252 100644
--- a/waves.lua
+++ b/waves.lua
@@ -208,7 +208,7 @@ wave[15] = {
delay = 0,
start = function()
for i = 1, 6, 1 do
- addtargetingenemy(128, i*16-14+flr(i/4)*36, 0.05)
+ addtargetingenemy(128, i*16-14+i\4*36, 0.05)
end
addbomb(140,46, 1)
end