What is the current behavior?
When you heal beyond the current max health, it chooses the value above the max health. Further, if you heal once but it isn't enough to fully heal you, it currently would still fully heal you regardless.
What is the expected behavior?
The variable name max_health implies it is a value that cannot be exceeded, so it should be choosing the minimum of the current and max health values.
Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.
Open FSM project
Code it so you only heal a single hit point when healing, take nearly-fatal damage
Heal - notice it chooses max_health because it's the max of the current health and the max.
I'm submitting a bug report
Bug report
What is the current behavior? When you heal beyond the current max health, it chooses the value above the max health. Further, if you heal once but it isn't enough to fully heal you, it currently would still fully heal you regardless.
What is the expected behavior? The variable name
max_health
implies it is a value that cannot be exceeded, so it should be choosing the minimum of the current and max health values.Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.
I'll be opening a PR to fix this shortly.