diff options
Diffstat (limited to 'engines/avalanche')
-rw-r--r-- | engines/avalanche/avalanche.cpp | 4 | ||||
-rw-r--r-- | engines/avalanche/avalot.cpp | 2 | ||||
-rw-r--r-- | engines/avalanche/closing.cpp | 4 | ||||
-rw-r--r-- | engines/avalanche/dialogs.cpp | 13 |
4 files changed, 18 insertions, 5 deletions
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp index 251cc0c71a..6451784180 100644 --- a/engines/avalanche/avalanche.cpp +++ b/engines/avalanche/avalanche.cpp @@ -51,7 +51,9 @@ AvalancheEngine::AvalancheEngine(OSystem *syst, const AvalancheGameDescription * _console = new AvalancheConsole(this); _rnd = new Common::RandomSource("avalanche"); - _rnd->setSeed(42); + TimeDate time; + _system->getTimeAndDate(time); + _rnd->setSeed(time.tm_sec + time.tm_min + time.tm_hour); // Needed because of Lucerna::load_also() for (int i = 0; i < 31; i++) { diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index 79f89535b3..4dac2ccedc 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -1526,7 +1526,7 @@ void AvalancheEngine::newGame() { _her = kPeoplePardon; _it = Parser::kPardon; _lastPerson = kPeoplePardon; // = Pardon? - _passwordNum = _rnd->getRandomNumber(30) + 1; //Random(30) + 1; + _passwordNum = _rnd->getRandomNumber(29) + 1; //Random(30) + 1; _userMovesAvvy = false; _doingSpriteRun = false; _avvyInBed = true; diff --git a/engines/avalanche/closing.cpp b/engines/avalanche/closing.cpp index 822148499a..e7314a0550 100644 --- a/engines/avalanche/closing.cpp +++ b/engines/avalanche/closing.cpp @@ -66,8 +66,8 @@ void Closing::exitGame() { _vm->_sound->stopSound(); getScreen(kScreenNagScreen); - byte nounId = _vm->_rnd->getRandomNumber(12); - byte verbId = _vm->_rnd->getRandomNumber(12); + byte nounId = _vm->_rnd->getRandomNumber(11); + byte verbId = _vm->_rnd->getRandomNumber(11); Common::String result = nouns[nounId] + " will " + verbs[verbId] + " you"; putIn(result, 1628); showScreen(); // No halt- it's already set up. diff --git a/engines/avalanche/dialogs.cpp b/engines/avalanche/dialogs.cpp index 9557b36b74..c0383045c7 100644 --- a/engines/avalanche/dialogs.cpp +++ b/engines/avalanche/dialogs.cpp @@ -34,6 +34,7 @@ #include "common/textconsole.h" #include "common/file.h" +#include "common/random.h" namespace Avalanche { @@ -765,7 +766,17 @@ void Dialogs::displayText(Common::String text) { // TODO: REPLACE BUFFER WITH A bool Dialogs::displayQuestion(Common::String question) { displayText(question + kControlNewLine + kControlQuestion); - warning("STUB: Dialogs::displayQuestion()"); + + if (_scReturn && (_vm->_rnd->getRandomNumber(1) == 0)) { // Half-and-half chance. + Common::String tmpStr = Common::String::format("...Positive about that?%cI%c%c%c", kControlRegister, kControlIcon, kControlNewLine, kControlQuestion); + displayText(tmpStr); // Be annoying! + if (_scReturn && (_vm->_rnd->getRandomNumber(3) == 3)) { // Another 25% chance + // \? are used to avoid that ??! is parsed as a trigraph + tmpStr = Common::String::format("%c100%% certain\?\?!%c%c%c%c", kControlInsertSpaces, kControlInsertSpaces, kControlIcon, kControlNewLine, kControlQuestion); + displayText(tmpStr); // Be very annoying! + } + } + return _scReturn; } |