aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets.lua10
-rw-r--r--assets/shine1.pngbin10533 -> 42891 bytes
-rw-r--r--assets/virus_scorch_mask.pngbin0 -> 372268 bytes
-rw-r--r--internet.lua4
-rw-r--r--virus1.lua57
-rw-r--r--window.lua7
6 files changed, 49 insertions, 29 deletions
diff --git a/assets.lua b/assets.lua
index 3852489..8303f66 100644
--- a/assets.lua
+++ b/assets.lua
@@ -66,7 +66,8 @@ function loadAssets()
}
v1 = {
intro = love.audio.newSource("assets/virus1intro.ogg"),
- scorch = love.graphics.newImage("assets/virus_scorch.png")
+ scorch = love.graphics.newImage("assets/virus_scorch.png"),
+ scorchMask = love.graphics.newImage("assets/virus_scorch_mask.png")
}
v1.c = {}
v1.c.idle = {}
@@ -80,6 +81,7 @@ function loadAssets()
v1.c.monitorspin.f = 1
v1.c.monitorspin.x = 330
v1.c.monitorspin.y = -200
+ v1.c.monitorspin.sp = 0.4
loadAnimation(v1.c.monitorspin.pic, v1.c.monitorspin.fs, 59, 6, 200, 200)
v1.c.slime = {}
v1.c.slime.fs = {}
@@ -93,10 +95,12 @@ function loadAssets()
v1.c.shine.f2 = love.graphics.newImage("assets/shine2.png")
v1.c.shine.r1 = 0
v1.c.shine.r2 = 0
- v1.c.shine.s1 = -30
- v1.c.shine.s2 = -40
+ v1.c.shine.s1 = 0
+ v1.c.shine.s2 = 0
+ v1.c.shine.s = -25
v1.c.shine.sm1 = true
v1.c.shine.sm2 = true
+ v1.c.shine.ct = 0
expl = {}
expl.frames = {}
expl.pic = love.graphics.newImage("assets/explosion.png")
diff --git a/assets/shine1.png b/assets/shine1.png
index adf3593..bd4af54 100644
--- a/assets/shine1.png
+++ b/assets/shine1.png
Binary files differ
diff --git a/assets/virus_scorch_mask.png b/assets/virus_scorch_mask.png
new file mode 100644
index 0000000..df37695
--- /dev/null
+++ b/assets/virus_scorch_mask.png
Binary files differ
diff --git a/internet.lua b/internet.lua
index 1f12ebf..570f074 100644
--- a/internet.lua
+++ b/internet.lua
@@ -27,7 +27,7 @@ end
function updateInternet()
internet.urlold = internet.url
function love.keypressed(key)
- if key == "backspace" and layer[1] == 2 then
+ if key == "backspace" and layer[1] == 2 and v1.yes == false then
internet.url = string.sub(internet.url, 1, string.len(internet.url)-1)
if internet.url ~= internet.urlold then
win[2].update = true
@@ -39,7 +39,7 @@ function updateInternet()
end
end
function love.textinput(t)
- if layer[1] == 2 then
+ if layer[1] == 2 and v1.yes == false then
internet.url = internet.url .. t
if internet.url ~= internet.urlold then
win[2].update = true
diff --git a/virus1.lua b/virus1.lua
index 2a943b6..83ea573 100644
--- a/virus1.lua
+++ b/virus1.lua
@@ -17,53 +17,66 @@ function drawVirusFight1()
if v1.explodeintrotimer >= 7.7 then
v1.explodeintro = true
end
- if v1.timer >= 17 then
+ if v1.timer >= 20 then
music.tension1:play()
end
- if v1.timer >= 35 then
+ if v1.c.shine.ct >= 3 then
+ love.graphics.setColor(0,0,0,150)
+ playAnimation(v1.c.idle, true, win[2].x+v1.c.monitorspin.x-40, v1.c.monitorspin.y+40, 0, 1, 100, 100, 0.5)
+ love.graphics.setColor(255,255,255)
playAnimation(v1.c.idle, true, win[2].x+v1.c.monitorspin.x, v1.c.monitorspin.y, 0, 1, 100, 100, 0.5)
end
if v1.timer >= 15 then
- music.tension1:play()
+ love.graphics.setColor(255,255,255)
if win[2].y+v1.c.slime.y >= v1.c.monitorspin.y then
- love.graphics.stencil(scorchStencil, "replace", 1)
- love.graphics.setStencilTest("lequal", 0)
- playAnimation(v1.c.slime, true, win[2].x+v1.c.slime.x, win[2].y+v1.c.slime.y, 0, 2.5, 25, 25, 0.5)
- playAnimation(v1.c.monitorspin, true, win[2].x+v1.c.monitorspin.x, v1.c.monitorspin.y, 0, 1, 100, 100, 0.5)
- love.graphics.setStencilTest()
- v1.c.slime.y = v1.c.slime.y - 0.75
- v1.c.monitorspin.y = v1.c.monitorspin.y + 1.25
+ playAnimation(v1.c.slime, true, win[2].x+v1.c.slime.x+math.random(1,4), win[2].y+v1.c.slime.y+math.random(1,4), 0, 2.5, 25, 25, 0.5)
+ playAnimation(v1.c.monitorspin, true, win[2].x+v1.c.monitorspin.x, v1.c.monitorspin.y, 0, 1, 100, 100, v1.c.monitorspin.sp)
+ v1.c.slime.y = v1.c.slime.y - 0.5
+ v1.c.monitorspin.y = v1.c.monitorspin.y + 1.5
end
- if win[2].y+v1.c.slime.y <= v1.c.monitorspin.y+120 then
+ if win[2].y+v1.c.slime.y <= v1.c.monitorspin.y+100 and v1.c.shine.s > -70 then
love.graphics.draw(v1.c.shine.f2, win[2].x+v1.c.monitorspin.x, v1.c.monitorspin.y,
- v1.c.shine.r2, 3+v1.c.shine.s2/10, 3+v1.c.shine.s2/10, 100, 100)
+ v1.c.shine.r2, (3+v1.c.shine.s2/10)+v1.c.shine.s/10, (3+v1.c.shine.s2/10)+v1.c.shine.s/10, 100, 100)
love.graphics.draw(v1.c.shine.f1, win[2].x+v1.c.monitorspin.x, v1.c.monitorspin.y,
- v1.c.shine.r1, 3+v1.c.shine.s1/10, 3+v1.c.shine.s1/10, 100, 100)
+ v1.c.shine.r1, (3+v1.c.shine.s1/10)+v1.c.shine.s/10, (3+v1.c.shine.s1/10)+v1.c.shine.s/10, 100, 100)
v1.c.shine.r1 = v1.c.shine.r1 + math.rad(1)
v1.c.shine.r2 = v1.c.shine.r2 - math.rad(1)
- if v1.c.shine.sm1 == true then
+ if v1.c.monitorspin.sp ~= 1 then
+ v1.c.monitorspin.sp = v1.c.monitorspin.sp + 0.1
+ if v1.c.monitorspin.sp >= 1 then
+ v1.c.monitorspin.sp = 1
+ end
+ end
+ if v1.c.shine.sm1 == true and v1.c.shine.ct < 3 then
v1.c.shine.s1 = v1.c.shine.s1 + 0.2
elseif v1.c.shine.sm1 == false then
v1.c.shine.s1 = v1.c.shine.s1 - 0.2
end
- if v1.c.shine.sm2 == true then
+ if v1.c.shine.sm2 == true and v1.c.shine.ct < 3 then
v1.c.shine.s2 = v1.c.shine.s2 + 0.3
elseif v1.c.shine.sm2 == false then
v1.c.shine.s2 = v1.c.shine.s2 - 0.3
end
- if v1.c.shine.s1 >= 5 then
+ if v1.c.shine.s1 >= 7 then
v1.c.shine.sm1 = false
- elseif v1.c.shine.s1 <= -5 and v1.timer < 35 then
+ v1.c.shine.ct = v1.c.shine.ct + 1
+ elseif v1.c.shine.s1 <= -5 and v1.c.shine.ct < 3 then
v1.c.shine.sm1 = true
end
- if v1.c.shine.s2 >= 0 then
+ if v1.c.shine.s2 >= 5 then
v1.c.shine.sm2 = false
- elseif v1.c.shine.s2 <= -10 and v1.timer < 35 then
+ elseif v1.c.shine.s2 <= -5 and v1.c.shine.ct < 3 then
v1.c.shine.sm2 = true
end
+ if v1.c.shine.ct ~= 3 and v1.c.shine.s < 4 then
+ v1.c.shine.s = v1.c.shine.s + 0.2
+ elseif v1.c.shine.ct >= 3 and v1.c.shine.s > -80 then
+ v1.c.shine.s = v1.c.shine.s - 0.5
+ end
+ end
+ if v1.timer < 20 then
+ love.graphics.setColor(255,255,255)
+ love.graphics.draw(v1.scorchMask, win[2].x-300, win[2].y-100)
end
end
end
-function scorchStencil()
- love.graphics.rectangle("fill", win[2].x+180, win[2].y+295, 400, 500)
-end
diff --git a/window.lua b/window.lua
index fff8d8f..4350b76 100644
--- a/window.lua
+++ b/window.lua
@@ -84,7 +84,7 @@ function drawWindow(id)
win[id].y = win[id].py + (sys.mouse.y - sys.mouse.p.y)
end
if (sys.mouse.p.p == true and sys.mouse.p.x >= win[id].x+win[id].w-22 and sys.mouse.p.x <= (win[id].x+win[id].w-22)+16 and win[id].ex == false
- and sys.mouse.drag == false and sys.mouse.p.y >= win[id].y+5 and sys.mouse.p.y <= (win[id].y+5)+16 and win[id].hover == true) then
+ and sys.mouse.drag == false and sys.mouse.p.y >= win[id].y+5 and sys.mouse.p.y <= (win[id].y+5)+16 and win[id].hover == true) and v1.yes == false then
win[id].ex = true
end
if win[id].ex == true and win[id].s ~= 0 then
@@ -99,9 +99,12 @@ function drawWindow(id)
end
if (win[id].min == false and sys.mouse.p.p == true and sys.mouse.p.x >= win[id].x+win[id].w-40
and sys.mouse.p.x <= (win[id].x+win[id].w-40)+16 and sys.mouse.drag == false and sys.mouse.p.y >= win[id].y+5
- and sys.mouse.p.y <= (win[id].y+5)+16 and win[id].hover == true) then
+ and sys.mouse.p.y <= (win[id].y+5)+16 and win[id].hover == true) and v1.yes == false then
win[id].min = true
end
+ if v1.yes == true and id ~= 2 and win[id].ex == false then
+ win[id].ex = true
+ end
if win[id].min == true and win[id].miny < minim then
win[id].y = win[id].y + 150
win[id].miny = win[id].miny + 150