Deal hunger damage at 0 satiation, not 1
parent
5121268cf0
commit
91505ab6dd
|
@ -1,6 +1,6 @@
|
|||
# Hunger with HUD bar [`hbhunger`]
|
||||
|
||||
* Version: 1.1.0
|
||||
Modified version for Hades Revisited.
|
||||
|
||||
## Using the mod
|
||||
|
||||
|
@ -14,7 +14,7 @@ This mod adds a hunger mechanic to the game. Players get a new attribute called
|
|||
* A new player starts with 20 satiation points out of 30
|
||||
* Actions like digging, placing and walking cause exhaustion, which lower the satiation
|
||||
* Every 800 seconds you lose 1 satiation point without doing anything
|
||||
* At 1 or 0 satiation you will suffer damage and die in case you don't eat something
|
||||
* At 0 satiation you will suffer damage and die in case you don't eat something
|
||||
* If your satiation is 16 or higher, you will slowly regenerate health points
|
||||
* Eating food will increase your satiation (Duh!)
|
||||
|
||||
|
|
|
@ -122,8 +122,8 @@ minetest.register_globalstep(function(dtime)
|
|||
-- heal player by 1 hp if not dead and satiation is > hbhunger.SAT_HEAL
|
||||
if h > hbhunger.SAT_HEAL and hp > 0 and player:get_breath() > 0 then
|
||||
player:set_hp(hp+1)
|
||||
-- or damage player by 1 hp if satiation is < 2
|
||||
elseif h <= 1 then
|
||||
-- or damage player by 1 hp if satiation is <= 0
|
||||
elseif h <= 0 then
|
||||
if hp-1 >= 0 then
|
||||
hades_death_messages.player_damage(player, S("Starvation"))
|
||||
player:set_hp(hp-1)
|
||||
|
|
Loading…
Reference in New Issue