diff options
-rw-r--r-- | engines/titanic/true_talk/barbot_script.cpp | 47 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_npc_script.h | 3 |
2 files changed, 45 insertions, 5 deletions
diff --git a/engines/titanic/true_talk/barbot_script.cpp b/engines/titanic/true_talk/barbot_script.cpp index ed7e083897..16bc2447b6 100644 --- a/engines/titanic/true_talk/barbot_script.cpp +++ b/engines/titanic/true_talk/barbot_script.cpp @@ -49,14 +49,53 @@ int BarbotScript::chooseResponse(TTroomScript *roomScript, TTsentence *sentence, applyResponse(); return 2; - } + + } else if (tag == MKTAG('S', 'W', 'E', 'R')) { + adjustDial(0, -18); + adjustDial(1, -5); + + if (getRandomNumber(100) > 50) { + addResponse(getDialogueId(getDialRegion(0) == 0 ? 250200 : 250062)); + applyResponse(); + return 2; + } + + } else if (tag == MKTAG('B', 'A', 'R', 'K') && getRandomNumber(100) > 50) { + proc14(250025); + switch (proc23()) { + case 4: + case 6: + addResponse(getDialogueId(250125)); + break; + default: + break; + } + + applyResponse(); + return 2; - if (tag == MKTAG('S', 'W', 'E', 'R')) { + } else if (tag == MKTAG('B', 'A', 'R', 'U') && getRandomNumber(100) > 50) { + proc14(250025); + switch (proc23()) { + case 4: + case 6: + addResponse(getDialogueId(250112)); + break; + default: + break; + } + applyResponse(); + return 2; } - warning("TODO"); - return SS_2; + if (tag == MKTAG('T', 'H', 'R', 'T') || tag == MKTAG('S', 'L', 'O', 'W') || + tag == MKTAG('S', 'E', 'X', '1') || tag == MKTAG('P', 'K', 'U', 'P')) { + adjustDial(0, -7); + adjustDial(1, -3); + } + + return TTnpcScript::chooseResponse(roomScript, sentence, tag); } void BarbotScript::proc7(int v1, int v2) { diff --git a/engines/titanic/true_talk/tt_npc_script.h b/engines/titanic/true_talk/tt_npc_script.h index 69934ce863..906489ec3b 100644 --- a/engines/titanic/true_talk/tt_npc_script.h +++ b/engines/titanic/true_talk/tt_npc_script.h @@ -198,7 +198,8 @@ public: virtual int getDialRegion(int dialNum); /** - * Get the NPC's dial level + * Gets the value for a dial, introducing a slight random variance so that + * the displayed dial will oscillate randomly around it's real level */ virtual int getDialLevel(uint dialNum, bool flag = true); |