X-Git-Url: http://git.megabrutal.com/?p=wgj58.git;a=blobdiff_plain;f=wgj58.js;h=71b0484725d4b015551a0053e6a9b5cc1d8b3626;hp=b98719dc6d29257f0bcde0907dd1925cc8aad4fd;hb=HEAD;hpb=4ec2bf940a0f1f0ada6a93271ba3789a45e66e49 diff --git a/wgj58.js b/wgj58.js index b98719d..71b0484 100644 --- a/wgj58.js +++ b/wgj58.js @@ -440,6 +440,14 @@ class NPC_Carlos extends GameNPC { 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: @@ -535,6 +543,39 @@ class NPC_Saiki extends GameNPC { 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!"); @@ -550,12 +591,13 @@ class NPC_Saiki extends GameNPC { } 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.) @@ -564,6 +606,14 @@ class NPC_Saiki extends GameNPC { class NPC_Peter extends GameNPC { actionTalk() { + /* If Peter is happy, she's already teleported to Clara. */ + if (!this.happy) + this.actionTalk_morning(); + else + this.actionTalk_afternoon(); + } + + actionTalk_morning() { if (logic.saiki.alive) { switch (this.talkcount) { case 0: @@ -638,20 +688,66 @@ class NPC_Peter extends GameNPC { super.actionTalk(); } + actionTalk_afternoon () { + if (logic.bianca.alive) { + switch (this.talkcount) { + case 0: + logic.gameinterface.talk(new Dialogue( [ { actor: this, text: "Hey John!" }, + { actor: logic.player, text: "Hey, what's up?" }, + { actor: this, text: "I just asked Clara out on a date!" }, + { actor: logic.clara, text: "Shhhsh, don't brag about it! I'm a person, not a prize." }, + { actor: this, text: "Sorry..." }, + { actor: logic.clara, text: "It's OK... Uhm... Sorry, John... I always liked Peter... but when you asked me out, I felt intimidated and a little uncomfortable." } ] )); + break; + case 1: + logic.gameinterface.talk(new Dialogue( [ { actor: logic.player, text: "I'm sorry, Clara, I didn't mean to be inappropriate... situations like this are always so complicated..." }, + { actor: logic.clara, text: "Never mind, John. I didn't handle it properly either. Apology accepted." }, + { actor: this, text: "Everyone's happy, I guess." }, + { actor: logic.player, text: "Not really. Maybe I'm gonna be fired." }, + { actor: this, text: "Haha, you're a joker!" } ] )); + break; + case 2: + logic.gameinterface.talk(new Dialogue( [ { actor: this, text: "*Whispers.* Khm, no offense, but it would be nice if you excused yourself and leave. You know how it is..." } ] )); + break; + case 3: + logic.gameinterface.talk(new Dialogue( [ { actor: logic.player, text: "Oh, time goes so fast... I have to go. Bye!" } ] )); + break; + default: + logic.gameinterface.talk(new Dialogue( [ { actor: logic.player, text: "..." } ] )); + } + } + else { + switch (this.talkcount) { + case 0: + logic.gameinterface.talk(new Dialogue( [ { actor: this, text: "..." }, + { actor: logic.clara, text: "..." }, + { actor: logic.player, text: "Hey there!... Uhm... Don't you have anything better to do?" }, + { actor: this, text: "Yeah, I would totally have if you weren't been blocking the meeting room!" } ] )); + break; + default: + logic.gameinterface.talk(new Dialogue( [ { actor: logic.player, text: "Get back to work! Don't make me say it again!" } ] )); + } + } + super.actionTalk(); + } + actionTake() { logic.closeDoor("saikidoor"); logic.openDoor("peterdoor"); logic.openDoor("biancadoor"); + logic.carlos.kill(); + if (logic.saiki.talkcount > 0) logic.saiki.kill(); return super.actionTake(); } endTalk() { - return (logic.saiki.alive) && (this.talkcount < 3); + return (logic.saiki.alive) && (this.talkcount < 3) && (!this.happy); } tpDone(value) { console.log("Woot-woot! Teleport complete:", value); value.makeHappy(); + value.resetTalk(); logic.clara.makeHappy(); // FIXME: Need to find a prettier way than this. logic.clara.update = function() { }; // Disable Clara's interaction. (Peter will talk for him.)