diff options
Diffstat (limited to 'virus1.lua')
| -rw-r--r-- | virus1.lua | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -552,6 +552,9 @@ function addBullet(x,y,a,s,t,id) if t == "v1" then table.insert(v1.bullets, 1, {x=x,y=y,a=a,s=s*sys.s,spx=0,spy=0,rm=false,id=id}) end + if t == "v2" then + table.insert(v2.bullets, 1, {x=x,y=y,a=a,s=s*sys.s,spx=0,spy=0,rm=false,id=id}) + end end function drawBullets() for i=1,#v1.bullets do @@ -639,6 +642,19 @@ function drawBullets() end end end + if v2.start == true then + if av.bullets[i].x >= v2.c.x-110 and av.bullets[i].x <= v2.c.x+110 and av.bullets[i].y >= v2.c.y-110 and av.bullets[i].y <= v2.c.y+110 then + v2.c.health = v2.c.health - 5 + v2.spm = v2.spm + 0.20*(sys.h/1080) + v2.shake = 10 + av.bullets[i].rm = true + if antivirus.hit:isPlaying() == true then + antivirus.hit:rewind() + else + antivirus.hit:play() + end + end + 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 <= 22 and virus1Pissed == false then |
