1
0
mirror of https://github.com/LDDestroier/CC/ synced 2024-09-27 14:48:21 +00:00

Update ccbn.lua

This commit is contained in:
LDDestroier 2019-03-09 16:16:36 -05:00 committed by GitHub
parent e4748a1284
commit 87959baf94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -296,7 +296,9 @@ local render = function()
term.setCursorPos(1,1)
term.write(players[you].health)
term.setCursorPos(scr_x - 3,1)
term.write(players[2].health)
if players[2] then
term.write(players[2].health)
end
end
local control = {
@ -443,7 +445,13 @@ local runGame = function()
local dmg = act.stage.getDamage(player.x, player.y, player.owner)
if player.cooldown.iframe == 0 and dmg > 0 then
player.health = player.health - dmg
player.cooldown.iframe = 32
if player.health <= 0 then
table.remove(players, id)
else
player.cooldown.iframe = 16
player.cooldown.move = 8
player.cooldown.shoot = 4
end
elseif player.control.buster and player.cooldown.shoot == 0 then
act.projectile.newProjectile(player.x, player.y, player.owner)
player.cooldown.shoot = 8