diff options
| author | 1029chris <1029chris@gmail.com> | 2016-10-16 04:47:17 -0700 |
|---|---|---|
| committer | 1029chris <1029chris@gmail.com> | 2016-10-16 04:47:17 -0700 |
| commit | 38775e9090dacbd5a663b7eb900778d0e4852046 (patch) | |
| tree | 11667f5d9f6b2449ad00896f46add3d933d442c8 /virus1.lua | |
| parent | 41c81f2cff92d33808ab43d2ec6aab6e1703b89c (diff) | |
Added many attacks for Virus 2
started virus 2 fight
its playable now
its also 5 am
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 |
