From bb5fd42ebc015d604858ef1d46e4ea49b34c5e99 Mon Sep 17 00:00:00 2001 From: 1029chris <1029chris@gmail.com> Date: Mon, 30 May 2016 11:19:31 -0700 Subject: Code to accommodate new dialogue --- virus1.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'virus1.lua') diff --git a/virus1.lua b/virus1.lua index c9d1207..56abf0f 100644 --- a/virus1.lua +++ b/virus1.lua @@ -247,13 +247,13 @@ function drawVirusFight1() end if v1.c.shine.s < -50 and v1.msgs[v1.c.chat.msgs] ~= nil then drawBubble(v1.c.x+40, v1.c.y-135, 300, 115, v1.c.chat.msg) - if (sys.mouse.p.x >= v1.c.x+40 and sys.mouse.p.x <= v1.c.x+40+300 - and sys.mouse.p.y >= v1.c.y-135 and sys.mouse.p.y <= v1.c.y-135+110 and - v1.c.chat.next == false and sys.mouse.drag == false and v1.c.chat.msgs ~= 15 - and v1.c.chat.msgs ~= 17 and v1.c.chat.msgs ~= 19 and v1.c.chat.msgs ~= 21) then + if mouseClick(v1.c.x+40,v1.c.y-135,300,110) == true and + v1.c.chat.next == false and v1.c.chat.msgs ~= 15 and + v1.c.chat.msgs ~= 17 and v1.c.chat.msgs ~= 19 and v1.c.chat.msgs ~= 21 then v1.c.chat.next = true if v1.c.chat.msgs == 23 then v1.c.chat.msgs = 26 + virus1Pissed = true else v1.c.chat.msgs = v1.c.chat.msgs + 1 end @@ -637,7 +637,7 @@ function drawBullets() love.graphics.draw(antivirus.bullet, av.bullets[i].x, av.bullets[i].y, av.bullets[i].a, 1.5, 1.5, 23/2, 7) if v1.yes == true then if av.bullets[i].x >= v1.c.x-80 and av.bullets[i].x <= v1.c.x+80 and av.bullets[i].y >= v1.c.y-80 and av.bullets[i].y <= v1.c.y+70 then - if v1.c.chat.msgs >= 15 and v1.c.chat.msgs <= 21 then + if v1.c.chat.msgs >= 15 and v1.c.chat.msgs <= 22 then v1.c.chat.msgs = 25 v1.c.chat.char = 0 v1.c.chat.msg = "" @@ -667,10 +667,14 @@ function drawBullets() end if av.bullets[i].x < 0 or av.bullets[i].x > sys.w or av.bullets[i].y < 0 or av.bullets[i].y > sys.h then av.bullets[i].rm = true - if v1.c.chat.msgs >= 15 and v1.c.chat.msgs <= 21 then + if v1.c.chat.msgs >= 15 and v1.c.chat.msgs <= 22 and virus1Pissed == false then v1.c.chat.msgs = v1.c.chat.msgs + 1 v1.c.chat.msg = "" v1.c.chat.char = 0 + elseif v1.c.chat.msgs >= 15 and v1.c.chat.msgs <= 22 and virus1Pissed == true then + v1.c.chat.msgs = 23 + v1.c.chat.msg = "" + v1.c.chat.char = 0 end end if av.bullets[i].rm == true then -- cgit