aboutsummaryrefslogtreecommitdiff
path: root/enemies.lua
diff options
context:
space:
mode:
authorRibbonCable <ambiguousmachine@gmail.com>2022-02-20 12:55:11 -0800
committerRibbonCable <ambiguousmachine@gmail.com>2022-02-20 12:55:11 -0800
commit4f4a5405a95c47b34e0250e6b0f143e8e5f8dc76 (patch)
tree9cfe9651c194db292621e712ee099984a9359aa5 /enemies.lua
parent23acc296abf209ccf2fa15e3641f266b02add71d (diff)
Lots of updates to the music player. Other than track titles and final songs, it's p much done. Also made some sprint non-flipped to save on tokens.
Diffstat (limited to 'enemies.lua')
-rw-r--r--enemies.lua26
1 files changed, 13 insertions, 13 deletions
diff --git a/enemies.lua b/enemies.lua
index a5b8373..0047647 100644
--- a/enemies.lua
+++ b/enemies.lua
@@ -34,7 +34,7 @@ function enemydie(enemy, sound, soundchannel, points, isboss, drop)
addcircle(x+rnd(enemy.w), y+rnd(enemy.h), rnd(4)-2, -rnd(2)-1, 1, 2, rnd({3, 11, 9}), -0.1)
end
if rnd(100) < sqrt(enemy.w*enemy.h)/1.5 and not drop then --you get a better chance of a randomly dropped health from bigger enemies
- addpickup(x+rnd(enemy.w), y+rnd(enemy.h), "health")
+ addpickup(x+rnd(enemy.w), y+rnd(enemy.h), 48)
end
if isboss then
playsong(-1, 3000)
@@ -43,7 +43,7 @@ function enemydie(enemy, sound, soundchannel, points, isboss, drop)
killallenemies()
if not gameover and not drop then
addpickup(x+rnd(32), y+rnd(32))
- addpickup(x+rnd(32), y+rnd(32), "health")
+ addpickup(x+rnd(32), y+rnd(32), 48)
end
end
if shake < 3 then
@@ -189,13 +189,13 @@ function addballshooter(x, y, speed)
function enemy.draw()
if enemy.inv < 0 or flashtime then
- local sprite = 11
+ local sprite = 9
if enemy.health < 4 then
damagesmoke(enemy)
- sprite = 27
+ sprite = 41
end
- spr(sprite, enemy.x, enemy.y, 3, 1, false, true)
- spr(sprite, enemy.x, enemy.y+8, 3, 1)
+ -- spr(sprite, enemy.x, enemy.y, 3, 1, false, true)
+ spr(sprite, enemy.x, enemy.y, 3, 2) --non-flipped image for token's sake
end
end
@@ -238,7 +238,7 @@ function addtargetingenemy(x, y, speed)
damagesmoke(enemy)
end
if enemy.inv < 0 or flashtime then
- spr(58, enemy.x, enemy.y, 2, 1)
+ spr(28, enemy.x, enemy.y, 2, 1)
end
end
@@ -284,13 +284,13 @@ function addlasershooter(x, y, points, speed, stay, isboss)
function enemy:draw()
if enemy.inv < 0 or flashtime then
- local sprite = 64
+ local sprite = 5
if enemy.health < 10 then
damagesmoke(enemy)
- sprite = 96
+ sprite = 65
end
- spr(sprite,enemy.x+0,enemy.y,4,2)
- spr(sprite,enemy.x+0,enemy.y+16,4,2,false,true)
+ spr(sprite,enemy.x,enemy.y,4,2) --non-flipped sprite to reduce tokens
+ -- spr(sprite,enemy.x+0,enemy.y+16,4,2,false,true)
end
end
@@ -517,9 +517,9 @@ function addmissileboss(x, y) --boss that shoots missiles!!!
}
function enemy.draw()
- local sprite = 68
+ local sprite = 69
if enemy.health < 11 then
- sprite = 100
+ sprite = 101
damagesmoke(enemy)
end
if enemy.inv < 0 or flashtime then