diff options
-rw-r--r-- | engines/wage/wage.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/wage/wage.cpp b/engines/wage/wage.cpp index 31df42474f..1f0769c561 100644 --- a/engines/wage/wage.cpp +++ b/engines/wage/wage.cpp @@ -385,7 +385,15 @@ void WageEngine::redrawScene() { } void WageEngine::regen() { - warning("STUB WageEngine::regen()"); + Chr *player = _world->_player; + int curHp = player->_context._statVariables[PHYS_HIT_CUR]; + int maxHp = player->_context._statVariables[PHYS_HIT_BAS]; + int delta = maxHp - curHp; + + if (delta > 0) { + int bonus = (int)(delta / (8 + _rnd->getRandomNumber(2))); + player->_context._statVariables[PHYS_HIT_CUR] += bonus; + } } void WageEngine::processTurnInternal(Common::String *textInput, Designed *clickInput) { |