class NPC_Saiki extends GameNPC {
actionTalk() {
+ /* If Saiki is happy, she's already teleported to Carlos. */
+ if (!this.happy)
+ this.actionTalk_morning();
+ else
+ this.actionTalk_afternoon();
+ }
+
+ actionTalk_morning() {
if (logic.carlos.alive) {
switch (this.talkcount) {
case 0:
super.actionTalk();
}
+ actionTalk_afternoon() {
+ if (logic.peter.alive) {
+ switch (this.talkcount) {
+ case 0:
+ logic.gameinterface.talk(new Dialogue( [ { actor: this, text: "Oh, hi John!" },
+ { actor: logic.carlos, text: "Hey John! Thanks for telling my secret to Saiki..." },
+ { actor: logic.player, text: "Really sorry man, but it was so funny!" },
+ { actor: logic.carlos, text: "Are you kidding me? It's the best thing you could have ever done!" },
+ { actor: this, text: "Yeah, I couldn't resist to come over here to talk about it, haha!" },
+ { actor: logic.carlos, text: "And we talked about lots of other stuff too..." },
+ { actor: this, text: "WE ASKED EACH OTHER OUT ON A DATE!!!" },
+ { actor: logic.carlos, text: "Yeah, Saiki finds gender equality so important that she had to take the role of the initiator, just in the right moment when I asked her out." },
+ { actor: this, text: "Oh, shut up! xD" },
+ { actor: logic.player, text: "Awesome, I'm so happy for you guys!" },
+ { actor: logic.player, text: "... Don't mean to ruin the fun, but have you finished with your work?" },
+ { actor: logic.carlos, text: "Who cares? It waits. I can totally sell the shit tomorrow." },
+ { actor: this, text: "Yeah, I'll commit my patch tomorrow morning. We definitely deserve some fun!" },
+ { actor: logic.player, text: "You say it right! Bye then." } ] ));
+ break;
+ default:
+ logic.gameinterface.talk(new Dialogue( [ { actor: logic.player, text: "Have a great evening, guys!" } ] ));
+ }
+ }
+ else {
+ logic.gameinterface.talk(new Dialogue( [ { actor: this, text: "Oh... hi Peter!..." },
+ { actor: this, text: "I wanted to talk to Carlos..." },
+ { actor: this, text: "Where is he? I mean, he often leaves early, but..." },
+ { actor: this, text: "I can't explain why, but somehow I have a very bad feeling about this. " },
+ { actor: logic.player, text: "..." } ] ));
+ }
+ super.actionTalk();
+ }
+
actionLeave() {
if (logic.carlos.alive) {
logic.gameinterface.dropNotice(this.shortname + ": It was nice talking to you!");
}
endTalk() {
- return (logic.carlos.alive);
+ return (logic.carlos.alive) && (!this.happy);
}
tpDone(value) {
console.log("Woot-woot! Teleport complete:", value);
value.makeHappy();
+ value.resetTalk();
logic.carlos.makeHappy();
// FIXME: Need to find a prettier way than this.
logic.carlos.update = function() { }; // Disable Carlos' interaction. (Saiki will talk for him.)
logic.closeDoor("saikidoor");
logic.openDoor("peterdoor");
logic.openDoor("biancadoor");
+ logic.carlos.kill();
+ if (logic.saiki.talkcount > 0) logic.saiki.kill();
return super.actionTake();
}