WAGE: Implement handleRestCommand

This commit is contained in:
Eugene Sandulenko 2016-01-15 21:01:30 +01:00
parent c3824f40ba
commit 43df45d610
4 changed files with 13 additions and 4 deletions

View File

@ -439,5 +439,8 @@ const char *Chr::getDefiniteArticle(bool capitalize) {
return "";
}
void Chr::printPlayerCondition() {
warning("STUB: printPlayerCondition()");
}
} // End of namespace Wage

View File

@ -222,6 +222,7 @@ public:
WeaponArray *getWeapons(bool includeMagic);
ObjArray *getMagicalObjects();
const char *getDefiniteArticle(bool capitalize);
void printPlayerCondition();
public:
bool hasNativeWeapon1() {

View File

@ -1034,7 +1034,13 @@ void Script::handleStatusCommand() {
}
void Script::handleRestCommand() {
warning("STUB: handleRestCommand");
if (_callbacks->getMonster() != NULL) {
appendText("This is no time to rest!");
_callbacks->_commandWasQuick = true;
} else {
_callbacks->regen();
_world->_player->printPlayerCondition();
}
}
void Script::handleAcceptCommand() {

View File

@ -120,13 +120,13 @@ public:
const char *getGameFile() const;
void processTurn(Common::String *textInput, Designed *clickInput);
void regen();
private:
bool loadWorld(Common::MacResManager *resMan);
void performInitialSetup();
void wearObjs(Chr *chr);
void processTurnInternal(Common::String *textInput, Designed *clickInput);
void regen();
void performCombatAction(Chr *npc, Chr *player);
int getValidMoveDirections(Chr *npc);
void performAttack(Chr *attacker, Chr *victim, Weapon *weapon);
@ -150,6 +150,7 @@ public:
int _aim;
bool _temporarilyHidden;
bool _isGameOver;
bool _commandWasQuick;
Common::String _inputText;
@ -172,8 +173,6 @@ private:
Common::MacResManager *_resManager;
bool _commandWasQuick;
bool _shouldQuit;
};