aboutsummaryrefslogtreecommitdiff
path: root/virus1.lua
diff options
context:
space:
mode:
Diffstat (limited to 'virus1.lua')
-rw-r--r--virus1.lua94
1 files changed, 1 insertions, 93 deletions
diff --git a/virus1.lua b/virus1.lua
index 14fc8e0..b61db9e 100644
--- a/virus1.lua
+++ b/virus1.lua
@@ -537,6 +537,7 @@ function drawVirusFight1()
win[4].update = true
scene = 1
time = 0
+ av.transform = false
elseif v1.c.chat.msgs == 53 then
virus1Lose = virus1Lose + 1
scene = 666
@@ -671,96 +672,3 @@ function drawVirus1StartThing()
love.graphics.draw(v1.scorchMask, win[2].x-300, win[2].y-100)
end
end
-function drawAntivirusFight()
- orderWindows()
- if antivirus.status ~= "VIRUS FOUND!" or v1.c.chat.msgs < 12 then
- love.graphics.draw(win[4].cvs, win[4].x+av.shakex, win[4].y+av.shakey, 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+av.shakex, win[4].y+5-av.gun+av.shakey, 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+av.shakex, win[4].y+5+av.shakey, 0, win[4].s, win[4].s, 80)
- if av.fireb == true then
- drawUpBox(win[4].x+138/2+71-3+av.shakex, win[4].y+93-3+av.shakey, 56+6, 19+6, 2)
- else
- drawDownBox(win[4].x+138/2+71-3+av.shakex, win[4].y+93-3+av.shakey, 56+6, 19+6, 2)
- end
- love.graphics.setColor(colors.font.dark)
- love.graphics.print("FIRE", win[4].x+138/2+76+av.shakex, win[4].y+99+av.shakey)
- love.graphics.setColor(255,255,255)
- drawDownBox(win[4].x+138/2+79-1+av.shakex, win[4].y+40-1+av.shakey, 42, 42, 2)
- love.graphics.stencil(chargeStencil, "replace", 1)
- love.graphics.setStencilTest("greater", 0)
- love.graphics.draw(antivirus.charge, win[4].x+138/2+79+av.shakex, win[4].y+40+av.shakey)
- love.graphics.setStencilTest()
- if av.wings >= 138/2 then
- av.wings = 138/2
- love.graphics.draw(antivirus.left, win[4].x+138/2-av.wings+av.shakex, win[4].y+av.shakey, 0, win[4].s)
- love.graphics.draw(antivirus.right, win[4].x+138/2+97+av.wings+av.shakex, win[4].y+av.shakey, 0, win[4].s)
- elseif av.wings < 138/2 then
- antivirus.open:play()
- av.wings = av.wings + 0.5*sys.s
- love.graphics.draw(antivirus.left, win[4].x+138/2-av.wings+math.random(-1,1)+av.shakex, win[4].y+math.random(-1,1)+av.shakey, 0, win[4].s)
- love.graphics.draw(antivirus.right, win[4].x+138/2+97+av.wings+math.random(-1,1)+av.shakex, win[4].y+math.random(-1,1)+av.shakey, 0, win[4].s)
- end
- if av.shake > 0 then
- av.shakex = math.random(av.shake,-av.shake)
- av.shakey = math.random(av.shake,-av.shake)
- av.shake = av.shake - 0.1*sys.s
- elseif av.shake < 0 then
- av.shake = 0
- av.shakex = 0
- av.shakey = 0
- end
- if av.gun == 10 then
- antivirus.opengun:play()
- end
- if av.wings == 138/2 and av.gun < 98 then
- av.gun = av.gun + 1*sys.s
- end
- if av.gun > 98 then
- av.gun = 98
- end
- if av.charge ~= 40 then
- av.fireb = false
- end
- if (sys.mouse.p.x >= win[4].x+138/2+71-3 and sys.mouse.p.x <= (win[4].x+138/2+71-3)+56+6 and av.fireb == true and av.charge == 40
- and sys.mouse.p.y >= win[4].y+93-3 and sys.mouse.p.y <= (win[4].y+93-3)+19+6 and sys.mouse.drag == false and sys.mouse.p.p == true) then
- av.fire = true
- av.fireb = false
- av.charge = 0
- if scene == 2 then
- if v1.c.chat.msgs == 15 or v1.c.chat.msgs == 17 or v1.c.chat.msgs == 19 or v1.c.chat.msgs == 21 then
- v1.c.chat.msgs = v1.c.chat.msgs + 1
- v1.c.chat.char = 0
- end
- end
- end
- if scene == 2 then
- if (v1.c.chat.msgs == 15 or v1.c.chat.msgs == 17 or v1.c.chat.msgs == 19 or v1.c.chat.msgs == 21 or v1.c.chat.msgs == 36 or v1.c.chat.msgs == 40) and av.charge == 40 then
- av.fireb = true
- end
- end
- if av.charge < 40 then
- av.charge = av.charge + (math.random(4,12,25,40,5,2,10)*delta)/di
- elseif av.charge > 40 then
- av.charge = 40
- end
- if av.fire == true then
- addBullet(win[4].x+138/2+99,win[4].y+5-av.gun,math.rad(-90),25,"av")
- if antivirus.laser:isPlaying() == true then
- antivirus.laser:rewind()
- else
- antivirus.laser:play()
- end
- av.fire = false
- end
- end
-end