nodecore-cd2025/mods/nc_player_setup/step_invulnbreath.lua
2020-06-22 22:47:33 -04:00

15 lines
455 B
Lua

-- LUALOCALS < ---------------------------------------------------------
local nodecore
= nodecore
-- LUALOCALS > ---------------------------------------------------------
nodecore.register_playerstep({
label = "invulnerable breath",
action = function(player, data)
if (not nodecore.player_can_take_damage(player))
and player:get_breath() < data.properties.breath_max then
player:set_breath(data.properties.breath_max)
end
end
})