Skip to content

Commit

Permalink
Fix typos and new links between locations
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-svendsen committed Aug 10, 2018
1 parent 758ab57 commit 25e2e8e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 15 deletions.
31 changes: 21 additions & 10 deletions src/scenario/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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)
Expand Down Expand Up @@ -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"
});
Expand All @@ -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)
Expand All @@ -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',
Expand Down
9 changes: 6 additions & 3 deletions src/scenario/sections/beginning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand All @@ -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 ¯\\_(ツ)_/¯")
;

Expand Down
7 changes: 5 additions & 2 deletions src/scenario/sections/thelostwoods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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."
})
Expand Down Expand Up @@ -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.");

Expand Down Expand Up @@ -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
}

0 comments on commit 25e2e8e

Please sign in to comment.