<<if $sugar gt 60 and not $dream_cave>><<set $dream_cave = true>><<set $dream_return = 'mines'>><<display 'next dream'>><<else>><<if $level gt 2>><<if not $beat_spider>><<display 'cave_spider'>><<else>><<display 'cave_free'>><<endif>><<else>>The cave looks dark and scary and you hear someone screaming for help from within. You are too cowardly to enter - come back when you are stronger.\n\n<<display 'woods'>><<endif>><<endif>>
<html><img width="256" src="dream2b.png"></html>\n\n<span class="wavy">A taste of blood.\n\n[[spit]]</span>\n
<html><img width="256" src="dream7c.png"></html>\n\n<span class="wavy">Voices on the edge of\n\n[[wake up]]</span>\n
<<set $sugar = $sugar+2>><<set $damage = $damage+1*$sensitivity>><<set $poppings = $poppings-1>><<set $mouth = 1>>You eat some popping candy. Fizz, pop, devils in your mouth! Damage increased to <<print $damage>>.\n\n<<display 'hax'>>
.passage {\n\ttransition: 0.8s linear;\n\t-webkit-transition: 0.8s linear;\n}\n.transition-in {\n\tposition:absolute;\n\topacity:0;\n}\n.transition-out {\n\tposition:absolute;\n\topacity:0;\n}\n
<<display 'time passes'>><<set $money = $money+3>>The chaos oracle collapses. In its pockets you find three candollars!\n\nKeep exploring the [[dungeon]].\nReturn to [[mystic convergence]].
<<if $sugar gt 120 and not $dream_home>><<set $dream_home = true>><<set $dream_return = 'home'>><<display 'next dream'>><<else>><<if $beat_warlord and not $gift_reward>>You find a package for you - a gift of thanks from the villagers! Opening it you find a jelly, two candollars, and three lollipops.<<set $gift_reward = true>><<set $jellies = $jellies+1>><<set $money = $money+2>><<set $lollipops = $lollipops+3>><br><br><<endif>>You are in your chocolate shop.\n\n<<display 'list_inventory'>>\n\n<<if $puzzle_box>>Examine the [[puzzle box|puzzle0]].<html><br></html><<endif>><<if $radioactive gt 0>>Forge [[chocolate bar|rad to chocolate]] from radioactive chocolate ore.<html><br></html><<endif>><<if $bars gt 0 and $lollipops gt 0>>Combine chocolate bar and lollipop into [[chocolate truffle|make truffle]].<html><br></html><<endif>>Return to the [[village]].<<endif>>
<<set $unlocked_dungeon = true>><<set $doom = $doom+1>>You unlock the dungeon.\n\n<<display 'mystic convergence'>>
You are trying to solve the puzzle box.\n\n<<display 'puzzle2'>>
<<if $level gt 1>><<if not $beat_troll>><<display 'woods_troll'>><<else>><<display 'woods_free'>><<endif>><<else>>Twizzle the town guard stops you. "You're not strong enough to deal with the wood creatures yet! Why not go take a lesson at the candy school?"\n\n<<display 'village'>><<endif>>
<html><img width="256" src="last_percent_of_doom.png"></html>\n\n<span class="wavy">[[wake up|dream8e]]</span>\n
<<loopsound $snd1>><html><img width="256" src="dream8a.png"></html>\n\n<span class="wavy">Aches all\n\n[[wake up|dream8b]]</span>
<<loopsound $snd0>><html><img width="256" src="dream5a.png"></html>\n\n<span class="wavy">shadow looming over you, pressing\n\n[[resist]]</span>\n
<<loopsound $snd1>><html><img width="256" src="dream4a.png"></html>\n\n<span class="wavy">Something buzzing, vibrating.\n\n[[listen]]</span>
<<loopsound $snd0>><html><img width="256" src="dream7a.png"></html>\n\n<span class="wavy">from every orifice\n\n[[gush]]</span>\n
<<loopsound $snd2>><html><img width="256" src="dream6a.png"></html>\n\n<span class="wavy">pressure building\n\n[[squat]]</span>
<<loopsound $snd0>><html><img width="256" src="dream1a.png"></html>\n\n<span class="wavy">A sudden faintness.\n\n[[stumble]]</span>
<<set $doom = $doom+7>><<set $truffles = $truffles+3>><<set $beat_warlord = true>><<display 'time passes'>>The warlord collapses and his stolen haul falls to the ground. As you approach to collect 3 chocolate truffles you hear him whisper "the doom boss will meet you on the dungeon mountain.."\n\n<<display 'village'>>
<<loopsound $snd2>><html><img width="256" src="dream3a.png"></html>\n\n<span class="wavy">Feeling parched.\n\n[[drink]]</span>
<<set $temp=$gems[1]>><<set $gems[1] = $gems[3]>><<set $gems[3] = $gems[7]>><<set $gems[7] = $gems[5]>><<set $gems[5] = $temp>><<display 'puzzle1'>>
<<set $sugar = $sugar+5>><<if $sensitivity lt 3>><<set $sensitivity = 3>><<endif>><<set $bitters = $bitters-1>>You quaff the green potion.\n\n<<display 'hax'>>
<<set $lesson = $lesson+1>><<display 'time passes'>>
<<set $sugar = $sugar+3>><<set $attacks = $attacks+3*$sensitivity>><<set $truffles = $truffles-1>><<set $mouth = 1>>You savour an exquisite chocolate truffle.\n\n<<display 'hax'>>
<<set $enemy_name = "Frog">><<set $enemy_hp = 7>><<set $enemy_damage = 1>><<set $enemy_passage = "A monstrous desert frog opposes you.">><<set $enemy_defeat = 'desert_free'>><<set $enemy_attack = 0>><<set $enemy_retreat = 'mystic convergence'>>As you enter the desert, you hear an enormous hop. Turning, you see a menacing frog!\n\n<<display 'hax'>>
<html><span style="color:cyan;font-size:3.0em;font-weight: bold;">O</span></html>
<html><span style="color:orange;font-size:3.0em;font-weight: bold;">O</span></html>
<<set $level = $level+1>>Congratulations! You are now a level <<print $level>> <<print $class>>.\n\n<<display 'village'>>
<html><span style="color:magenta;font-size:3.0em;font-weight: bold;">O</span></html>
<<print $enemy_passage>>\nIt has <<print $enemy_hp>> hp and <<if $enemy_attack eq 0>>can do <<$enemy_damage>> damage<<if $armour>>, but your armour reduces that to <<print $enemy_damage-1>><<endif>><<else>>can steal <<$enemy_damage>> candollars<<endif>>.\n\n<<display 'inventory'>>
<<set $made_shop = true>><<set $doom = $doom+1>><<display 'time passes'>>You bind together the chocolatey earth and forge it into a towering shop of chocolate.\n\n<<display 'chocolate shop'>>
<<stopallsound>><<display $dream_return>>
Candy Quest 3: Edge of Sweetness
<<if $armour>>"Be on your way - there's doom to avert!"<<else>><<set $talked_glabro = true>>Glabro says "Bring me a dozen lollipops and I'll weave you something to fit".<<endif>>\n\n<<display 'junkyard_free'>>
<<display 'time passes'>><<set $cupcakes = $cupcakes+1>>The shark drowns, leaving only a single cupcake in its wake.\n\nKeep exploring the [[dungeon]].\nReturn to [[mystic convergence]].
<<set $enemy_name = "Spider">><<set $enemy_hp = 4>><<set $enemy_damage = 1>><<set $enemy_passage = "You are fighting a terrifying spider.">><<set $enemy_defeat = 'cave_free'>><<set $enemy_attack = 0>><<set $enemy_retreat = 'woods'>>As you enter the cave a spider leaps upon you!\n\n<<display 'hax'>>
<<if $laboratory eq 0>><<display 'laboratory3'>><<elseif $laboratory eq 1>><<display 'laboratory4'>><<elseif $laboratory eq 2>><<display 'laboratory5'>><<else>>You don't find anything new.\n\n[[Escape|desert]] into the desert.<<endif>><<set $laboratory = $laboratory+1>>
<<set $enemy_name = "Sand Mite">><<set $enemy_hp = 2>><<set $enemy_damage = 1>><<set $enemy_passage = "You are fighting a tiny sand mite.">><<set $enemy_defeat = 'laboratory3_done'>><<set $enemy_attack = 0>><<set $enemy_retreat = 0>>As you are searching, a sand-mite hops in!\n\n<<display 'hax'>>
<<set $bitcoins = $bitcoins+1>>Searching through the objects you find a bitcoin! This is bound to be useful.\n\n<<set $enemy_name = "Haunted Grasshopper">><<set $enemy_hp = 4>><<set $enemy_damage = 2>><<set $enemy_passage = "You are fighting a terrifying haunted grasshopper.">><<set $enemy_defeat = 'laboratory4_done'>><<set $enemy_attack = 0>><<set $enemy_retreat = 0>>Suddenly, a haunted grasshopper hops into the room!\n\n<<display 'hax'>>
<<set $enemy_name = "Kangaroo">><<set $enemy_hp = 13>><<set $enemy_damage = 2>><<set $enemy_passage = "You are fighting a vicious dire kangaroo.">><<set $enemy_defeat = 'laboratory5_done'>><<set $enemy_attack = 0>><<set $puzzle_box = true>><<set $enemy_retreat = 0>>You find a fascinating puzzle box. But before you can examine it, of course there is another hopping creature. Maybe you should take it somewhere quieter?\n\n<<display 'hax'>>
<<set $sugar = $sugar+3>><<set $shield = $shield+2*$sensitivity>><<set $damage = $damage+2*$sensitivity>><<set $cupcakes = $cupcakes-1>><<set $mouth = 1>>You devour a delicious cupcake.\n\n<<display 'hax'>>
"Hello again" says Jolly, "today we will be learning about fizzy candy!".\n\n"Fizzy candy is inhabited by microscopic demons which are released when it is eaten. You will feel them jumping up and down on your tongue! Consuming their essence makes your attacks more powerful, but only for a limited time. Fizzy candy is very expensive to produce because of the difficulty of binding the demons, but thanks to our sponsors we have some free samples for you here today - all hail the Candy King!"\n\n<<replace "take popping candy (+1 fizzy damage) {3}">><<set $poppings = $poppings+3>>You carefully put the popping candy in your candy pouch.\n\nGo back to the [[village|Levelup]].<<endreplace>>
"Welcome to my class" says Jolly, "today we will be learning about sugary candy!".\n\n"There are four basic flavours, each affecting a different part of your tongue and a different combat stat. The most fundamental flavour is <i>sugary</i>, and almost all candy possesses it in some measure! Eating sugary candy contributes to your <i>sugar shield</i> which is essential to absorb combat damage, but if you have too much you will harm your teeth - reducing your ability to eat candy at all!"\n\n<<replace "eat gobstopper (+9 sugar shield)">><<set $shield = $shield+9>><<set $sugar = $sugar+10>><<set $mouth = 2>>You eat a gobstopper. Sugar shield at <<print $shield>>.\n\n"Gobstoppers are a very long-lasting form of pure sugary candy. Here are two more - use them to endure difficult quests!"<<set $gobstoppers = $gobstoppers+2>>\n\nGo back to the [[village|Levelup]].<<endreplace>>
<<set $enemy_name = "Goblin">><<set $enemy_hp = 6>><<set $enemy_damage = 2>><<set $enemy_passage = "You are fighting a sinister goblin.">><<set $enemy_defeat = 'mine_free'>><<set $enemy_attack = 0>><<set $enemy_retreat = 'cave'>>As you descend into the mines you encounter a goblin.\n\n<<display 'hax'>>
<<set $sugar = $sugar+5>><<set $attacks = $attacks+5*$sensitivity>><<set $shield = $shield+3*$sensitivity>><<set $cocoas = $cocoas-1>>You swallow the thick brown potion.\n\n<<display 'hax'>>
"Today's lesson will be your last," says Jolly, "for the fourth and final flavour you need to know about is <i>sour</i>".\n\n"Sour foods are unpleasant to eat, but they make your tongue more sensitive to savour delicious treats! If you can find any sour lollies, eat them to increase your appetite for everything else. However they are exceedingly rare and we do not have any specimens here today. Good luck averting doom!"\n\nGo back to the [[village|Levelup]].<<endreplace>>
"Welcome back to my class" says Jolly, "today's lesson is everyone's favourite - chocolate!".\n\n"Chocolate is a magical radioactive mineral found deep underground. It empowers whoever eats it to make them attack faster and faster! It has positive effects also on your happiness and well-being and there is no reason not to eat as much as you can get your hands on. Admittedly the effects do wear off over time, but that just gives an excuse to eat even more chocolate! I expect you'll be eating a lot of chocolate so we'll start you off with an ample supply."\n\n<<replace "take chocolate bar (+1 delicious attack, +1 sugar shield) {5}">><<set $bars = $bars+5>>You grab all of the chocolate. All of it.\n\nGo back to the [[village|Levelup]].<<endreplace>>
<<set $jellies = $jellies+1>><<set $doom = $doom+13>><<display 'time passes'>><<set $enemy_name = "hitler">><<set $enemy_hp = 88>><<set $enemy_damage = 8>><<set $enemy_passage = "You are fighting a hitler.">><<set $enemy_defeat = 'hell gauntlet 4'>><<set $enemy_attack = 0>><<set $enemy_retreat = 0>>The beast bursts. Doom is <<print $doom>>% averted. You find a jelly.\n\nA hitler attacks!\n\n<<display 'hax'>>
<<set $enemy_name = "Elf">><<set $enemy_hp = 10>><<set $enemy_damage = 3>><<set $enemy_passage = "You are fighting a frigid elf warrior.">><<set $enemy_defeat = 'grotto_free'>><<set $enemy_attack = 0>><<set $enemy_retreat = 'ice zone'>>An ice-elf ambushes you! It is strong.\n\n<<display 'hax'>>
<<set $rocks = $rocks+1>>You pull up a chunk of rock candy!\nYou have <<print $rocks>> pieces of rock candy.\n\n<<display 'mine_free'>>
<<set $sugar = $sugar+1>><<set $shield = $shield-23>><<set $enemy_hp = $enemy_hp-34>><<set $enemy_damage = $enemy_damage-1>>Sweetness expands around you, filling all available space and weakening your foes.\n\n<<if $enemy_hp gt 0>><<display 'hax'>><<else>><<display $enemy_defeat>><<endif>>
<<display 'time passes'>><<if $shield lte 30>><<set $shield = 30>><<endif>><<set $sugar = $sugar + 5>>You immerse yourself in a thick syrup of sugar essence. You feel very sweet.\n\n<<display 'tower'>>
You open up the puzzle box. It is filled with colourful candy gemstones.\n\n<<display 'puzzle2'>>
You exchange currency for a sour lolly.<<set $money = $money-6>><<set $sours = $sours+1>>\n\n<<display 'general store'>>
<html><img width="256" src="dream7b.png"></html>\n\n<span class="wavy">fleshworms crawl.\n\n[[scratch]]</span>\n
<<set $enemy_hp = $enemy_hp-$damage>>You hit the <<print $enemy_name>> for <<print $damage>> damage!<<set $i = $i + 1>><<if $i lt $attacks>><html><br></html><<display 'attack_loop'>><<endif>>
<<set $dream_count = $dream_count+1>><<if $dream_count eq 1>><<display 'dream1'>><<elseif $dream_count eq 2>><<display 'dream2'>><<elseif $dream_count eq 3>><<display 'dream3'>><<elseif $dream_count eq 4>><<display 'dream4'>><<elseif $dream_count eq 5>><<display 'dream5'>><<elseif $dream_count eq 6>><<display 'dream6'>><<elseif $dream_count eq 7>><<display 'dream7'>><<else>><<display 'dream8'>><<endif>>
<<if $sugar gt 120 and not $dream_home>><<set $dream_home = true>><<set $dream_return = 'home'>><<display 'next dream'>><<else>><<if $beat_warlord and not $gift_reward>>You find a package for you - a gift of thanks from the villagers! Opening it you find a jelly, two candollars, and three lollipops.<<set $gift_reward = true>><<set $jellies = $jellies+1>><<set $money = $money+2>><<set $lollipops = $lollipops+3>><br><br><<endif>>You are in your sugar tower.\n\nYour sugar shield is at <<print $shield>>. You may [[bathe in the treacle pools]].\n\n<<if $puzzle_box>>Examine the [[puzzle box|puzzle0]].<html><br></html><<endif>>Return to the [[mountain]].<<endif>>
You make a deal for some popping candy.<<set $money = $money-5>><<set $poppings = $poppings+1>>\n\n<<display 'general store'>>
<<set $made_shop = true>><<set $doom = $doom+1>><<display 'time passes'>>You start up your oven and spend the day baking planks of bread and piling them up. Before long you have a gingerbread house of your own.\n\n<<display 'gingerbread cottage'>>
<<if $doom gte 99 and not $dream_lab>><<set $dream_lab = true>><<set $dream_return = 'desert laboratory'>><<display 'next dream'>><<else>>The flimsy laboratory shack is constantly beset by the hopping creatures of the desert sector! You feel a sense of frantic action terror!\n\n[[Search|laboratory2]] the laboratory.\n[[Escape|desert]] into the desert.<<endif>>
<<if $gems[0] eq $gems[1] and $gems[0] eq $gems[2] and $gems[0] eq $gems[3] and $gems[0] eq $gems[4] and $gems[0] eq $gems[5] and $gems[0] eq $gems[6] and $gems[0] eq $gems[7] and $gems[0] eq $gems[8]>><<display $gem_col[$gems[0]]>> <<display $gem_col[$gems[0]]>> <<display $gem_col[$gems[0]]>>\n<<display $gem_col[$gems[0]]>> <<display $gem_col[$gems[0]]>> <<display $gem_col[$gems[0]]>>\n<<display $gem_col[$gems[0]]>> <<display $gem_col[$gems[0]]>> <<display $gem_col[$gems[0]]>>\n\nAll the gems slide into place. The box bursts open, revealing a dungeon key!<<set $dungeon_key = true>><<set $puzzle_box = false>><<set $doom = $doom+1>>\n\n<<display 'home'>><<else>><<set $temp = $gem_col[$gems[0]]>>[[<<display $temp>>|switch0]] <<set $temp = $gem_col[$gems[1]]>>[[<<display $temp>>|switch1]] <<set $temp = $gem_col[$gems[2]]>>[[<<display $temp>>|switch2]]\n<<set $temp = $gem_col[$gems[3]]>>[[<<display $temp>>|switch3]] <<set $temp = $gem_col[$gems[4]]>>[[<<display $temp>>|switch4]] <<set $temp = $gem_col[$gems[5]]>>[[<<display $temp>>|switch5]]\n<<set $temp = $gem_col[$gems[6]]>>[[<<display $temp>>|switch6]] <<set $temp = $gem_col[$gems[7]]>>[[<<display $temp>>|switch7]] <<set $temp = $gem_col[$gems[8]]>>[[<<display $temp>>|switch8]]\n\n[[Close the box.|home]]<<endif>>
<<display 'time passes'>><<set $radioactive = $radioactive-1>><<set $dice = (Math.floor(Math.random()*4))+1>><<set $bars = $bars+$dice>>You hammer away at the chunk of ore, and eventually it yields <<print $dice>> bars of pure chocolate.\n\n<<display 'chocolate shop'>>
<<set $enemy_name = "<span class='wavy'>shadow</span>">><<set $enemy_hp = $shield>><<set $enemy_damage = $damage>><<set $enemy_passage = "<span class='wavy'>You are fighting a shadow.</span>">><<set $enemy_defeat = 'beat_shadow'>><<set $enemy_attack = 0>><<set $enemy_retreat = 0>><span class="wavy">You try to grab the shadow.</span>\n\n<<display 'hax'>>
<<if $shield gte 7>>cast [[sugar ray]] (<b>7:</b> deal 11 damage and gain 1 attack)<br><<endif>><<if $shield gte 23 and $enemy_damage gt 0>>cast [[sugar orb]] (<b>23:</b> deal 34 damage and remove 1 damage from enemy)<br><<endif>><<if $shield gte 37>>cast [[sugar vortex]] (<b>37:</b> deal 51 damage and gain a random potion)<br><<endif>>
<<if $class eq "Sucromancer">><<display 'tower'>><<elseif $class eq "Chocolatier">><<display 'chocolate shop'>><<else>><<display 'gingerbread cottage'>><<endif>>
<html><img width="256" src="dream8d.png"></html>\n\n<span class="wavy">flesh drips,';, cry, helpless.\n\n[[wake up|dream8e]]</span>\n
The kangaroo explodes into a fiery explosion of kangaroo innards. Mysterious! But it is still too distracting here to examine the puzzle box, what with all the hopping. Take it somewhere more private.<<set $doom = $doom+2>><<display 'time passes'>>\n\n[[Keep searching|laboratory2]].\n[[Escape|desert]] into the desert.
<html><img width="256" src="dream8b.png"></html>\n\n<span class="wavy">swelling tongue.\n\n[[wake up|dream8c]]</span>\n
<html><img width="256" src="dream8c.png"></html>\n\n<span class="wavy">more teeth. Black\n\n[[wake up|dream8d]]</span>
<<if ($sugar gt 140 or $doom gte 99) and not $dream_dungeon>><<set $dream_dungeon = true>><<set $dream_return = 'dungeon'>><<display 'next dream'>><<else>><<set $dice = (Math.floor(Math.random()*7))+1>><<if $dice eq $last_dungeon>><<display 'dungeon'>><<else>><<set $last_dungeon = $dice>><<if $dice eq 1>><<display 'dungeon1'>><<elseif $dice eq 2>><<display 'dungeon2'>><<elseif $dice eq 3>><<display 'dungeon3'>><<elseif $dice eq 4>><<display 'dungeon4'>><<elseif $dice eq 5>><<display 'dungeon5'>><<elseif $dice eq 6>><<display 'dungeon6'>><<elseif $dice eq 7>><<display 'dungeon mountain'>><<endif>><<endif>><<endif>>
<<set $enemy_name = "Troll">><<set $enemy_hp = 3>><<set $enemy_damage = 1>><<set $enemy_passage = "You are fighting a horrible troll.">><<set $enemy_defeat = 'woods_free'>><<set $enemy_attack = 0>><<set $enemy_retreat = 'village'>>The woods are menaced by a horrible troll!\n\n<<display 'hax'>>
<<if $level gt 3>><<if not $beat_goblin>><<display 'mine_goblin'>><<else>><<display 'mine_free'>><<endif>><<else>>The mines look even scarier than the cave, and dangerous too! Come back when you are less timid!\n\n<<display 'cave'>><<endif>>
<<if $sugar gt 30 and not $dream_mystic>><<set $dream_mystic = true>><<set $dream_return = 'mystic convergence'>><<display 'next dream'>><<else>>A tangled nexus from which many paths lead. There is a highway here. There is a dungeon here<<if not $unlocked_dungeon>>, but it is locked<<else>>, which you have unlocked<<endif>>. There is the entrance to an ice zone here. There is a path to desert here.\n\nReturn along the [[highway]].<<if $unlocked_dungeon>><br>Enter the [[dungeon]].<<else>><<if $dungeon_key>><br>Unlock [[dungeon|dungeon_key]].<<endif>><<endif>>\nEnter the [[ice zone]].\nEnter the [[desert]].<<endif>>
<<set $enemy_name = "Giant">><<set $enemy_hp = 5>><<set $enemy_damage = 2>><<set $enemy_passage = "You are fighting an enormous giant.">><<set $enemy_defeat = 'mountain_free'>><<set $enemy_attack = 0>><<set $enemy_retreat = 'village'>>You begin to climb the mountain. An enormous giant blocks the way up!\n\n<<display 'hax'>>
<<set $beat_capitalist = true>><<set $doom = $doom+8>><<display 'time passes'>>The Capitalist vanishes in a puff of smoke.\n\n<<display 'junkyard'>>
<<set $lollipops = $lollipops-2>><<set $poppings = $poppings-1>><<set $aspartames = $aspartames+1>><<display 'time passes'>>You mix a sickly sweet pink potion.\n\n<<display hell mountain>>
<<set $bars = $bars-2>><<set $truffles = $truffles-1>><<set $cocoas = $cocoas+1>><<display 'time passes'>>You stew a rich brown potion.\n\n<<display hell mountain>>
<<set $sours = $sours-2>><<set $flosses = $flosses-1>><<set $bitters = $bitters+1>><<display 'time passes'>>You brew a bitter green potion.\n\n<<display hell mountain>>
<span class="wavy">The shadow collapses.\n\n[[examine|beat_shadow2]]</span>
<<set $doom = 0>><<set $level = 0>><<set $shield = 0>><<set $lesson = 2>><<set $gobstoppers = 0>><<set $poppings = 0>><<set $damage = 1>><<set $mouth = 0>><<set $sours = 0>><<set $sensitivity = 1>><<set $flosses = 0>><<set $bars = 0>><<set $lollipops = 0>><<set $attacks = 1>><<set $candy_mined = 0>><<set $chocolate_mined = 0>><<set $rocks = 0>><<set $radioactive = 0>><<set $laboratory = 0>><<set $bitters = 0>><<set $cocoas = 0>><<set $aspartames = 0>><<set $bitcoins = 0>><<set $cupcakes = 0>><<set $truffles = 0>><<set $gem_col = ['gem_0','gem_1','gem_2']>><<set $gems = [0,1,2,1,2,0,2,0,1]>><<set $last_dungeon = -1>><<set $miss_attack = 0>><<set $sugar = 0>><<set $dream_count = 0>><<set $snd0 = "dream0.mp3">><<set $snd1 = "dream1.mp3">><<set $snd2 = "dream2.mp3">>First choose a character class.\n\n[[Chocolatier]]\nSkilled in mining chocolate, refining it to utmost purity, and sculpting the finest treats in the land.\n\n[[Lollipop Witch]]\nBest known for her role in the capture of the rogues Hansel and Gretel, she bakes delicious cupcakes and sucks on many a lollipop.\n\n[[Sucromancer]]\nA powerful wizard capable of calling forth sweetness from the bitterest substance.
<<if $doom gte 99 and not $dream_highway>><<set $dream_highway = true>><<set $dream_return = 'highway'>><<display 'next dream'>><<else>><<if $level gt 4>><<if not $beat_thief and $money gt 0>><<display 'highway_thief'>><<else>><<display 'highway_free'>><<endif>><<else>>The highway is too dangerous to travel on, there may be highwaymen living there! You go back into the woods.\n\n<<display 'woods'>><<endif>><<endif>>
<<set $visited_dungeon = true>><<set $last_dungeon = 7>><<if $beat_warlord and not $beat_doom>><<set $enemy_name = "Doom Boss">><<set $enemy_hp = 999>><<set $enemy_damage = 10>><<set $enemy_passage = "You are fighting the doom boss.">><<set $enemy_defeat = 'doom_boss'>><<set $enemy_attack = 0>><<set $enemy_retreat = 'dungeon'>>As you reach the peak of the dungeon mountain, the doom boss appears.\n\n<<display 'hax'>><<else>>In the centre of the dungeon there is a mountain, reaching far above those shadowed depths of torment.\n\nFrom its peak you can see only darkness.\n\nDescend back into the [[dungeon]].<<if $portal3>><html><br></html>Enter the portal to the [[ice mountain]].<<if $portal1>><html><br></html>Enter the portal to the [[village mountain|mountain]].<<endif>><<if $portal4>><html><br></html>Enter the portal to the [[trash mountain]].<<endif>><<if $portal5>><html><br></html>Enter the portal to the [[hell mountain]].<<endif>><<endif>><<endif>>
<<if $sugar gt 50 and not $dream_hell>><<set $dream_hell = true>><<set $dream_return = 'hell zone'>><<display 'next dream'>><<else>>You stand at the entrance of the HELL ZONE.\n\nThis is where the most doom will be found.\n\n<<if $gauntlet_complete>>Climb the [[hell mountain]].<<else>>Fight through the [[hell gauntlet]].<<endif>>\nReturn through the portal to [[ice zone]].<<endif>>
<<if $sugar gt 120 and not $dream_home>><<set $dream_home = true>><<set $dream_return = 'home'>><<display 'next dream'>><<else>><<if $beat_warlord and not $gift_reward>>You find a package for you - a gift of thanks from the villagers! Opening it you find a jelly, two candollars, and three lollipops.<<set $gift_reward = true>><<set $jellies = $jellies+1>><<set $money = $money+2>><<set $lollipops = $lollipops+3>><br><br><<endif>>You're in your gingerbread cottage.\n\n<<display 'list_inventory'>>\n\n<<if $puzzle_box>>Examine the [[puzzle box|puzzle0]].<html><br></html><<endif>><<if $rocks gt 0 and $flosses gt 0>>Bake 1 rock candy and 1 candy floss into [[gobstopper|bake1]].<html><br></html><<endif>><<if $rocks gt 0 and $poppings gt 0>>Bake 1 rock candy and 1 popping candy into [[cupcake|bake2]].<html><br></html><<endif>>Return to the [[woods]].<<endif>>
<<set $doom = $doom+13>><<set $money = $money+13>><<display 'time passes'>><<set $gauntlet_complete = true>>The hitler collapses. Doom is <<print $doom>>% averted. You find $13.\n\n<<display 'hell mountain'>>
<<set $cupcakes = $cupcakes+1>><<set $doom = $doom+6>><<display 'time passes'>><<set $enemy_name = "beast">><<set $enemy_hp = 66>><<set $enemy_damage = 6>><<set $enemy_passage = "You are fighting a beast.">><<set $enemy_defeat = 'hell gauntlet 3'>><<set $enemy_attack = 0>><<set $enemy_retreat = 0>><<set $enemy_retreat = 0>>The imp dissipates. Doom is <<print $doom>>% averted. You find a cupcake.\n\nA fearsome beast jumps out of the hell!\n\n<<display 'hax'>>
You have entered the ice zone. This is symbolic of the difficulties the hero must overcome to complete their quest, and it resembles a ruined version of their home village in deep winter. It is also a literal difficulty which must be overcome. There is much doom here.<<if (Math.floor(Math.random()*2)) eq 0>><html><br><br></html>It is snowing.<<endif>>\n\nTo the far south you see an ice mountain, past a dangerous ice grotto. <<if $battle_arena>>You can see your battle arena from here.<<else>>In another direction there is ice robot battle arena factory.<<endif>>\n\nGo south through the [[ice grotto]].\n<<if $battle_arena>>Enter the [[ice robot battle arena]].<<else>>Go another direction to the [[ice robot battle arena factory]].<<endif>>
<<set $beat_thief = true>><<set $doom = $doom+1>><<display 'time passes'>>The thief suddenly vanishes.\n\n<<display 'highway_free'>>
<<set $visited_hell = true>>You stand at the peak of the hell mountain, adorned with darkblossoms. There is a diabolical cauldron here, which you can use to mix potions!\n\n<<display 'list_inventory'>>\n\n<<if $lollipops gt 1 and $poppings gt 0>>Mix 2 lollipops and 1 popping candy into [[aspartame potion|potion1]].<html><br></html><<endif>><<if $bars gt 1 and $truffles gt 0>>Mix 2 chocolate bars and 1 chocolate truffle into [[cocoa potion|potion2]].<html><br></html><<endif>><<if $sours gt 1 and $flosses gt 0>>Mix 2 sour lollies and 1 candy floss into [[bitter potion|potion3]].<html><br></html><<endif>>Return to the entrance of the [[hell zone]].<<if $portal5>><html><br></html>Enter the portal to the [[ice mountain]].<<if $portal1>><html><br></html>Enter the portal to the [[village mountain|mountain]].<<endif>><<if $portal3>><html><br></html>Enter the portal to the [[dungeon mountain]].<<endif>><<if $portal4>><html><br></html>Enter the portal to the [[trash mountain]].<<endif>><<endif>>
<<set $shield = $shield+3*$sensitivity>><<set $sugar = $sugar+7>><<set $lollipops = $lollipops-1>><<set $mouth = 1>>You suck a lollipop. Sugar shield increased to <<print $shield>>.\n\n<<display 'hax'>>
<<set $enemy_name = "Capitalist">><<set $enemy_hp = 10>><<set $enemy_damage = 3>><<set $enemy_passage = "You are fighting a junkyard Capitalist.">><<set $enemy_defeat = 'beat_capitalist'>><<set $enemy_attack = 1>><<set $enemy_retreat = 0>>As you climb out of the trash burrow you encounter an enormous Capitalist - it was their home!\n\n<<display 'hax'>>
<<if not $beat_robot>><<set $beat_robot = true>><<set $doom = $doom+11>><<set $money = $money+30>><<set $cupcakes = $cupcakes+1>><<display 'time passes'>>As you shatter the robot its glowing core opens up revealing a portal to Hell. You also collect 30 candollars and a prize cupcake.<html><br><br></html><<endif>>You are in the ICE ROBOT BATTLE ARENA, now empty for its purpose is fulfilled. There is a portal to Hell here.\n\nGo to [[hell zone]].\nReturn to [[ice zone]].
<<set $temp=$gems[8]>><<set $gems[8] = $gems[5]>><<set $gems[5] = $gems[4]>><<set $gems[4] = $gems[7]>><<set $gems[7] = $temp>><<display 'puzzle1'>>
<<if $bars gt 0>>transmute chocolate bar into [[1 lollipop|transmute1]]<html><br></html><<endif>><<if $poppings gt 0>>transmute popping candy into [[2 lollipops|transmute2]]<html><br></html><<endif>><<if $sours gt 0>>transmute sour lolly into [[3 lollipops|transmute3]]<html><br></html><<endif>>
<<set $class = "Chocolatier">><<set $money=7>><<display 'Levelup'>>
<<set $temp=$gems[2]>><<set $gems[2] = $gems[1]>><<set $gems[1] = $gems[4]>><<set $gems[4] = $gems[5]>><<set $gems[5] = $temp>><<display 'puzzle1'>>
<<if $gems[1] neq $gems[4]>><<if $gems[1] neq 0 and $gems[4] neq 0>><<set $temp=0>><<elseif $gems[1] neq 1 and $gems[4] neq 1>><<set $temp=1>><<else>><<set $temp=2>><<endif>><<set $gems[1] = $temp>><<set $gems[4] = $temp>><<endif>><<display 'puzzle1'>>
<<set $shield = $shield+9*$sensitivity>><<set $sugar = $sugar+10>><<set $gobstoppers = $gobstoppers-1>><<set $mouth = 3>>You put a gobstopper in your mouth. Sugar shield increased to <<print $shield>>.\n\n<<display 'hax'>>
<<if $gems[7] neq $gems[4]>><<if $gems[7] neq 0 and $gems[4] neq 0>><<set $temp=0>><<elseif $gems[7] neq 1 and $gems[4] neq 1>><<set $temp=1>><<else>><<set $temp=2>><<endif>><<set $gems[7] = $temp>><<set $gems[4] = $temp>><<endif>><<display 'puzzle1'>>
<<set $sugar = $sugar+7>><<set $shield = $shield*2*$sensitivity>><<set $jellies = $jellies-1>>You smear jelly all over yourself.\n\n<<display 'hax'>>
<<if $gems[5] neq $gems[4]>><<if $gems[5] neq 0 and $gems[4] neq 0>><<set $temp=0>><<elseif $gems[5] neq 1 and $gems[4] neq 1>><<set $temp=1>><<else>><<set $temp=2>><<endif>><<set $gems[5] = $temp>><<set $gems[4] = $temp>><<endif>><<display 'puzzle1'>>
<<if not $beat_troll>><<set $beat_troll = true>><<set $doom = $doom+1>><<display 'gain experience'>><<set $flosses = $flosses+1>>The troll crumbles into a pile of sugary dust. You gather together enough to form one candy floss.<html><br><br></html><<endif>>The finest fudge forest, these woods are peaceful and free of doom.\nThere are mysterious paths leading to a cave and a highway.\n\n<<if $level gt 4 and $class eq "Lollipop Witch">><<if $made_shop>>Enter your [[gingerbread cottage]].<<else>>Bake a new [[gingerbread house|new gingerbread house]], for you are now a full Lollipop Witch.<<endif>><html><br></html><<endif>>Return to the [[village]].\nExplore the [[cave]].\nTravel the [[highway]].
<<set $sugar = $sugar+1>><<if $sensitivity lt 2>><<set $sensitivity = 2>><<endif>><<set $sours = $sours-1>>You eat a sour lolly. You yearn for a more refreshing treat.\n\n<<display 'hax'>>
Michael Brough
"Thanks again for rescuing me!" says Wonko, <<if $got_gift>>"check out what I have for sale - and I'll give you a good deal on any unrefined rock candy you find!"<<else>>"here have a free sample of sour lolly."<<set $sours = $sours+1>><<set $got_gift=true>><<endif>>\n\n<<display 'list_inventory'>>\n\ncandy floss (+1 sugar shield) {1 candollar} <<if $money gte 1>>[[buy|buy_floss]]<<else>>can't afford<<endif>>\nlollipop (+3 sugar shield) {2 candollars} <<if $money gte 2>>[[buy|buy_lollipop]]<<else>>can't afford<<endif>>\nchocolate bar (+1 delicious attack, +1 sugar shield) {3 candollars} <<if $money gte 3>>[[buy|buy_bar]]<<else>>can't afford<<endif>>\ngobstopper (+9 sugar shield) {4 candollars} <<if $money gte 4>>[[buy|buy_gob]]<<else>>can't afford<<endif>>\npopping candy (+1 fizzy damage) {5 candollars} <<if $money gte 5>>[[buy|buy_popping]]<<else>>can't afford<<endif>>\nsour lolly {6 candollars} <<if $money gte 6>>[[buy|buy_sour]]<<else>>can't afford<<endif>><<if $rocks gt 0>><html><br><br></html>rock candy {3 candollars} [[sell]]<<endif>>\n\nBack out into the [[village]].
You squish the sand-mite under your toe. Continuing your search, you find an exhibit showing the life cycle of sugar - from rock candy to candy floss and finally a gobstopper. You add it to your inventory.<<set $rocks = $rocks+1>><<set $flosses = $flosses+1>><<set $gobstoppers = $gobstoppers+1>><<set $doom = $doom+1>><<display 'time passes'>>\n\n[[Keep searching|laboratory2]].\n[[Escape|desert]] into the desert.
<<display 'time passes'>><<set $rocks = $rocks+1>>You defeat the dungeon enemy. It drops a lump of rock candy!\n\nKeep exploring the [[dungeon]].\nReturn to [[mystic convergence]].
<<loopsound $snd1>><html><img width="256" src="dream2a.png"></html>\n\n<span class="wavy">Stabbing pain.\n\n[[cough]]</span>
<<set $class = "Sucromancer">><<set $money=5>><<display 'Levelup'>>
<<set $enemy_name = "imp">><<set $enemy_hp = 7>><<set $enemy_damage = 2>><<set $enemy_passage = "You are fighting an imp.">><<set $enemy_defeat = 'hell gauntlet 2'>><<set $enemy_attack = 0>><<set $enemy_retreat = 0>>A horrible imp leaps upon you!\n\n<<display 'hax'>>
(function(){version.extensions.replaceMacrosCombined={major:1,minor:1,revision:1};\nvar nullobj={handler:function(){}};function showVer(n,notrans){n.innerHTML="";\nnew Wikifier(n,n.tweecode);n.setAttribute("data-enabled","true");\nn.style.display="inline";n.classList.remove("revision-span-out");\nif(!notrans){n.classList.add("revision-span-in");if(n.timeout){clearTimeout(n.timeout)\n}n.timeout=setTimeout(function(){n.classList.remove("revision-span-in");\nn=null},1)}}function hideVer(n,notrans){n.setAttribute("data-enabled","false");\nn.classList.remove("revision-span-in");if(n.timeout){clearTimeout(n.timeout)\n}if(!notrans){n.classList.add("revision-span-out");n.timeout=setTimeout(function(){if(n.getAttribute("data-enabled")=="false"){n.classList.remove("revision-span-out");\nn.style.display="none";n.innerHTML=""}n=null},1000)}else{n.style.display="none";\nn.innerHTML="";n=null}}function tagcontents(b,starttags,desttags,endtags,k){var l=0,c="",tg,a,i;\nfunction tagfound(i,e){for(var j=0;j<e.length;j++){if(a.indexOf("<<"+e[j],i)==i){return e[j]\n}}}a=b.source.slice(k);for(i=0;i<a.length;i++){if(tg=tagfound(i,starttags)){l++\n}else{if((tg=tagfound(i,desttags))&&l==0){b.nextMatch=k+i+tg.length+4;\nreturn[c,tg]}else{if(tg=tagfound(i,endtags)){l--;if(l<0){return null\n}}}}c+=a.charAt(i)}return null}var begintags=[];var endtags=[];\nfunction revisionSpanHandler(g,e,f,b){var k=b.source.indexOf(">>",b.matchStart)+2,vsns=[],vtype=e,flen=f.length,becomes,c,cn,m,h,vsn;\nfunction mkspan(vtype){h=insertElement(m,"span",null,"revision-span "+vtype);\nh.setAttribute("data-enabled",false);h.style.display="none";h.tweecode="";\nreturn h}if(this.shorthand&&flen){while(f.length>0){vsns.push([f.shift(),(this.flavour=="insert"?"gains":"becomes")])\n}}else{if(this.flavour=="insert"||(this.flavour=="continue"&&this.trigger=="time")){vsns.push(["","becomes"])\n}}if(this.flavour=="continue"&&flen){b.nextMatch=k+b.source.slice(k).length;\nvsns.push([b.source.slice(k),vtype])}else{becomes=["becomes","gains"];\nc=tagcontents(b,begintags,becomes.concat(endtags),endtags,k);\nif(c&&endtags.indexOf(c[1])==-1){while(c){vsns.push(c);c=tagcontents(b,begintags,becomes,endtags,b.nextMatch)\n}c=tagcontents(b,begintags,["end"+e],endtags,b.nextMatch)}if(!c){throwError(g,"can't find matching end"+e);\nreturn}vsns.push(c);if(this.flavour=="continue"){k=b.nextMatch;\nb.nextMatch=k+b.source.slice(k).length;vsns.push([b.source.slice(k),""])\n}}if(this.flavour=="remove"){vsns.push(["","becomes"])}cn=0;m=insertElement(g,"span",null,e);\nm.setAttribute("data-flavour",this.flavour);h=mkspan("initial");\nvsn=vsns.shift();h.tweecode=vsn[0];showVer(h,true);while(vsns.length>0){if(vsn){vtype=vsn[1]\n}vsn=vsns.shift();h=mkspan(vtype);h.tweecode=vsn[0]}if(typeof this.setup=="function"){this.setup(m,g,f)\n}}function quantity(m){return(m.children.length-1)+(m.getAttribute("data-flavour")=="remove")\n}function revisionSetup(m,g,f){m.className+=" "+f[0].replace(" ","_")\n}function keySetup(m,g,f){var fl=this.flavour,key=f[0];m.setEventListener("keydown",function l(e){var done=!revise("revise",m);\nif(done){m.removeEventListener("keydown",l)}})}function timeSetup(m,g,f){function cssTimeUnit(s){if(typeof s=="string"){if(s.slice(-2).toLowerCase()=="ms"){return Number(s.slice(0,-2))||0\n}else{if(s.slice(-1).toLowerCase()=="s"){return Number(s.slice(0,-1))*1000||0\n}}}throwError(g,s+" isn't a CSS time unit");return 0}var fl=this.flavour;\nvar tm=cssTimeUnit(f[0]);setTimeout(function timefn(){var done=!revise("revise",m);\nif(!done){setTimeout(timefn,tm)}},tm)}function hoverSetup(m){m.onmouseover=function(){revise("revise",this)\n};m.onmouseout=function(){revise("revert",this)};m=null}function mouseSetup(m){var fl=this.flavour,evt=(window.onmouseenter===null?"onmouseenter":"onmouseover");\nm[evt]=function(){var done=!revise("revise",this);if(done){this[evt]=null\n}};m=null}function linkSetup(m,g,f){var fl=this.flavour,l=Wikifier.createInternalLink(),p=m.parentNode;\nl.className="internalLink replaceLink";p.insertBefore(l,m);l.insertBefore(m,null);\nl.onclick=function(){var p,done=false;if(m&&m.parentNode==this){done=!revise("revise",m);\nscrollWindowTo(m)}if(done){this.parentNode.insertBefore(m,this);\nthis.parentNode.removeChild(this)}};l=null}function visitedSetup(m,g,f){var i,done,shv=state.history[0].variables,os="once seen",d=(m.firstChild&&(this.flavour=="insert"?m.firstChild.nextSibling:m.firstChild).tweecode);\nshv[os]=shv[os]||{};if(d&&!shv[os].hasOwnProperty(d)){shv[os][d]=1\n}else{for(i=shv[os][d];i>0&&!done;i--){done=!revise("revise",m,true)\n}if(shv[os].hasOwnProperty(d)){shv[os][d]+=1}}}[{name:"insert",flavour:"insert",trigger:"link",setup:linkSetup},{name:"timedinsert",flavour:"insert",trigger:"time",setup:timeSetup},{name:"insertion",flavour:"insert",trigger:"revisemacro",setup:revisionSetup},{name:"later",flavour:"insert",trigger:"visited",setup:visitedSetup},{name:"keyinsert",flavour:"insert",trigger:"key",setup:keySetup},{name:"replace",flavour:"replace",trigger:"link",setup:linkSetup},{name:"timedreplace",flavour:"replace",trigger:"time",setup:timeSetup},{name:"mousereplace",flavour:"replace",trigger:"mouse",setup:mouseSetup},{name:"hoverreplace",flavour:"replace",trigger:"hover",setup:hoverSetup},{name:"revision",flavour:"replace",trigger:"revisemacro",setup:revisionSetup},{name:"keyreplace",flavour:"replace",trigger:"key",setup:keySetup},{name:"timedremove",flavour:"remove",trigger:"time",setup:timeSetup},{name:"mouseremove",flavour:"remove",trigger:"mouse",setup:mouseSetup},{name:"hoverremove",flavour:"remove",trigger:"hover",setup:hoverSetup},{name:"removal",flavour:"remove",trigger:"revisemacro",setup:revisionSetup},{name:"once",flavour:"remove",trigger:"visited",setup:visitedSetup},{name:"keyremove",flavour:"remove",trigger:"key",setup:keySetup},{name:"continue",flavour:"continue",trigger:"link",setup:linkSetup},{name:"timedcontinue",flavour:"continue",trigger:"time",setup:timeSetup},{name:"mousecontinue",flavour:"continue",trigger:"mouse",setup:mouseSetup},{name:"keycontinue",flavour:"continue",trigger:"key",setup:keySetup},{name:"cycle",flavour:"cycle",trigger:"revisemacro",setup:revisionSetup},{name:"mousecycle",flavour:"cycle",trigger:"mouse",setup:mouseSetup},{name:"timedcycle",flavour:"cycle",trigger:"time",setup:timeSetup},{name:"keycycle",flavour:"replace",trigger:"key",setup:keySetup}].forEach(function(e){e.handler=revisionSpanHandler;\ne.shorthand=(["link","mouse","hover"].indexOf(e.trigger)>-1);\nmacros[e.name]=e;macros["end"+e.name]=nullobj;begintags.push(e.name);\nendtags.push("end"+e.name)});function insideDepartingSpan(elem){var r=elem.parentNode;\nwhile(!r.classList.contains("passage")){if(r.classList.contains("revision-span-out")){return true\n}r=r.parentNode}}function reviseAll(rt,rname){var rall=document.querySelectorAll(".passage ."+rname),ret=false;\nfor(var i=0;i<rall.length;i++){if(!insideDepartingSpan(rall[i])){ret=revise(rt,rall[i])||ret\n}}return ret}function revise(rt,r,notrans){var ind2,curr,next,ind=-1,rev=(rt=="revert"),rnd=(rt.indexOf("random")>-1),fl=r.getAttribute("data-flavour"),rc=r.childNodes,cyc=(fl=="cycle"),rcl=rc.length-1;\nfunction doToGainerSpans(n,fn){for(var k=n-1;k>=0;k--){if(rc[k+1].classList.contains("gains")){fn(rc[k],notrans)\n}else{break}}}for(var k=0;k<=rcl;k++){if(rc[k].getAttribute("data-enabled")=="true"){ind=k\n}}if(rev){ind-=1}curr=(ind>=0?rc[ind]:(cyc?rc[rcl]:null));ind2=ind;\nif(rnd){ind2=(ind+(Math.floor(Math.random()*rcl)))%rcl}next=((ind2<rcl)?rc[ind2+1]:(cyc?rc[0]:null));\nvar docurr=(rev?showVer:hideVer);var donext=(rev?hideVer:showVer);\nvar currfn=function(){if(!(next&&next.classList.contains("gains"))||rnd){docurr(curr,notrans);\ndoToGainerSpans(ind,docurr,notrans)}};var nextfn=function(){donext(next,notrans);\nif(rnd){doToGainerSpans(ind2+1,donext,notrans)}};if(!rev){currfn();\nnextfn()}else{nextfn();currfn()}return(cyc?true:(rev?(ind>0):(ind2<rcl-1)))\n}macros.revert=macros.revise=macros.randomise=macros.randomize={handler:function(a,b,c){var l,rev,rname;\nfunction disableLink(l){l.style.display="none"}function enableLink(l){l.style.display="inline"\n}function updateLink(l){if(l.className.indexOf("random")>-1){enableLink(l);\nreturn}var rall=document.querySelectorAll(".passage ."+rname),cannext,canprev,i,ind,r,fl;\nfor(i=0;i<rall.length;i++){r=rall[i],fl=r.getAttribute("data-flavour");\nif(insideDepartingSpan(r)){continue}if(fl=="cycle"){cannext=canprev=true\n}else{if(r.firstChild.getAttribute("data-enabled")==!1+""){canprev=true\n}if(r.lastChild.getAttribute("data-enabled")==!1+""){cannext=true\n}}}var can=(l.classList.contains("revert")?canprev:cannext);(can?enableLink:disableLink)(l)\n}function toggleText(w){w.classList.toggle(rl+"Enabled");w.classList.toggle(rl+"Disabled");\nw.style.display=((w.style.display=="none")?"inline":"none")}var rl="reviseLink";\nif(c.length<2){throwError(a,b+" macro needs 2 parameters");return\n}rname=c.shift().replace(" ","_");l=Wikifier.createInternalLink(a,null);\nl.className="internalLink "+rl+" "+rl+"_"+rname+" "+b;var v="";\nvar end=false;var out=false;if(c.length>1&&c[0][0]=="$"){v=c[0].slice(1);\nc.shift()}switch(c[c.length-1]){case"end":end=true;c.pop();break;\ncase"out":out=true;c.pop();break}var h=state.history[0].variables;\nfor(var i=0;i<c.length;i++){var on=(i==Math.max(c.indexOf(h[v]),0));\nvar d=insertElement(null,"span",null,rl+((on)?"En":"Dis")+"abled");\nif(on){h[v]=c[i];l.setAttribute("data-cycle",i)}else{d.style.display="none"\n}insertText(d,c[i]);l.appendChild(d)}l.onclick=function(){reviseAll(b,rname);\nvar t=this.childNodes,u=this.getAttribute("data-cycle")-0,m=t.length,n,lall,i;\nif((end||out)&&u==m-(end?2:1)){if(end){n=this.removeChild(t[u+1]);\nn.className=rl+"End";n.style.display="inline";this.parentNode.replaceChild(n,this)\n}else{this.parentNode.removeChild(this);return}}else{toggleText(t[u]);\nu=(u+1)%m;if(v){h[v]=c[u]}toggleText(t[u]);this.setAttribute("data-cycle",u)\n}lall=document.getElementsByClassName(rl+"_"+rname);for(i=0;i<lall.length;\ni++){updateLink(lall[i])}};l=null}};macros.mouserevise=macros.hoverrevise={handler:function(a,b,c,d){var endtags=["end"+b],evt=(window.onmouseenter===null?"onmouseenter":"onmouseover"),t=tagcontents(d,[b],endtags,endtags,d.source.indexOf(">>",d.matchStart)+2);\nif(t){var rname=c[0].replace(" ","_"),h=insertElement(a,"span",null,"hoverrevise hoverrevise_"+rname),f=function(){var done=!reviseAll("revise",rname);\nif(b!="hoverrevise"&&done){this[evt]=null}};new Wikifier(h,t[0]);\nif(b=="hoverrevise"){h.onmouseover=f;h.onmouseout=function(){reviseAll("revert",rname)\n}}else{h[evt]=f}h=null}}};macros.instantrevise={handler:function(a,b,c,d){reviseAll("revise",c[0].replace(" ","_"))\n}};macros.endmouserevise=nullobj;macros.endhoverrevise=nullobj\n}());
<html><img width="256" src="title.png"></html>\n\nTwice came doom to the toothsome village, and twice was it averted by heroic deeds. Yet darkness can ever only be delayed, so in accordance with prophecy once more it returns.\n\nOnly you can save your home!\n\n[[Start|Class]]\n\n<span style="font-size:0.7em;"><i>Thanks to Leon Arnott for help with Twine and Andi McClure for BECOME A GREAT ARTIST IN JUST 10 SECONDS.</i></span>
<<set $sugar = $sugar+5>><<set $shield = $shield-37>><<set $enemy_hp = $enemy_hp-51>><<set $dice = (Math.floor(Math.random()*3))+1>>A spinning saccharine wormhole opens around you, enveloping the battlefield. Suddenly it pops closed and a <<if $dice eq 1>>pink<<set $aspartames = $aspartames+1>><<elseif $dice eq 2>>brown<<set $cocoas = $cocoas+1>><<else>>green<<set $bitters = $bitters+1>><<endif>> potion appears in your hand.\n\n<<if $enemy_hp gt 0>><<display 'hax'>><<else>><<display $enemy_defeat>><<endif>>
<<display 'time passes'>><<set $doom = $doom+8>><<set $beat_doom = true>><<set $shield = $shield+10>><<set $sugar = $sugar+20>>The doom boss tumbles from the mountain, never to be seen again. Until next time..\n\nThe doom around you lessens noticeably. You feel very sweet.\n\n<<display 'dungeon mountain'>>
<<if not $beat_warlord and $doom gt 68>><<set $enemy_name = "Doom Warlord">><<set $enemy_hp = 32>><<set $enemy_damage = 3>><<set $enemy_passage = "The doom warlord battle continues.">><<set $enemy_defeat = 'village_free'>><<set $enemy_attack = 0>>Entering the village you sense that something is different. The streets are unusually quiet. Suddenly you notice the figure of a Lieutenant Doom Warlord casting a shadow before you. You must fight it.\n\n<<display 'hax'>><<else>>The twilit streets of the doom-beset village lie before you. <<if $level lt $lesson>>The candy school is open for lessons.<<else>>The candy school is closed.<<endif>> <<if $beat_spider>>Wonko's general store is open.<<else>>The general store is closed.<<endif>> To the south a path leads into the woods. A mountain hovers overhead.\n\n<<display 'list_inventory'>> Doom is <<if $doom eq 0>>0<<else>><<print $doom>><<endif>>% averted.\n\n<<if $level gt 4 and $class eq "Chocolatier">><<if $made_shop>>Enter your [[chocolate shop]].<<else>>Open a new [[chocolate shop|open chocolate shop]], for you are now a master Chocolatier.<<endif>><html><br></html><<endif>><<if $beat_spider>>Shop at the [[general store]].<html><br></html><<endif>><<if $level lt $lesson>>Learn at the [[candy school]].<html><br></html><<endif>>Wander into the [[woods]].\nClimb the [[mountain]].<<endif>>
<<if $doom gte 99 and not $dream_burrow>><<set $dream_burrow = true>><<set $dream_return = 'trash burrow'>><<display 'next dream'>><<else>>The trash burrow is littered with mysterious objects. <<if not $unknown_device>>There is an unknown device here.<html> </html><<endif>><<if not $burrow_bucks>>There are several candollars discarded here.<<endif>>\n\n<<if not $unknown_device>>Take [[unknown device|trash burrow][$unknown_device = true]].<html><br></html><<endif>><<if not $burrow_bucks>>Take [[candollars|burrow2]].<br><<endif>>Return to the [[junkyard entrance|junkyard]].<<endif>>
<html><img width="256" src="dream1b.png"></html>\n\n<span class="wavy">Something is wrong.\n\n[[wake up]]</span>
<<set $enemy_name = "Thief">><<set $enemy_hp = 3>><<set $enemy_damage = 1>><<set $enemy_passage = "You are fighting a greedy thief.">><<set $enemy_defeat = 'highway_death'>><<set $enemy_attack = 1>><<set $enemy_retreat = 0>>As you walk out onto the highway, a masked man appears.\n\n<<display 'hax'>>
<<if not $beat_frog>><<set $beat_frog = true>><<set $doom = $doom+1>><<display 'time passes'>><<set $jellies = $jellies+1>>The frog is squished by your attack into a smear of jelly. You take the delicious sugary jelly.<html><br><br></html><<endif>>The desert sputters with butterscotch sand. All around are bizarre hopping creatures. You hope they don't notice you again.\nThere is a metal hut with strange protuberances here.\n\nInvestigate [[desert laboratory]].\nBack to [[mystic convergence]].
You acquire a gobstopper.<<set $money = $money-4>><<set $gobstoppers = $gobstoppers+1>>\n\n<<display 'general store'>>
<<set $burrow_bucks = true>><<set $money = $money+17>><<display 'trash burrow'>>
You have <<if $money gt 0>><<print $money>><<else>>no<<endif>> candollars<<if $flosses gt 0>>, <<print $flosses>> candy flosses<<endif>><<if $lollipops gt 0>>, <<print $lollipops>> lollipops<<endif>><<if $bars gt 0>>, <<print $bars>> chocolate bars<<endif>><<if $gobstoppers gt 0>>, <<print $gobstoppers>> gobstoppers<<endif>><<if $poppings gt 0>>, <<print $poppings>> popping candies<<endif>><<if $sours gt 0>>, <<print $sours>> sour lollies<<endif>><<if $cupcakes gt 0>>, <<print $cupcakes>> cupcakes<<endif>><<if $truffles gt 0>>, <<print $truffles>> chocolate truffles<<endif>><<if $jellies gt 0>>, <<print $jellies>> jellies<<endif>><<if $aspartames gt 0>>, <<print $aspartames>> aspartame potions<<endif>><<if $cocoas gt 0>>, <<print $cocoas>> cocoa potions<<endif>><<if $bitters gt 0>>, <<print $bitters>> bitter potions<<endif>><<if $rocks gt 0>>, <<print $rocks>> rock candies<<endif>><<if $radioactive gt 0>>, <<print $radioactive>> radioactive chocolate ores<<endif>><<if $bitcoins gt 0>>, <<print $bitcoins>> bitcoin<<endif>>.<<if $shield gt 0>><html>  </html>Sugar shield at <<print $shield>>.<<endif>>
<<set $i = 0>><<display 'attack_loop'>>\n<<if $enemy_hp gt 0>><<if $enemy_attack eq 0>><<set $actual_damage = $enemy_damage>><<if $armour>><<set $actual_damage = $actual_damage-1>><<endif>><<if $miss_attack gt 0>><<set $miss_attack = $miss_attack-1>>The <<print $enemy_name>> is distracted.<<else>><<if $shield gt 0 and $shield lt $actual_damage>><<set $actual_damage = $shield>><<endif>><<set $shield = $shield-$actual_damage>>The <<print $enemy_name>> hits you for <<print $actual_damage>> damage!<<endif>><<elseif $enemy_attack eq 1>><<set $money = $money-$enemy_damage>>The <<print $enemy_name>> steals <<print $enemy_damage>> candollars from your purse!<<if $money eq 0>><<set $enemy_hp = 0>><<endif>><<endif>>\n\n<<if $enemy_hp gt 0>><<if $shield gt -1>><<display 'hax'>><<else>>You have died.<<endif>><<endif>>\n<<endif>><<if $enemy_hp lte 0>><<if $mouth lt 2>><<set $mouth = 0>><<endif>><<set $miss_attack = 0>><<display $enemy_defeat>><<endif>>
<<if not $beat_dog>><<set $beat_dog = true>><<set $doom = $doom+1>><<display 'time passes'>>The dog bursts open, spraying lollipops everywhere. You collect 5 lollipops.<<set $lollipops = $lollipops+5>><html><br><br></html><<endif>>An infinite expanse of trash extends before you. Broken bicycles the size of jumbo jets looming ahead. Wounded soldiers just hanging there in space. Millions of paperclips, some alone and some bonded to other bureaucratic paraphenalia.\n\nGlabro the liquoriweft is working here, twining liquorice bootstraps into elaborate weaves.\n\n<<if $talked_glabro and $lollipops gte 12 and not $armour>>Give Glabro [[12 lollipops|get_armour]].<<else>>Talk to [[Glabro]].<<endif>>\nClimb the [[trash heap]].\nDelve into the [[trash burrow]].\nReturn to the [[highway]].
<html><img width="256" src="dream4b.png"></html>\n\n<span class="wavy">It's your heart, it feels like it's about to\n\n[[wake up]]</span>
<html><img width="256" src="dream2c.png"></html>\n\n<span class="wavy">A missing tooth.\n\n[[wake up]]</span>\n
<<set $enemy_name = "Chaos Oracle">><<set $enemy_hp = 6>><<set $enemy_damage = 3>><<set $enemy_passage = "You are fighting a chaos oracle.">><<set $enemy_defeat = 'dungeon2_done'>><<set $enemy_attack = 0>><<set $enemy_retreat = 0>>Wandering through the dungeon you come across the lair of a chaos oracle. "I predict doom for you" it declares, then attacks.\n\n<<display 'hax'>>
<<set $enemy_name = "Spiteful Hipster">><<set $enemy_hp = 8>><<set $enemy_damage = 2>><<set $enemy_passage = "You are fighting a spiteful hipster.">><<set $enemy_defeat = 'dungeon3_done'>><<set $enemy_attack = 0>><<set $enemy_retreat = 0>>Along comes a dungeon-dwelling spiteful hipster.\n\n<<display 'hax'>>
<<set $enemy_name = "Dungeon Enemy">><<set $enemy_hp = 5>><<set $enemy_damage = 1>><<set $enemy_passage = "You are fighting a dungeon enemy.">><<set $enemy_defeat = 'dungeon1_done'>><<set $enemy_attack = 0>><<set $enemy_retreat = 0>>Entering the dungeon, you encounter a random encounter! A dungeon enemy attacks you.\n\n<<display 'hax'>>
In the dungeon, you get caught in a trap! You will have to sacrifice one of your items to escape.\n\n<<if $flosses+$lollipops+$gobstoppers+$poppings+$sours+$cupcakes+$truffles+$jellies+$aspartames+$cocoas+$bitters eq 0>>You have nothing appropriate. You die in the trap.<<else>><<display 'list_inventory'>>\n\n<<if $flosses gt 0>>sacrifice [[candy floss|dungeon6_done][$flosses = $flosses-1]]<html><br></html><<endif>><<if $lollipops gt 0>>sacrifice [[lollipop|dungeon6_done][$lollipops = $lollipops-1]]<html><br></html><<endif>><<if $bars gt 0>>sacrifice [[chocolate bar|dungeon6_done][$bars = $bars-1]]<html><br></html><<endif>><<if $gobstoppers gt 0>>sacrifice [[gobstopper|dungeon6_done][$gobstoppers = $gobstoppers-1]]<html><br></html><<endif>><<if $poppings gt 0>>sacrifice [[popping candy|dungeon6_done][$poppings = $poppings-1]]<html><br></html><<endif>><<if $sours gt 0>>sacrifice [[sour lolly|dungeon6_done][$sours = $sours-1]]<br> <<endif>><<if $cupcakes gt 0>>sacrifice [[cupcake|dungeon6_done][$cupcakes = $cupcakes-1]]<html><br></html><<endif>><<if $truffles gt 0>>sacrifice [[chocolate truffle|dungeon6_done][$truffles = $truffles-1]]<html><br></html><<endif>><<if $jellies gt 0>>sacrifice [[jelly|dungeon6_done][$jellies = $jellies-1]]<br><<endif>><<if $aspartames gt 0>>sacrifice [[aspartame potion|dungeon6_done][$aspartames = $aspartames-1]]<html><br></html><<endif>><<if $cocoas gt 0>>sacrifice [[cocoa potion|dungeon6_done][$cocoas = $cocoas-1]]<html><br></html><<endif>><<if $bitters gt 0>>sacrifice [[bitter potion|dungeon6_done][$bitters = $bitters-1]]<br><<endif>><<if $bitcoins gt 0>>sacrifice [[bitcoin|dungeon6_done][$bitcoins = $bitcoins-1]]<br><<endif>><<endif>>
<<set $enemy_name = "Vagabond Shark">><<set $enemy_hp = 4>><<set $enemy_damage = 4>><<set $enemy_passage = "You are fighting a vagabond shark.">><<set $enemy_defeat = 'dungeon4_done'>><<set $enemy_attack = 0>><<set $enemy_retreat = 0>>Swimming through the dungeon is a vagabond shark. It leaps upon you!\n\n<<display 'hax'>>
<<if not $beat_dungeon>><<set $enemy_name = "Dungeon Boss">><<set $enemy_hp = 100>><<set $enemy_damage = 5>><<set $enemy_passage = "You are fighting a dungeon boss.">><<set $enemy_defeat = 'dungeon5_done'>><<set $enemy_attack = 0>><<set $enemy_retreat = 'dungeon'>>The dungeon boss fight begins!\n\n<<display 'hax'>><<else>>You come across the old corpse of the Dungeon Boss. Shadows are growing out of it.\n\nKeep exploring the [[dungeon]].\nReturn to [[mystic convergence]].<<endif>>
<html><img width="256" src="dream3c.png"></html>\n\n<span class="wavy">You strain your muscles but\n\n[[wake up]]</span>\n
You exorcise the haunted grasshopper. Now peaceful, it hops merrily away.<<set $doom = $doom+3>><<display 'time passes'>>\n\n[[Keep searching|laboratory2]].\n[[Escape|desert]] into the desert.
<<set $enemy_name = "Ice Robot">><<set $enemy_hp = 77>><<set $enemy_damage = 7>><<set $enemy_passage = "You are in a bossfight against an Ice Robot in your Ice Robot Battle Arena.">><<set $enemy_defeat = 'arena_free'>><<set $enemy_attack = 0>><<set $enemy_retreat = 0>>You enter the arena. Crowds cheer, theme music plays, a boss fight is about to start!\n\n<<display 'hax'>>
<<if not $beat_dog>><<display 'junkyard_dog'>><<elseif $burrow_bucks and not $beat_capitalist>><<display 'junkyard_capitalist'>><<else>><<display 'junkyard_free'>><<endif>>
<<set $sugar = $sugar+2>><<set $shield = $shield-7>><<set $enemy_hp = $enemy_hp-11>><<set $attacks = $attacks+1>>A ray of sugar bursts from your teeth and smites the enemy. You feel yourself moving faster.\n\n<<if $enemy_hp gt 0>><<display 'hax'>><<else>><<display $enemy_defeat>><<endif>>
<<display 'time passes'>><<set $flosses = $flosses+(Math.floor(Math.random()*4))+2>>The spiteful hipster bursts in a cloud of candy floss. You gather a few pieces.\n\nKeep exploring the [[dungeon]].\nReturn to [[mystic convergence]].
<<set $made_shop = true>><<set $doom = $doom+1>><<display 'time passes'>>You invoke mystical deliciousness and cause an enormous shaft of magical sugar to burst out of the ground. It surges around you.\n\n<<display 'tower'>>
<<display 'time passes'>><<set $doom = $doom+13>><<set $sours = $sours+1>><<set $beat_dungeon = true>>You defeat the dungeon boss! Doom is <<print $doom>>% averted. You loot its corpse and find a sour lolly.\n\nKeep exploring the [[dungeon]].\nReturn to [[mystic convergence]].
<<if $gems[3] neq $gems[4]>><<if $gems[3] neq 0 and $gems[4] neq 0>><<set $temp=0>><<elseif $gems[3] neq 1 and $gems[4] neq 1>><<set $temp=1>><<else>><<set $temp=2>><<endif>><<set $gems[3] = $temp>><<set $gems[4] = $temp>><<endif>><<display 'puzzle1'>>
You manage to back out of the fight. But in time you will have to face your fears!\n\n<<display $enemy_retreat>>
<<set $enemy_name = "Junkyard Dog">><<set $enemy_hp = 5>><<set $enemy_damage = 2>><<set $enemy_passage = "You are fighting a fierce mutant dog.">><<set $enemy_defeat = 'junkyard_free'>><<set $enemy_attack = 0>><<set $enemy_retreat = 'highway'>>As soon as you enter the junkyard you are set upon by an enormous Junkyard Dog.\n\n<<display 'hax'>>
<<set $temp=$gems[0]>><<set $gems[0] = $gems[3]>><<set $gems[3] = $gems[4]>><<set $gems[4] = $gems[1]>><<set $gems[1] = $temp>><<display 'puzzle1'>>
<<if not $beat_spider>><<set $beat_spider = true>><<set $rocks=$rocks+1>><<set $doom = $doom+1>><<display 'gain experience'>>The spider turns into rock candy. You take the rock candy.\n\nIn the cave you find Wonko the shopkeeper tangled up in webs. He is grateful to be rescued!<html><br><br></html><<endif>>The cave appears to be the entrance to an abandoned mine!\n\nReturn to the [[woods]].\nExplore deeper into the [[mines]].
At last, the ice mountain.\n\nLong abandoned on the towering peak, a mountain-portal generator. Perhaps you can use this to open portals connecting other mountains you have visited?\n\n<<if not $portal1>>Open portal to [[village mountain|portal1]].<<else>>Go to [[village mountain|mountain]].<<endif>><<if $visited_dungeon>><html><br></html><<if not $portal3>>Open portal to [[dungeon mountain|portal3]].<<else>>Go to [[dungeon mountain]].<<endif>><<endif>><<if $visited_trash>><html><br></html><<if not $portal4>>Open portal to [[trash mountain|portal4]].<<else>>Go to [[trash mountain]].<<endif>><<endif>><<if $visited_hell>><html><br></html><<if not $portal5>>Open portal to [[hell mountain|portal5]].<<else>>Go to [[hell mountain]].<<endif>><<endif>>\nReturn to [[ice zone entrance|ice zone]].
<<if not $beat_giant>><<set $beat_giant = true>><<set $doom = $doom+2>><<display 'gain experience'>><<set $truffles = $truffles+1>>The giant explodes in a burst of rainbows and confetti, and a single chocolate truffle.<html><br><br></html><<endif>>From the top of the mountain you can see for miles! <<if $doom lte 25>>There is much doom all around.<<elseif $doom lte 50>>The doom is beginning to clear.<<elseif $doom lte 75>>Doom lurks in the distance.<<elseif $doom lte 100>>Some doom still lingers.<<else>>There is no doom in sight.<<endif>>\n\n<<if $level gt 4 and $class eq "Sucromancer">><<if $made_shop>>Enter your [[tower]].<<else>>Summon a [[tower of sugar]], for you are now a master Sucromancer.<<endif>><html><br></html><<endif>><<if $portal1>>Enter the portal to the [[ice mountain]].<html><br></html><<if $portal3>>Enter the portal to the [[dungeon mountain]].<html><br></html><<endif>><<if $portal4>>Enter the portal to the [[trash mountain]].<html><br></html><<endif>><<if $portal5>>Enter the portal to the [[hell mountain]].<html><br></html><<endif>><<endif>>Return to the [[village]].
<<set $temp=$gems[6]>><<set $gems[6] = $gems[7]>><<set $gems[7] = $gems[4]>><<set $gems[4] = $gems[3]>><<set $gems[3] = $temp>><<display 'puzzle1'>>
<<if $lesson eq 2>><<display 'candy school 2'>><<endif>><<if $lesson eq 3>><<display 'candy school 3'>><<endif>><<if $lesson eq 4>><<display 'candy school 4'>><<endif>><<if $lesson eq 5>><<display 'candy school 5'>><<endif>>
<<display 'time passes'>>You magnificently escape from the trap!\n\n<<display 'list_inventory'>>\n\nKeep exploring the [[dungeon]].\nReturn to [[mystic convergence]].
<<if not $beat_robot>><<display 'ice_robot'>><<else>><<display 'arena_free'>><<endif>>
.transition-out { display:none; }
<<set $shield = $shield+1*$sensitivity>><<set $sugar = $sugar+1>><<set $flosses = $flosses-1>>You gobble on some candy floss. Sugar shield increased to <<print $shield>>.\n\n<<display 'hax'>>
You hand over a chunk of rock candy.<<set $money = $money+3>><<set $rocks = $rocks-1>>\n\n<<display 'general store'>>
<<if $level gt 3>><<if not $beat_giant>><<display 'mountain_giant'>><<else>><<display 'mountain_free'>><<endif>><<else>>You try to climb to the summit but your arms are too weak.\n\n<<display 'village'>><<endif>>
<<set $sugar = $sugar+10>><<set $damage = $damage+2*$sensitivity>><<set $shield = $shield+10*$sensitivity>><<set $aspartames = $aspartames-1>>You quickly chug down the pink potion.\n\n<<display 'hax'>>
<<if not $visited_trash>><<set $visited_trash = true>><<display 'time passes'>><<endif>>Eventually you reach the top, with a devastating vista across endless trash.\n\n<<if $portal4>><<if $portal1>>Enter the portal to the [[village mountain|mountain]].<br><<endif>>Enter the portal to the [[ice mountain]].\n<<if $portal3>>Enter the portal to the [[dungeon mountain]].<br><<endif>><<if $portal5>>Enter the portal to the [[hell mountain]].<br><<endif>><<endif>>Climb back down to the [[junkyard]].
<<display 'time passes'>><<set $poppings = $poppings-1>><<set $rocks = $rocks-1>><<set $cupcakes = $cupcakes+1>>You bake a delicious fizzy cupcake.\n\n<<display 'gingerbread cottage'>>
You purchase a measure of candy floss.<<set $money = $money-1>><<set $flosses = $flosses+1>>\n\n<<display 'general store'>>
<<if not $beat_goblin>><<set $beat_goblin = true>><<set $doom = $doom+2>><<display 'time passes'>><<set $flosses = $flosses+1>>The goblin splinters into shards of sugar cane. You gather up some floss.<html><br><br></html><<endif>>The walls of the mine glisten with delicious candy.\n\n<<if $rocks+$radioactive gte 4>>You can't carry any more right now.<<else>><<if $candy_mined lt 20>>You can [[dig]] for rock candy!<<else>>You've exhausted all the rock candy here.<<endif>><<if $class eq "Chocolatier">><html><br></html><<if $chocolate_mined lt 5>>As a Chocolatier, you can also sense veins of [[radioactive chocolate]].<<else>>You've exhausted all the radioactive chocolate here.<<endif>><<endif>><<endif>>\nClamber back up the [[cave]].
<<if $shield gt 0>>Sugar shield at <<print $shield>>.<<else>>Sugar shield at 0!<<endif>> You can make <<print $attacks>> attack<<if $attacks gt 1>>s<<endif>> at <<print $damage>> damage each.\n<<if $mouth gt 0>><<set $mouth = $mouth-1>>Your mouth is full.<html><br><br></html><<else>><html><br></html><<if $flosses gt 0>>eat [[candy floss]] (+1 sugar shield) {<<print $flosses>>}<html><br></html><<endif>><<if $lollipops gt 0>>eat [[lollipop]] (+3 sugar shield) {<<print $lollipops>>}<html><br></html><<endif>><<if $bars gt 0>>eat [[chocolate bar]] (+1 delicious attack, +1 sugar shield) {<<print $bars>>}<html><br></html><<endif>><<if $gobstoppers gt 0>>eat [[gobstopper]] (+9 sugar shield) {<<print $gobstoppers>>}<html><br></html><<endif>><<if $poppings gt 0>>eat [[popping candy]] (+1 fizzy damage) {<<print $poppings>>}<html><br></html><<endif>><<if $sours gt 0 and $sensitivity lt 2>>eat [[sour lolly]] (double item effectiveness) {<<print $sours>>}<html><br></html><<endif>><<if $cupcakes gt 0>>eat [[cupcake]] (+2 sugar shield, +2 fizzy damage) {<<print $cupcakes>>}<html><br></html><<endif>><<if $truffles gt 0>>eat [[chocolate truffle]] (+3 delicious attacks) {<<print $truffles>>}<html><br></html><<endif>><<if $jellies gt 0 and $shield gt 0>>use [[jelly]] (double sugar shield) {<<print $jellies>>}<html><br></html><<endif>><<if $aspartames gt 0>>drink [[aspartame potion]] (+2 fizzy damage, +10 sugar shield) {<<print $aspartames>>}<html><br></html><<endif>><<if $cocoas gt 0>>drink [[cocoa potion]] (+5 delicious attacks, +3 sugar shield) {<<print $cocoas>>}<html><br></html><<endif>><<if $bitters gt 0 and $sensitivity lt 3>>drink [[bitter potion]] (triple item effectiveness) {<<print $bitters>>}<html><br></html><<endif>><<endif>><<if $class eq "Lollipop Witch">><<display 'witch actions'>><<endif>><<if $class eq "Sucromancer">><<display 'wizard actions'>><<endif>><<if $enemy_name eq "Ice Robot" and not $moved_obstacles>>operate [[manual obstacles]]<br><<endif>>[[attack]]<<if $enemy_retreat>><br>[[retreat]]<<endif>>\n
The highway spans ahead of you, high and way.\n\nGo back to the [[woods]].\nContinue on to [[mystic convergence]].<<if $junkyard_map>><html><br></html>Follow the map to the [[junkyard]].<<endif>>
<<display 'time passes'>><<set $truffles = $truffles+1>><<set $bars = $bars-1>><<set $lollipops = $lollipops-1>>You carefully craft a perfect chocolate truffle.\n\n<<display 'chocolate shop'>>
.revision-span-in {\n\topacity: 0;\n}\n.revision-span:not(.revision-span-out) {\n\ttransition: 0s; -webkit-transition: 0s;\n}\n.revision-span-out {\n\tposition:absolute;\n\topacity: 0;\n}\n\n.transition-out { display:none; }\n\n.passage a:hover { text-decoration: none } .passage a:hover .char { text-decoration: underline }\n\n.passage {\n\tfont-size: 1.5em;\n}\n\n.char:nth-child(8n) { color:hsl(45,20%,85%); }\n.char:nth-child(8n+1) {color:hsl(90,20%,85%); }\n.char:nth-child(8n+2) {color:hsl(135,20%,85%); }\n.char:nth-child(8n+3) {color:hsl(180,20%,85%); }\n.char:nth-child(8n+4) {color:hsl(225,20%,85%); }\n.char:nth-child(8n+5) {color:hsl(270,20%,85%); }\n.char:nth-child(8n+6) {color:hsl(315,20%,85%); }\n.char:nth-child(8n+7) {color:hsl(0,20%,85%); }\n\n.passage a .char:nth-child(8n) { color:hsl(45,100%,70%); }\n.passage a .char:nth-child(8n+1) { color:hsl(90,100%,70%); }\n.passage a .char:nth-child(8n+2) {color:hsl(135,100%,70%); }\n.passage a .char:nth-child(8n+3) {color:hsl(180,100%,70%); }\n.passage a .char:nth-child(8n+4) {color:hsl(225,100%,70%); }\n.passage a .char:nth-child(8n+5) {color:hsl(270,100%,70%); }\n.passage a .char:nth-child(8n+6) {color:hsl(315,100%,70%); }\n.passage a .char:nth-child(8n+7) {color:hsl(0,100%,70%); }\n\n.wavy .char { \n position:relative;\n}\n.wavy .char:nth-child(8n) { \n animation: wavetext 2s 0s infinite;\n -webkit-animation: wavetext 3s 0s infinite;\n}\n.wavy .char:nth-child(8n+1) { \n animation: wavetext 2s -0.4s infinite;\n -webkit-animation: wavetext 3s -0.4s infinite;\n}\n.wavy .char:nth-child(8n+2) { \n animation: wavetext 2s -0.9s infinite;\n -webkit-animation: wavetext 3s -0.9s infinite;\n}\n.wavy .char:nth-child(8n+3) { \n animation: wavetext 2s -1.0s infinite;\n -webkit-animation: wavetext 3s -1.0s infinite;\n}\n.wavy .char:nth-child(8n+4) { \n animation: wavetext 2s -1.1s infinite;\n -webkit-animation: wavetext 3s -1.1s infinite;\n}\n.wavy .char:nth-child(8n+5) { \n animation: wavetext 2s -1.3s infinite;\n -webkit-animation: wavetext 3s -1.3s infinite;\n}\n.wavy .char:nth-child(8n+6) { \n animation: wavetext 2s -1.7s infinite;\n -webkit-animation: wavetext 3s -1.7s infinite;\n}\n.wavy .char:nth-child(8n+7) { \n animation: wavetext 2s -1.8s infinite;\n -webkit-animation: wavetext 3s -1.8s infinite;\n}\n@keyframes wavetext {\n 0%, 100% { top: 0em; } 50% { top: 0.2em; }\n}\n@-webkit-keyframes wavetext {\n 0%, 100% { top: 0em; } 50% { top: 0.2em; }\n}\n
<<set $portal1 = true>>You configure the mountain-portal settings and arrange transportation back to your home village.\n\n<<display 'ice mountain'>>
<<set $portal3 = true>>You enable dungeon access through the mountain-portal.\n\n<<display 'ice mountain'>>
<<set $portal5 = true>>You supply the hell mountain coordinates to the mountain-portal device.\n\n<<display 'ice mountain'>>
<<set $portal4 = true>>You update the mountain-portal permissions, adding the trash mountain to its database.\n\n<<display 'ice mountain'>>
<<set $sugar = $sugar+2>><<set $shield = $shield+1*$sensitivity>><<set $attacks = $attacks+1*$sensitivity>><<set $bars = $bars-1>><<set $mouth = 1>>You devour a bar of chocolate. Attacks increased to <<print $attacks>>. Sugar shield increased to <<print $shield>>.\n\n<<display 'hax'>>
You invest in a lollipop.<<set $money = $money-2>><<set $lollipops = $lollipops+1>>\n\n<<display 'general store'>>
<html><img width="256" src="dream3b.png"></html>\n\n<span class="wavy">Nothing to drink here.\n\n[[stand up]]</span>
<<if $sugar gte 90 and not $dream_ice>><<set $dream_ice = true>><<set $dream_return = 'ice zone'>><<display 'next dream'>><<else>><<if not $beat_elf>><<display 'grotto_elf'>><<else>>You pass through the grotto undisturbed.\n\n<<display 'ice mountain'>><<endif>><<endif>>
<<set $radioactive = $radioactive+1>>You siphon out a chunk of radioactive chocolate ore!\nYou have <<print $radioactive>> pieces of radioactive chocolate.\n\n<<display 'mine_free'>>
<html><img width="256" src="dream6b.png"></html>\n\n<span class="wavy">acid burns.\n\n[[wake up]]</span>\n
WELCOME TO ICE ROBOT BATTLE ARENA FACTORY\n\n<<if $arena_assembled>>HERE IS YOUR ARENA, ARE YOU GOING TO USE IT NOW THAT IT HAS BEEN MANUFACTURED?\n\nEnter [[ice robot battle arena]].\nReturn to [[ice zone entrance|ice zone]].<<elseif $electric_toothbrush and $unknown_device>>YOU COULDN'T FIND AN AUTOMATIC OBSTACLE? NEVER MIND, YOU WILL HAVE TO OPERATE THEM MANUALLY.\n\nLET'S GET THIS ARENA ASSEMBLED!\n\nTIME PASSES...<<display 'time passes'>>\n\nOK HERE IS YOUR ARENA.\n\n<<set $battle_arena = true>>Enter [[ice robot battle arena]].\nReturn to [[ice zone entrance|ice zone]].<<else>>WE CAN BUILD YOU AN ICE ROBOT BATTLE ARENA IF YOU WISH TO FIGHT THE ICE ROBOT BOSS\n\nALL WE NEED ARE SOME SPARE PARTS:\nAN AUTOMATIC OBSTACLE\n<<if not $electric_toothbrush>>AN ELECTRIC TOOTHBRUSH<html><br></html><<endif>><<if not $unknown_device>>AN UNKNOWN DEVICE<html><br></html><<endif>>\nYOU MAY BE ABLE TO FIND SOME OF THESE IN THE TRASH<<if not $junkyard_map>><br>THE JUNKYARD IS HIDDEN BUT HERE IS A MAP<<endif>>\n\n<<if not $junkyard_map>>Take [[junkyard map|ice robot battle arena factory][$junkyard_map = true]].<br><<endif>>Return to [[ice zone entrance|ice zone]].<<endif>>
<<if $visited_trash and $electric_toothbrush>><<display 'trash mountain'>><<else>>The longer you spend going up the trash heap the higher it gets, until it seems a veritable trash mountain towering above you.<<if not $electric_toothbrush>><html> </html>You see an electric toothbrush here.<<endif>>\n\n<<if not $electric_toothbrush>>Take [[electric toothbrush|trash heap][$electric_toothbrush = true]].<html><br></html><<endif>>Continue up the [[trash mountain]].\nReturn to the [[junkyard entrance|junkyard]].<<endif>>
<<set $miss_attack = 2>><<set $moved_obstacles = true>>You move obstacles to distract the ice robot.\n\n<<display 'hax'>>
<html><img width="256" src="dream5b.png"></html>\n\n<span class="wavy">It looks familar - it is your own shadow! Bones burst from your lips and fingers.\n\n[[wake up]]</span>
<<if $sugar gt 70 and not $dream_desert>><<set $dream_desert = true>><<set $dream_return = 'desert'>><<display 'next dream'>><<else>><<if not $beat_frog>><<display 'desert_frog'>><<else>><<display 'desert_free'>><<endif>><<endif>>
<<set $bars = $bars-1>><<set $lollipops = $lollipops+1>>You wiggle about the chocolate bar until it transforms into a lollipop.\n\n<<display 'hax'>>
You buy a chocolate bar.<<set $money = $money-3>><<set $bars = $bars+1>>\n\n<<display 'general store'>>
<<set $sours = $sours-1>><<set $lollipops = $lollipops+3>>You warm the sour lolly in your armpit until it bursts into a shower of lollipops.\n\n<<display 'hax'>>
<<set $poppings = $poppings-1>><<set $lollipops = $lollipops+2>>You lick the popping candy gently until it collapses into a stable pair of lollipops.\n\n<<display 'hax'>>
<<set $lollipops = $lollipops-12>><<set $armour = true>><<set $shield = $shield+23>><<set $sugar = $sugar+2>><<display 'time passes'>>Glabro takes the lollipops and weaves you a tight-fitting suit of liquorice armour.\n\n<<display 'junkyard_free'>>
<<set $beat_elf = true>><<set $doom = $doom+2>><<display 'time passes'>>The elf's blood sprays out into the chill air of the grotto, glistening prismatically as it rapidly freezes. Sudden flickers as sparkling cold-locusts leap on the frostlets and crunch them for nourishment.\n\nContinue to the [[ice mountain]].
<<set $class = "Lollipop Witch">><<set $money=3>><<display 'Levelup'>>
<<display 'time passes'>><<set $flosses = $flosses-1>><<set $rocks = $rocks-1>><<set $gobstoppers = $gobstoppers+1>>You bake a long-lasting gobstopper.\n\n<<display 'gingerbread cottage'>>
<<if $damage gt 1>><<set $damage = $damage-1>><<endif>><<if $mouth gt 0>><<set $mouth = $mouth-1>><<endif>><<if $sensitivity gt 1>><<set $sensitivity = $sensitivity-1>><<endif>><<if $attacks gt 1>><<set $attacks = $attacks-1>><<endif>>
(function () {\n "use strict";\n version.extensions['soundMacros'] = {\n major: 1,\n minor: 1,\n revision: 2\n };\n var p = macros['playsound'] = {\n soundtracks: {},\n handler: function (a, b, c, d) {\n var loop = function (m) {\n if (m.loop == undefined) {\n m.loopfn = function () {\n this.play();\n };\n m.addEventListener('ended', m.loopfn, 0);\n } else m.loop = true;\n m.play();\n };\n var s = eval(d.fullArgs());\n if (s) {\n s = s.toString();\n var m = this.soundtracks[s.slice(0, s.lastIndexOf("."))];\n if (m) {\n if (b == "playsound") {\n m.play();\n } else if (b == "loopsound") {\n loop(m);\n } else if (b == "pausesound") {\n m.pause();\n } else if (b == "unloopsound") {\n if (m.loop != undefined) {\n m.loop = false;\n } else if (m.loopfn) {\n m.removeEventListener('ended', m.loopfn);\n delete m.loopfn;\n }\n } else if (b == "stopsound") {\n m.pause();\n m.currentTime = 0;\n } else if (b == "fadeoutsound" || b == "fadeinsound") {\n if (m.interval) clearInterval(m.interval);\n if (b == "fadeinsound") {\n if (m.currentTime>0) return;\n m.volume = 0;\n loop(m);\n } else {\n if (!m.currentTime) return;\n m.play();\n }\n var v = m.volume;\n m.interval = setInterval(function () {\n v = Math.min(1, Math.max(0, v + 0.005 * (b == "fadeinsound" ? 1 : -1)));\n m.volume = Math.easeInOut(v);\n if (v == 0 || v == 1) clearInterval(m.interval);\n if (v == 0) {\n m.pause();\n m.currentTime = 0;\n m.volume = 1;\n }\n }, 10);\n }\n }\n }\n }\n }\n macros['fadeinsound'] = p;\n macros['fadeoutsound'] = p;\n macros['unloopsound'] = p;\n macros['loopsound'] = p;\n macros['pausesound'] = p;\n macros['stopsound'] = p;\n macros['stopallsound'] = {\n handler: function () {\n var s = macros.playsound.soundtracks;\n for (var j in s) {\n\t\tif (s.hasOwnProperty(j)) {\n s[j].pause();\n if (s[j].currentTime) {\n\t\t s[j].currentTime = 0;\n\t\t }\n\t\t}\n }\n }\n }\n var div = document.getElementById("storeArea").firstChild;\n var fe = ["ogg", "mp3", "wav", "webm"];\n while (div) {\n var b = String.fromCharCode(92);\n var q = '"';\n var re = "['" + q + "]([^" + q + "']*?)" + b + ".(ogg|mp3|wav|webm)['" + q + "]";\n k(new RegExp(re, "gi"));\n div = div.nextSibling;\n }\n\n function k(c, e) {\n do {\n var d = c.exec(div.innerHTML);\n if (d) {\n var a = new Audio();\n if (a.canPlayType) {\n for (var i = -1; i < fe.length; i += 1) {\n if (i >= 0) d[2] = fe[i];\n if (a.canPlayType("audio/" + d[2])) break;\n }\n if (i < fe.length) {\n a.setAttribute("src", d[1] + "." + d[2]);\n a.interval = null;\n macros.playsound.soundtracks[d[1]] = a;\n } else console.log("Browser can't play '" + d[1] + "'");\n }\n }\n } while (d);\n }\n}());