diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wage/entities.cpp | 3 | ||||
-rw-r--r-- | engines/wage/entities.h | 1 | ||||
-rw-r--r-- | engines/wage/script.cpp | 8 | ||||
-rw-r--r-- | engines/wage/wage.h | 5 |
4 files changed, 13 insertions, 4 deletions
diff --git a/engines/wage/entities.cpp b/engines/wage/entities.cpp index 8472e7844b..e229daf2fb 100644 --- a/engines/wage/entities.cpp +++ b/engines/wage/entities.cpp @@ -439,5 +439,8 @@ const char *Chr::getDefiniteArticle(bool capitalize) { return ""; } +void Chr::printPlayerCondition() { + warning("STUB: printPlayerCondition()"); +} } // End of namespace Wage diff --git a/engines/wage/entities.h b/engines/wage/entities.h index 6a97abf39e..0a3fa28e9f 100644 --- a/engines/wage/entities.h +++ b/engines/wage/entities.h @@ -222,6 +222,7 @@ public: WeaponArray *getWeapons(bool includeMagic); ObjArray *getMagicalObjects(); const char *getDefiniteArticle(bool capitalize); + void printPlayerCondition(); public: bool hasNativeWeapon1() { diff --git a/engines/wage/script.cpp b/engines/wage/script.cpp index 48e01c029f..0b38f37579 100644 --- a/engines/wage/script.cpp +++ b/engines/wage/script.cpp @@ -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() { diff --git a/engines/wage/wage.h b/engines/wage/wage.h index 2eb9803695..10541b3c12 100644 --- a/engines/wage/wage.h +++ b/engines/wage/wage.h @@ -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; }; |