From 25e2e8ed65367208391cebd155bae1a4a639a683 Mon Sep 17 00:00:00 2001 From: alexander-svendsen Date: Fri, 10 Aug 2018 13:15:21 +0200 Subject: [PATCH] Fix typos and new links between locations --- src/scenario/main.ts | 31 ++++++++++++++++++--------- src/scenario/sections/beginning.ts | 9 +++++--- src/scenario/sections/thelostwoods.ts | 7 ++++-- 3 files changed, 32 insertions(+), 15 deletions(-) diff --git a/src/scenario/main.ts b/src/scenario/main.ts index 6ebd131..f4be5de 100644 --- a/src/scenario/main.ts +++ b/src/scenario/main.ts @@ -55,6 +55,7 @@ intersection .link('forest', lostWoods) .link('to forest', lostWoods) .link('north', door) + .link("east", startSection) .setOnEnter(() => gtag('event', 'intersection', { 'event_category': 'game', 'event_label': 'game', @@ -69,10 +70,12 @@ castleShadowGate .setDesc( 'A shadow grows on the wall behind you, ' + "swallowing you in darkness. It's almost here...\n" + - "It's to dark to continue without a light source. You need to go back." + "It's too dark to continue without a light source. You need to go back." ) .link('back', intersection) + .link('east', intersection) .link("gates", insideCastle) + .link("forward", insideCastle) .link("through gates", insideCastle) .link("gate", insideCastle) .link("through gate", insideCastle) @@ -137,7 +140,8 @@ insideCastle torch.setUse(() => { if(gameEngine.currentLocation === castleShadowGate){ - return "It worked!! You can see a path through the main gates." + castleShadowGate.setDesc("You can see a path forward through the main gates."); + return "It worked!! You can see a path forward through the main gates." } return "Can't use that here" }); @@ -152,6 +156,7 @@ door.setId('The lonely door') 'You only see a path back.' ) .link('back', intersection) + .link("south", intersection) .link('wind', james) .link('with the wind', james) .link('with wind', james) @@ -162,20 +167,26 @@ door.setId('The lonely door') })); +const jamesSays = "Congratulations! You have cleared the game. \n " + + "James: Unfortunately, there is no legendary artifact. We have tried to create it, but failed. Many times. " + + "However, there is a place of ultimate knowledge, where monolithic architectures seem like a ting of the past. " + + "See you at JavaZone 2018!"; + +const punchCardStr = "\n He hands you a punch card."; + const punchCard = new Item() - .setTake(() => "You took the punch card") + .setTake(() => { + james.setDesc(jamesSays); + return "You took the punch card" + }) .setTakeable(true) - .setUse(() => "https://youtu.be/kLO1djacsfg?t=3m6s") // TODO change me - .setLook(() => "https://youtu.be/kLO1djacsfg?t=3m6s"); // TODO change me + .setUse(() => "https://www.youtube.com/watch?v=dQw4w9WgXcQ") // TODO change me + .setLook(() => "https://www.youtube.com/watch?v=dQw4w9WgXcQ"); // TODO change me james.setId('The architect named James') .setImg(gosling) .setImgAlt("A image of a strange old bold man") - .setDesc("Congratulations! You have cleared the game. \n " + - "James: Unfortunately, there is no legendary artifact. We have tried to create it, but failed. Many times. " + - "However, there is a place of ultimate knowledge, where monolithic architectures seem like a ting of the past. " + - "See you at JavaZone 2018! \n" + - "He hands you a punch card.") + .setDesc(jamesSays + punchCardStr) .addItem("punch card", punchCard) .setOnEnter(() => gtag('event', 'james', { 'event_category': 'game', diff --git a/src/scenario/sections/beginning.ts b/src/scenario/sections/beginning.ts index f5f80e5..be94a04 100644 --- a/src/scenario/sections/beginning.ts +++ b/src/scenario/sections/beginning.ts @@ -6,7 +6,7 @@ import mountain from "../img/mountain"; const start = new Location() .setId("A new beginning") .setDesc("You are standing in an old, abandoned house. " + - "There is nothing in the room except for a closed chest.") + "There is nothing in the room expect for a closed chest.") .setImgAlt("Image of a house on the mountains") .setImg(mountain); @@ -48,7 +48,10 @@ const letterText = "Welcome to QuestZone! \n" + const letter = new Item() .setLook(() => "It's a letter. You can probably read it.") - .setTake(() => "You took the letter.") + .setTake(() => { + chest.setLook(() => "The chest is empty."); + return "You took the letter." + }) .setTakeable(true) .setUse(() => "You made a paper plane...\n That was fun. Let's continue the adventure.") .on("read", () => letterText); @@ -62,7 +65,7 @@ const scroll = new Item() }) .setTakeable(true) .setUse(() => "You made an origami figure...\n That was fun. Maybe you should read it?") - .on("read", () => "To be GDPR compliant you herby accept all terms and conditions by TAKING this scroll!!\n" + + .on("read", () => "To be GDPR compliant you hereby accept all terms and conditions by TAKING this scroll!!\n" + "What this entails you will never know ¯\\_(ツ)_/¯") ; diff --git a/src/scenario/sections/thelostwoods.ts b/src/scenario/sections/thelostwoods.ts index 27b9a1a..addb152 100644 --- a/src/scenario/sections/thelostwoods.ts +++ b/src/scenario/sections/thelostwoods.ts @@ -7,7 +7,7 @@ import thumpsup from "../img/thumpsup"; export const torch = new Item() .setTake(() => { final.setDesc("FINALLY!!!\n" + - "You finally out of the forest. " + + "You're finally out of the forest. " + "You see a path back out of the forest."); return "You took the torch." }) @@ -40,7 +40,7 @@ const left2 = new Location() " You see 4 path different paths you can take: left, right, up, down."); const right1 = new Location() - .setId("Unfathomable deep in the woods") + .setId("Unfathomably deep in the woods") .setDesc("You went right. You arrive at an intersection in the forest." + " You see 4 path different paths you can take: left, right, up, down."); @@ -152,12 +152,15 @@ export function lostWoodsSection(backLocation: Location){ backAtStartLocation.link("back", backLocation); backAtStartLocation.link("intersection", backLocation); backAtStartLocation.link("to intersection", backLocation); + backAtStartLocation.link("north", backLocation); startLocation.link("back", backLocation); startLocation.link("intersection", backLocation); startLocation.link("to intersection", backLocation); + startLocation.link("north", backLocation); final.link("back", backLocation); final.link("intersection", backLocation); final.link("to intersection", backLocation); + final.link("north", backLocation); return startLocation }