aboutsummaryrefslogtreecommitdiff
path: root/enemies.lua
diff options
context:
space:
mode:
authorRibbon <ambiguousmachine@gmail.com>2022-02-16 00:05:35 -0800
committerRibbon <ambiguousmachine@gmail.com>2022-02-16 00:05:35 -0800
commit8b53a5ee4a55f455c7b1d1dd02d67778b1ec31f8 (patch)
tree00014e4fdfa4e05bd798f1c8aa9f3c1e06f466db /enemies.lua
parent457aaf1cc62789c1272bd13237b0f0a58307c007 (diff)
Update to cart label logo.
puny print
Diffstat (limited to 'enemies.lua')
-rw-r--r--enemies.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/enemies.lua b/enemies.lua
index 9f74efc..0f2934a 100644
--- a/enemies.lua
+++ b/enemies.lua
@@ -125,7 +125,7 @@ function addwallshooter(x, shootup, health, speed, offset, bulletspeed)
end
function enemy.draw(enemy)
- if enemy.health < enemy.health*0.25 then
+ if enemy.health < health*0.25 then
damagesmoke(enemy)
end
if enemy.inv < 0 or ceil(enemy.inv*10%2) == 1 then
@@ -343,7 +343,7 @@ function addlasershooter(x, y, speed, stay)
end
---ERROR damage model has incorrect tiling (also it doesnt work??)
+--ERROR damage model has incorrect tiling for endings and lights
function addwallboss(x, y, length, speed, stay, move)
local enemy = {
stay = stay or false,
@@ -354,13 +354,14 @@ function addwallboss(x, y, length, speed, stay, move)
w = 16,
h = 8*length,
inv = -1,
- health = 10*length*#players, --10
+ health = 2*length*#players, --10
shootcooldown = 3,
speed = speed,
bulletfired = {},
shot = enemyshot,
collide = enemycollide
}
+ enemy.starthealth = enemy.health
for i = 1, length, 1 do
enemy.bulletfired[i] = 0
@@ -368,7 +369,7 @@ function addwallboss(x, y, length, speed, stay, move)
function enemy.draw(enemy)
local dmg = 0
- if enemy.health < enemy.health*0.25 then
+ if enemy.health < enemy.starthealth*0.25 then
damagesmoke(enemy)
dmg = 16
end