cocolabs / vitality

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make health proportional to hunger & thirst

opened this issue · comments

The number of hearts (H) available is equal to the average number of filled hunger (h) & thirst (t) icons, rounded up.

i.e. H = ( h + t ) ÷ 2, rounded ↑ to whole heart

The number of filled hearts is recorded as a percentage out of those available; in the scenario above, this would be 50%. The percentage is rounded up, so that if it where 60%, 5 hearts would be filled.

If we want to, we could include routing down, I've just left to round up only for simplicity's sake.

There should be a config option to disable this; in case one only wants to have the thirst feature.