]> git.lizzy.rs Git - Crafter.git/commitdiff
Make drowning take away full heart
authoroilboi <47129783+oilboi@users.noreply.github.com>
Tue, 19 May 2020 17:25:08 +0000 (13:25 -0400)
committeroilboi <47129783+oilboi@users.noreply.github.com>
Tue, 19 May 2020 17:25:08 +0000 (13:25 -0400)
mods/new_functions/init.lua

index 0ef1a888cd32b27a7d1084ecf9b1599b52839dae..1ae4dd069111904dc1bed540cf8beb850e1f26bf 100644 (file)
@@ -287,12 +287,11 @@ local function fix_breath_hack()
                                local hp =  player:get_hp()
                                meta:set_int("drowning", 1)
                                if hp > 0 then
-                                       player:set_hp(hp-1)
+                                       player:set_hp(hp-2)
                                        player:add_player_velocity(vector.new(0,-15,0))
                                end
                        end
                elseif breath < 10 then --reset the bar
-                       
                        breath = breath + 1
                        meta:set_int("breath", breath)
                        meta:set_int("drowning", 0)