Skip to content

Commit

Permalink
WAGE: Implement WageEngine::regen()
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Jan 7, 2016
1 parent 83dcdf9 commit 7bdb942
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion engines/wage/wage.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 7bdb942

Please sign in to comment.