4b96fd9b4b
* mods/CORE/mcl_damage/init.lua (damage_player, heal_player) (get_hp): New functions. (register_on_hpchange): Do not apply modifiers to damage inflicted by damage_player and heal_player. Otherwise, first apply the difference to internal damage and compute the engine hp difference from thence. (register_on_punchplayer): Inflict punch damage by means of damage_player. (register_on_joinplayer): Synchronize player engine health with internal health counter if nonexistent. (register_on_dieplayer): Reset internal health counter. * mods/CORE/mcl_util/init.lua (deal_damage): If dealing damage to player, invoke mcl_damage.damage_player. (get_hp): Return fractional health gauge if player. * mods/ITEMS/mcl_totems/init.lua (register_modifier): * mods/HUD/mcl_death_messages/init.lua (register_on_damage): Derive whether damage is lethal from the fractional health gauge rather than `obj:get_hp'. * mods/ITEMS/mcl_armor/damage.lua (register_modifier): Do not compute ceiling of modified damage; return the floating point value as-is. * mods/ITEMS/mcl_potions/functions.lua (healing_func) (register_globalstep): Use heal_player rather than set_hp. * mods/ITEMS/mcl_throwing/register.lua (pearl_tp): * mods/MISC/mcl_commands/kill.lua (damage_player): * mods/PLAYER/mcl_hunger/hunger.lua: * mods/PLAYER/mcl_hunger/init.lua: As above.