var linked = false;



try {



version.extensions['generateSpaceMacro'] = {

major:1, minor:0, revision:0

};



macros['generatespace'] = {

handler: function(place, macroName, params, parser) {



if (params.length != 0) {



var type = params.shift();

var html = "";



if (type == "corridor") {

html = generateCorridor(params);

}

else if (type == "stairs") {

html = generateStairs(params);

}

else if (type == "elevator") {

html = generateElevator(params);

}

else if (type == "snow") {

html = generateSnow(params);

}

else if (type == "frost") {

html = generateFrost(params);

}

else if (type == "water") {

html = generateWater(params);

}

else if (type == "cycles") {

html = generateCycles(params);

}

else if (type == "timedcycles") {

html = generateTimedCycles(params);

}

else if (type == "wasteland") {

html = generateTheWasteland(params);

}



new Wikifier(place, html);



}

},

init: function() { },

};

}

catch(e) {

console.log(e.message);

throwError(place,"randomunicode Setup Error: "+e.message);

}



function generateCorridor(params) {



var rendered = (params[0] == "true");



theString = "";



theString += "<span class=\s"nowrap\s">";



theString += "<span class=\s"home\s">" + params[1] + "</span>"; // Add the default home tag.



theString += "<span class=\s"warning\s">";



if (!rendered) {

theString += " <<revise walk" + i + " \s"walk.\s">><<insertion walk" + i + ">> ";

for (var i = 2; i < params.length - 1; i++) {

theString += params[i];

theString += " <<revise walk" + i + " \s"walk.\s">><<insertion walk" + i + ">> ";

}

theString += "</span>"; // Close warning



theString += params[params.length-1];





for (var i = 1; i < params.length; i++) {

theString += "<<endinsertion>>"

}

}

else {

for (var i = 2; i < params.length - 1; i++) {

theString += " " + params[i];

}

theString += " " + params[params.length-1];

theString += "</span>"; // Close warning



}



theString += "</span>"; // Close nowrap



return theString;

}



function generateStairs(params) {



var rendered = (params[0] == "true");

var homeLinkText = params[1];

var homeLinkDestination = params[2];

var steps = parseInt(params[3]);

var warningLinkText = params[4];

var warningLinkDestination = params[5];



var indentPercentage = 0.15; // Percentage of the width

var indentDirection = 1;

var theWidth = $('#passages').width();

var indentAmount = indentPercentage*indentDirection*theWidth;

var currentIndent = indentAmount;

var previousIndent = 0;

var theString = "";



console.log("Indent amount: ",indentAmount,", theWidth: ",theWidth);



theString += "<span class=\s"nowrap\s">";



if (false) {



// THE OLD VERSION OF STAIRS FROM THE BOTTOM WHERE IT'S INTERACTIVE

for (var i = 0; i < steps+1; i++) {

theString += "<<revision step" + i + ">>";

theString += Array(steps-i+1).join("\sn");

theString += "<<becomes>>";

}



theString += "<span class='home'>[[" + homeLinkText + "|" + homeLinkDestination + "]]</span>\sn";

theString += "@@padding-left:" + currentIndent + "px; @@";

theString += "step.";



for (var i = steps; i >= 1; i--) {

theString += "<<endrevision>>";



theString += "@@padding-left:" + currentIndent + "px; @@";

theString += "<span class='home'><<revise step" + (i) + " 'step.'>></span>";

theString += "\sn";



if (currentIndent > $('#passages').width() || currentIndent < indentAmount) {

// if (currentIndent > 5*indentAmount || currentIndent < indentAmount) {

indentDirection = -indentDirection;

}

currentIndent += indentDirection * indentAmount;



theString += "@@padding-left:" + currentIndent + "px; @@";

theString += "step.";

}



theString += "<<endrevision>>";

theString += "@@padding-left:" + (currentIndent) + "px; @@";

theString += "<span class='home'><<revise step" + 0 + " 'step.'>></span>\sn";



// The bad exit

if (currentIndent > $('#passages').width() || currentIndent < indentAmount) {

// if (currentIndent > 5*indentAmount || currentIndent < indentAmount) {

indentDirection = -indentDirection;

}

theString += "@@padding-left:" + (currentIndent + (indentAmount*indentDirection)) + "px;";

theString += "<span class='warning'>[[" + warningLinkText + "|" + warningLinkDestination + "]]</span>@@\sn";

}





else if (rendered) {



// A VERSION OF THE STAIRS THAT ARE PRE-RENDERED SO YOU CAN

// JUST LEAVE THEM QUICKLY



theString += "<span class='home'>[[" + homeLinkText + "|" + homeLinkDestination + "]]</span>\sn";



theString += "@@padding-left:" + currentIndent + "px; @@";

theString += "<span class='warning'>step.</span>\sn";



for (var i = 0; i < steps; i++) {

// if (currentIndent > 5*indentAmount || currentIndent < indentAmount) {

if (currentIndent > theWidth-2*indentAmount || currentIndent < indentAmount) {

indentDirection = -indentDirection;

}

currentIndent += indentDirection * indentAmount;

theString += "@@padding-left:" + currentIndent + "px; @@";

theString += "<span class='warning'>step.</span>\sn";

}



// if (currentIndent > 5*indentAmount || currentIndent < indentAmount) {

if (currentIndent > theWidth-2*indentAmount || currentIndent < indentAmount) {

indentDirection = -indentDirection;

}

theString += "@@padding-left:" + (currentIndent + (indentAmount*indentDirection)) + "px;<span class=\s"warning\s">[[" + warningLinkText + "|" + warningLinkDestination + "]]</span>@@\sn";



for (var i = 0; i < steps+1; i++) {

theString += "</span>";

}

}





//

// FROM TOP

//

else {

theString += "<span class='home'>[[" + homeLinkText + "|" + homeLinkDestination + "]]</span>\sn";



theString += "@@padding-left:" + currentIndent + "px; @@";

theString += "<span class='warning'><<insert \s"step.\s">></span>\sn";



for (var i = 0; i < steps; i++) {

// if (currentIndent > 5*indentAmount || currentIndent < indentAmount) {

if (currentIndent > theWidth-2*indentAmount || currentIndent < indentAmount) {

indentDirection = -indentDirection;

}

currentIndent += indentDirection * indentAmount;

theString += "@@padding-left:" + currentIndent + "px; @@";

theString += "<span class='warning'><<insert 'step.'>></span>\sn";

}



// if (currentIndent > 5*indentAmount || currentIndent < indentAmount) {

if (currentIndent > theWidth-2*indentAmount || currentIndent < indentAmount) {

indentDirection = -indentDirection;

}

theString += "@@padding-left:" + (currentIndent + (indentAmount*indentDirection)) + "px;<span class=\s"warning\s">[[" + warningLinkText + "|" + warningLinkDestination + "]]</span>@@\sn";



for (var i = 0; i < steps+1; i++) {

theString += "<<endinsert>></span>";

}

}

theString += "</span>"; // Closing nowrap



return theString;

}



function generateElevator (params) {



var elevatorAtTop = (params[0] == "true");

var homeLinkDestination = params[1];

var floors = parseInt(params[2]);

var warningLinkDestination = params[3];



var inactiveButton = "<<cyclinglink 'button.'>>";

var closedDoors = "<<cyclinglink 'closed doors.'>>"



var replaceTime = 2;



var theString = "";



if (elevatorAtTop) {

theString += "<<revision elevatortop>><span class='home'>[[open doors.|" + homeLinkDestination + "]]</span><<becomes>>";

theString += "<<timedreplace " + replaceTime + "s>><<cyclinglink 'closing doors.'>> " + inactiveButton + "<<becomes>>";



theString += "<<timedinsert " + replaceTime*2 + "s>>down.\sn\sn";



for (var i = 0; i < floors; i++) {

theString += "<<timedinsert " + replaceTime + "s>>down.\sn\sn";

}

for (var i = 0; i < floors; i++) {

theString += "<<endtimedinsert>>";

}

theString += "<<endtimedinsert>>";



theString += "<<timedreplace " + (floors+4)*replaceTime + "s>>" + closedDoors + " " + inactiveButton + "<<becomes>>";

// theString += "<<timedreplace " + replaceTime + "s>> <<cyclinglink 'closed doors.'>> " + inactiveButton + "<<becomes>>"

theString += "<<timedreplace " + replaceTime + "s>> <<cyclinglink 'opening doors.'>> " + inactiveButton + "<<becomes>>"

theString += "<span class='warning'>[[open doors.|" + warningLinkDestination + "]]</span> " + inactiveButton;

theString += "<<endtimedreplace>>";

// theString += "<<endtimedreplace>>";

theString += "<<endtimedreplace>>";

theString += "<<endtimedreplace>>";

theString += "<<endrevision>>";



theString += " <span class='warning'><<revise elevatortop 'button.'>></span>"

}

else {

theString += "<<revision elevatorbottom>>" + Array(floors+1).join("\sn\sn") + "\sn\sn" + closedDoors + "<<becomes>>";



theString += "<<timedreplace " + replaceTime + "s>>" + Array(floors+1).join("\sn\sn") + "\sn\sn" + "<<cyclinglink 'closing doors.'>> " + inactiveButton + "<<becomes>>";

theString += "<<timedreplace " + replaceTime*2 + "s>>" + Array(floors+1).join("\sn\sn") + "\sn\sn" + "<<cyclinglink 'closed doors.'>> " + inactiveButton + "<<becomes>>";



for (var i = 0; i < floors; i++) {

var floor = (floors - i);

theString += "<<timedreplace " + replaceTime + "s>>";

theString += Array(floor+1).join("\sn\sn") + closedDoors + " " + inactiveButton;

theString += Array(i+1).join("\sn\snup.");

theString += "\sn\snup.";

theString += "<<becomes>>";

}

theString += "<<timedreplace " + replaceTime*2 + "s>>"

theString += closedDoors + " " + inactiveButton + Array(floors+2).join("\sn\snup.");

theString += "<<becomes>>"

theString += "<<timedreplace " + replaceTime + "s>>";

theString += "<<cyclinglink 'opening doors.'>>" + " " + inactiveButton + Array(floors+2).join("\sn\snup.");

theString += "<<becomes>>";

theString += "<span class='home'>[[open doors.|" + homeLinkDestination + "]]</span>" + " " + inactiveButton + Array(floors+2).join("\sn\snup.");

theString += "<<endtimedreplace>><<endtimedreplace>>"

for (var i = 0; i < floors; i++) {

theString += "<<endtimedreplace>>";

}

theString += "<<endtimedreplace>>";

theString += "<<endtimedreplace>>";

theString += "<<endrevision>>";

theString += "<<revise elevatordoortop 'button.'>>";

theString += " <span class='warning'><<revise elevatorbottom 'button.'>></span>";



}



return theString;

}



function generateSnow(params) {

var numSnows = parseInt(params[0]);



var indentAmount = 10;

var indentDirection = 1;

var currentIndent = indentAmount;

var previousIndent = 0;

var theString = "";



for (var i = 0; i < numSnows; i++) {

theString += "<span class=\s"snow\s">";

var padding = 0;

for (var j = 0; j < 10; j++) {

if (Math.random() < 0.5) {

padding += 1;

}

}

theString += "@@padding-left: " + padding + "px;"

theString += "<<cyclinglink \s"snow.\s" \s"snow.\s">>";

theString += "@@";

theString += "</span> ";

}



return theString;

}



function generateFrost(params) {

var numSnows = parseInt(params[0]);



var indentAmount = 10;

var indentDirection = 1;

var currentIndent = indentAmount;

var previousIndent = 0;

var theString = "";



for (var i = 0; i < numSnows; i++) {

theString += "";



// theString += "@@padding-left: 2px;"

theString += "<<replace 'frost.'>><<cyclinglink 'footstep.'>><<endreplace>> ";

// theString += "@@";

theString += "";

}



return theString;

}



function generateWater(params) {

var numWater = parseInt(params[0]);



var indentAmount = 10;

var indentDirection = 1;

var currentIndent = indentAmount;

var previousIndent = 0;

var theString = "";



for (var i = 0; i < numWater; i++) {

// theString += "";

// for (var j = 0; j < 3; j++) {

// if (Math.random() < 0.5) {

// theString += " ";

// }

// }

// theString += "@@padding-left: 2px;"

theString += "<<hoverreplace>>water<<becomes>>water<<endhoverreplace>>. ";

// theString += "@@";

theString += "";

}



return theString;

}



function generateCycles(params) {



console.log(params);



var theString = "";

var numCycles = parseInt(params.shift());

var cycleMin = parseFloat(params.shift());

var cycleMax = parseFloat(params.shift());



for (var i = 0; i < numCycles; i++) {

theString += "<<cyclinglink ";

for (var j = 0; j < params.length-1; j++) {

theString += "'" + params[j] + "' ";

}

theString += "'" + params[params.length-1] + "'>> ";

}



//

// for (var i = 0; i < numCycles; i++) {

// theString += "<<timedcycle " + (cycleMin + (Math.random() * (cycleMax - cycleMin))) + "s>>"

// for (var j = 0; j < params.length-1; j++) {

// theString += "<<cyclinglink '" + params[j] + "'>><<becomes>>";

// }

// theString += "<<cyclinglink '" + params[params.length-1] + "'>><<becomes>>";

// theString += "<<endtimedcycle>> ";

// }



return theString;

}



function generateTimedCycles(params) {



var theString = "";

var numCycles = parseInt(params.shift());

var cycleMin = parseFloat(params.shift());

var cycleMax = parseFloat(params.shift());

var totalTime = parseInt(params.shift());



theString += "<<timedreplace " + totalTime + "s>>"

for (var i = 0; i < numCycles; i++) {

theString += "<<timedcycle " + (cycleMin + (Math.random() * (cycleMax - cycleMin))) + "s>>"

for (var j = 0; j < params.length-2; j++) {

theString += "<<cyclinglink '" + params[j] + "'>><<becomes>>";

}

theString += "<<cyclinglink '" + params[params.length-2] + "'>><<becomes>>";

theString += "<<endtimedcycle>> ";

}

theString += "<<becomes>>"

for (var i = 0; i < numCycles; i++) {

theString += "<<cyclinglink '" + params[params.length-1] + "'>> ";

}

theString += "<<endtimedreplace>>"



return theString;

}



var theWastelandLines = [

[

"What is that sound high in the air",

"Murmur of maternal lamentation",

"What is the city over the mountains",

"Cracks and reforms and bursts in the violet air",

"Falling towers",

"Unreal"

],

[

"And bats with baby faces in the violet light",

"Whistled, and beat their wings",

"And crawled head downward down a blackened wall",

"And upside down in air were towers",

"Tolling reminiscent bells, that kept the hours",

"And voices singing out of empty cisterns and exhausted wells.",

],

[

"In this decayed hole among the mountains",

"There is the empty chapel, only the wind’s home.",

"Dry bones can harm no one.",

"In a flash of lightning. Then a damp gust",

"The jungle crouched, humped in silence.",

],

[

"Then spoke the thunder",

"DA",

"The awful daring of a moment’s surrender",

"By this, and this only, we have existed",

"In our empty rooms",

],

[

"DA",

"Dayadhvam: I have heard the key",

"We think of the key, each in his prison",

"Thinking of the key, each confirms a prison",

],

[

"DA",

"These fragments I have shored against my ruins",

"Datta. Dayadhvam. Damyata.",

"Shantih shantih shantih",

]

];



count = 0;

linesIndex = 0;



function generateTheWasteland(params) {

var theString = "";



switch (count) {



case 0:

theString += "<<generatenoise 'whitenoise' 0.0 " + 0.0 + " 0.0>>"

break;



case 1:

theString += generateWastelandPassage(true,0,0,false,0,0);

theString += "<<generatenoise 'whitenoise' 0.2 " + (count*0.1) + " 1.0>>"



break;



case 2:

theString += generateWastelandPassage(true,0,0,true,0,0);

theString += "<<generatenoise 'whitenoise' 0.2 " + (count*0.1) + " 1.0>>"



break;



case 3:

theString += generateWastelandPassage(true,0.1,0,true,0.1,0);

theString += "<<generatenoise 'whitenoise' 0.2 " + (count*0.1) + " 1.0>>"



break;



case 4:

theString += generateWastelandPassage(true,0.25,0.05,true,0.25,0.05);

theString += "<<generatenoise 'whitenoise' 0.2 " + (count*0.1) + " 1.0>>"



break;



case 5:

theString += generateWastelandPassage(true,0.5,0.1,true,0.5,0.1);

theString += "<<generatenoise 'whitenoise' 0.2 " + (count*0.1) + " 1.0>>"



break;



case 6:

theString += generateWastelandPassage(true,0.75,0.25,true,0.75,0.25);

theString += "<<generatenoise 'whitenoise' 0.2 " + (count*0.1) + " 1.0>>"

break;



case 7:

theString += generateWastelandPassage(true,1,0.5,true,1,0.5);

theString += "<<generatenoise 'whitenoise' 0.2 " + (count*0.1) + " 1.0>>"



break;



case 8:

theString += "<<generatenoise 'whitenoise' 0.0 " + (count*0.0) + " 0.0>>"



break;



case 9:



theString += "<span style='animation: fadeout 0.5s forwards 10s'>";

theString += "<<timedinsert 0.1s>><<these>><<endtimedinsert>>";

theString += "<<timedinsert 0.2s>><<fragments>><<endtimedinsert>>";

theString += "<<timedinsert 0.3s>><<i>><<endtimedinsert>>";

theString += "<<timedinsert 0.4s>><<have>><<endtimedinsert>>";

theString += "<<timedinsert 0.5s>><<shored>><<endtimedinsert>>";

theString += "<<timedinsert 0.6s>><<against>><<endtimedinsert>>";

theString += "<<timedinsert 0.7s>><<my>><<endtimedinsert>>";

theString += "<<timedinsert 0.8s>><<ruins>><<endtimedinsert>>";

theString += "</span>"



break;



case 10:



break;



case 11:



theString += "<span class='black'><<cyclinglink 'end.'>></span>";



break;

}



if (count == 9) theString += "<<timedgoto 'The Wasteland' 6s>>";

else if (count < 11) theString += "<<timedgoto 'The Wasteland' 5s>>";





// if (count < 11) theString += "<<generatenoise 'whitenoise' 0.2 " + (count*0.1) + " 1.0>>"



count++;





return theString;

}



function generateWastelandPassage(showDarks,darkCorruptRate,darkBreakRate,showLines,lineCorruptRate,lineBreakRate) {

var theString = "";



var darks = 100;

console.log(linesIndex);

console.log(theWastelandLines[linesIndex]);

console.log(theWastelandLines[linesIndex].length);

var textFrequency = Math.floor(darks/(theWastelandLines[linesIndex].length));

var textCounter = 0;

var textIndex = 0;





for (var i = 0; i < darks; i++) {

if (showDarks) {

theString += "<span class='black'>";

theString += "<span style='" + ((Math.random() < 0.5) ? "opacity: 1" : "opacity: 0") + "; animation: flicker " + (0.5 + Math.random() * 2) + "s infinite;'>";

theString += corrupt("dark.",darkCorruptRate,darkBreakRate);

theString += "</span>";

theString += "</span> ";

}



if (showLines) {

if (textCounter == textFrequency) {

theString += "<span class='lightning-text'>";

theString += "<span style='animation: lightning " + (1 + Math.random() * 8) + "s infinite;'>";

theString += corrupt(theWastelandLines[linesIndex][textIndex],lineCorruptRate,lineBreakRate);

theString += "</span>"

theString += "</span> ";

textIndex++;

textCounter = 0;

}



textCounter++;

}

}

if (showLines) linesIndex++;





return theString;

}



function corrupt(text,corruptRate,breakRate) {

// console.log("Corrupting: " + text);

var corrupted = "";

// First corrupt the text

for (var i = 0; i < text.length; i++) {

if (Math.random() < corruptRate) {

corrupted += getRandomChar();

}

else {

corrupted += text.charAt(i);

}

}



var returnText = "";

if (Math.random() > breakRate) {

returnText += "<<cyclinglink '" + corrupted + "'>>";

}

else {

var textArray = corrupted.split(' ');

returnText += "<<" + textArray.join('') + ">><<timedinsert " + Math.floor(1+Math.random()*5) + "s>><<generatenoise 'whitenoise' 0.2 2 1.0>><<endtimedinsert>>";

}



return returnText;

}



function getRandomChar() {

var char = String.fromCharCode(Math.random() * 0xffff);

if ("|[]@;<>".indexOf(char) != -1) {

char = "0";

}

return char;

}







body {

\tbackground-color: #bbbbbb;

}



#passages {

\tbackground-color: #bbbbbb;

\tcolor: white;

\tline-height: 1.5;

\tbackground-color: #bbbbbb;

}





#sidebar {

\tdisplay: none;

}



input {

\tfont-size: 18pt;

\twidth: 400px;

}



.passage a {

\tcolor: white;

\tbackground-color: #55cc55;

}



.passage a:hover {

\tcolor: white;

\tbackground-color: green;

}



.passage a:active {

\tbackground-color: white;

\tcolor: white;

}



#footer, #footer-container, #floater, .toolbar, .title, #storyTitle, #storyAuthor {

\tdisplay: none;

}





<<generateui 2 "Thunder Antichamber" "$thunderAirlockDoorUnlocked" true true 0.05 "Thunder UI">><<generatenoise "tone" 100>>

<<if previous() is "Fire Antichamber">><<generatespace "stairs" true "a door." "Chess Antichamber" 25 "a door." "Fire Antichamber">><<scroll "bottom">><<else>><<generatespace "stairs" false "a door." "Chess Antichamber" 25 "a door." "Fire Antichamber">><<endif>><<generatenoise "whitenoise" 0.009 0.2 1.0>>

body {

\tbackground-color: #222;

}



#passages {

\tbackground-color: #222;

\tfont-family: fixed;

\tfont-size: 14pt;

\tcolor: white;

\tline-height: 1.5;



\t-webkit-animation-name: flicker;

\t-webkit-animation-duration: 0.2s;

\t-webkit-animation-iteration-count: infinite;

\t-webkit-animation-timing-function: linear;

}





#sidebar {

\tdisplay: none;

}



input {

\tfont-size: 18pt;

\twidth: 20%;

}



.passage a {

\tcolor: red;

\t-webkit-animation-name: flicker;

\t-webkit-animation-duration: 0.2s;

\t-webkit-animation-iteration-count: infinite;

\t-webkit-animation-timing-function: linear;

}



.passage a:hover {

\tbackground-color: red;

\tcolor: red;

}



.passage a:active {

\tbackground-color: white;

\tcolor: white;

}



#footer, #footer-container, #floater, .toolbar, .title, #storyTitle, #storyAuthor {

\tdisplay: none;

}





<span class="home">[[home.|home.]]</span> <<generatespace "snow" 50>> <<if $burialDoorUnlocked is true>><span class="flicker"><<cyclinglink 'a blank screen.'>></span> <<generatespace "snow" 20>> <span class="warning">[[a door.|Burial Chamber]]</span><<else>><span class="glow"><<replace "snow.">>a glow.<<becomes>><span class="screen">[[a screen.|Burial UI]]</span><<endreplace>></span> <<generatespace "snow" 25>><<replace>><span class="snow"><<cyclinglink 'snow.'>></span><<becomes>><span class='warning'><<cyclinglink 'a door.'>></span><<becomes>><span class='warning'><<cyclinglink 'a locked door.'>></span><<endreplace>></span><<endif>><<generatespace "snow" 50>><<generatenoise "whitenoise" 0.075 0.05 5.0>>







body {

\tbackground-color: #dddddd;

}



#passages {

\tbackground-color: #dddddd;

}



.passage {

\tcolor: white;

\tline-height: 1.5;

\tbackground-color: #dddddd;

}



#sidebar {

\tdisplay: none;

}



input {

\tfont-size: 18pt;

\twidth: 400px;

}





#passages .snow a {

\tcolor: #aaaaaa;

\tbackground-color: #fff;

}



#footer, #footer-container, #floater, .toolbar, .title, #storyTitle, #storyAuthor {

\tdisplay: none;

}





@@font-size:2em;font-weight:bold;color:white;Burnt Matches.@@

@@font-size:1em;font-weight:regular;color:white;Pippin Barr.@@



<<timedgoto "Snow" 5s>>

<<runtracking>>

var linked = false;



try {



version.extensions['runtrackingMacro'] = {

major:1, minor:0, revision:0

};



macros['runtracking'] = {

handler: function(place, macroName, params, parser) {

window.runtracking = function () {

// var sc_project=6867947;

// var sc_invisible=1;

// var sc_security="458bbcb5";

// var scJsHost = (("https:" == document.location.protocol) ? "https://secure." : "http://www.");

// document.write("<sc"+"ript type='text/javascript' src='" +scJsHost+"statcounter.com/counter/counter.js'></"+"script>");

// <!-- End of StatCounter Code for Default Guide -->



(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)

})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');



ga('create', 'UA-25915730-1', 'auto');

ga('send', 'pageview');

}



window.runtracking();



console.log("Tracking.");

},

init: function() {

},

};

}

catch(e) {

console.log(e.message);

throwError(place,"randomunicode Setup Error: "+e.message);

}



<span class="home">[[five steps.|Snow]]</span> <<replace "dried lilacs.">><<cyclinglink "lilac fragments.">><<endreplace>> <<generatespace "frost" 25>> <span class="warning"><<if $burialDoorOpen>>an open door. [[a corridor.|Burial Corridor]]</span><<else>><span class="warning"><<replace "a door.">>an open door.<<set $burialDoorOpen to true>> [[a corridor.|Burial Corridor]]<<endreplace>></span><<endif>> <<replace "a diagram.">><<cyclinglink 'a circle with radiating lines.'>><<endreplace>><<generatenoise "whitenoise" 0.05 0.03 5.0>>

body {

\tbackground-color: #4c4;

}



#passages {

\tbackground-color: #4c4;

}



.passage {

\tcolor: #666;

\tline-height: 1.5;

\tbackground-color: #4c4;

}



#sidebar {

\tdisplay: none;

}



#footer, #footer-container, #floater, .toolbar, .title, #storyTitle, #storyAuthor {

\tdisplay: none;

}



(function(){postrender.typewriter = function (b) {

if(this.tags){var r=new RegExp("t8n.typewriter.([0-9]+)(?:[^0-9]|$)","g");var t=r.exec(this.tags.toString());

if(t){typeout(b,t[1]+0);}}return b;};var typeout=function(c,t){var Furl=function(current){this.n=current;

this.out=false;this.data=current.nodeValue;current.nodeValue="";this.kids=[];var cn=current.childNodes;

if(current.style && current.style.display=="none"){return;}while(cn.length>0){var f=new Furl(cn[0]);

current.removeChild(cn[0]);f.out=true;this.kids.push(f);}};var nodes=new Furl(c);

var unfurl=function(furled,d){var n=furled.n;if(furled.out){d.appendChild(n);furled.out=false;

}if(furled.data){n.nodeValue+=furled.data[0];furled.data=furled.data.slice(1);return true;

}for(var j=0;j<furled.kids.length;j++){var ret=unfurl(furled.kids[j],n);if(ret){return true;

}}return false;};var title=state.history[0].passage.title;var intr=setInterval(function(){if(state.history[0].passage.title==title&&unfurl(nodes,null)){return;

}clearInterval(intr);},t);};}());

version.extensions.cyclinglinkMacro={major:3,minor:3,revision:0};

macros.cyclinglink={handler:function(a,b,c){var rl="cyclingLink";

function toggleText(w){w.classList.remove("cyclingLinkInit");

w.classList.toggle(rl+"Enabled");w.classList.toggle(rl+"Disabled");

w.style.display=((w.style.display=="none")?"inline":"none")}switch(c[c.length-1]){case"end":var end=true;

c.pop();break;case"out":var out=true;c.pop();break}var v="";if(c.length&&c[0][0]=="$"){v=c[0].slice(1);

c.shift()}var h=state.history[0].variables;if(out&&h[v]===""){return

}var l=Wikifier.createInternalLink(a,null);l.className="internalLink cyclingLink";

l.setAttribute("data-cycle",0);for(var i=0;i<c.length;i++){var on=(i==Math.max(c.indexOf(h[v]),0));

var d=insertElement(null,"span",null,"cyclingLinkInit cyclingLink"+((on)?"En":"Dis")+"abled");

if(on){h[v]=c[i];l.setAttribute("data-cycle",i)}else{d.style.display="none"

}insertText(d,c[i]);if(on&&end&&i==c.length-1){l.parentNode.replaceChild(d,l)

}else{l.appendChild(d)}}l.onclick=function(){var t=this.childNodes;

var u=this.getAttribute("data-cycle")-0;var m=t.length;toggleText(t[u]);

u=(u+1);if(!(out&&u==m)){u%=m;if(v){h[v]=c[u]}}else{h[v]=""}if((end||out)&&u==m-(end?1:0)){if(end){var n=this.removeChild(t[u]);

n.className=rl+"End";n.style.display="inline";this.parentNode.replaceChild(n,this)

}else{this.parentNode.removeChild(this);return}return}toggleText(t[u]);

this.setAttribute("data-cycle",u)}}};



<<generateui 2 "Fire Antichamber" "$fireDoorUnlocked" false false 0.1 "Fire UI">><<generatenoise "tone" 100>>

<<generatespace "cycles" 15 2 10 "rock." "dry." "red.">> <<if $thunderAirlockDoorUnlocked is true>><<if $thunderAirlockDoorOpen is false>><<timedreplace 2s>><span class="home">[[open doors.|Water Elevator]]</span><<becomes>><<timedreplace 2s>><<cyclinglink "closing doors.">><<becomes>><<replace "closed doors.">><<cyclinglink 'sealed doors.'>><<endreplace>><<endtimedreplace>><<endtimedreplace>><<else>><<replace "closed doors.">><<cyclinglink 'sealed doors.'>><<endreplace>><<endif>><<else>><span class="home">[[open doors.|Water Elevator]]</span><<endif>> <<generatespace "cycles" 15 2 10 "rock." "dry." "red.">> <<if $thunderAirlockDoorUnlocked is false>><span class="screen">[[a screen.|Thunder UI]]</span><<else>><span class="flicker"><<cyclinglink "a blank screen.">></span><<endif>> <<generatespace "cycles" 20 2 10 "rock." "dry." "red.">> <<if $thunderAirlockDoorUnlocked is true>><<if $thunderAirlockDoorOpen is false>><span class="warning"><<timedreplace 2s>><<cyclinglink "closed doors.">><<becomes>><<timedreplace 2s>><<cyclinglink "opening doors.">><<becomes>><<set $thunderAirlockDoorOpen to true>>[[open doors.|Thunder Airlock]]</span><<endtimedreplace>><<endtimedreplace>></span><<else>><span class="warning">[[open doors.|Thunder Airlock]]</span><<endif>><<else>><span class="warning"><<replace "closed doors.">></span><<cyclinglink "locked doors.">><<endreplace>><<endif>> <<generatespace "cycles" 20 2 10 "rock." "dry." "red.">><<generatenoise "browniannoise" 0.2 0.4 1.0>>





body {

\tbackground-color: #000;

}



#passages {

\tbackground-color: #000;

}



.passage {

\tcolor: #666;

\tline-height: 1.5;

\tbackground-color: #000;

}



#sidebar {

\tdisplay: none;

}



#passages .corrupt {

\tuser-select: none;

\tcolor: #000;

\tbackground-color: #fff;

}





.fadeout {

\tanimation: fadeout 10s forwards;

}



#passages .corrupt:after {

\tcontent: "韵";

}



#passages .corrupt:before {

\tcontent: "籭";

}





#passages .black a {

\tcolor: #222;

\tbackground-color: #111;

}



#passages .black .thunder a {

\tuser-select: none;

\tcolor: #000;

\tbackground-color: #fff;

}



#passages .lightning a {

\tuser-select: none;

\tcolor: rgba(255,255,255,0);

\tbackground-color: rgb(255,255,255);

}



#passages .lightning-text a {

\tuser-select: none;

\tcolor: #000;

\tbackground-color: #fff;

}





#footer, #footer-container, #floater, .toolbar, .title, #storyTitle, #storyAuthor {

\tdisplay: none;

}



.hidden {

\tdisplay: none;

}



@keyframes flicker {

\t50% { opacity: 0; }

\t100% { opacity: 1; }

}



@keyframes lightning {

\t0% { opacity: 0; }

\t88% { opacity: 0; }

\t99% { opacity: 1; }

\t100% {opacity: 0; }

}



@keyframes fadeout {

\tfrom { opacity: 1; }

\tto {opacity: 0;}

}



<<if previous() is "Thunder Antichamber">><<set $elevatorStatus to "bottom">><<else>><<set $elevatorStatus to "top">><<endif>><<if $elevatorStatus is "top">>

<<generatespace "elevator" true "Water Antichamber" 10 "Thunder Antichamber">>

<<else>>

<<generatespace "elevator" false "Water Antichamber" 10 "Thunder Antichamber">>

<<scroll "bottom">>

<<endif>><<generatenoise "whitenoise" 0.004 0.75 1.0>>

<<generatechessui 10 "Chess Antichamber" "$chessDoorUnlocked">><<generatenoise "tone" 100>>

var linked = false;

var context = null;



try {



version.extensions['generateNoiseMacro'] = {

major:1, minor:0, revision:0

};



macros['generatenoise'] = {

handler: function(place, macroName, params, parser) {



if (params.length != 0) {



var type = params[0];



if (context) {

context.close();

}

context = new (window.AudioContext || window.webkitAudioContext)();



switch(type) {

case "tone":



var osc = context.createOscillator(); // instantiate an oscillator

osc.type = 'sine'; // this is the default - also square, sawtooth, triangle

osc.frequency.value = parseInt(params[1]); // Hz

osc.connect(context.destination); // connect it to the destination

osc.start();



break;



case "whitenoise":



var bufferSize = 2 * context.sampleRate,

noiseBuffer = context.createBuffer(1, bufferSize, context.sampleRate),

output = noiseBuffer.getChannelData(0);

for (var i = 0; i < bufferSize; i++) {

output[i] = Math.random() * 2 - 1;

output[i] *= 2;

}

whiteNoise = context.createBufferSource();

whiteNoise.buffer = noiseBuffer;

whiteNoise.loop = true;



whiteNoise.playbackRate.value = parseFloat(params[1]);



var gainNode = context.createGain();

// gainNode.gain.setValueAtTime(1, context.currentTime);

whiteNoise.connect(gainNode);

gainNode.connect(context.destination);



whiteNoise.start(0);

// gainNode.gain.exponentialRampToValueAtTime(1.0, context.currentTime);

// gainNode.gain.setValueAtTime(0, context.currentTime);

gainNode.gain.value = 0;

gainNode.gain.linearRampToValueAtTime(parseFloat(params[2]), context.currentTime+parseFloat(params[3]));

// gainNode.gain.exponentialRampToValueAtTime(1.0, context.currentTime+1000);



// gainNode.gain.setTargetAtTime(1.0, context.currentTime+4,1);



break;



case "browniannoise":



var bufferSize = 4096;

var brownNoise = (function() {

var lastOut = 0.0;

var node = context.createScriptProcessor(bufferSize, 1, 1);

node.onaudioprocess = function(e) {

var output = e.outputBuffer.getChannelData(0);

for (var i = 0; i < bufferSize; i++) {

var white = Math.random() * 2 - 1;

output[i] = (lastOut + (0.02 * white)) / 1.02;

lastOut = output[i];

output[i] *= 3.5; // (roughly) compensate for gain

}

}

node.playbackRate = 0.1;

return node;

})();



brownNoise.playbackRate.value = parseFloat(params[1]);



var gainNode = context.createGain();

brownNoise.connect(gainNode);

gainNode.connect(context.destination);

gainNode.gain.value = 0;

gainNode.gain.linearRampToValueAtTime(parseFloat(params[2]), context.currentTime+parseFloat(params[3]));



// brownNoise.connect(context.destination);

// brownNoise.start(0);



break;

}



// new Wikifier(place, theString);

}

},

init: function() {



},

};

}

catch(e) {

console.log(e.message);

throwError(place,"randomunicode Setup Error: "+e.message);

}



var linked = false;



try {



version.extensions['scrollMacro'] = {

major:1, minor:0, revision:0

};



macros['scroll'] = {

handler: function(place, macroName, params, parser) {

var scrollDelay = 100;

if (params.length != 0) {

if (params[0] == "bottom") {

window.setTimeout(function () {

console.log(width() + "x" + height());

// window.scrollBy(0,height());

window.scrollBy(0,10000);

},scrollDelay);

}

else if (params[0] == "right") {

window.setTimeout(function () {

window.scrollBy(10000,0);

},scrollDelay);

}

else if (params[0] == "bottomright") {

window.setTimeout(function () {

console.log(width() + "x" + height());

window.scrollBy(10000,10000);

},scrollDelay);

}

}



//

},

init: function() { },

};

}

catch(e) {

console.log(e.message);

throwError(place,"randomunicode Setup Error: "+e.message);

}



function height() {

var body = document.body;

var html = document.documentElement;



var height = Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight );

var width = Math.max( body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth );



return 400;

return height;

}



function width() {

var body = document.body;

var html = document.documentElement;



var height = Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight );

var width = Math.max( body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth );



return width;

}



String.prototype.unDash = function()

{

\tvar s = this.split("-");

\tif(s.length > 1)

\t\tfor(var t=1; t < s.length; t++)

\t\t\ts[t] = s[t].substr(0,1).toUpperCase() + s[t].substr(1);

\treturn s.join("");

};

var linked = false;



try {



version.extensions['generatechessuiMacro'] = {

major:1, minor:0, revision:0

};



macros['generatechessui'] = {

handler: function(place, macroName, params, parser) {



if (params.length != 0) {



var paragraphs = 1 + Math.floor(Math.random() * parseInt(params[0]));

var linkBack = params[1];

var lockVar = params[2];



var theString = "";

linked = false;



var p = 0;

while (p < paragraphs || !linked) {



theString += generateParagraph(linkBack,lockVar);



theString += "\sn";

p++;

}



new Wikifier(place, theString);

}

},

init: function() { },

};

}

catch(e) {

console.log(e.message);

throwError(place,"randomunicode Setup Error: "+e.message);

}



function generateParagraph(linkBack,lockVar) {



var thePara = "";



var paragraphLength = 10 + Math.round(Math.random() * 10);



var linking = false;

var replacing = false;

// var css = false;



for (var i = 0; i < paragraphLength; i++) {



if (!linking && Math.random() < 0.05) {

thePara += "<span class=\s"warning\s">[[";

linking = true;

}

else if (linking) {

var link;

if (Math.random() > 0.15) {

link = "Chess UI";

}

else {

link = linkBack;

}

thePara += "|" + link + "][" + lockVar + "= true]]</span>";

linking = false;;

linked = true;

}



thePara += getRandomChar();

}



if (linking) thePara += "|" + linkBack + "][" + lockVar + "= true]]</span>";



return thePara;

}



function getNRandomChars(n) {

var chars = "";

for (var i = 0; i < n; i++) {

chars += getRandomChar();

}

return chars;

}



function getRandomChar() {

var char = String.fromCharCode(0x2654 + Math.random() * 0x000b);

if ("|[]@;".indexOf(char) != -1) {

char = "0";

}

return char;

}



<<print state.history[0].passage.title>>

<span class="home"><<cyclinglink 'end.'>></span>

<<generatenoise "whitenoise" 0 0 0>>

jquery:on

hash:off

bookmark:on

modernizr:off

undo:off

obfuscate:off

exitprompt:off

blankcss:on



<span class="home">[[a door.|Burial Corridor]]</span>

@@margin-left:10%;<<replace "a chair.">>an unremarkable chair.<<endreplace>>@@

@@margin-left:15%;<<replace "overhead lights.">>seven overhead lights.<<endreplace>>@@

@@margin-left:-5%;<<replace "a table.">>a table with concentric circles scratched onto its surface.<<endreplace>>@@

@@margin-left:5%;<<replace "a framed picture face down on the table.">>a framed picture of a man, his eyes whited out, upright on the table.<<endreplace>>@@

@@margin-left:20%;<<replace "a time device on the wall.">>a motionless time device.<<endreplace>>@@

@@margin-left:-10%;<<replace "a faint breeze.">>an insipid breeze from a ventilation duct.<<endreplace>>@@

@@margin-left:5%;<<replace "a scent.">>a synthetic scent.<<endreplace>>@@

@@margin-left:10%;<<replace "the ceiling.">>the ceiling, pitted and marked.<<endreplace>>@@

@@margin-left:20%;<<replace "bones.">>the bones of rodents.<<endreplace>>@@

@@margin-left:10%;<<if $chessDoorUnlocked is false>><span class="screen">[[a screen.|Chess UI]]</span><<else>><span class="flicker"><<cyclinglink "a blank screen.">></span><<endif>>@@

@@margin-left:-10%;<<if $chessDoorUnlocked is true>><<if $chessAntichamberDoorOpen is true>>an open door. <span class="warning">[[a flight of stairs.|Chess Stairs]]</span><<else>><span class="warning"><<replace "a closed door.">>an open door.<<set $chessAntichamberDoorOpen to true>> [[a flight of stairs.|Chess Stairs]]<<endreplace>></span><<endif>><<else>><span class="warning"><<replace "a door.">><<cyclinglink 'a locked door.'>><<endreplace>></span><<endif>>@@<<generatenoise "whitenoise" 0.01 0.1 1.0>>



<<if previous() is "Water Antichamber">><<generatespace "corridor" true "[[a door.|Fire Antichamber]]" "a river of concrete." "flowing downhill." "a river of concrete." "leading you on." "a river of concrete." "all the way down." "a river of concrete." "full-fathom deep." "a river of concrete." "to an unknown depth." "a river of concrete." "pulling you on." "a river of concrete." "pulling you in." "a river of concrete." "down you go." "a river of concrete." "weialala leia." "a river of concrete." "wallala leialala." "a river of concrete." "[[a door.|Water Antichamber]]">><<else>><<generatespace "corridor" false "[[a door.|Fire Antichamber]]" "a river of concrete." "flowing downhill." "a river of concrete." "leading you on." "a river of concrete." "all the way down." "a river of concrete." "full-fathom deep." "a river of concrete." "to an unknown depth." "a river of concrete." "pulling you on." "a river of concrete." "pulling you in." "a river of concrete." "down you go." "a river of concrete." "weialala leia." "a river of concrete." "wallala leialala." "a river of concrete." "[[a door.|Water Antichamber]]">><<endif>>

<<scroll "bottomright">><<generatenoise "whitenoise" 0.007 0.4 1.0>>

.revision-span-in {

\topacity: 0;

}

.revision-span:not(.revision-span-out) {

\ttransition: 1s; -webkit-transition: 1s;

}

.revision-span-out {

\tposition:absolute;

\topacity: 0;

}

(function () {

"use strict";

version.extensions['soundMacros'] = {

major: 1,

minor: 1,

revision: 2

};

var p = macros['playsound'] = {

soundtracks: {},

handler: function (a, b, c, d) {

var loop = function (m) {

if (m.loop == undefined) {

m.loopfn = function () {

this.play();

};

m.addEventListener('ended', m.loopfn, 0);

} else m.loop = true;

m.play();

};

var s = eval(d.fullArgs());

if (s) {

s = s.toString();

var m = this.soundtracks[s.slice(0, s.lastIndexOf("."))];

if (m) {

if (b == "playsound") {

m.play();

} else if (b == "loopsound") {

loop(m);

} else if (b == "pausesound") {

m.pause();

} else if (b == "unloopsound") {

if (m.loop != undefined) {

m.loop = false;

} else if (m.loopfn) {

m.removeEventListener('ended', m.loopfn);

delete m.loopfn;

}

} else if (b == "stopsound") {

m.pause();

m.currentTime = 0;

} else if (b == "fadeoutsound" || b == "fadeinsound") {

if (m.interval) clearInterval(m.interval);

if (b == "fadeinsound") {

if (m.currentTime>0) return;

m.volume = 0;

loop(m);

} else {

if (!m.currentTime) return;

m.play();

}

var v = m.volume;

m.interval = setInterval(function () {

v = Math.min(1, Math.max(0, v + 0.005 * (b == "fadeinsound" ? 1 : -1)));

m.volume = Math.easeInOut(v);

if (v == 0 || v == 1) clearInterval(m.interval);

if (v == 0) {

m.pause();

m.currentTime = 0;

m.volume = 1;

}

}, 10);

}

}

}

}

}

macros['fadeinsound'] = p;

macros['fadeoutsound'] = p;

macros['unloopsound'] = p;

macros['loopsound'] = p;

macros['pausesound'] = p;

macros['stopsound'] = p;

macros['stopallsound'] = {

handler: function () {

var s = macros.playsound.soundtracks;

for (var j in s) {

\t\tif (s.hasOwnProperty(j)) {

s[j].pause();

if (s[j].currentTime) {

\t\t s[j].currentTime = 0;

\t\t }

\t\t}

}

}

}

var div = document.getElementById("storeArea").firstChild;

var fe = ["ogg", "mp3", "wav", "webm"];

while (div) {

var b = String.fromCharCode(92);

var q = '"';

var re = "['" + q + "]([^" + q + "']*?)" + b + ".(ogg|mp3|wav|webm)['" + q + "]";

k(new RegExp(re, "gi"));

div = div.nextSibling;

}



function k(c, e) {

do {

var d = c.exec(div.innerHTML);

if (d) {

var a = new Audio();

if (a.canPlayType) {

for (var i = -1; i < fe.length; i += 1) {

if (i >= 0) d[2] = fe[i];

if (a.canPlayType("audio/" + d[2])) break;

}

if (i < fe.length) {

a.setAttribute("src", d[1] + "." + d[2]);

a.interval = null;

macros.playsound.soundtracks[d[1]] = a;

} else console.log("Browser can't play '" + d[1] + "'");

}

}

} while (d);

}

}());

<<timedreplace 2s>><span class="home">[[an open door.|Thunder Antichamber]]</span><<becomes>><<timedreplace 2s>><span class="home">[[a closing door.|Thunder Antichamber]]</span><<becomes>><<timedreplace 2s>><span class="home">[[an almost closed door.|Thunder Antichamber]]</span><<becomes>><<replace "a closed door.">><<cyclinglink "a locked door.">><<endreplace>><<endtimedreplace>><<endtimedreplace>><<endtimedreplace>><<generatenoise "browniannoise" 0.2 0.2 0.2>>



<<timedreplace 8s>><<becomes>>After the torch-light red on sweaty faces<<generatenoise "tone" 75>><<endtimedreplace>>

<<timedreplace 10s>><<becomes>>After the frosty silence in the gardens<<endtimedreplace>>

<<timedreplace 12s>><<becomes>>After the agony in stony places<<endtimedreplace>>

<<timedreplace 14s>><<becomes>>The shouting and the crying<<endtimedreplace>>

<<timedreplace 16s>><<becomes>>Prison and place and reverberation<<endtimedreplace>>

<<timedreplace 18s>><<becomes>>Of thunder of spring over distant mountains<<endtimedreplace>>

<<timedreplace 20s>><<becomes>>He who was living is now dead<<endtimedreplace>>

<<timedreplace 22s>><<becomes>>We who were living are now dying<<endtimedreplace>>

<<timedreplace 24s>><<becomes>>With a little patience<<endtimedreplace>>



<span class="warning"><<timedreplace 28s>><<replace "a closed door.">><<cyclinglink "a locked door.">><<endreplace>><<becomes>><<generatenoise "tone" 55>><<timedreplace 2s>>[[an opening door.|The Wasteland]]<<becomes>>[[an open door.|The Wasteland]]<<generatenoise "tone" 5>><<endtimedreplace>><<endtimedreplace>></span>





.nowrap {

\twhite-space: nowrap;

\toverflow: hidden;

}



#passages {

\tborder: 0;

\tmargin: 0;

\twidth: 80%;

\tmargin-top: 10%;

\tmargin-left: 10%;

\tfont-size: 1.5em;

\tuser-select: none;

}



@media only screen and (max-width: 768px) {



\t#passages {

\t\tfont-size: 1.2em;

\t}



}



#passages a {

\tcolor: white;

\tbackground-color: #aaa;

}



#passages .home a {

\tbackground-color: #5d5;

}





#passages .glow a {

\tcolor: #ccc;

\tbackground-color: #fee;

}



#passages .warning a {

\tcursor: all-scroll;

\tbackground-color: #d55;

}



#passages .glow .warning a {

\tcolor: #fff;

\tbackground-color: #d55 !important;

\tcursor: all-scroll;

\tanimation: flicker 0.4s infinite;

}



#passages .screen a {

\tcolor: #fff;

\tbackground-color: #d55 !important;

\tcursor: all-scroll;

\tanimation: flicker 0.4s infinite;

}



.flicker {

\tanimation: flicker 0.4s infinite;

}



@keyframes flicker {

\t20% {opacity: 0.8}

\t30% {opacity: 1}

\t50% {opacity: 0.6}

\t60% {opacity: 0.9}

\t80% {opacity: 0.7}

}





<<generateui 1 "Water Antichamber" "$waterDoorUnlocked" true false 0.02 "Water UI">><<generatenoise "tone" 100>>

<<generatespace "water" 30>><span class="home">[[a door.|Fire Ramp]]</span> <<generatespace "water" 30>><<if $waterDoorUnlocked is false>><span class="screen">[[a screen.|Water UI]]</span><<else>><span class="flicker"><<cyclinglink "a blank screen.">></span><<endif>> <<generatespace "water" 30>><<if $waterDoorUnlocked is true>><<if $waterDoorOpen is false>><span class="warning"><<timedreplace 2s>><<cyclinglink "closed elevator doors.">><<becomes>><<timedreplace 2s>><<cyclinglink "opening elevator doors.">><<becomes>><<set $waterDoorOpen to true>>[[open elevator doors.|Water Elevator]]</span><<endtimedreplace>><<endtimedreplace>></span><<else>><span class="warning">[[open elevator doors.|Water Elevator]]</span><<endif>><<else>><span class="warning"><<replace "elevator doors.">><<cyclinglink "closed elevator doors.">><<endreplace>></span><<endif>> <<generatespace "water" 30>><<generatenoise "whitenoise" 0.005 0.5 1.0>>

<<if previous() is "Chess Antichamber">><<generatespace "corridor" true "[[a door.|Burial Chamber]]" "lilac fragments." "rough concrete." "chalk markings." "cracked concrete." "a small wood figure with a crown." "the smell of concrete." "stippled mould." "grey concrete." "dead air." "dusty concrete." "ridged pipes." "chipped concrete." "a small round hole." "damp concrete." "a red rock." "a tree root through concrete." "hyacinth fragments." "pale concrete." "bird bones." "the weight of concrete." "a card with a picture of a drowned man." "a wall of concrete." "a pool of light." "[[a door.|Chess Antichamber]]">><<scroll "right">><<else>><<generatespace "corridor" false "[[a door.|Burial Chamber]]" "lilac fragments." "rough concrete." "chalk markings." "cracked concrete." "a small wood figure with a crown." "the smell of concrete." "stippled mould." "grey concrete." "dead air." "dusty concrete." "ridged pipes." "chipped concrete." "a small round hole." "damp concrete." "a red rock." "a tree root through concrete." "hyacinth fragments." "pale concrete." "bird bones." "the weight of concrete." "a card with a picture of a drowned man." "a wall of concrete." "a pool of light." "[[a door.|Chess Antichamber]]">><<endif>><<generatenoise "whitenoise" 0.025 0.03 5.0>>

<<generatespace "wasteland">>

(function(){version.extensions.replaceMacrosCombined={major:1,minor:1,revision:7};var nullobj={handler:function(){}};function showVer(n,notrans){if(!n){return;}n.innerHTML="";

new Wikifier(n,n.tweecode);n.setAttribute("data-enabled","true");n.style.display="inline";n.classList.remove("revision-span-out");if(!notrans){n.classList.add("revision-span-in");

if(n.timeout){clearTimeout(n.timeout);}n.timeout=setTimeout(function(){n.classList.remove("revision-span-in");n=null;},20);}}function hideVer(n,notrans){if(!n){return;

}n.setAttribute("data-enabled","false");n.classList.remove("revision-span-in");if(n.timeout){clearTimeout(n.timeout);}if(!notrans){n.classList.add("revision-span-out");

n.timeout=setTimeout(function(){if(n.getAttribute("data-enabled")=="false"){n.classList.remove("revision-span-out");n.style.display="none";n.innerHTML="";}n=null;

},1000);}else{n.style.display="none";n.innerHTML="";n=null;}}function tagcontents(b,starttags,desttags,endtags,k){var l=0,c="",tg,a,i;function tagfound(i,e,endtag){for(var j=0;

j<e.length;j++){if(a.indexOf("<<"+e[j]+(endtag?">>":""),i)==i){return e[j];}}}a=b.source.slice(k);for(i=0;i<a.length;i++){if(tg=tagfound(i,starttags)){l++;}else{if((tg=tagfound(i,desttags,true))&&l==0){b.nextMatch=k+i+tg.length+4;

return[c,tg];}else{if(tg=tagfound(i,endtags,true)){l--;if(l<0){return null;}}}}c+=a.charAt(i);}return null;}var begintags=[];var endtags=[];function 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;

function mkspan(vtype){h=insertElement(m,"span",null,"revision-span "+vtype);h.setAttribute("data-enabled",false);h.style.display="none";h.tweecode="";return h;}if(this.shorthand&&flen){while(f.length>0){vsns.push([f.shift(),(this.flavour=="insert"?"gains":"becomes")]);

}}else{if(this.flavour=="insert"||(this.flavour=="continue"&&this.trigger=="time")){vsns.push(["","becomes"]);}}if(this.flavour=="continue"&&flen){b.nextMatch=k+b.source.slice(k).length;

vsns.push([b.source.slice(k),vtype]);}else{becomes=["becomes","gains"];c=tagcontents(b,begintags,becomes.concat(endtags),endtags,k);if(c&&endtags.indexOf(c[1])==-1){while(c){vsns.push(c);

c=tagcontents(b,begintags,becomes,endtags,b.nextMatch);}c=tagcontents(b,begintags,["end"+e],endtags,b.nextMatch);}if(!c){throwError(g,"can't find matching end"+e);

return;}vsns.push(c);if(this.flavour=="continue"){k=b.nextMatch;b.nextMatch=k+b.source.slice(k).length;vsns.push([b.source.slice(k),""]);}}if(this.flavour=="remove"){vsns.push(["","becomes"]);

}cn=0;m=insertElement(g,"span",null,e);m.setAttribute("data-flavour",this.flavour);h=mkspan("initial");vsn=vsns.shift();h.tweecode=vsn[0];showVer(h,true);while(vsns.length>0){if(vsn){vtype=vsn[1];

}vsn=vsns.shift();h=mkspan(vtype);h.tweecode=vsn[0];}if(typeof this.setup=="function"){this.setup(m,g,f);}}function quantity(m){return(m.children.length-1)+(m.getAttribute("data-flavour")=="remove");

}function revisionSetup(m,g,f){m.className+=" "+f[0].replace(" ","_");}function keySetup(m,g,f){var key=f[0];m.setEventListener("keydown",function l(e){var done=!revise("revise",m);

if(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;

}else{if(s.slice(-1).toLowerCase()=="s"){return Number(s.slice(0,-1))*1000||0;}}}throwError(g,s+" isn't a CSS time unit");return 0;}var tm=cssTimeUnit(f[0]);var s=state.history[0].passage.title;

setTimeout(function timefn(){if(state.history[0].passage.title==s){var done=!revise("revise",m);if(!done){setTimeout(timefn,tm);}}},tm);}function hoverSetup(m){var fn,noMouseEnter=(document.head.onmouseenter!==null),m1=m.children[0],m2=m.children[1],gains=m2.className.indexOf("gains")>-1;

if(!m1||!m2){return;}m1.onmouseenter=function(e){var efp=document.elementFromPoint(e.clientX,e.clientY);while(efp&&efp!==this){efp=efp.parentNode;}if(!efp){return;

}if(this.getAttribute("data-enabled")!="false"){revise("revise",this.parentNode);}};m2.onmouseleave=function(e){var efp=document.elementFromPoint(e.clientX,e.clientY);

while(efp&&efp!==this){efp=efp.parentNode;}if(efp){return;}if(this.getAttribute("data-enabled")!="false"){revise("revert",this.parentNode);}};if(gains){m1.onmouseleave=m2.onmouseleave;

}if(noMouseEnter){fn=function(n){return function(e){if(!event.relatedTarget||(event.relatedTarget!=this&&!(this.compareDocumentPosition(event.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY))){this[n]();

}};};m1.onmouseover=fn("onmouseenter");m2.onmouseout=fn("onmouseleave");if(gains){m1.onmouseout=m2.onmouseout;}}m=null;}function mouseSetup(m){var evt=(document.head.onmouseenter===null?"onmouseenter":"onmouseover");

m[evt]=function(){var done=!revise("revise",this);if(done){this[evt]=null;}};m=null;}function linkSetup(m,g,f){var l=Wikifier.createInternalLink(),p=m.parentNode;

l.className="internalLink replaceLink";p.insertBefore(l,m);l.insertBefore(m,null);l.onclick=function(){var p,done=false;if(m&&m.parentNode==this){done=!revise("revise",m);

scrollWindowTo(m);}if(done){this.parentNode.insertBefore(m,this);this.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);

shv[os]=shv[os]||{};if(d&&!shv[os].hasOwnProperty(d)){shv[os][d]=1;}else{for(i=shv[os][d];i>0&&!done;i--){done=!revise("revise",m,true);}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;

e.shorthand=(["link","mouse","hover"].indexOf(e.trigger)>-1);macros[e.name]=e;macros["end"+e.name]=nullobj;begintags.push(e.name);endtags.push("end"+e.name);});function insideDepartingSpan(elem){var r=elem.parentNode;

while(!r.classList.contains("passage")){if(r.classList.contains("revision-span-out")){return true;}r=r.parentNode;}}function reviseAll(rt,rname){var rall=document.querySelectorAll(".passage [data-flavour]."+rname),ret=false;

for(var i=0;i<rall.length;i++){if(!insideDepartingSpan(rall[i])){ret=revise(rt,rall[i])||ret;}}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;

function doToGainerSpans(n,fn){for(var k=n-1;k>=0;k--){if(rc[k+1].classList.contains("gains")){fn(rc[k],notrans);}else{break;}}}for(var k=0;k<=rcl;k++){if(rc[k].getAttribute("data-enabled")=="true"){ind=k;

}}if(rev){ind-=1;}curr=(ind>=0?rc[ind]:(cyc?rc[rcl]:null));ind2=ind;if(rnd){ind2=(ind+(Math.floor(Math.random()*rcl)))%rcl;}next=((ind2<rcl)?rc[ind2+1]:(cyc?rc[0]:null));

var docurr=(rev?showVer:hideVer);var donext=(rev?hideVer:showVer);var currfn=function(){if(!(next&&next.classList.contains("gains"))||rnd){docurr(curr,notrans);doToGainerSpans(ind,docurr,notrans);

}};var nextfn=function(){donext(next,notrans);if(rnd){doToGainerSpans(ind2+1,donext,notrans);}};if(!rev){currfn();nextfn();}else{nextfn();currfn();}return(cyc?true:(rev?(ind>0):(ind2<rcl-1)));

}macros.revert=macros.revise=macros.randomise=macros.randomize={handler:function(a,b,c){var l,rev,rname;function disableLink(l){l.style.display="none";}function enableLink(l){l.style.display="inline";

}function updateLink(l){if(l.className.indexOf("random")>-1){enableLink(l);return;}var rall=document.querySelectorAll(".passage [data-flavour]."+rname),cannext,canprev,i,ind,r,fl;

for(i=0;i<rall.length;i++){r=rall[i],fl=r.getAttribute("data-flavour");if(insideDepartingSpan(r)){continue;}if(fl=="cycle"){cannext=canprev=true;}else{if(r.firstChild.getAttribute("data-enabled")==!1+""){canprev=true;

}if(r.lastChild.getAttribute("data-enabled")==!1+""){cannext=true;}}}var can=(l.classList.contains("revert")?canprev:cannext);(can?enableLink:disableLink)(l);}function toggleText(w){w.classList.toggle(rl+"Enabled");

w.classList.toggle(rl+"Disabled");w.style.display=((w.style.display=="none")?"inline":"none");}var rl="reviseLink";if(c.length<2){throwError(a,b+" macro needs 2 parameters");

return;}rname=c.shift().replace(" ","_");l=Wikifier.createInternalLink(a,null);l.className="internalLink "+rl+" "+rl+"_"+rname+" "+b;var v="";var end=false;var out=false;

if(c.length>1&&c[0][0]=="$"){v=c[0].slice(1);c.shift();}switch(c[c.length-1]){case"end":end=true;c.pop();break;case"out":out=true;c.pop();break;}var h=state.history[0].variables;

for(var i=0;i<c.length;i++){var on=(i==Math.max(c.indexOf(h[v]),0));var d=insertElement(null,"span",null,rl+((on)?"En":"Dis")+"abled");if(on){h[v]=c[i];l.setAttribute("data-cycle",i);

}else{d.style.display="none";}insertText(d,c[i]);l.appendChild(d);}l.onclick=function(){reviseAll(b,rname);var t=this.childNodes,u=this.getAttribute("data-cycle")-0,m=t.length,n,lall,i;

if((end||out)&&u>=m-(end?2:1)){if(end){n=this.removeChild(t[u+1]||t[u]);n.className=rl+"End";n.style.display="inline";this.parentNode.replaceChild(n,this);}else{this.parentNode.removeChild(this);

return;}}else{toggleText(t[u]);u=(u+1)%m;if(v){h[v]=c[u];}toggleText(t[u]);this.setAttribute("data-cycle",u);}lall=document.getElementsByClassName(rl+"_"+rname);

for(i=0;i<lall.length;i++){updateLink(lall[i]);}};disableLink(l);setTimeout((function(l){return function(){updateLink(l);};}(l)),1);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);

if(t){var rname=c[0].replace(" ","_"),h=insertElement(a,"span",null,"hoverrevise hoverrevise_"+rname),f=function(){var done=!reviseAll("revise",rname);if(b!="hoverrevise"&&done){this[evt]=null;

}};new Wikifier(h,t[0]);if(b=="hoverrevise"){h.onmouseover=f;h.onmouseout=function(){reviseAll("revert",rname);};}else{h[evt]=f;}h=null;}}};macros.instantrevise={handler:function(a,b,c,d){reviseAll("revise",c[0].replace(" ","_"));

}};macros.endmouserevise=nullobj;macros.endhoverrevise=nullobj;}());

<span class="home">[[a door.|Chess Stairs]]</span>

<<replace "leaves.">>dry leaves.<<becomes>>pieces of dry leaves<<becomes>>fragments of dry leaves.<<endreplace>>

<<replace "small pieces of wood.">>matches.<<becomes>>burnt matches.<<endreplace>>

<<replace "cigarette ends.">>ancient cigarette ends.<<endreplace>>

<<replace "the sound of a river.">>the sound of a river?<<becomes>>a soft white noise.<<becomes>>a small speaker emitting white noise.<<endreplace>>

<<replace "cold.">>a feeling of cold.<<becomes>>a coldness.<<endreplace>>

<<replace "a rat's bones.">>a rat's skull.<<becomes>>a rat's foot.<<becomes>>pieces of a rat.<<becomes>>broken pieces of rat.<<endreplace>>

<<replace "dim light.">>dimming vision.<<becomes>>indistinct greys.<<becomes>>a sense of blindness.<<endreplace>>

<<replace "a shell.">>a small shell.<<becomes>>a twisted shell.<<endreplace>>

<<replace "a button.">>a non-functional button.<<endreplace>>

<<if $fireDoorUnlocked is false>><span class="screen">[[a screen.|Fire UI]]</span><<else>><span class="flicker"><<cyclinglink "a blank screen.">></span><<endif>>

<<if $fireDoorUnlocked is true>><span class="warning"><<if $fireDoorOpen is true>>an open door. [[a ramp.|Fire Ramp]]<<else>><<replace "a closed door.">>an open door.<<set $fireDoorOpen to true>> [[a ramp.|Fire Ramp]]<<endreplace>></span><<endif>><<else>><span class="warning"><<replace "a door.">><<cyclinglink 'a locked door.'>><<endreplace>></span><<endif>><<generatenoise "whitenoise" 0.008 0.3 1.0>>

body {

}



.passage {

}



#passages {

}



#passages .warning a {

\tmargin-right: 100px;

\tmargin-bottom: 50px;

}

version.extensions.timedgotoMacro={major:1,minor:2,revision:0};

macros["goto"]=macros.timedgoto={timer:null,handler:function(a,b,c,d){function cssTimeUnit(s){if(typeof s=="string"){if(s.slice(-2).toLowerCase()=="ms"){return +(s.slice(0,-2))||0

}else{if(s.slice(-1).toLowerCase()=="s"){return +(s.slice(0,-1))*1000||0

}}}throwError(a,s+" isn't a CSS time unit");return 0}var t,d,m,s;

t=c[c.length-1];d=d.fullArgs();m=0;if(b!="goto"){d=d.slice(0,d.lastIndexOf(t));

m=cssTimeUnit(t)}d=eval(Wikifier.parse(d));if(d+""&&state&&state.init){if(macros["goto"].timer){clearTimeout(macros["goto"].timer)

}s=state.history[0].passage.title;macros["goto"].timer=setTimeout(function(){if(state.history[0].passage.title==s){state.display(d,a)

}},m)}}};



try {



version.extensions['closeWindowMacro'] = {

major:1, minor:0, revision:0

};



macros['closewindow'] = {

handler: function(place, macroName, params, parser) {

\t\twindow.close();

},

init: function() { },

};

}

catch(e) {

console.log(e.message);

throwError(place,"randomunicode Setup Error: "+e.message);

}

body {

\tbackground: linear-gradient(#999,#000);

\tbackground-repeat: no-repeat;

background-attachment: fixed;

}



.passage {

\ttransform: rotate(20deg);

\tbackground: transparent;

\tmargin-right: 100px;

}



#passages {

\tbackground: transparent;

\tmargin-right: 100px;

}



#passages .warning a {

\tmargin-right: 100px;

\tmargin-bottom: 50px;

}

Pippin Barr

var linked = false;



try {



version.extensions['generateuiMacro'] = {

major:1, minor:0, revision:0

};



macros['generateui'] = {

handler: function(place, macroName, params, parser) {



if (params.length != 0) {



var paragraphs = 1 + Math.round(Math.random() * parseInt(params[0]));

var linkBack = params[1];

var lockVar = params[2];

var includeUI = params[3] == "true";

var timedReplace = params[4] == "true";

var linkbackChance = params[5];

var linkSelf = params[6];



var theString = "";

linked = false;



var p = 0;

while (p < paragraphs || !linked) {

var forceLink = (p + 1 == paragraphs);

theString += generateParagraph(linkBack,lockVar,includeUI,timedReplace,forceLink,linkbackChance,linkSelf);

theString += "\sn\sn";

p++;

}



new Wikifier(place, theString);

}

},

init: function() { },

};

}

catch(e) {

console.log(e.message);

throwError(place,"randomunicode Setup Error: "+e.message);

}



function generateParagraph(linkBack,lockVar,includeUI,timedReplace,forceLink,linkbackChance,linkSelf) {



var thePara = "";



var paragraphLength = 20 + Math.round(Math.random() * 50);



var linking = false;

var replacing = false;

// var css = false;



for (var i = 0; i < paragraphLength; i++) {



if (!linking && Math.random() < 0.01) {

thePara += "<span class=\s"warning\s">[[";

linking = true;

}

else if (linking && Math.random() < 0.1) {

if (Math.random() < linkbackChance) {

thePara += "|" + linkBack + "][" + lockVar + "= true]]</span>";

}

else {

thePara += "|" + linkSelf + "]]</span>";

}

linking = false;;

linked = true;

}



if (timedReplace && !linking && Math.random() < 0.9) {

thePara += "<<timedcycle " + Math.random() * 10 + "s>>";



thePara += getRandomChar();

thePara += "<<becomes>>";



thePara += getRandomChar();

thePara += "<<endtimedcycle>>";

}



if (includeUI) {

if (!linking && Math.random() < 0.1) {

if (Math.random() < linkbackChance) {

link = linkBack;

}

else {

link = linkSelf;

}



thePara += "<<textinput $value [[" + getNRandomChars(1+Math.floor(Math.random()*8)) +"|" + link + "][" + lockVar + "= true]]>>";

}



if (!linking && Math.random() < 0.1) {

thePara += "<<radio $value \s"" + getNRandomChars(1+Math.floor(Math.random()*8)) +"\s">>";

}



if (!linking && Math.random() < 0.1) {

thePara += "<<checkbox $value \s"" + getNRandomChars(1+Math.floor(Math.random()*8)) +"\s">>";

}

}



thePara += getRandomChar();

}



if (linking) thePara += "|" + linkBack + "][" + lockVar + "= true]]</span>";



if (forceLink && !linked) {

thePara += "<span class=\s"warning\s">[[";

var chars = Math.floor(Math.random() * 5) + 3;

for (var i = 0; i < chars; i++) {

thePara += getRandomChar();

}

if (Math.random() < linkbackChance) {

thePara += "|" + linkBack + "][" + lockVar + "= true]]</span>";

}

else {

thePara += "|" + linkSelf + "]]</span>";

}

linked = true;

}



return thePara;

}



function getNRandomChars(n) {

var chars = "";

for (var i = 0; i < n; i++) {

chars += getRandomChar();

}

return chars;

}



function getRandomChar() {

var char = String.fromCharCode(Math.random() * 0xffff);

if ("|[]@;".indexOf(char) != -1) {

char = "0";

}

return char;

}



<<generateui 0 "Snow" "$burialDoorUnlocked" false false 0.25 "Burial UI">><<generatenoise "tone" 100>>