diff options
| -rw-r--r-- | dialogue.lua | 6 | ||||
| -rw-r--r-- | virus2.lua | 70 | ||||
| -rw-r--r-- | window.lua | 4 |
3 files changed, 68 insertions, 12 deletions
diff --git a/dialogue.lua b/dialogue.lua index 7ca2075..7650319 100644 --- a/dialogue.lua +++ b/dialogue.lua @@ -141,13 +141,13 @@ function loadDia() v2.msgs[10] = "Sure, destruction is fun..." v2.msgs[11] = "But why not make a little money first?" v2.msgs[12] = "After you make a good amount o' cash, THAT is when you end them!" - v2.msgs[13] = "I don't need time to destroy this computer. I just need my cold hard cash! $500 will do!" + v2.msgs[13] = "I don't need time to destroy this computer. I just need $500! Then, you'll be discarded." v2.msgs[14] = "I have to give that arrogant punk some credit, he did leave your door wide open for me!" v2.msgs[15] = "He was oddly specific when explaining the fight, so I'll assume you know how this works!" v2.msgs[16] = "So, lets get to work... shall we?" v2.msgs[18] = "Umm... I'm not going to baby you. Open your antivirus!" - v2.msgs[20] = "Ah, There it is! Fun!" - v2.msgs[22] = "This'll be fun, you better not disappoint me!" + v2.msgs[20] = "Ah, There it is! Fun! You better not disapoint me, I want some action!" + v2.msgs[22] = "Remember, The more popups are open, the faster I make money!" v2.msgs[23] = "Now, let's begin." v2.msgs[25] = "No! You won't beat me! I will beat you! Behold my ultimate power!!!" v2.msgs[27] = "Well, I'm done. If you survived that, then theres nothing else I can do..." @@ -26,9 +26,13 @@ function drawVirusFight2() shotgunBundleAttack() elseif v2.currentAttack == "shotgunSpiral" then shotgunSpiralAttack() + elseif v2.currentAttack == "shotgunFast" then + superFastShotgunAttack() + elseif v2.currentAttack == "shotgun" then + v2ShotgunAttack() end if v2.nextAttack <= v2.attackNextTimer then - local na = math.random(1,6) + local na = math.random(1,8) if na == 1 then v2.currentAttack = "rShotgun" elseif na == 2 then @@ -41,6 +45,10 @@ function drawVirusFight2() v2.currentAttack = "shotgunBundle" elseif na == 6 then v2.currentAttack = "shotgunSpiral" + elseif na == 7 then + v2.currentAttack = "shotgunFast" + elseif na == 8 then + v2.currentAttack = "shotgun" end v2.nextAttack = math.random(5,20) if na == 3 or na == 4 then @@ -129,6 +137,9 @@ function drawVirusFight2() v2.c.yd = sys.h/4 elseif v2.c.chat.msgs == 24 then v2.fightStart = true + if v2.currentAttack ~= "shotgun" then + v2.c.handp = "idle" + end end if v2.fightStart == true then music.tension2:stop() @@ -295,6 +306,12 @@ function drawVirus2() v2.c.y = v2.c.y + v2.c.spy end end + if v2.currentAttack ~= "first" and v2.c.chat.msgs == 24 then + if v2.c.x == v2.c.xd and v2.c.y == v2.c.yd then + v2.c.xd = math.random(125, sys.w-125) + v2.c.yd = math.random(125, sys.h/2) + end + end if v2.shake > 0 and v2.c.chat.msgs == 24 then v2.shakex = math.random(v2.shake,-v2.shake) v2.shakey = math.random(v2.shake,-v2.shake) @@ -352,7 +369,7 @@ function drawVirus2() end love.graphics.setColor(256,256,256,v2.c.gunpointOp) love.graphics.draw(v2.c.idle.handright, v2.c.x+v2.shakex, v2.c.y+v2.shakey, v2.c.r, v2.c.s, v2.c.s, 125, 125) - love.graphics.draw(v2.c.gunleft, v2.c.x-82+v2.shakex, v2.c.y+35+v2.shakey, v2.gun.r+math.rad(-100), 1.2, 1.2, 45, 10) + love.graphics.draw(v2.c.gunleft, v2.c.x-82+v2.shakex, v2.c.y+35+v2.shakey, v2.gun.r+math.rad(-90), 1.2, 1.2, 45, 10) end v2.mTime = v2.mTime + delta if v2.mTime > 6 and v2.c.chat.msgs == 17 and win[4].ex == true then @@ -470,9 +487,15 @@ function floatingShotgun() -math.sin(v2.sg[i].r+math.rad(90))*(v2.sg[i].y-140-v2.sg[i].y)+v2.sg[i].x local y3 = math.sin(v2.sg[i].r+math.rad(90))*(v2.sg[i].x-30-v2.sg[i].x) +math.cos(v2.sg[i].r+math.rad(90))*(v2.sg[i].y-140-v2.sg[i].y)+v2.sg[i].y - addBullet(x1,y1,v2.sg[i].r+math.rad(4),10,"v1",2) - addBullet(x2,y2,v2.sg[i].r,10,"v1",1) - addBullet(x3,y3,v2.sg[i].r-math.rad(4),10,"v1",2) + if v2.sg[i].b == 1 then + addBullet(x1,y1,v2.sg[i].r+math.rad(4),10,"v1",2) + addBullet(x3,y3,v2.sg[i].r-math.rad(4),10,"v1",2) + end + if math.random(1,8) == 8 then + addBullet(x2,y2,v2.sg[i].r,10,"v1",5) + else + addBullet(x2,y2,v2.sg[i].r,10,"v1",1) + end v2.sg[i].f = true if v2.c.fire:isPlaying() == true then v2.c.fire:rewind() @@ -548,6 +571,31 @@ function v2PopupAttack() end end function v2ShotgunAttack() + v2.c.handp = "gunpoint" + if v2.attackTimer <= 0 then + local xx = math.cos(v2.gun.r+math.rad(90))*(v2.c.x-82+150-v2.c.x-82) + -math.sin(v2.gun.r+math.rad(90))*(v2.c.y+35-275-v2.c.y+35)+v2.c.x-82 + local yy = math.sin(v2.gun.r+math.rad(70))*(v2.c.x-82+150-v2.c.x-82) + +math.cos(v2.gun.r+math.rad(90))*(v2.c.y+35-275-v2.c.y+35)+v2.c.y+35 + addBullet(xx,yy,v2.gun.r+math.rad(4),10,"v1",2) + addBullet(xx,yy,v2.gun.r-math.rad(4),10,"v1",2) + if math.random(1,8) == 8 then + addBullet(xx,yy,v2.gun.r,10,"v1",5) + else + addBullet(xx,yy,v2.gun.r,10,"v1",1) + end + if v2.c.fire:isPlaying() == true then + v2.c.fire:rewind() + else + v2.c.fire:play() + end + if v2.c.health <= 50 and math.random(1,3) == 1 then + for i=1,3 do + addShotgun(math.random(0,sys.w),math.random(0,sys.h/2),0.5,1) + end + end + v2.attackTimer = 1 + end end function v2ShootingPopupAttack() end @@ -555,13 +603,13 @@ function v2ShotgunPopupAttack() if v2.attackTimer <= 0 then v2.attackTimer = 1.5 addPopup(true) - addShotgun(math.random(0,sys.w),math.random(0,sys.h/2),1,1) + addShotgun(math.random(0,sys.w),math.random(0,sys.h/2),2,1) end end function shotgunBundleAttack() if v2.attackTimer <= 0 then - v2.attackTimer = 1.5 - for i=1,10 do + v2.attackTimer = 2 + for i=1,8 do addShotgun(math.random(0,sys.w),math.random(0,sys.h/2),0.5,1) end end @@ -577,3 +625,9 @@ function shotgunSpiralAttack() end end end +function superFastShotgunAttack() + if v2.attackTimer <= 0 then + v2.attackTimer = 0.1 + addShotgun(math.random(0,sys.w),math.random(0,sys.h/2),0.5,2) + end +end @@ -94,8 +94,10 @@ function drawWindow(id) win[id].py = win[id].y end if sys.mouse.drag == true and win[id].min == false and win[id].ex == false and layer[1] == id then - if id == 4 and (v1.yes == true or v2.start == true) then + if id == 4 and v1.yes == true then windowMouseMove(id,0,sys.w-win[id].w,sys.h/2,sys.h-win[id].h-panel.thick-1) + elseif id == 4 and v2.start == true then + windowMouseMove(id,0,sys.w-win[id].w,sys.h/2.4,sys.h-win[id].h-panel.thick-1) else windowMouseMove(id,0,sys.w-win[id].w,0,sys.h-win[id].h-panel.thick-1) end |
