Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
Loading…
/*TAG-BASED QBN DISPLAY*/
/*<<if tags().includes("location")>> <<include [[Hunt]]>> <</if>> This will display location cards (via the Hunt passage) if you're in a place where you can Hunt*/
/*<<if tags().includes("map")>> <<include [[Map Locations]]>> <</if>> This will display map locations if you're in a place where you can Hunt*/
/*TAG usage*/
/*<<if tags().includes("forest")>>…the active passage is part of the forest…<</if>>
<<if tags("Lonely Glade").includes("forest")>>…the Lonely Glade passage is part of the forest…<</if>>
Story.lookup("tags", "forest");*/<<if tags().includes("bbar")>>
<div id="bottombar">
<div id="bbblock">
<div id="bbtext">
Background:
<<button "ice">>
<<removeclass "body" "jumper">>
<<addclass "body" "background">>
<</button>>
<<button "sweater">>
<<removeclass "body" "background">>
<<addclass "body" "jumper">>
<</button>>
<span class="specialbutton">
<<button "Add snowflakes!">>
<<toggleclass ".snowflakes" "hide">>
<</button>>
</span>
</div>
</div>
</div>
<</if>>http://www.gogamewise.com
<div id="volumeslider">Volume: <<volume>></div>
<span class="credits">[[Credits]]</span>
/*VERTICAL HEALTHBAR DISPLAY FOR STORY CAPTION
<div id="verticalhealthbarbkg" class="vertbarbkg">
<div id="verticalhealthbar" class="vertbar"></div>
</div>
<<run Health2($CurHP, $MaxHP, "verticalhealthbar", false)>>*/<strong>Design:</strong>
-Gilbert Walker
-Hannah Sunderland
<strong>Code:</strong>
Macros and other handy bits of code courtesty of:
-TheMadExile
-HiEv
-GreyElf
-Dan Cox
<strong>Styling:</strong>
-Hannah Sunderland (Aka my beautiful wife)
//A particular thanks to TheMadExile for the Sugarcube format, and Klembot for Twine in general. //
<<return "back">><<set $points to 5>>
<<set $textboxbutton to "Check!">> /*Default password button (if none is specified) */
<<set $reward to 3>>
/*STOW UI BAR*/
<<script>>UIBar.stow()<</script>>
/*HEALTH*/
<<set $MaxHP to 10>> /* Maximum Hit Points */
<<set $CurHP to 5>> /* Current Hit Points */
/*SOUNDS - DEFAULT ERROR AND VICTORY SOUND INCLUDED!*/
<<set _sound = setup.Path + "error.mp3">>
<<cacheaudio "error" _sound>>
<<set _sound = setup.Path + "victory.mp3">>
<<cacheaudio "victory" _sound>>
<<set _sound = setup.Path + "bell_xmas.mp3">>
<<cacheaudio "bell" _sound>>
<<set _sound = setup.Path + "snowball_xmas.mp3">>
<<cacheaudio "snowball" _sound>>
<<set _sound = setup.Path + "jangle_xmas.mp3">>
<<cacheaudio "jangle" _sound>>
<<set _sound = setup.Path + "unwrapmagic_xmas.mp3">>
<<cacheaudio "unwrap" _sound>>
<<set _sound = setup.Path + "whoosh_xmas.mp3">>
<<cacheaudio "whoosh" _sound>>
<<set _sound = setup.Path + "whoosh2_xmas.mp3">>
<<cacheaudio "whoosh2" _sound>>
<<set _sound = setup.Path + "hmm_xmas.mp3">>
<<cacheaudio "hmm" _sound>>
/*----------------------------------------------------------CUSTOM PASSAGES------------------------------------------------------*//*initialising variables */
<h1 style="text-align:center;">Welcome!</h1>
<div class="centerh">
<div class="flexitem" style="flex-grow: 0;">
<img src="assets/thumbnail.jpg" style="max-width: 400px; flex-grow: 0; outline: 0.5px solid grey;">
</div>
</div>
<p style= "text-align: center;">Before you begin, please enter your game code below:
<<password "happymerry" "Prompt" "Joy to the World!">>
</p>
<<set _coinflip to random(0,1)>>
<<if _coinflip is 1>>
<<gender "female">>
<<else>>
<<gender "male">>
<</if>><<arraymaker "characters">> <<set $characters to _array>> <<set $characters.shuffle()>>
<<arraymaker "adjectives">> <<set $adjectives to _array>> <<set $adjectives.shuffle()>>
<<arraymaker "locations">> <<set $locations to _array>> <<set $locations.shuffle()>>
<<arraymaker "problems">> <<set $problems to _array>> <<set $problems.shuffle()>>
<<arraymaker "items">> <<set $items to _array>> <<set $items.shuffle()>>
<<arraymaker "resolutions">> <<set $resolutions to _array>> <<set $resolutions.shuffle()>><<include [[Variables Setup]]>>
<div class="prompt" style="font-size: 5.5vmin;">
The story starts with a
<span id="adj"><<link $adjectives[0]>> <<supercycle $adjectives "#adj" "snowball">><</link>></span>
<span id="char"><<link $characters[0]>><<supercycle $characters "#char" "jangle">><</link>></span>
<span id="loc"><<link $locations[0]>> <<supercycle $locations "#loc" "whoosh">><</link>></span>
$He
<span id="prob"><<link $problems[0]>> <<supercycle $problems "#prob" "hmm">><</link>></span>
<span id="item"><<link $items[0]>> <<supercycle $items "#item" "whoosh2">><</link>></span>
to
<span id="res"><<link $resolutions[0]>> <<supercycle $resolutions "#res" "bell">><</link>></span>
</div>
<div style= "align-self: flex-start;">
<<button "Remix!">>
<<audio "jangle" volume 1 play>>
<<include [[Variables Setup]]>>
<<replace ".prompt" t8n>>
<<set _coinflip to random(0,1)>> /*set random gender */
<<if _coinflip is 1>>
<<gender "female">>
<<else>>
<<gender "male">>
<</if>>
<<include [[Remix]]>>
<</replace>>
<</button>> <br>
<span class="specialbutton black"><<button "F">><<gender "female">><<goto [[Prompt]]>><</button>></span>
<span class="specialbutton black"><<button "M">><<gender "male">><<goto [[Prompt]]>><</button>></span>
</div>
<div class="snowflakes hide" aria-hidden="true">
<div class="snowflake">
❅
</div>
<div class="snowflake">
❅
</div>
<div class="snowflake">
❆
</div>
<div class="snowflake">
❄
</div>
<div class="snowflake">
❅
</div>
<div class="snowflake">
❆
</div>
<div class="snowflake">
❄
</div>
<div class="snowflake">
❅
</div>
<div class="snowflake">
❆
</div>
<div class="snowflake">
❄
</div>
</div>The story starts with a
<span id="adj"><<link $adjectives[0]>> <<supercycle $adjectives "#adj" "bell">><</link>></span>
<span id="char"><<link $characters[0]>><<supercycle $characters "#char" "whoosh">><</link>></span>
<span id="loc"><<link $locations[0]>> <<supercycle $locations "#loc" "jangle">><</link>></span>
$He
<span id="prob"><<link $problems[0]>> <<supercycle $problems "#prob" "snowball">><</link>></span>
<span id="item"><<link $items[0]>> <<supercycle $items "#item" "whoosh2">><</link>></span>
to
<span id="res"><<link $resolutions[0]>> <<supercycle $resolutions "#res" "hmm">><</link>>.</span><<widget "supercycle">>
/*CYCLE THE LINK!*/
<<replace $args[1] t8n>> /*the span id to replace */
<<capture $args[0], $args[1], $first>>
<<set $old to $args[0].shift()>> /*Extracting the FIRST member from the array */
<<set $args[0].push($old)>> /*Appending the extracted first member^^ to the END of the array */
<<set $first to $args[0].first()>> /*look at the new FIRST member of the array */
<<link $first>> /*a link with the new first member as the link's name*/
<<supercycle $args[0] $args[1] $args[2]>> /*calling on the widget again with 0. the SAME variable array AND 1. the same span id to replace*/
<</link>>
/*REFRESH The ARRAYS if it gets below 1 MEMBER!*/
<</capture>>
<</replace>>
/*SOUND!*/
<<if $args[2]>>
<<audio $args[2] volume 1 play>> /*play the third argument of the widget OR if there is none, play a default sound */
<<else>>
<<audio "error" volume 1 play>>
<</if>>
<</widget>>totally exhausted
tricksy
ravenous
very well behaved
seriously ill-prepared
very excited
grumpy
way over-prepared
greedy
jolly
selfish
family-oriented
clumsy
lonely
forgetful
spiteful
spoilt
generous
ambitiouself
little $boy
christmas shopper
Santa impersonator
gift giver
reindeer
snowboarder
$snowman
$father of 6
Grinch
penguin
Easter Bunny
shopkeeper
backpacker
older $brother
Santastuck in the chimney.
hunting for last minute gifts on christmas eve.
lost in the mall. Suddenly all the lights go out.
stuck at work on Christmas eve.
finding the perfect gift in a shop window.
finding $his parents' gift stash in the wardrobe.
stumbling through a blizzard.
cutting $himself while trying to get a tree for christmas.
tripping while iceskating with friends.
home-alone on christmas eve. $He hears a knock at the door.
buying a cursed present in a shady market.
out caroling with friends. $His voice sounds like gravel.blows up the christmas tree by accident
can't see $his family on Christmas eve
discovers Santa is an impostor
ruins $his new present in the snow
runs out of money
is caught in an avalanche
gets a letter saying $he's lost $his job
recieves a terrible gift
is trapped by a giant snow monster
gets robbed by an elf who was fired by Santa
mistakes Santa for a thief and knocks him out
accidentally unties Santa's reindeer who fly away
is caught by an angry Grinch
eats waaaaaaaay too much gingerbread
forgets to buy $his best friend a gift
pours $his father some bad egg-nogbut uses a magic candycane
but uses the christmas ham
but dresses up as Santa
but creates a diversion
but uses an elves stocking
but befriends a reindeer
but makes a snow plough
but uses a lump of coal
but uses a giant snowball
but makes friends with an elf who helps $him
but uses some tinsel
but steals Santa's sleighcalm $his cranky grandmother
save the Christmas Turkey
make friends with a child
restore peace to a village of Elves
learn the true meaning of Christmas
get all the presents for $himself
cheer up a lonely neighbour
hide the evidence
catch an imposter Grinch
make a quick getaway
make a sacrifice to help others
make it the BEST CHRISTMAS EVER
help $his family
get what $he wants
defeat the bad guys
get a pay rise in the new year<h1>Game Setup:</h1>
In this game you need to keep your senses sharp and your wits alert!
<span style="color: red;"><-- </span> Your Detective Experience is shown by the <span style="color: red;">red bar </span>to the left.
You gain and lose XP by making inferences throughout the game. //Don't let it drop to zero! :P//
You also need to solve the mystery before the kids get back from the scavenger hunt, so time is precious!
Don't be afraid to click around on things and try stuff out. After all, a good detective gets their hands dirty!
<strong>Choose your difficulty level, and the game will begin! </strong>
<div style = "display: flex; justify-content: space-around;">
<<nobr>>
<<button "Chicken (No timer)">><<set $difficulty to "casual">><<goto [[Hunt]]>><</button>>
<<button "Novice (60 min)">><<set $difficulty to "novice">><<goto [[Hunt]]>><</button>>
<<button "Expert (45 min)">><<set $difficulty to "expert">><<goto [[Hunt]]>><</button>>
<<button "Mastermind (30 min)">><<set $difficulty to "mastermind">><<goto [[Hunt]]>><</button>>
<</nobr>>
</div>/*<<if visited() is 1>> Starting the timer on your FIRST visit only*/
<<switch $difficulty>>
<<case "casual">>
/* no timer! */
<<case "novice">>
<<script>>setup.startCountdown(60 * 60, 'time is up');<</script>>
<<case "expert">>
<<script>>setup.startCountdown(45 * 60, 'time is up');<</script>> /*45 lots of 60 seconds, include CONTENTS of the 'time is up' passage (in the "time is up" passage there's a <<goto "death">> */
<<case "mastermind">>
<<script>>setup.startCountdown(30 * 60, 'time is up');<</script>>
<<default>>
<<script>>setup.startCountdown(60 * 60, 'time is up');<</script>>
<</switch>>
/*<</if>>*/
/*Applies settings from the "Game Settings" passage*/<<goto [[death by time]]>><<set _confidence to 0>>
Your Detective XP ran out :(
Your confidence took a blow, so you spend some time reflecting on what you know so far...Maybe you can rebuild your confidence with some new ideas?
<span id="confidence">Your confidence: _confidence</span>
<<button "Think...">>
<<set _confidence++>>
<<replace "#confidence">>Your confidence: _confidence<</replace>>
<<if _confidence gte 10>>
<<replace "#confidence" t8n>>
Your confidence is restored!
<<button "Get back in the Game!">> <<set $CurHP to 5>> <<goto [[Hunt]]>> <</button>>
<</replace>>
<</if>>
<</button>>Your time ran out! :(
Your inference detective skills are not as sharp as you thought they were.
<h1>The thief has escaped & the candy is lost!
:( </h1>
<<button "Go back in time and try again">>
<<run Engine.restart()>>
<</button>>
/*-----------------------------------------------------------------WIDGETS---------------------------------------------------------------- */<<widget "password">> /*The name of the widget */
<<set _password to $args[0]>> /*setting the textbox password */
<<set _forwardingpassage to $args[1]>> /*setting the forwarding passage */
<<if $args[2]>>
<<set _buttonlabel to $args[2]>>/*setting the label for the textbox check button. If Designer hasn't included a button label it willfault to "Check!" */
<<else>>
<<set _buttonlabel to "Check!">>
<</if>>
<span id="answerfeedback"></span><br>
<<textbox "_code" "" autofocus>>
<<button _buttonlabel>>
<<set _code to _code.toLowerCase()>>
<<if _code.indexOf(_password) > -1>> /*checks code against the password set by the widget argument. If password is "brain" any instance of it will work, ie "brained" or "the brain" or "xyzsbrain"*/
<<goto _forwardingpassage>>
<<else>>
<<replace "#answerfeedback">>Hmm that doesn't look right...try again?<</replace>>
<</if>>
<</button>>
<</widget>>
/*USAGE: <<password "The Password" "Forwarding Passage" "Button Label">> "The Password", the second is the passage to forward to if the password is correct *//*WIDGET CONSTRUCTING Array FROM PASSAGE*/
<<widget "arraymaker">> /*the name of the widget*/
/*Get the contents of a variable passage - that is specified in the twine passage. For example, <<arraymaker "somepassage">> would run this widget and turn the contents of "somepassage" into an Array*/
<<set _passageContents to Story.get($args[0])>> /*full argument string in raw and parsed forms—accessed via the $args.raw and $args.full*/
/*Turn the contents into text*/
<<set _passageText to _passageContents.text>>
/*Turn the text into an Array (split here by ENTERS)*/
<<set _array to _passageText.split("\n")>>
<</widget>>
/*
SAMPLE USAGE- the first word is calling on the widget, the second word or number etc. is the argument ie "$args[0]" that you're passing to the widget - this can be a value or a variable etc.
<<set _q to "8x tables">> //setting question passage
<<arraymaker _q>> //Running the arraymaker widget for _q, which means it grabs all content in the passage "8x tables" and turns it into an Array
*/<<widget "gender">> /*the name of the widget*/
<<if $args[0] is "male">>
<<set $he to "he">>
<<set $him to "him">>
<<set $his to "his">>
<<set $himself to "himself">>
<<set $He to "He">>
<<set $Him to "Him">>
<<set $His to "His">>
<<set $Himself to "Himself">>
<<set $son to "daughter">>
<<set $witch to "witch">>
<<set $wife to "wife">>
<<set $wizard to "wizard">>
<<set $prince to "prince">>
<<set $boy to "boy">>
<<set $brother to "brother">>
<<set $father to "father">>
<<set $snowman to "snowman">>
<<else>>
<<set $he to "she">>
<<set $him to "her">>
<<set $his to "her">>
<<set $himself to "herself">>
<<set $He to "She">>
<<set $Him to "Her">>
<<set $His to "Her">>
<<set $Himself to "Herself">>
<<set $son to "son">>
<<set $witch to "wizard">>
<<set $wife to "husband">>
<<set $wizard to "witch">>
<<set $prince to "princess">>
<<set $boy to "girl">>
<<set $brother to "sister">>
<<set $father to "mother">>
<<set $snowman to "snow-woman">>
<</if>>
<</widget>>/* widget fuction that adds or subtracts health, plays appropriate sound and sends you to the death passage if you're dead!*/
<<widget "CurHP">>
/*LOSE HEALTH */
<<set $CurHP to $CurHP + $args[0]>> /*Gain or lose as much HP as the widget argument[0] */
/*AUDIO */
<<if $args[0] gt 0>> /*GAIN HP, so play victory sound */
<<audio "victory" volume 0.5 play>>
<<audio "victory" fadeoverto 1 0>>
<<timed 1s>> <<audio "victory" stop>> <</timed>>
<<else>> /*no gain of HP, so play error sound */
<<audio "error" volume 0.5 play>>
<<audio "error" fadeoverto 1.5 0>>
<</if>>
/*GAME-BASED STUFF */
<<if $CurHP lte 0>> /*IF HP loss dropped player below 0 send them to the death passage! */
<<timed 1.5s>>
<<audio "error" stop>>
<<goto [[death]]>>
<</timed>>
<</if>>
<<if $CurHP gte $MaxHP>> /*IF that gain put player OVER max HP, set HP to Max HP*/
<<set $CurHP to $MaxHP>>
<</if>>
/*UPDATE HEALTHBAR! */
<<run Health2($CurHP, $MaxHP, "verticalhealthbar", false)>>
<</widget>>