Make fall damage leave at least 1 hp (#678)

* Make fall damage leave at least 1 hp
This commit is contained in:
LoneWolfHT 2020-09-16 08:30:58 -07:00 committed by GitHub
parent 58db9e7dd0
commit 179ff104bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -0,0 +1,8 @@
-- Capture The Flag mod: anticoward
minetest.register_on_player_hpchange(function(player, hp_change, reason)
if reason.type == "fall" and player:get_hp() + hp_change <= 0 then
return (-player:get_hp()) + 1
end
return hp_change
end, true)

View file

@ -0,0 +1 @@
name = anticoward