X-Git-Url: http://git.megabrutal.com/?p=wgj58.git;a=blobdiff_plain;f=wgj58.js;h=ad6bbf82b9f1a34333cfada27581fb0d3c6ad444;hp=dec883db915cf0f88c86d978626deac56f1b7fc1;hb=cf792c3120fd82f3d5c39b1638b2b6b4bb8ae241;hpb=69d387036efbf36522919bcdb3b3bd5c33d5b147 diff --git a/wgj58.js b/wgj58.js index dec883d..ad6bbf8 100644 --- a/wgj58.js +++ b/wgj58.js @@ -159,6 +159,7 @@ class Player extends Phaser.Sprite { takeMe(npc) { this.loadTexture(npc.key); npc.kill(); + this.disguise = npc; } } @@ -222,7 +223,8 @@ class NPC_Clara extends GameNPC { { actor: logic.player, text: "Well, maybe if we dare to joke about it, it won't happen to us..." }, { actor: this, text: "Wish it worked like that... Is it some superstition like the belief that having an umbrella with you prevents rain?" }, { actor: logic.player, text: "Nah, that actually works; it's not a superstition, but Murphy's Law!" }, - { actor: this, text: "If you say so..." } ] )); + { actor: this, text: "If you say so..." }, + { actor: this, text: "Anyway, I logged you in and opened the door for you." } ] )); logic.openDoor("cutedoor"); break; case 1: @@ -311,7 +313,7 @@ class NPC_Carlos extends GameNPC { logic.gameinterface.talk(new Dialogue( [ { actor: this, text: "You know, generally, I think it sucks being a child. One thing I miss though, if you're a child, you're allowed to be silly." }, { actor: this, text: "..." }, { actor: this, text: "For example, when my Dad told me that semen is the seed of animals, I theoretized, if I'd bury some pig semen in the garden, a pig would grow out of it..." }, - { actor: this, text: "I was totally fascinated by the thought, because I really wanted to have a pet pig, but Dad wouldn't let me to have one." }, + { actor: this, text: "I was totally fascinated by the thought, because I really wanted to have a pet pig, but Dad wouldn't let me have one." }, { actor: this, text: "So I thought I could grow my own pig in the garden from pig seeds!" }, { actor: logic.player, text: "Interesting. Where are you going with this?" }, { actor: this, text: "I don't know... sometimes I feel like I'd rather sell pig semen to our clients, heh!" }, @@ -428,6 +430,7 @@ class NPC_Saiki extends GameNPC { { actor: this, text: "Hmm..." }, { actor: this, text: "I guess it didn't work." }, { actor: this, text: "So do you want to know what I think about this?" }, + { actor: this, text: "..." }, { actor: this, text: "IT'S BRILLIANT!!!" }, { actor: this, text: "You know, it really sparkled my artistic vision! Now I must draw a pig with its legs rooted into the ground!" }, { actor: logic.player, text: "That's gross. Poor pig." }, @@ -437,7 +440,12 @@ class NPC_Saiki extends GameNPC { //this.offscreenTeleportation(new Phaser.Point(logic.carlos.x + 128, logic.carlos.y), this.tpdone); } else { - logic.gameinterface.talk(new Dialogue( [ { actor: this, text: "I've found an orchestrated rendition of „Potential for Anything”. You'll have to check it out, it's breathtaking!" } ] )); + if (Phaser.Math.random() < 0.5) { + logic.gameinterface.talk(new Dialogue( [ { actor: this, text: "I've found an orchestrated rendition of „Potential for Anything”. You'll have to check it out, it's breathtaking!" } ] )); + } + else { + logic.gameinterface.talk(new Dialogue( [ { actor: this, text: "I don't like that our department is green. The blue one, where Carlos works, looks much better." } ] )); + } } } } @@ -466,7 +474,7 @@ class NPC_Saiki extends GameNPC { { actor: this, text: "..." } ] )); break; default: - logic.gameinterface.talk(new Dialogue( [ { actor: this, text: "Don't you have anything better to do?" } ] )); + logic.gameinterface.talk(new Dialogue( [ { actor: this, text: "Don't you have anything better to do, Carlos?" } ] )); } } super.actionTalk(); @@ -537,9 +545,14 @@ class GameInterface extends Phaser.Group { this.back_talk.lineTo(this.back_talk.width - 10, 35); this.add(this.back_talk); style = { align: 'left', fill: 'yellow', font: 'Ubuntu Mono', fontSize: 22, fontWeight: 'bold' }; - this.text_talktitle = new Phaser.Text(game, this.back_talk.x, this.back_talk.y, null, style); - this.text_talktitle.anchor.setTo(-0.2, -0.2); + this.text_talktitle = new Phaser.Text(game, this.back_talk.x + 15, this.back_talk.y + 6, null, style); + //this.text_talktitle.anchor.setTo(-0.2, -0.2); this.add(this.text_talktitle); + this.strikethrough_talktitle = new Phaser.Graphics(game, this.back_talk.x, this.back_talk.y); + this.strikethrough_talktitle.lineStyle(3, Phaser.Color.RED, 1); + this.strikethrough_talktitle.moveTo(12, 20); + this.strikethrough_talktitle.lineTo(67, 20); + this.add(this.strikethrough_talktitle); style = { align: 'left', fill: 'white', font: 'Ubuntu Mono', fontSize: 18, fontWeight: 'bold' }; this.text_talk = new Phaser.Text(game, this.back_talk.x + 35, this.back_talk.y + 40, null, style); this.text_talk.wordWrap = true; @@ -602,6 +615,7 @@ class GameInterface extends Phaser.Group { this.dialogue = null; this.back_talk.visible = false; this.text_talktitle.visible = false; + this.strikethrough_talktitle.visible = false; this.text_talk.visible = false; } @@ -610,7 +624,14 @@ class GameInterface extends Phaser.Group { console.log(this.dialogue.actual()); var actualdialogue = this.dialogue.actual(); if (actualdialogue) { - this.text_talktitle.text = actualdialogue.actor.shortname; + if (actualdialogue.actor.disguise) { + this.text_talktitle.text = actualdialogue.actor.shortname + " " + actualdialogue.actor.disguise.shortname; + this.strikethrough_talktitle.visible = true; + } + else { + this.text_talktitle.text = actualdialogue.actor.shortname; + this.strikethrough_talktitle.visible = false; + } this.text_talk.text = actualdialogue.text; this.dialogue.advance(); } @@ -686,7 +707,7 @@ class GameLogic { this.carlos = newChar; break; case 'saiki': - newChar = new NPC_Saiki(object.x, object.y, 'saiki', "Saiki", "Saiki Ytpme", 200); + newChar = new NPC_Saiki(object.x, object.y, 'saiki', "Saiki", "Saiki Ytpme", 150); this.saiki = newChar; break; default: