Khaligufzel / Dimensionfall

A survival game inspired by Cataclysm: Dark Days Ahead and Bright Nights.
MIT License
12 stars 5 forks source link

Implement Medical type items #352

Closed snipercup closed 1 month ago

snipercup commented 1 month ago

Requires #347 Fixes #348

It implements the suggestions from #348. Also updates the tooltip for inventory items to display the information about medical items.

This implementation offers flexibility in the application of medical items. You can add any attribute to it's targets, not just body parts. You can set the order by which to apply the amount you set. In addition to this, you can set an amount for a specific attribute on top of the general amount.

This means you can have a general bandage that heals 25 on the most damaged body part and if there is any of the 25 left over to heal, it will move to the next body part. You can also have some medical item that only applies to arms and have it give a flat 10 to one arm or both. You can also combine the two. For example, give 25 to the most damaged body part + 10 to the torso.

With this PR we will have two health systems in place since I haven't removed Khaligufzel's implementation yet. That will happen in a follow up PR.

Image showing the new health bars and tooltip: image