aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author1029chris <1029chris@gmail.com>2016-04-23 13:27:27 -0700
committer1029chris <1029chris@gmail.com>2016-04-23 13:27:27 -0700
commit8e5d093aaa00f240bbd9bc7ed42c2910d6021070 (patch)
treeca174f95b4511e51e2dea98784040ce9230ed99f
parent0f72dc977e32ed4bc4105d3256381f186fa9fadc (diff)
Antivirus now transforms into a turret
-rw-r--r--antivirus.lua2
-rw-r--r--var.lua5
-rw-r--r--virus1.lua28
3 files changed, 32 insertions, 3 deletions
diff --git a/antivirus.lua b/antivirus.lua
index 32eebbe..2830dd8 100644
--- a/antivirus.lua
+++ b/antivirus.lua
@@ -16,7 +16,7 @@ end
function updateAntivirus()
if (sys.mouse.p.p == true and win[4].hover == true and antivirus.scanning == false
and sys.mouse.p.x >= win[4].x+49 and sys.mouse.p.x <= win[4].x+49+100
- and sys.mouse.p.y >= win[4].y+110 and sys.mouse.p.y <= win[4].y+110+19) then
+ and sys.mouse.p.y >= win[4].y+110 and sys.mouse.p.y <= win[4].y+110+19 and v1.yes == false) then
antivirus.scanning = true
antivirus.prog = 0
end
diff --git a/var.lua b/var.lua
index 45f3628..19f9816 100644
--- a/var.lua
+++ b/var.lua
@@ -90,10 +90,13 @@ function loadVar()
fadeOpacity = 0
scene = 1
loading = 0
- antivirus = {}
antivirus.prog = 0
antivirus.status = "Not Scanning"
antivirus.scanning = false
+ av = {}
+ av.wings = 0
+ av.gun = 0
+ av.transform = false
chat.status = 0
chat.profilename = "Best Friend"
colors = {}
diff --git a/virus1.lua b/virus1.lua
index a9a5224..05c58a8 100644
--- a/virus1.lua
+++ b/virus1.lua
@@ -31,10 +31,36 @@ function drawVirusFight1()
win[4].y = sys.h/2-75
layer.sentToFront = 4
antivirus.scanning = true
+ antivirus.prog = 0
end
if v1.c.chat.msgs > 7 then
orderWindows()
- love.graphics.draw(win[4].cvs, win[4].x, win[4].y, 0, win[4].s)
+ if antivirus.status ~= "VIRUS FOUND!" or v1.c.chat.msgs < 12 then
+ love.graphics.draw(win[4].cvs, win[4].x, win[4].y, 0, win[4].s)
+ elseif antivirus.status == "VIRUS FOUND!" and v1.c.chat.msgs >= 12 then
+ if av.transform == false then
+ win[4].w = 342
+ win[4].x = win[4].x - 138/2
+ av.transform = true
+ end
+ if av.gun == 98 then
+ love.graphics.draw(antivirus.gun, win[4].x+138/2+99, win[4].y+5-av.gun, 0, win[4].s, win[4].s, 12)
+ elseif av.gun ~= 98 and av.wings == 138/2 then
+ love.graphics.draw(antivirus.gun, win[4].x+138/2+99+math.random(-1,1), win[4].y+5-av.gun+math.random(-1,1), 0, win[4].s, win[4].s, 12)
+ end
+ love.graphics.draw(antivirus.body, win[4].x+138/2+99, win[4].y+5, 0, win[4].s, win[4].s, 80)
+ if av.wings == 138/2 then
+ love.graphics.draw(antivirus.left, win[4].x+138/2-av.wings, win[4].y, 0, win[4].s)
+ love.graphics.draw(antivirus.right, win[4].x+138/2+97+av.wings, win[4].y, 0, win[4].s)
+ elseif av.wings ~= 138/2 then
+ av.wings = av.wings + 0.5
+ love.graphics.draw(antivirus.left, win[4].x+138/2-av.wings+math.random(-1,1), win[4].y+math.random(-1,1), 0, win[4].s)
+ love.graphics.draw(antivirus.right, win[4].x+138/2+97+av.wings+math.random(-1,1), win[4].y+math.random(-1,1), 0, win[4].s)
+ end
+ if av.wings == 138/2 and av.gun ~= 98 then
+ av.gun = av.gun + 1
+ end
+ end
end
if v1.timer >= 16 then
music.tension1:play()