Make fall damage leave at least 1 hp (#678)
* Make fall damage leave at least 1 hp
This commit is contained in:
parent
58db9e7dd0
commit
179ff104bf
2 changed files with 9 additions and 0 deletions
8
mods/pvp/anticoward/init.lua
Normal file
8
mods/pvp/anticoward/init.lua
Normal 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)
|
1
mods/pvp/anticoward/mod.conf
Normal file
1
mods/pvp/anticoward/mod.conf
Normal file
|
@ -0,0 +1 @@
|
|||
name = anticoward
|
Loading…
Reference in a new issue