From 2b256bc806c668b5655906a57657f1d682eaba9e Mon Sep 17 00:00:00 2001
From: MegaBrutal <code+git@megabrutal.com>
Date: Tue, 25 Sep 2018 15:30:40 +0200
Subject: [PATCH] Add Peter & Clara happiness conditions

	modified:   wgj58.js
---
 wgj58.js | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/wgj58.js b/wgj58.js
index 4810116..66344a8 100644
--- a/wgj58.js
+++ b/wgj58.js
@@ -281,8 +281,6 @@ class NPC_Clara extends GameNPC {
 					{ actor: logic.player, text: "Would you go out on a date with me?" },
 					{ actor: this, text: "..." },
 					{ actor: this, text: "No." } ] ));
-				// FIXME: Clara should have another happy condition.
-				this.makeHappy();
 				break;
 			default:
 				logic.gameinterface.talk(new Dialogue( [ { actor: this, text: "..." } ] ));
@@ -560,6 +558,7 @@ class NPC_Peter extends GameNPC {
 							{ actor: this, text: "You should know it's against the company etiquette..." },
 							{ actor: this, text: "Regardless, I don't think she's really mad. You're a cool guy." },
 							{ actor: logic.player, text: "I hope this will be sorted out... I totally accept her answer, but I wouldn't like her to have negative feelings towards me." } ] ));
+						this.offscreenTeleportation(new Phaser.Point(logic.clara.x - 160, logic.clara.y), this.tpDone, this);
 					}
 					else {
 						logic.gameinterface.talk(new Dialogue( [ { actor: this, text: "I'm kind of busy, man." } ] ));
@@ -613,6 +612,14 @@ class NPC_Peter extends GameNPC {
 	endTalk() {
 		return (logic.saiki.alive) && (this.talkcount < 3);
 	}
+
+	tpDone(value) {
+		console.log("Woot-woot! Teleport complete:", value);
+		value.makeHappy();
+		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.)
+	}
 }
 
 class NPC_Bianca extends GameNPC {
-- 
2.43.0