aboutsummaryrefslogtreecommitdiff
path: root/virus1.lua
diff options
context:
space:
mode:
author1029chris <1029chris@gmail.com>2016-10-29 23:28:39 -0700
committer1029chris <1029chris@gmail.com>2016-10-29 23:28:39 -0700
commitd293377e7dedd102e9afb2a51fda3d3375d7904d (patch)
tree588181ae53b101250cf4ec2a5931066f60c76c56 /virus1.lua
parenta6bce9a2ac2d1dc641f166c76191627b01cec64c (diff)
Added second half and ending of second fight
Diffstat (limited to 'virus1.lua')
-rw-r--r--virus1.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/virus1.lua b/virus1.lua
index 7dd3d30..638f449 100644
--- a/virus1.lua
+++ b/virus1.lua
@@ -579,6 +579,8 @@ function drawBullets()
love.graphics.draw(v1.bullet, v1.bullets[i].x, v1.bullets[i].y, v1.bullets[i].a, 1.5, 1.5, 23/2, 7)
elseif v1.bullets[i].id == 5 then
love.graphics.draw(v1.bulletYellow, v1.bullets[i].x, v1.bullets[i].y, v1.bullets[i].a, 1.5, 1.5, 23/2, 7)
+ elseif v1.bullets[i].id == 6 then
+ love.graphics.draw(antivirus.bullet, v1.bullets[i].x, v1.bullets[i].y, v1.bullets[i].a, 1.5, 1.5, 23/2, 7)
end
if v1.bullets[i].x < 0 or v1.bullets[i].x > sys.w or v1.bullets[i].y < 0 or v1.bullets[i].y > sys.h then
v1.bullets[i].rm = true
@@ -602,6 +604,9 @@ function drawBullets()
win[4].hover = false
win[4].crazy = true
av.shake = 4
+ elseif v1.bullets[i].id == 6 then
+ av.health = av.health - 5
+ av.shake = 6
end
if antivirus.hit:isPlaying() == true then
antivirus.hit:rewind()
@@ -615,6 +620,7 @@ function drawBullets()
end
end
for i=1,#av.bullets do
+ if av.bullets[i] ~= nil then
av.bullets[i].spx = av.bullets[i].s * math.cos(av.bullets[i].a)
av.bullets[i].spy = av.bullets[i].s * math.sin(av.bullets[i].a)
av.bullets[i].x = av.bullets[i].x + av.bullets[i].spx
@@ -682,6 +688,7 @@ function drawBullets()
end
end
end
+end
function chargeStencil()
love.graphics.rectangle("fill", win[4].x+138/2+79, win[4].y+40+40, 40, -av.charge)
end