Let Carlos afternoon dialogue triggered by Saiki
authorMegaBrutal <code+git@megabrutal.com>
Sun, 18 Nov 2018 05:40:00 +0000 (06:40 +0100)
committerMegaBrutal <code+git@megabrutal.com>
Sun, 18 Nov 2018 05:40:00 +0000 (06:40 +0100)
... instead of Peter.

modified:   wgj58.js

wgj58.js

index c69dcbee022d6abceebf7b6a21042cb407ae0335..b98719dc6d29257f0bcde0907dd1925cc8aad4fd 100644 (file)
--- a/wgj58.js
+++ b/wgj58.js
@@ -309,7 +309,7 @@ class NPC_Clara extends GameNPC {
 class NPC_Carlos extends GameNPC {
        actionTalk() {
                if (logic.clara.alive) {
-                       if (logic.peter.talkcount == 0) {
+                       if (logic.saiki.talkcount == 0) {
                                switch (this.talkcount) {
                                        case 0:
                                                logic.gameinterface.talk(new Dialogue( [ { actor: logic.player, text: "Good morning, Carlos! What's up?" },
@@ -417,7 +417,7 @@ class NPC_Carlos extends GameNPC {
        }
 
        actionLeave() {
-               if ((logic.clara.alive) && (logic.peter.talkcount == 0)) {
+               if ((logic.clara.alive) && (logic.saiki.talkcount == 0)) {
                        logic.gameinterface.dropNotice(this.shortname + ": Bye, John! Pass on my greetings to Saiki!");
                }
        }
@@ -429,7 +429,7 @@ class NPC_Carlos extends GameNPC {
        }
 
        endTalk() {
-               return ((logic.clara.alive) && (logic.peter.talkcount == 0)) || (this.talkcount < 3);
+               return ((logic.clara.alive) && (logic.saiki.talkcount == 0)) || (this.talkcount < 3);
        }
 
        tpDone(value) {
@@ -456,6 +456,7 @@ class NPC_Saiki extends GameNPC {
                                        logic.closeDoor("carlosdoor");
                                        logic.openDoor("saikidoor");
                                        logic.openDoor("peterdoor");
+                                       logic.carlos.resetTalk();
                                        break;
                                case 1:
                                        logic.gameinterface.talk(new Dialogue( [ { actor: this, text: "Now that I think about it, there's still one thing. You could look into why the access control system is acting so funny today." },
@@ -576,7 +577,6 @@ class NPC_Peter extends GameNPC {
                                        logic.closeDoor("saikidoor");
                                        logic.openDoor("peterdoor");
                                        logic.openDoor("biancadoor");
-                                       logic.carlos.resetTalk();
                                        break;
                                case 1:
                                        logic.gameinterface.talk(new Dialogue( [ { actor: this, text: "See... Would you talk to Bianca? We don't understand each other pretty well. That's why I'd rather wouldn't make a shot." } ] ));