@@font-size:small; This is day <<print $day>>.@@\n\n
<<attributes\nSun=3\nSoil=3\nWater=2\nPest=0\nBeauty=2\nWild=1\nEldritch=0\n>>\s\n<<property name>>\s\nA Flower Meadow\n<<property description>>\s\nSoft grass underfoot, and a riot of buttercups, bluebells, and daisies. It's easy to lie here and lose the day, watching clouds.\n<<property hidden>>
Yellow pom poms, velvet to the touch.\n\n[[Back|previous()]]
<<if $winningAspect eq "beauty">>\s\n<<ambientsound "audio/Beauty.ogg">>\s\nAfter careful cultivation and attention to detail, your garden is the most Beautiful in all the land! Kings, Queens, and courtiers travel from far and wide to visit, envious of the perfectly balanced horticultural masterpiece. You get a gold star.\n\nContent with your efforts, you take a long last breath of the delicate scents of your garden. Rejuvenated, you set of into the world once more, with a spring in your step.\n<<else if $winningAspect eq "wild">>\s\n<<ambientsound "audio/Wild.ogg">>\s\nYou have reclaimed part of the world for the Wild, bringing back the hidden creatures, shy birds, slithering critters, the bold, the fierce, the noble. Walking quietly in your garden, you experience the world as it once was. A white stag is seen passing through, giant eagles overhead. What else may soon call your garden home? Your work here is done, and you head back into the world again a smile on your lips.\n<<else if $winningAspect eq "wasteland">>\s\n<<ambientsound "audio/Wasteland.ogg">>\s\nYou have brought nothing but death and ruin to this place. The land is barren and grey, the dead plants everywhere are a stark reminder of your failure to cultivate even the smallest of gardens. The smell of decay hangs in the air, and the bare branches of dead trees scratch at the sky. People avoid this place, believing to be cursed or plague-ridden. You have brought shame to Nomad Gardeners everywhere.\n\nTime has come to leave this blighted place, the dead leaves blowing around you as you quietly slip away.\n<<else if $winningAspect eq "eldritch">>\s\n<<ambientsound "audio/Eldritch.ogg">>\s\nMost sensible folk give your garden a wide berth, especially during full moon. Eldritch forces gather here, flickering at the corner of the eye, raising tingles on the skin. Interested parties pilgrimage to your garden, by secret ways, some even possibly from places beyond the veil of our world. Happy to have made the world a little stranger, you set off on your travels once more, eager to find new lands.\n<<endif>>\s\n\n<<resetworld>>\s\n[[Your life as a Nomadic Gardener continues...|realstart]]\n\n\n/%Summoned by the unknowable energies emanating from your garden, a tentacled horror from another dimension comes to tea. Finally.%/
<<if $beauty lte 4>>This is a pleasant garden.\s\n<<else if $beauty lte 8>>This is a pretty garden.\s\n<<else if $beauty lte 12>>This is a beautiful garden.\s\n<<else>>This garden is nearly the fairest in all the land.\s\n<<endif>>
<<locationselect>>
(function () {\n "use strict";\n\n version.extensions['plantattributesMacro'] = {\n major: 1,\n minor: 0,\n revision: 0\n };\n\n var macro = macros.plantattributes = {\n traits: function(plantType, attributeName) {\n var attributes = macros.attributes.plant[plantType];\n\n if (attributes.traits[attributeName] == undefined) {\n return 0;\n } else {\n return attributes.traits[attributeName];\n }\n },\n\n handler: function (place, macroName, params, parser) {\n if (params.length != 1) {\n throwError(place, "plantattributes: Wrong number of arguments!" +\n "Expected 1, got " + params.length + ".");\n return;\n }\n\n var plantType = params[0];\n var attributes = macros.attributes.plant[plantType];\n\n new Wikifier(place,\n "<<displayproperty " + plantType + " shortdescription>>" + " needs:\sn");\n\n for (var key in attributes.needs) {\n new Wikifier(place, key + " of " + attributes.needs[key].toString() + "\sn");\n }\n\n new Wikifier(place,\n "<<displayproperty " + plantType + " shortdescription>>" + " has:\sn");\n\n for (var key in attributes.traits) {\n new Wikifier(place, key + " of " + attributes.traits[key].toString() + "\sn");\n }\n\n new Wikifier(place,\n "<<displayproperty " + plantType + " shortdescription>>" + " adds:\sn");\n\n for (var key in attributes.adds) {\n new Wikifier(place, attributes.adds[key].toString() + " to " + key + "\sn");\n }\n }\n }\n\n // <<attributes>> is a no-op macro to wrap attribute definitions\n macros.attributes = {\n plant: {},\n terrain: {},\n\n handler: function (place, macroName, params, parser) { }\n }\n\n var attributeRegex = /(\sw+)([+-=])(\sd+)/g;\n\n function parseAttributes(text, needsKeys) {\n var attributes = { traits: {}, needs: {}, adds: {} };\n\n while (true) {\n var result = attributeRegex.exec(text);\n\n if (!result) {\n break;\n }\n\n var attributeName = result[1].toLowerCase();\n var operator = result[2];\n var value = Number(result[3]);\n\n if (operator == "=") {\n if (needsKeys[attributeName]) {\n attributes.needs[attributeName] = value;\n } else {\n attributes.traits[attributeName] = value;\n }\n } else if (operator == "+") {\n attributes.adds[attributeName] = value;\n } else if (operator == "-") {\n attributes.adds[attributeName] = -value;\n }\n }\n\n return attributes;\n }\n\n var attributeSectionRegex = /<<attributes\ss*([^>]*)>>/;\n\n var plantTypes = tale.lookup("tags", "plant");\n\n function parsePassageAttributes(passage, needsKeys) {\n var result = attributeSectionRegex.exec(passage.initialText);\n\n if (result) {\n return parseAttributes(result[1], needsKeys);\n } else {\n return null;\n }\n }\n\n macros.attributes.parsePassageAttributes = parsePassageAttributes;\n\n for (var i = 0; i < plantTypes.length; ++i) {\n var plantType = plantTypes[i];\n var attributes = parsePassageAttributes(plantType,\n { sun: true, soil: true, water: true });\n\n if (attributes) {\n macros.attributes.plant[plantType.title] = attributes;\n }\n }\n}());
@@color: #003333; THE NOMAD GARDENER@@
The acorn is polished and smooth to the touch. Almost good enough to [[eat|eat_acorn]].\n\n[[Back|previous()]]
<<attributes\nSun=0\nSoil=0\nWater=0\nPest=0\nBeauty=0\nWild=0\nEldritch=0\n>>\s\n<<property name>>\s\n\n<<property description>>\s\n\n<<property hidden>>
<<if $wasteland lte 4>>This is a slightly unkempt garden.\s\n<<else if $wasteland lte 8>>This garden is dying.\s\n<<else if $wasteland lte 12>>The stench of death hangs in the air.\s\n<<else>>This was once a garden, but is now a blighted wasteland.\s\n<<endif>>
Soft white flowers in a delicate canopy, like a tiny tree. It's nice. You tuck a sprig behind your ear.\n\n[[Back|previous()]]
<<attributes\nAge_Young=2\nAge_Mature=4\nAge_Old=8\nSun=3\nSoil=2\nWater=3\nPestResistant=1\nHardy=2\nBeauty=3\nEldritch-1\nBeauty+1\n>>\s\n<<if $plantDead>>\s\n<<property shortdescription>>\s\na dead marigold\s\n<<property description>>\s\nWithered leaves and a slight rotting smell, like .\s\n<<property groupdescription>>\s\n<<if $groupSize gt 3>>a mass of dead marigolds\s\n<<else if $groupSize gt 1>>some dead marigolds\s\n<<else>>a dead marigold\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<if $plantAge eq 'young'>>\s\n<<property shortdescription>>\s\nmarigold seedlings\s\n<<property description>>\s\nTiny bright green leaves, already excited about the world.\s\n<<property groupdescription>>\s\n<<if $groupSize eq 1>> a marigold seedling\s\n<<elseif $groupSize lte 3>> a few marigold seedlings\s\n<<else>> a cluster of marigold seedlings\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'mature'>>\s\n<<property shortdescription>>a marigold plant\s\n<<property description>>\s\nA small green garden plant, with many leaves, slightly rough to the touch, like a cats tongue. \n<<property groupdescription>>\s\n<<if $groupSize eq 1>>a marigold plant\s\n<<elseif $groupSize lte 3>>a tangle of marigolds\s\n<<else>>a large clump of marigolds\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'old'>>\s\n<<property shortdescription>>an aging marigold plant\s\n<<property description>>\s\nThis marigold is reaching the end of its short life.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>an aging marigold plant\s\n<<elseif $groupSize lte 3>>a couple of aging marigolds\s\n<<else>> a clump of aging marigolds\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<property seed>>marigold seeds\s\n<<property fruit>>\s\nEnthusiastic [[ bright orange and gold daisies|flower_marigold]] nod happily in the breeze.
<<attributes\nSun=3\nSoil=2\nWater=2\nPest=0\nBeauty=2\nWild=1\nEldritch=0\n>>\s\n<<property name>>\s\nGrassy Meadow\n<<property description>>\s\nA lovely meadow, full of soft grass and small flowers.\n<<property hidden>>
<<attributes\nSun=3\nSoil=2\nWater=2\nPest=0\nBeauty=1\nWild=2\nEldritch=0\n>>\s\n<<property name>>\s\nHidden Meadow\n<<property description>>\s\nA small meadow, hidden away, full of wildflowers and long grass.\n<<property hidden>>
(function() {\n version.extensions['plantspaceMacro'] = {major:1, minor:0, revision:0};\n\n function plantAgeCategory(plantState) {\n if (!plantState.alive) {\n return "dead";\n }\n\n var plantAge = state.history[0].variables.day - plantState.plantedOn;\n\n var plantattributes = macros.plantattributes;\n\n var youngPeriod = plantattributes.traits(plantState.type, "age_young");\n\n if (plantAge < youngPeriod) {\n return "young";\n }\n\n var maturePeriod = plantattributes.traits(plantState.type, "age_mature");\n\n if (plantAge < youngPeriod + maturePeriod) {\n return "mature";\n }\n\n var oldPeriod = plantattributes.traits(plantState.type, "age_old");\n\n if (plantAge < youngPeriod + maturePeriod + oldPeriod) {\n return "old";\n }\n\n return "dead";\n }\n\n function setGroupVariables(plantType, plantAge, group) {\n var variables = state.history[0].variables;\n variables.plantType = plantType;\n variables.plantAge = plantAge;\n variables.plantDead = (plantAge == "dead");\n variables.groupSize = group.length;\n }\n\n function isAre(number) {\n return (number == 1) ? "is" : "are";\n }\n\n macros.plantspace = {\n updateVariables: function(plantState) {\n var variables = state.history[0].variables;\n variables.plantAge = plantAgeCategory(plantState);\n variables.plantAgeDays = variables.day - plantState.plantedOn;\n variables.plantType = plantState.type;\n variables.plantDead = !plantState.alive;\n },\n\n plantAgeCategory: plantAgeCategory,\n setGroupVariables: setGroupVariables,\n\n describePlant: function(place, plantState) {\n this.updateVariables(plantState);\n new Wikifier(place, "<<display 'PlantDescription'>>");\n },\n\n describeGroup: function(place, plantType, plantAge, group) {\n setGroupVariables(plantType, plantAge, group);\n\n var link = Wikifier.createInternalLink(place, null);\n link.className = "internalLink";\n\n macros.displayproperty.handler(link, "displayproperty",\n [plantType, "groupdescription"], null);\n\n link.onclick = function () {\n setGroupVariables(plantType, plantAge, group);\n\n macros.plantstate.plantType = plantType;\n macros.plantstate.plantAge = plantAge;\n macros.plantstate.group = group;\n\n state.display("InspectPlants");\n }\n },\n\n createGroups: function(plantList) {\n var groups = {};\n\n for (var i = 0; i < plantList.length; ++i) {\n var plant = plantList[i];\n var age = plantAgeCategory(plant);\n\n if (groups[plant.type] == undefined) {\n groups[plant.type] = {};\n }\n\n if (groups[plant.type][age] == undefined) {\n groups[plant.type][age] = [];\n }\n\n groups[plant.type][age].push(plant);\n }\n\n var groupsFlat = [];\n\n for (var type in groups) {\n for (var age in groups[type]) {\n groupsFlat.push({ type: type, age: age, list: groups[type][age] });\n }\n }\n\n return groupsFlat;\n },\n\n render: function(place, passage) {\n var plantList = this.plants[passage.title];\n var plantCount = this.plantCounts[passage.title];\n\n if (plantList.length != 0) {\n var groups = this.createGroups(plantList);\n\n insertText(place, "Growing here is ");\n\n for (var i = 0; i < groups.length; ++i) {\n this.describeGroup(place, groups[i].type, groups[i].age,\n groups[i].list);\n\n if (i < groups.length - 2) {\n insertText(place, ", ");\n } else if (i == groups.length - 2) {\n insertText(place, " and ");\n }\n }\n\n insertText(place, ".");\n\n var fruitingTypes = {};\n var anyFruiting = false;\n\n for (var i = 0; i < plantList.length; ++i) {\n var plant = plantList[i];\n\n if (plant.fruiting) {\n fruitingTypes[plant.type] = true;\n anyFruiting = true;\n }\n }\n\n if (anyFruiting) {\n insertText(place, " ");\n\n for (var type in fruitingTypes) {\n new Wikifier(place, "<<displayproperty '" + type + "' fruit>>");\n }\n }\n\n new Wikifier(place, "\sn\sn");\n }\n\n if (plantList.length < plantCount) {\n var placesLeft = plantCount - plantList.length;\n\n if (placesLeft <= 2) {\n new Wikifier(place, "There is very little room left. ");\n } else if (placesLeft <= 6) {\n new Wikifier(place, "There is some room left. ");\n } else {\n new Wikifier(place, "There is lots of room left. ");\n }\n\n var link = Wikifier.createInternalLink(place, null);\n link.className = "internalLink";\n\n insertText(link, "Plant something...");\n\n var macro = this;\n\n this.createSelectFunction(link, place, passage);\n }\n },\n\n createPlantState: function(plantType) {\n var variables = state.history[0].variables;\n var attributes = macros.attributes.plant[plantType];\n\n return {\n type: plantType,\n plantedOn: variables.day,\n health: attributes.traits.hardy,\n attributes: attributes,\n alive: true,\n fruiting: false,\n };\n },\n\n createPlantLink: function(place, topLevelSpan, passage, plantType) {\n var link = Wikifier.createInternalLink(place, null);\n link.className = "internalLink";\n\n macros.displayproperty.handler(link, "displayproperty",\n [plantType, "seed"], null);\n\n var macro = this;\n\n link.onclick = function() {\n macro.plants[passage.title].push(macro.createPlantState(plantType));\n\n removeChildren(topLevelSpan);\n macro.render(topLevelSpan, passage);\n }\n },\n\n createSelectFunction: function(link, topLevelSpan, passage) {\n var macro = this;\n\n var plantTypes = tale.lookup("tags", "plant");\n\n link.onclick = function() {\n var span = insertElement(null, "span");\n insertText(span, "Select something to plant: ");\n\n var secondLast = plantTypes.length - 2;\n\n for (var i = 0; i < plantTypes.length; ++i) {\n macro.createPlantLink(span, topLevelSpan, passage, plantTypes[i].title);\n\n if (i < secondLast) {\n insertText(span, ", ");\n } else if (i == secondLast) {\n insertText(span, " or ");\n }\n }\n\n insertText(span, ".");\n\n this.parentNode.replaceChild(span, this);\n }\n },\n\n handler: function (place, macroName, params, parser) {\n if (params.length != 1) {\n throwError(place, "plantspace: Wrong number of arguments!" +\n "Expected 1, got " + params.length + ".");\n return;\n }\n\n var passage = state.history[0].passage;\n\n if (this.plants[passage.title] == undefined) {\n this.plants[passage.title] = [];\n }\n\n this.plantCounts[passage.title] = Number(params[0]);\n\n var span = insertElement(place, "span");\n\n this.render(span, passage);\n },\n\n initialise: function() {\n this.plants = {};\n this.plantCounts = {};\n },\n\n plants: null,\n plantCounts: null,\n }\n\n var adjectives = {\n sun: ["gloomy", "shady", "partially sunny", "sunny"],\n water: ["parched", "dry", "moist", "soggy"],\n soil: ["infertile", "sandy", "loamy", "rich"],\n }\n\n function clamp(x, min, max) {\n return Math.max(min, Math.min(x, max));\n }\n\n var ATTRIBUTE_MINIMUM = 0;\n var ATTRIBUTE_MAXIMUM = 3;\n\n function renderPlantNeeds(place, plantType, groupSize) {\n var needs = macros.attributes.plant[plantType].needs;\n\n function adjective(trait) {\n var value = 0;\n\n if (needs[trait] != undefined) {\n value = clamp(needs[trait], ATTRIBUTE_MINIMUM, ATTRIBUTE_MAXIMUM);\n }\n\n return adjectives[trait][value];\n }\n\n var description = "This plant likes " + adjective('sun') +\n " places, with soil that is " +\n adjective('soil') + " and " + adjective('water') + ".";\n\n insertText(place, description);\n }\n\n function renderPlantSickly(place, plantAge, group) {\n if (plantAge == "dead") {\n return;\n }\n\n var sicklyCount = 0;\n\n for (var i = 0; i < group.length; ++i) {\n if (group[i].health < group[i].attributes.traits.hardy) {\n ++sicklyCount;\n }\n }\n\n if (sicklyCount > 0) {\n new Wikifier(place, "\sn\sn");\n\n if (sicklyCount == group.length) {\n if (sicklyCount == 1) {\n insertText(place, "This plant is sickly.");\n } else {\n insertText(place, "These plants are sickly.");\n }\n } else {\n var quantity = lang.wordForNumber(sicklyCount);\n quantity = quantity.charAt(0).toUpperCase() + quantity.slice(1);\n\n insertText(place, quantity + " of these plants " +\n isAre(sicklyCount) + " sickly.");\n }\n }\n }\n\n macros.plantstate = {\n group: null,\n plantType: null,\n plantAge: null,\n\n handler: function (place, macroName, params, parser) {\n var group = this.group;\n var plantType = this.plantType;\n var plantAge = this.plantAge;\n\n if (group == null || plantType == null || plantAge == null) {\n return;\n }\n\n renderPlantNeeds(place, plantType, group.length);\n renderPlantSickly(place, plantAge, group);\n },\n };\n}());
The flowers emit a rank and unpleasant odour. Taking a deep breath seems like it would be [[a bad idea|breath_hemlock]].\n\n[[Back|previous()]]
<<attributes\nSun=2\nSoil=2\nWater=2\nPest=0\nBeauty=2\nWild=1\nEldritch=0\n>>\s\n<<property name>>\s\nForest Cabin\n<<property description>>\s\nTimber walls and a mossy roof. Smoke drifts from the chimney, the air is still and carries the scent of trees and earth.\n<<property hidden>>
<<attributes\nAge_Young=15\nAge_Mature=25\nAge_Old=25\nSun=1\nSun-1\nSoil=2\nWater=1\nPestResistant=0\nHardy=4\nEldritch=4\nEldritch+3\n>>\s\n<<if $plantDead>>\s\n<<property shortdescription>>\s\na dead elder tree\s\n<<property description>>\s\nSoft branches grown over with yellow lichen, when snapped the branches are hollow with a pithy core.\s\n<<property groupdescription>>\s\n<<if $groupSize gt 3>>a copse of dead elder trees\s\n<<else if $groupSize gt 1>>some dead elder trees\s\n<<else>>a dead elder tree\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<if $plantAge eq 'young'>>\s\n<<property shortdescription>>\s\nan elder sapling\s\n<<property description>>\s\nDelicate leaves and thin twigs, slowly growing.\s\n<<property groupdescription>>\s\n<<if $groupSize eq 1>> an elder sapling\s\n<<elseif $groupSize lte 3>> some elder saplings\s\n<<else>>a cluster of elder saplings\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'mature'>>\s\n<<property shortdescription>>an elder tree\s\n<<property description>>\s\nThe slender branches tangle upward. Sprays of serrated dark green leaves scatter small shadows.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>an elder tree\s\n<<elseif $groupSize lte 3>>a cluster of elder trees\s\n<<else>>a thicket of elder trees\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'old'>>\s\n<<property shortdescription>>a gnarled elder tree\s\n<<property description>>\s\nThe rough bark is dusted with yellow-green lichen. Sprays of serrated dark green leaves tangle together. You feel like you are being watched.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>a gnarled elder tree\s\n<<elseif $groupSize lte 3>>a tangled clump of old elder trees\s\n<<else>> a dark thicket of gnarled elder trees\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<property seed>>elder seedling\s\n<<property fruit>>\s\nClusters of [[small white flowers|flower_elder]] have bloomed.
Bees buzz happily around the little flowers, in a lovely scene of everyday life at peace.\n\n[[Back|previous()]]
Soft petals, the delicate folds wet with dew. Their scent is rich with promise and seduction.\n\n[[Smell|smell_rose]] the rose.\n\n[[Back|previous()]]
(function () {\n "use strict";\n version.extensions['nextdayMacro'] = {\n major: 1,\n minor: 0,\n revision: 0\n };\n\n function initCalendar() {\n var variables = state.history[0].variables;\n if (!variables.day) {\n variables.day = 1;\n }\n }\n\n function currentDay() {\n initCalendar();\n return state.history[0].variables.day;\n }\n\n version.extensions['nextdayMacro'] = {\n major:1,\n minor:0,\n revision:0\n };\n\n function plantNeedsAreMet(plantState, siteState) {\n var plantNeeds = macros.attributes.plant[plantState.type].needs;\n\n var mismatchCount = 0;\n\n for (var key in plantNeeds) {\n if (siteState[key] != plantNeeds[key]) {\n ++mismatchCount;\n }\n }\n\n return (mismatchCount <= 1);\n }\n\n function updatePlants() {\n // update plants\n for (var site in macros.plantspace.plants) {\n var plants = macros.plantspace.plants[site];\n var plantCount = macros.plantspace.plantCounts[site];\n\n var siteState = macros.worldstate.calculateSiteState(site);\n\n for (var i = 0; i < plants.length; ++i) {\n var plantState = plants[i];\n\n if (plantState.alive) {\n if (plantNeedsAreMet(plantState, siteState)) {\n if (plantState.health < plantState.attributes.hardy) {\n ++plantState.health;\n }\n } else {\n --plantState.health;\n\n if (plantState.health == 0) {\n plantState.alive = false;\n }\n }\n }\n\n plantState.fruiting = false;\n\n if (plantState.alive) {\n var plantAge = state.history[0].variables.day - plantState.plantedOn;\n\n var plantattributes = macros.plantattributes;\n var youngPeriod = plantattributes.traits(plantState.type, "age_young");\n var maturePeriod = plantattributes.traits(plantState.type, "age_mature");\n var oldPeriod = plantattributes.traits(plantState.type, "age_old");\n\n var matureAge = youngPeriod;\n var oldAge = youngPeriod + maturePeriod;\n\n if (plantAge >= matureAge && plantAge < oldAge) {\n var FRUITING_CHANCE = 0.25;\n\n plantState.fruiting = (Math.random() < FRUITING_CHANCE);\n }\n }\n }\n\n for (var i = 0; i < plants.length && plants.length < plantCount; ++i) {\n if (plants[i].fruiting) {\n var PROPAGATION_CHANCE = 0.25;\n\n if (Math.random() < PROPAGATION_CHANCE) {\n plants.push(macros.plantspace.createPlantState(plants[i].type));\n }\n }\n }\n }\n }\n\n function updateSites() {\n for (var key in macros.worldstate.sites) {\n var site = macros.worldstate.sites[key];\n if (site.extraWater > 0) {\n --site.extraWater;\n }\n }\n }\n\n function updateAspectsForSite(aspects, site) {\n var siteState = macros.worldstate.calculateSiteState(site);\n\n for (var key in aspects) {\n if (siteState[key] != undefined) {\n aspects[key] += siteState[key];\n }\n }\n }\n\n var ASPECT_TARGET = 15;\n\n function updateAspects() {\n var aspects = macros.worldstate.aspects;\n\n for (var key in aspects) {\n aspects[key] = 0;\n }\n\n for (var site in macros.worldstate.sites) {\n updateAspectsForSite(aspects, site);\n }\n\n var maximumAspect = 0;\n var winningAspect = null;\n\n for (var key in aspects) {\n if (aspects[key] > maximumAspect) {\n maximumAspect = aspects[key];\n winningAspect = key;\n } else if (aspects[key] == maximumAspect) {\n winningAspect = null;\n }\n }\n\n return winningAspect;\n }\n\n function setAspectVariables() {\n var aspects = macros.worldstate.aspects;\n var variables = state.history[0].variables;\n\n for (var key in aspects) {\n variables[key] = aspects[key];\n }\n }\n\n macros.nextday = {\n updateAspects: updateAspects,\n\n handler: function (place, macroName, params, parser) {\n initCalendar();\n state.history[0].variables.day += 1;\n\n updatePlants();\n updateSites();\n\n var winningAspect = updateAspects();\n state.history[0].variables.winningAspect = winningAspect;\n\n setAspectVariables();\n\n if (winningAspect != null &&\n macros.worldstate.aspects[winningAspect] >= ASPECT_TARGET) {\n var interval = setInterval(function() {\n state.display("WinDescription");\n clearInterval(interval);\n }, 0);\n }\n },\n\n init: function() {\n initCalendar();\n },\n }\n}());
<<attributes\nSun=2\nSoil=1\nWater=2\nPest=0\nBeauty=0\nWild=3\nEldritch=0\n>>\s\n<<property name>>\s\nThe Bramble Woods\n<<property description>>\s\nOld trees all tangled with generations of bramble and thorn. Dead leaves muffle footsteps, animals scurry in the underbrush.\n<<property hidden>>
You have enough time to improve your garden a little.\n\n<<actionlist>>\n\nOr you could just [[sleep|Sleep]].
<<attributes\nSun=3\nSoil=1\nWater=2\nPest=0\nBeauty=2\nWild=1\nEldritch=0\n>>\s\n<<property name>>\s\nA Secluded Shepherd's Cottage\n<<property description>>\s\nA small stone building high on the hills, among the stones and the sheep. Lambs bleat in the distance.\n<<property hidden>>
<<property title>>Country Cottage\s\n<<property description>>\s\nA small stone house, white walls and grey thatch, nestled into the shelter of the hills. \s\n<<if $character eq 'character_geologist' >>\s\nThe stone used for the walls comes from a nearby quarry.\n<<else if $character eq 'character_botanist'>>\s\nCommon ivy decorates the doorway.\n<<else if $character eq 'character_librarian'>>\s\nA place so homely and inviting, it seems almost a cliche of every country retreat.\n<<endif>>
<<attributes\nSun=1\nSoil=3\nWater=2\nPest=0\nBeauty=0\nWild=2\nEldritch=1\n>>\s\n<<property name>>\s\nForest Glade\n<<property description>>\s\nA sheltered clearing surrounded by tall trees.\n<<property hidden>>\s\nTreasure!
<<property title>>Crumbling Mansion\s\n<<property description>>\s\nGrey stone and dark windows dream of forgotten splendor, cracked paving stones buckle around a dry fountain. \s\n<<if $character eq 'character_geologist' >>\s\nThe granite of the building seems to yearn to return to the magma of it’s youth.\n<<else if $character eq 'character_botanist'>>\s\nEven the brambles seem to have tired of this place.\n<<else if $character eq 'character_librarian'>>\s\nA gothic mansion that begs for murder, mystery, romance!\n<<endif>>
<<attributes\nSun=3\nSoil=2\nWater=1\nPest=0\nBeauty=0\nWild=3\nEldritch=0\n>>\s\n<<property name>>\s\nDry River Bed\n<<property description>>\s\nAn old watercourse, high clay cliffs on each side trap the heat, the ground sandy from forgotten rivers.\n<<property hidden>>
--Let the player undo moves? (on / off)\n--In Sugarcane, this enables the browser's back button.\n--In Jonah, this lets the player click links in previous\n--passages.\n\nUndo: off\n\n--Let the player use bookmarks? (on / off)\n--This enables the Bookmark links in Jonah and Sugarcane\n--(If the player can't undo, bookmarks are always disabled.)\n\nBookmark: off\n\n--Obfuscate the story's HTML source to prevent possible\n--spoilers? (swap / off)\n\nObfuscate: off\n\n--String of letter pairs to use for swap-style obfuscation\n\nObfuscateKey: txevmouybgzafhdskqjcwpnlri\n\n--Include the jQuery script library? (on / off)\n--Individual scripts may force this on by\n--containing the text 'requires jQuery'.\n\njQuery: off\n\n--Include the Modernizr script library? (on / off)\n--Individual scripts/stylesheets may force this on by\n--containing the text 'requires Modernizr'.\n\nModernizr: off\n
<<display "describe day">>\n<<aspectstatus>>\s\n\n[[Credits]]
Clusters of tiny white flowers cover the tree. They smell faintly sweet, and make your head spin as if you stood up too quickly.\n\n[[Back|previous()]]
This garden is a mix of many things.
The acorn is bitter and nutty on your tongue. You spend the days happily snuffling about under the oaks, enjoying the grass against your trotters, wandering far from your garden.\n\n<<resetworld>>\s\n[[One day you wake up to find yourself a Nomad Gardener once more...|Sleep]]
<<property title>>Geologist\s\n<<property description>>\s\nThe slow dance of continents, the stories whispered by stone and strata, these are yours to witness.
<<showsidebar>>\s\nYou have travelled the world long enough. Time to rest your weary bones and GROW A GARDEN. \n\nEach garden is unique. What atmosphere will your garden develop? Will it be a place of Beauty, or run Wild? Perhaps you will foster Eldritch forces...\n\nNurture your garden until it is more Wild, Eldritch, or Beautiful than any in the land!\n\n[[BEGIN GARDENING|Home]]\n\n\n\n@@color: #003333; HORTICULTURE TIP: <<print either("Different plants need different things, study them carefully to learn what they like, make note of the terrain you plant them in.", "Each location has different traits that will affect the plants growing there.", "Till the soil to make it more suitable to the plants you wish to grow there.", "Water plants that are in a location that is too dry for them. But remember, the water will get used up over the next few days.", "Weed your garden to remove dead plants or other unwanted vegetation.", "Each plant will affect the atmosphere of your garden, cultivate those that add to the Aspect you are aiming to increase.", "Locations each have their own affect on your gardens atmosphere, this may affect which Aspect you try to increase.", "Dont forget to stop and smell the roses.", "Keep an eye on flowering plants, they may self-seed and take over empty space in your garden!", "We don't see things as they are, we see things as we are.", "Plants grow old and will eventually die from old age if they last long enough.", "This game was made in 48 hours for Global Game Jam 2014!", "The description in the sidebar will give you an idea of what Aspect your garden is currently developing. Keep an eye on it as you cultivate your garden.")>>@@\n\n\n/%[[How have your travels changed you?|Character Select]]%/\n
<<attributes\nAge_Young=5\nAge_Mature=8\nAge_Old=5\nSun=2\nSoil=2\nWater=3\nPestResistant=0\nHardy=2\nEldritch=4\nBeauty=3\nEldritch+1\nBeauty+1\n>>\s\n<<if $plantDead>>\s\n<<property shortdescription>>\s\na dead foxglove\s\n<<property description>>\s\nYellowed leaves and bugrot.\s\n<<property groupdescription>>\s\n<<if $groupSize gt 3>>a mound of dead foxgloves\s\n<<else if $groupSize gt 1>>a mess of dead foxgloves\s\n<<else>>a dead foxglove\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<if $plantAge eq 'young'>>\s\n<<property shortdescription>>\s\na foxglove seedling\s\n<<property description>>\s\nSmall sprouts of an unassuming appearance.\s\n<<property groupdescription>>\s\n<<if $groupSize eq 1>> a foxglove seedling\s\n<<elseif $groupSize lte 3>> a few foxglove seedlings\s\n<<else>> a lot of foxglove seedlings\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'mature'>>\s\n<<property shortdescription>>a foxglove plant\s\n<<property description>>\s\nA clump of broad spearshaped leaves cluster together.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>a foxglove plant\s\n<<elseif $groupSize lte 3>>a row of foxgloves\s\n<<else>>a collection of foxgloves\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'old'>>\s\n<<property shortdescription>>an aging foxglove plant\s\n<<property description>>\s\nA clump of tired leaves, no longer as dark green or spearlike as they once were.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>an aging foxglove plant\s\n<<elseif $groupSize lte 3>>a few straggling old foxgloves\s\n<<else>> a mess of old foxgloves\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<property seed>>foxglove seed\s\n<<property fruit>>\s\nA tall spear of [[red and white flowers|flower_foxglove]] have appeared
<<attributes\nSun=3\nSoil=2\nWater=1\nPest=0\nBeauty=0\nWild=0\nEldritch=3\n>>\s\n<<property name>>\s\nStanding Stone\n<<property description>>\s\nA solitary stone, tall as a person, stands slightly askew atop a small grassy mound.\n<<property hidden>>
<<attributes\nAge_Young=20\nAge_Mature=30\nAge_Old=150\nSun=1\nSun-2\nSoil=2\nWater=2\nWater-1\nPest=0\nHardy=6\nWild=4\nWild+1\nBeauty+2\n>>\s\n<<if $plantDead>>\s\n<<property shortdescription>>\s\na dead oak tree\s\n<<property description>>\s\nThe dead wood of an oak tree, beginning to rot.\s\n<<property groupdescription>>\s\n<<if $groupSize gt 3>>an eerie grove of dead oaks\s\n<<else if $groupSize gt 1>>a few dead oak trees\s\n<<else>>the bare branches of a dead oak\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<if $plantAge eq 'young'>>\s\n<<property shortdescription>>\s\na small oak sapling\s\n<<property description>>\s\nThin and twiggy, its ambitous leaves far to big for its size.\s\n<<property groupdescription>>\s\n<<if $groupSize eq 1>> a small oak sapling\s\n<<elseif $groupSize lte 3>> a few oak saplings\s\n<<else>> a thicket of oak saplings\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'mature'>>\s\n<<property shortdescription>>an oak tree\s\n<<property description>>\s\nStrong limbs and bright green leaves of an oak tree create a beautiful canopy overhead.\s\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>an oak tree\s\n<<elseif $groupSize lte 3>>a few oak trees\s\n<<else>>a grove of oaks\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'old'>>\s\n<<property shortdescription>>a gnarled old oak\s\n<<property description>>\s\nIt's strong branches twisted and gnarled, holding up a thick canopy that vaults high above. This tree has weathered many storms and still holds strong.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>a gnarled old oak\s\n<<elseif $groupSize lte 3>>a group of twisted old oaks\s\n<<else>> a dark grove of gnarled old oaks, twisted together,\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<property seed>>an acorn\s\n<<property fruit>>\s\nSmall [[acorns|fruit_acorn]] nestle among the leaves.
(function () {\n "use strict";\n\n version.extensions['locationselectMacro'] = {\n major: 1,\n minor: 0,\n revision: 0\n };\n\n function displayTerrainName(place, site) {\n var terrain = macros.worldstate.terrains[site];\n new Wikifier(place, "<<displayproperty '" + terrain + "' name>>");\n }\n\n function createSiteLinks(place, handler) {\n var sites = macros.worldstate.sites;\n\n for (var site in sites) {\n var link = Wikifier.createInternalLink(place, null);\n link.className = "internalLink";\n displayTerrainName(link, site);\n\n link.site = site;\n link.onclick = function() {\n removeChildren(place);\n handler(place, this.site);\n };\n }\n }\n\n function renderSiteState(place, site) {\n displayTerrainName(place, site);\n new Wikifier(place, "\sn");\n macros.sitestate.render(place, site);\n }\n\n var actions = [\n {\n name: "Water the garden",\n handler: function(place) {\n new Wikifier(place, "Where would you like to water?\sn\sn");\n\n createSiteLinks(place, function(place, site) {\n function createWaterLink(text, amount) {\n var link = Wikifier.createInternalLink(place, null);\n link.className = "internalLink";\n insertText(link, text);\n\n link.onclick = function() {\n macros.worldstate.sites[site].extraWater += amount;\n\n removeChildren(place);\n\n renderSiteState(place, site);\n new Wikifier(place, "\sn\sn[[Sleep]]");\n }\n }\n\n renderSiteState(place, site);\n new Wikifier(place, "\sn\snYou can water this place ");\n createWaterLink("a little", 1);\n insertText(place, " or ");\n createWaterLink("a lot", 2);\n new Wikifier(place, ", or you could just [[sleep|Sleep]].");\n });\n\n new Wikifier(place, "\snOr just [[sleep|Sleep]].");\n },\n },\n {\n name: "Till the soil",\n handler: function(place) {\n new Wikifier(place, "Where would you like to till the soil?\sn\sn");\n\n createSiteLinks(place, function(place, site) {\n function createTillLink(text, amount) {\n var link = Wikifier.createInternalLink(place, null);\n link.className = "internalLink";\n insertText(link, text);\n\n link.onclick = function() {\n macros.worldstate.sites[site].extraSoil += amount;\n\n removeChildren(place);\n\n renderSiteState(place, site);\n new Wikifier(place, "\sn\sn[[Sleep]]");\n }\n }\n\n renderSiteState(place, site);\n new Wikifier(place, "\sn\snYou can make the soil ");\n createTillLink("richer", 1);\n insertText(place, " or ");\n createTillLink("poorer", -1);\n\n new Wikifier(place, ", or you could just [[sleep|Sleep]].");\n });\n\n new Wikifier(place, "\snOr just [[sleep|Sleep]].");\n },\n },\n {\n name: "Weed the garden",\n handler: function(place) {\n new Wikifier(place, "Where would you like to weed?\sn\sn");\n\n createSiteLinks(place, function(place, site) {\n function createWeedLink(plantType, plantAge, group) {\n var link = Wikifier.createInternalLink(place, null);\n link.className = "internalLink";\n\n macros.plantspace.setGroupVariables(plantType, plantAge, group);\n new Wikifier(link, "Remove ");\n macros.displayproperty.handler(link, "displayproperty",\n [plantType, "groupdescription"], null);\n new Wikifier(link, ".\sn");\n\n link.onclick = function() {\n var ageCategory = macros.plantspace.plantAgeCategory;\n var plantsRemoved = 0;\n\n for (var i = 0; i < plants.length; ) {\n if (plants[i].type == plantType &&\n ageCategory(plants[i]) == plantAge) {\n plants.splice(i, 1);\n ++plantsRemoved;\n } else {\n ++i;\n }\n }\n\n removeChildren(place);\n\n new Wikifier(place, "You removed " +\n lang.wordForNumber(plantsRemoved) + " " +\n lang.pluralise("plant", plantsRemoved) + ".\sn\sn[[Sleep]]");\n };\n }\n\n var plants = macros.plantspace.plants[site] || [];\n var groups = macros.plantspace.createGroups(plants);\n\n displayTerrainName(place, site);\n new Wikifier(place, "\sn");\n\n if (groups.length > 0) {\n new Wikifier(place, "What would you like to remove?\sn\sn");\n\n for (var i = 0; i < groups.length; ++i) {\n createWeedLink(groups[i].type, groups[i].age, groups[i].list);\n }\n\n new Wikifier(place, "\snOr just [[sleep|Sleep]].");\n } else {\n new Wikifier(place, "There are no plants here.\sn\sn[[Sleep]]");\n }\n });\n },\n },\n ];\n\n function createActionLink(place, action) {\n var link = Wikifier.createInternalLink(place, null);\n link.className = "internalLink";\n insertText(link, action.name);\n\n link.onclick = function() {\n removeChildren(place);\n action.handler(place);\n };\n }\n\n macros.actionlist = {\n handler: function (place, macroName, params, parser) {\n for (var i = 0; i < actions.length; ++i) {\n createActionLink(place, actions[i]);\n\n if (i < actions.length - 1) {\n new Wikifier(place, "\sn");\n }\n }\n }\n }\n}());
/%You are the <<displayproperty $character title>>.%/\s\n/%You are in the <<displayproperty $location title>>.%/\s\nThese are the areas that make up your garden:\n\n<<sitelist>>\s\n\nEnd your day by [[maintaining|ActionList]] the garden or [[sleeping|Sleep]].
You take a deep breath. Time slows and you feel the pulse of growing things around you. Life is good.\n\nSlowly walk back [[home|Home]].
<<attributes\nSun=2\nSoil=2\nWater=2\nPest=0\nBeauty=0\nWild=3\nEldritch=0\n>>\s\n<<property name>>\s\nGap In The Wall\n<<property description>>\s\nA section of the old stone wall has tumbled down, leaving a small gap through to the Old Forest.\n<<property hidden>>
<<attributes\nAge_Young=15\nAge_Mature=50\nAge_Old=30\nSun=1\nSun-1\nSoil=2\nSoil-1\nWater=1\nWater-1\nPestResistant=1\nHardy=5\nWild=4\nBeauty-1\nWild+1\n>>\s\n<<if $plantDead>>\s\n<<property shortdescription>>\s\nthe bare scraggy branches of a dead cypress\s\n<<property description>>\s\nDead bark still grips the cracked trunk and shattered limbs of the cypress tree.\s\n<<property groupdescription>>\s\n<<if $groupSize gt 3>>the tangled bare branches of a few dead cypress trees\s\n<<else if $groupSize gt 1>>a spooky of grove of dead cypress trees, their bare scraggy branches clawing at the sky\s\n<<else>>the bare scraggy branches of a dead cypress\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<if $plantAge eq 'young'>>\s\n<<property shortdescription>>\s\na cypress sapling\s\n<<property description>>\s\nSmall leaves and tiny limbs, it's hard to believe it may someday grow to be a spreading tree.\s\n<<property groupdescription>>\s\n<<if $groupSize eq 1>> a cypress sapling\s\n<<elseif $groupSize lte 3>> a number of cypress saplings\s\n<<else>> a group of cypress saplings\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'mature'>>\s\n<<property shortdescription>>the dark scraggy shape of a cypress tree\s\n<<property description>>\s\nThe twisting trunk and strong limbs of the cypress tree hold aloft a ragged mass of dark foliage in scattered shapes, casting deep shadows. It feels like old gods and mystery.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>the dark scraggy shape of a cypress tree\s\n<<elseif $groupSize lte 3>>a few ragged cypress trees huddle together\s\n<<else>>a thick cypress grove, dark and deep\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'old'>>\s\n<<property shortdescription>>the dark scraggy shape of an old cypress tree\s\n<<property description>>\s\nThe cracked trunk and twisted limbs of the old cypress tree hold aloft a ragged mass of dark foliage in scattered shapes, casting deep shadows. It feels like old gods and mystery.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>the dark scraggy shape of a cypress tree\s\n<<elseif $groupSize lte 3>>a few ragged old cypress trees huddle together\s\n<<else>>an impenetrable grove of old cypress trees, dark and mysterious\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<property seed>>cypress nut\s\n<<property fruit>>\s\nSmall hexagonal [[spikey nuts|fruit_cypress]] fall from the tree, sharp underfoot.
<<attributes\nSun=1\nSoil=1\nWater=3\nPest=0\nBeauty=0\nWild=2\nEldritch=2\n>>\s\n<<property name>>\s\nA Reedy Swamp\n<<property description>>\s\nGrey and dismal, the flat mud stretches into the distance, interrupted only by clumps of rust colored reeds. Bugs swarm and bite.\n<<property hidden>>
<<characterselect>>
Brilliant yellow and orange daisy flowers, like molten gold, reaching eagerly toward the sky.\n\n[[Back|previous()]]
<<attributes\nAge_Young=2\nAge_Mature=5\nAge_Old=10\nSun=3\nSoil=3\nWater=2\nPestResistant=0\nHardy=2\nWild=-1\nEldritch=1\n>>\s\n<<if $plantDead>>\s\n<<property shortdescription>>\s\na dead sage bush\s\n<<property description>>\s\nGrey twigs and a few dead leaves. They still smell like a memory of kitchens.\s\n<<property groupdescription>>\s\n<<if $groupSize gt 3>>a hedge of dead sage bushes\s\n<<else if $groupSize gt 1>>some dead sage bushes\s\n<<else>>a dead sage bush\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<if $plantAge eq 'young'>>\s\n<<property shortdescription>>\s\na sage seedling\s\n<<property description>>\s\nTiny greyish green leaves, slowly growing.\s\n<<property groupdescription>>\s\n<<if $groupSize eq 1>> a sage seedling\s\n<<elseif $groupSize lte 3>> a sprinkling of sage seedlings\s\n<<else>> a clump of sage seedlings\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'mature'>>\s\n<<property shortdescription>>a sage bush\s\n<<property description>>\s\nThe sage bush has soft grey leaves, that give off a pleasant herbal aroma when touched.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>a sage bush\s\n<<elseif $groupSize lte 3>>a couple of sage bushes\s\n<<else>>an aromatic patch of sage\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'old'>>\s\n<<property shortdescription>>a woody old sage bush\s\n<<property description>>\s\nWhile its are stems woody, the grey-green leaves are as soft and aromatic as ever.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>a woody old sage bush\s\n<<elseif $groupSize lte 3>>a couple of old sage bushes\s\n<<else>> a hedge of old sage bushes\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<property seed>>sage seed\s\n<<property fruit>>\s\nSprays of [[purple flowers|flower_sage]] have bloomed.\s\n\s\n\s\n\s\n<<property detaildescription>>\s\n<<if $character eq 'character_geologist'>>\s\nThe pungent aroma conjures memories of sunday roasts and kitchen gardens.\n<<elseif $character eq 'character_botanist'>>\s\nSalvia officinalis, common garden Sage, with woody stems and soft grey leaves, a member of the family Lamiaceae.\n<<elseif $character eq 'character_librarian'>>\s\nA soft grey herb found in all kitchen gardens, with a history of reputed properties, ‘Sage the Saviour’ beloved of Dioscorides, Pliny, and Galen.\n<<endif>>
<<display SplashScreen>>
<<displayproperty $plantType description>> \s\n<<if $plantAge gt 0>>\s\nIt has been growing for <<print $plantAge>> day<<if $plantAge gt 1>>s<<endif>>.\s\n<<else>>\s\nIt has just been planted.\s\n<<endif>>\s\n<<displayproperty $plantType fruit>>
(function () {\n "use strict";\n\n version.extensions['displaypropertyMacro'] = {\n major: 1,\n minor: 0,\n revision: 0\n };\n\n function expandVariable(string) {\n if (string[0] == "$") {\n return state.history[0].variables[string.slice(1)] || "";\n } else {\n return string;\n }\n }\n\n macros.displayproperty = {\n handler: function (place, macroName, params, parser) {\n if (params.length != 2) {\n throwError(place, "displayproperty: Wrong number of arguments!" +\n "Expected 2, got " + params.length + ".");\n return;\n }\n\n var passageTitle = expandVariable(params[0]);\n var property = expandVariable(params[1]);\n\n state.history[0].variables.property = property;\n\n new Wikifier(place, "<<display '" + passageTitle + "'>>");\n }\n }\n\n version.extensions['propertyMacro'] = {\n major: 1,\n minor: 0,\n revision: 0\n };\n\n function propertyContents(parser) {\n var start = parser.source.indexOf(">>", parser.matchStart) + 2;\n var nextProperty = parser.source.indexOf("<<property", start);\n\n if (nextProperty == -1) {\n nextProperty = parser.source.length;\n }\n\n var endProperty = parser.source.indexOf("<<endproperty", start);\n\n if (endProperty == -1) {\n endProperty = parser.source.length;\n }\n\n var end = Math.min(nextProperty, endProperty)\n\n parser.nextMatch = end;\n\n return parser.source.slice(start, end);\n }\n\n macros.property = {\n handler: function (place, macroName, params, parser) {\n if (params.length != 1) {\n throwError(place, "property: Wrong number of arguments!" +\n "Expected 1, got " + params.length + ".");\n return;\n }\n\n var property = params[0];\n var contents = propertyContents(parser);\n\n if (state.history[0].variables.property == property) {\n new Wikifier(place, contents);\n }\n }\n }\n\n macros.endproperty = {\n handler: function (place, macroName, params, parser) { }\n }\n}());
<<attributes\nSun=2\nSoil=1\nWater=2\nPest=0\nBeauty=0\nWild=2\nEldritch=1\n>>\s\n<<property name>>\s\nRocky Hilltop\n<<property description>>\s\nA group of old granite boulders, grey and patched with lichen, sheltering the sparse grass between them.\n<<property hidden>>
<<attributes\nSun=3\nSoil=1\nWater=1\nPest=0\nBeauty=0\nWild=2\nEldritch=1\n>>\s\n<<property name>>\s\nBarren Earth\n<<property description>>\s\nA patch of barren earth, shunned by most plants.\n<<property hidden>>
.passage {width: 900px}\n@font-face {font-family: 'Press Start 2P'; src: url(http://www.openfontlibrary.org/assets/fonts/press-start-2p/6b0a4bbcec8eb53940cbfcb409a788ee/74496d9086d97aaeeafb3085e9957668/PressStart2PRegular.ttf) format('truetype');}\n\nbody {font-family: 'Press Start 2P'; font-weight: normal; font-style: normal; font-size: medium}\n#sidebar {font-family: 'Press Start 2P'; font-weight: normal; font-style: normal;}\n#credits { display: none; }\n#passages { border-left: 0; padding-left: 2; }
<<property title>>Librarian\s\n<<property description>>\s\nBooks are windows into many worlds, from which you have taken many souvenirs. Your mind is an attic stuffed with obtuse facts and perspectives, all neatly catalogued in the Dewey decimal system.
<<attributes\nAge_Young=4\nAge_Mature=10\nAge_Old=10\nSun=3\nSoil=1\nWater=2\nPest=0\nHardy=3\nBeauty=3\nBeauty+2\n>>\s\n<<if $plantDead>>\s\n<<property shortdescription>>\s\nthe thorny twigs of a dead rosebush\s\n<<property description>>\s\nA dead rosebush, tattered twigs and old thorns.\s\n<<property groupdescription>>\s\n<<if $groupSize gt 3>>a thorny thicket of dead rosebushes\s\n<<else if $groupSize gt 1>>a few dead rosebushes\s\n<<else>>the thorny twigs of a dead rosebush\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<if $plantAge eq 'young'>>\s\n<<property shortdescription>>\s\nthe tender shoots of a young rosebush\s\n<<property description>>\s\nUnfurling leaves of bright green, thorns still soft and tender.\s\n<<property groupdescription>>\s\n<<if $groupSize eq 1>> the tender shoots of a young rosebush\s\n<<elseif $groupSize lte 3>> a row of young rose shoots\s\n<<else>> a verdant mass of young rose shoots\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'mature'>>\s\n<<property shortdescription>>a rosebush\s\n<<property description>>\s\nThe rosebush has dark green leaves that hide wicked thorns.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>a rosebush\s\n<<elseif $groupSize lte 3>>a row of rosebushes\s\n<<else>> a luxurious bed of roses\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'old'>>\s\n<<property shortdescription>>an old rosebush\s\n<<property description>>\s\nThe rosebush is old, it's branches gnarled, dark green leaves tattered, it's wicked thorns long and savage.\n<<property detaildescription>>\s\n<<if $character eq 'character_geologist'>>\s\nA flower, no more worthy of interest than any other, other than it’s traitorous thorns ready to pierce the trusting heart.\n<<elseif $character eq 'character_botanist'>>\s\nThe sharp objects along the stem are commonly called thorns, are technically prickles. True thorns, are modified stems, which originate at a node and which have nodes along the length of the thorn itself.\n<<elseif $character eq 'character_librarian'>>\s\nBy any other name, would still smell as sweet. The thorn and the petal, beloved symbols of romance both.\n<<endif>>\s\n<<property description>>\s\nThe rosebush has dark green leaves that hide wicked thorns.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>an old rosebush\s\n<<elseif $groupSize lte 3>>a tangle of old rosebushes\s\n<<else>> a thicket of old rosebushes\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<property seed>>a rose cutting\s\n\s\n<<property fruit>>\s\nA single [[red rose|flower_rose]] has blossomed.
<<attributes\nSun=2\nSoil=2\nWater=2\nPest=0\nBeauty=2\nWild=0\nEldritch=1\n>>\s\n<<property name>>\s\nCottage Garden\n<<property description>>\s\nA small garden, sheltered behind a stone wall.\n<<property hidden>>
<<property title>>Forest Cabin\s\n<<property description>>\s\nTimber walls and a mossy roof. Smoke drifts from the chimney, the air is still and carries the scent of trees and earth. \s\n<<if $character eq 'character_geologist' >>\s\nIt triggers memories of long expeditions into the mountains, searching for glints of gold in the streams.\n<<else if $character eq 'character_botanist'>>\s\nThe conifers whisper gently to each other, ammonita mushrooms red around their feet.\n<<else if $character eq 'character_librarian'>>\s\nThe perfect place to curl up with a book, to lose track of time.\n<<endif>>
<<attributes\nSun=2\nSoil=1\nWater=3\nPest=0\nBeauty=0\nWild=1\nEldritch=2\n>>\s\n<<property name>>\s\nAn Old Quarry\n<<property description>>\s\nWhite chalky cliffs overgrown with ivy, the bottom of the quarry now filled with water, dark and deep. \n<<property hidden>>
<<attributes\nAge_Young=5\nAge_Mature=10\nAge_Old=10\nSun=1\nSoil=2\nWater=1\nPestResistant=1\nHardy=2\nEldritch=5\nBeauty=4\nEldritch+1\nBeauty+1\n>>\s\n<<if $plantDead>>\s\n<<property shortdescription>>\s\na tansy plant\s\n<<property description>>\s\nDead leaves in a rotting carpet over the ground. A swarm of bugs revel in the plant's untimely end.\s\n<<property groupdescription>>\s\n<<if $groupSize gt 3>>a mass of dead tansy leaves\s\n<<else if $groupSize gt 1>>a carpet of dead tansy leaves\s\n<<else>>a dead tansy plant\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<if $plantAge eq 'young'>>\s\n<<property shortdescription>>\s\na tansy seedling\s\n<<property description>>\s\nSmall fronds slowly uncurling into life.\s\n<<property groupdescription>>\s\n<<if $groupSize eq 1>> a tansy seedling\s\n<<elseif $groupSize lte 3>> a number of tansy seedlings\s\n<<else>> a spread of tansy seedlings\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'mature'>>\s\n<<property shortdescription>>a patch of tansy\s\n<<property description>>\s\nA carpet of dark green fronds grow over the ground, waving gently in the breeze. A bright peppery smell rises as the leaves are crushed underfoot.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>a patch of tansy\s\n<<elseif $groupSize lte 3>>a carpet of tansy fronds\s\n<<else>>the ground is covered by a mass of tansy\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'old'>>\s\n<<property shortdescription>>a dense patch of tansy\s\n<<property description>>\s\nA thick mass of dark green fronds matted across the ground. A bright peppery smell rises as the leaves are crushed underfoot.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>a dense patch of tansy\s\n<<elseif $groupSize lte 3>>a thick carpet of tansy\s\n<<else>> a deep mass of tansy\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<property seed>>tansy seed\s\n<<property fruit>>\s\nClusters of [[small yellow pompoms|flower_tansy]] bob merrily above the fronds.
<<attributes\nSun=2\nSoil=2\nWater=1\nPest=0\nBeauty=0\nWild=2\nEldritch=2\n>>\s\n<<property name>>\s\nA Hillside Cottage\n<<property description>>\s\nA small stone house, white walls and grey thatch, nestled into the shelter of the hills.\n<<property hidden>>
// based on the HTML5 sound macros from\n// http://www.glorioustrainwrecks.com/node/5061\n(function () {\n "use strict";\n version.extensions['ambientsoundMacro'] = {\n major: 1,\n minor: 0,\n revision: 0\n };\n\n function enableLooping(audio) {\n if (audio.loop != undefined) {\n audio.loop = true;\n } else {\n var restart = function () {\n audio.play();\n };\n\n audio.addEventListener('ended', restart, 0);\n }\n }\n\n function clamp(x, min, max) {\n return Math.max(min, Math.min(x, max));\n }\n\n function fade(audio, velocity) {\n if (audio.interval) {\n clearInterval(audio.interval);\n }\n\n var currentVolume = audio.volume;\n var updateIntervalMs = 10;\n\n function updateFade() {\n currentVolume = currentVolume + velocity * updateIntervalMs / 1000;\n\n audio.volume = clamp(currentVolume, 0, 1);\n\n if ((velocity > 0 && audio.volume == 1) ||\n (velocity < 0 && audio.volume == 0)) {\n clearInterval(audio.interval);\n\n if (audio.volume == 0) {\n audio.pause();\n }\n }\n }\n\n audio.interval = setInterval(updateFade, updateIntervalMs);\n }\n\n function fadeIn(audio) {\n fade(audio, 1);\n }\n\n function fadeOut(audio) {\n fade(audio, -1);\n }\n\n macros.ambientsound = {\n soundtracks: {},\n currentlyPlaying: {},\n\n stopOtherTracks: function(trackName) {\n var currentlyPlaying = this.currentlyPlaying;\n\n for (var key in currentlyPlaying) {\n if (currentlyPlaying.hasOwnProperty(key) && currentlyPlaying[key]\n && key != trackName) {\n fadeOut(currentlyPlaying[key]);\n currentlyPlaying[key] = null;\n }\n }\n },\n\n handler: function (place, macroName, params, parser) {\n if (params.length == 0) {\n throwError(place, "ambientsound: No sound specified!");\n return;\n }\n\n var basename = params[0].slice(0, params[0].lastIndexOf("."));\n\n this.stopOtherTracks(basename);\n\n if (this.currentlyPlaying[basename]) {\n return;\n }\n\n var audio = this.soundtracks[basename];\n\n if (audio) {\n enableLooping(audio);\n\n fadeIn(audio);\n audio.play();\n\n this.currentlyPlaying[basename] = audio;\n }\n }\n }\n\n // preload sounds for this macro\n var div = document.getElementById("storeArea").firstChild;\n while (div) {\n preloadSoundsForDiv(div);\n div = div.nextSibling;\n }\n\n function preloadSoundsForDiv(div) {\n var extensions = ["ogg", "mp3", "wav", "webm"];\n var regex = /ambientsound\ss+(['"])([^'"]*?)\s.(ogg|mp3|wav|webm)\s1/gi;\n\n while (true) {\n var result = regex.exec(div.innerHTML);\n\n if (!result) {\n break;\n }\n\n var basename = result[2];\n var extension = result[3];\n\n var audio = new Audio();\n\n if (audio.canPlayType) {\n var canPlay = audio.canPlayType("audio/" + extension)\n\n if (!canPlay) {\n // try other known extensions\n for (var i = 0; i < extensions.length; ++i) {\n if (audio.canPlayType("audio/" + extensions[i])) {\n extension = extensions[i];\n canPlay = true;\n break;\n }\n }\n }\n\n if (canPlay) {\n audio.setAttribute("src", basename + "." + extension);\n audio.volume = 0;\n audio.interval = null;\n macros.ambientsound.soundtracks[basename] = audio;\n } else {\n console.log("Browser can't play '" + basename + "'");\n }\n }\n }\n }\n}());
The size of a small marble, and vaguely geodesic, the cypress nuts are prickly and leave your hands sticky with sap.\n\n[[Back|previous()]]
<<if $eldritch lte 4>>This is a slightly strange garden.\s\n<<else if $eldritch lte 8>>This is a weird garden.\s\n<<else if $eldritch lte 12>>This is an eldritch garden.\s\n<<else>>This garden is becoming a secret place of power and Eldritch forces.\s\n<<endif>>
<<attributes\nSun=2\nSoil=2\nWater=1\nPest=0\nBeauty=0\nWild=2\nEldritch=2\n>>\s\n<<property name>>\s\nOld Ruins\n<<property description>>\s\nGrey stone and dark windows dream of forgotten splendor, cracked paving stones buckle around a dry fountain, ivy slowly pulling down the remaining walls.\n<<property hidden>>
(function () {\n "use strict";\n\n version.extensions['locationselectMacro'] = {\n major: 1,\n minor: 0,\n revision: 0\n };\n\n macros.locationselect = {\n handler: function (place, macroName, params, parser) {\n var locations = tale.lookup("tags", "location");\n\n for (var i = 0; i < 2; ++i) {\n var index = Math.floor(Math.random() * locations.length);\n\n var location = locations[index].title;\n\n new Wikifier(place,\n "[[<<displayproperty '" + location + "' description>>|Home]" +\n "[$location = '" + location + "']]\sn\sn");\n\n locations.splice(index, 1);\n }\n }\n }\n}());
Taking in a lungful of the bitter smell, you drift away from this mortal plane on a wave of vertigo.\n\n<<resetworld>>\s\n[[You wake far far away from here...|Sleep]]
<<attributes\nSun=1\nSoil=2\nWater=3\nPest=0\nBeauty=1\nWild=2\nEldritch=0\n>>\s\n<<property name>>\s\nForest Brook\n<<property description>>\s\nA small fast flowing stream babbles to itself as it flows between the trees.\n<<property hidden>>
(function () {\n "use strict";\n\n version.extensions['characterselectMacro'] = {\n major: 1,\n minor: 0,\n revision: 0\n };\n\n macros.characterselect = {\n handler: function (place, macroName, params, parser) {\n var characters = tale.lookup("tags", "character");\n\n for (var i = 0; i < 2; ++i) {\n var index = Math.floor(Math.random() * characters.length);\n\n var character = characters[index].title;\n\n new Wikifier(place,\n "[[<<displayproperty '" + character + "' description>>" +\n "|Home]" + "[$character = '" + character + "']]\sn\sn");\n\n characters.splice(index, 1);\n }\n }\n }\n}());
<<ambientsound "audio/MainTheme.ogg">>\s\n<<hidesidebar>>\s\n[img[title.gif][realstart]]
<<if $wild lte 4>>This is a slightly wild garden.\s\n<<else if $wild lte 8>>This is a wild garden.\s\n<<else if $wild lte 12>>This is a very wild garden.\s\n<<else>>Your garden has almost become one with the Wild.\s\n<<endif>>
<<attributes\nSun=2\nSoil=3\nWater=3\nPest=0\nBeauty=0\nWild=3\nEldritch=0\n>>\s\n<<property name>>\s\nA Black Bog\n<<property description>>\s\nThe bright green moss and rotting logs hide the deep black bog that lurks below, waiting to suck down the foolish and misguided. Frogs croak loudly, and the air smells of swampwater.\n<<property hidden>>
<<attributes\nSun=1\nSoil=2\nWater=3\nPest=0\nBeauty=2\nWild=1\nEldritch=0\n>>\s\n<<property name>>\s\nA Shady Glen\n<<property description>>\s\nSheltered from the midday sun, this hidden glen is damp and green. Frogs croak gently nearby.\n<<property hidden>>
<<attributes\nAge_Young=4\nAge_Mature=10\nAge_Old=20\nSun=2\nSoil=1\nWater=1\nPestResistant=1\nHardy=2\nEldritch=2\nWild=2\nEldritch+1\nBeauty+1\n>>\s\n<<if $plantDead>>\s\n<<property shortdescription>>\s\na dead yarrow twig\s\n<<property description>>\s\nThin dry twigs and some soft dead leaves.\s\n<<property groupdescription>>\s\n<<if $groupSize gt 3>>a mass of dead yarrow twigs\s\n<<else if $groupSize gt 1>>a scattering of dead yarrow twigs\s\n<<else>>a dead yarrow twig\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<if $plantAge eq 'young'>>\s\n<<property shortdescription>>\s\nyarrow seedling\s\n<<property description>>\s\nTiny leaves, soft and tentative.\s\n<<property groupdescription>>\s\n<<if $groupSize eq 1>> a yarrow seedling\s\n<<elseif $groupSize lte 3>> a smattering of yarrow seedlings\s\n<<else>> a mess of yarrow seedlings\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'mature'>>\s\n<<property shortdescription>>a yarrow plant\s\n<<property description>>\s\nDelicately fronded dark green leaves grow over the ground.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>a yarrow plant\s\n<<elseif $groupSize lte 3>>a small patch of yarrow\s\n<<else>>a soft blanket of yarrow\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'old'>>\s\n<<property shortdescription>>an old yarrow plant\s\n<<property description>>\s\nA matt of old green fronds and twisted roots, holding tight to the soil, spreading like a blanket.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>an old yarrow plant\s\n<<elseif $groupSize lte 3>>a matt of old yarrow\s\n<<else>> a morass of old yarrow\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<property seed>>yarrow root\s\n<<property fruit>>\s\nA head of [[small white flowers|flower_yarrow]] have bloomed.
<<attributes\nAge_Young=10\nAge_Mature=15\nAge_Old=30\nSun=1\nSun=-1\nSoil=1\nSoil+1\nWater=3\nPestResistant=0\nHardy=3\nWild=4\nBeauty=5\nBeauty+2\nWild+1\n>>\s\n<<if $plantDead>>\s\n<<property shortdescription>>\s\nthe sad branches of a dead willow\s\n<<property description>>\s\nThe dead dry branches are brittle the touch, the thick trunk hollow and beginning to rot.\n<<property groupdescription>>\s\n<<if $groupSize gt 3>>a group of dead willows standing forlorn\s\n<<else if $groupSize gt 1>>a melancholy thicket of dead willows\s\n<<else>>the sad branches of a dead willow\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<if $plantAge eq 'young'>>\s\n<<property shortdescription>>\s\na willow sapling\s\n<<property description>>\s\nStraight and proud, young willows do not yet weep.\s\n<<property groupdescription>>\s\n<<if $groupSize eq 1>> a willow sapling\s\n<<elseif $groupSize lte 3>> a number of willow saplings\s\n<<else>> a gaggle of willow saplings\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'mature'>>\s\n<<property shortdescription>>a gently weeping willow\s\n<<property description>>\s\nThe delicate arcs of the willow branches drape to the ground, creating a hidden pavillion filled with golden green light.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>a gently weeping willow\s\n<<elseif $groupSize lte 4>>a group of weeping willows gather for company\s\n<<else>>a thicket of weeping willows, their branches tangled together\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'old'>>\s\n<<property shortdescription>>an ancient willow\s\n<<property description>>\s\nThe delicate arcs of the willow branches drape to the ground in a thick curtain, creating a hidden pavillion filled with dim green light. The trunk is gnarled and full of hollows in which to hide secrets.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>an ancient willow\s\n<<elseif $groupSize lte 3>>a group of old willows weeping together for time passed\s\n<<else>>a melancholy thicket of old willows, branches tangled together in sympathy\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<property seed>>willow twig
<<set $winningAspect = "wasteland">>\n<<display WinDescription>>
[img[credits.jpg]]\n\n<center>[[Back|previous()]]</center>
<<attributes\nSun=2\nSoil=2\nWater=2\nPest=0\nBeauty=3\nWild=0\nEldritch=0\n>>\s\n<<property name>>\s\nThe Manor Grounds\n<<property description>>\s\nExpansive and ornate, the surrounds of the Manor are full of hidden corners, crumbling statues, and the whispers of garden parties long past.\n<<property hidden>>
(function () {\n "use strict";\n "requires jQuery";\n\n version.extensions['locationselectMacro'] = {\n major: 1,\n minor: 0,\n revision: 0\n };\n\n macros.hidesidebar = {\n handler: function (place, macroName, params, parser) {\n $('#sidebar').hide();\n }\n }\n\n macros.showsidebar = {\n handler: function (place, macroName, params, parser) {\n $('#sidebar').fadeIn();\n }\n }\n}());
<<property title>>Botanist\s\n<<property description>>\s\nFrom the smallest of desert lichens to lush canopies of the jungle, all plants are known to you. By property and name, from seed, stem and flower, collected and quantified.
/% @@font-size:1.5em; Ben Batt & Jim Batt @@%/
<<attributes\nSun=1\nSoil=2\nWater=3\nPest=0\nBeauty=0\nWild=2\nEldritch=1\n>>\s\n<<property name>>\s\nA Mossy Cave\n<<property description>>\s\nThe entrance hidden by ferns, the interior is cool and damp. Soft moss covers the rocks, and a small rivulet of water runs out into the sun.\n<<property hidden>>
The tall flower stem stands as tall as you, spiralled around with white and red trumpetlike flowers. As beautiful as it is, you are cautious of its deadly reputation.\n\n[[Back|previous()]]
<<displayproperty $plantType description>>\n<<displayproperty $plantType detaildescription>>\n<<plantstate>>\n\n[[Back|previous()]]
(function () {\n "use strict";\n\n version.extensions['worldstateMacro'] = {\n major: 1,\n minor: 0,\n revision: 0\n };\n\n var ATTRIBUTE_MINIMUM = 0;\n var ATTRIBUTE_MAXIMUM = 3;\n\n function calculateSiteState(site) {\n var terrain = macros.worldstate.terrains[site];\n var baseState = macros.attributes.terrain[terrain];\n\n var finalState = {};\n\n for (var key in baseState) {\n finalState[key] = baseState[key];\n }\n\n var plants = macros.plantspace.plants[site] || [];\n\n function addToState(key, value) {\n if (finalState[key] == undefined) {\n finalState[key] = value;\n } else {\n finalState[key] += value;\n }\n }\n\n addToState("water", macros.worldstate.sites[site].extraWater);\n addToState("soil", macros.worldstate.sites[site].extraSoil);\n\n for (var i = 0; i < plants.length; ++i) {\n if (plants[i].alive) {\n var attributes = macros.attributes.plant[plants[i].type];\n\n for (var name in attributes.adds) {\n addToState(name, attributes.adds[name]);\n }\n } else {\n addToState('wasteland', 1);\n }\n }\n\n for (var key in finalState) {\n finalState[key] =\n clamp(finalState[key], ATTRIBUTE_MINIMUM, ATTRIBUTE_MAXIMUM);\n }\n\n return finalState;\n }\n\n var worldstate = macros.worldstate = {\n sites: {},\n aspects: { wild: 0, eldritch: 0, beauty: 0, wasteland: 0 },\n terrains: {},\n\n calculateSiteState: calculateSiteState,\n\n handler: function (place, macroName, params, parser) {}\n }\n\n function clamp(x, min, max) {\n return Math.max(min, Math.min(x, max));\n }\n\n var adjectives = {\n sun: ["gloomy", "shady", "partially sunny", "sunny"],\n water: ["parched", "dry", "moist", "soggy"],\n soil: ["infertile", "sandy", "loamy", "rich"],\n }\n\n function renderSiteState(place, passageTitle) {\n var state = calculateSiteState(passageTitle);\n\n function adjective(trait) {\n var value = 0;\n\n if (state[trait] != undefined) {\n value = clamp(state[trait], ATTRIBUTE_MINIMUM, ATTRIBUTE_MAXIMUM);\n }\n\n return adjectives[trait][value];\n }\n\n insertText(place, "It is " + adjective('sun') + " here." +\n " The soil is " + adjective('water') + " and " +\n adjective('soil') + ".");\n/*\n\n for (var key in state) {\n new Wikifier(place, "\sn" + key + ": " + state[key]);\n }\n*/\n }\n\n macros.sitestate = {\n render: renderSiteState,\n\n handler: function (place, macroName, params, parser) {\n var passage = state.history[0].passage;\n var terrain = worldstate.terrains[passage.title];\n\n new Wikifier(place,\n "<<displayproperty '" + terrain + "' name>>\sn" +\n "<<displayproperty '" + terrain + "' description>>\sn");\n\n renderSiteState(place, passage.title);\n\n new Wikifier(place,\n "\sn\sn<<plantspace 10>>\sn\sn" +\n "<<sitelist>>\sn" +\n "[[Home]]");\n }\n }\n\n macros.sitelist = {\n handler: function (place, macroName, params, parser) {\n var passage = state.history[0].passage;\n var sites = worldstate.sites;\n\n for (var site in sites) {\n if (site != passage.title) {\n var destTerrain = worldstate.terrains[site];\n\n new Wikifier(place,\n "[[<<displayproperty '" + destTerrain + "' name>>|" + site + "]]");\n }\n }\n }\n }\n\n macros.aspectstatus = {\n handler: function (place, macroName, params, parser) {\n var highestAspects = [];\n\n var aspects = macros.worldstate.aspects;\n var maxAspectValue = 0;\n\n for (var key in aspects) {\n if (aspects[key] > maxAspectValue) {\n highestAspects = [key];\n maxAspectValue = aspects[key];\n } else if (aspects[key] == maxAspectValue) {\n highestAspects.push(key);\n }\n }\n\n if (maxAspectValue > 0) {\n if (highestAspects.length == 1) {\n var name = highestAspects[0];\n state.history[0].variables[name] = aspects[name];\n new Wikifier(place, "<<display aspect_" + name + ">>\sn");\n } else {\n new Wikifier(place, "<<display aspect_mixed>>\sn");\n }\n }\n }\n }\n\n function initialiseWorld() {\n macros.plantspace.initialise();\n\n // parse terrain attributes\n var terrains = tale.lookup("tags", "terrain");\n\n for (var i = 0; i < terrains.length; ++i) {\n var attributes =\n macros.attributes.parsePassageAttributes(terrains[i], {});\n\n macros.attributes.terrain[terrains[i].title] = attributes.traits;\n }\n\n // assign random terrains to sites\n var sites = tale.lookup("tags", "site");\n\n for (var i = 0; i < sites.length; ++i) {\n var site = sites[i];\n\n site.text = site.initialText = "<<sitestate>>";\n\n worldstate.sites[site.title] = { extraWater: 0, extraSoil: 0 };\n\n var index = Math.floor(Math.random() * terrains.length);\n\n worldstate.terrains[site.title] = terrains[index].title;\n terrains.splice(index, 1);\n }\n\n macros.nextday.updateAspects();\n }\n\n macros.resetworld = {\n handler: function (place, macroName, params, parser) {\n initialiseWorld();\n }\n }\n\n initialiseWorld();\n}());
lang = {};\n\n(function () {\n var NUMBER_WORDS = [\n "none", "one", "two", "three", "four", "five", "six", "seven", "eight",\n "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen",\n "sixteen", "seventeen", "eighteen", "nineteen", "twenty",\n ];\n\n lang.wordForNumber = function(number) {\n if (number >= 0 && number < NUMBER_WORDS.length) {\n return NUMBER_WORDS[number];\n } else {\n return number.toString();\n }\n }\n\n lang.pluralise = function(word, number) {\n if (number == 1) {\n return word;\n } else {\n return word + "s";\n }\n }\n}());
<<nextday>>\s\nYou awaken feeling <<print either("refreshed", "ready to face a new day", "normal", "excited", "ready for some extreme horticulture", "like you didn't sleep very well", "that you might be a butterfly dreaming it's a person", "like a dream has just slipped from your grasp", "like you miss absent friends", "a tingle on your skin, as if Eldritch forces were gathering", "like some creature of the Wild is watching over you", "a new appreciation for the Beauty around you", "like it might be time to travel again soon", "nomadic urges", "restless","fresh","happy", "melancholy","rested", "rested", "stiff and sore", "hungry")>>.\n\n<<if $winningAspect eq 'wild' >>\s\n<<ambientsound "audio/Wild.ogg">>\s\n<<else if $winningAspect eq 'beauty' >>\s\n<<ambientsound "audio/Beauty.ogg">>\s\n<<else if $winningAspect eq 'eldritch' >>\s\n<<ambientsound "audio/Eldritch.ogg">>\s\n<<else>>\s\n<<ambientsound "audio/MainTheme.ogg">>\s\n<<endif>>\s\n<<display "Home">>
<<attributes\nAge_Young=2\nAge_Mature=6\nAge_Old=3\nSun=2\nSoil=1\nWater=1\nPestResistant=0\nHardy=3\nEldritch=2\nEldritch+1\nBeauty-1\n>>\s\n<<if $plantDead>>\s\n<<property shortdescription>>\s\na dead hemlock plant\s\n<<property description>>\s\nSpindly twigs and rotting leaves.\s\n<<property groupdescription>>\s\n<<if $groupSize gt 4>>a mess of dead hemlock\s\n<<else if $groupSize gt 1>>a clump of dead hemlock\s\n<<else>>a dead hemlock plant\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<if $plantAge eq 'young'>>\s\n<<property shortdescription>>\s\na small hemlock seedling\s\n<<property description>>\s\nSmall green leaves, eager for growth\s\n<<property groupdescription>>\s\n<<if $groupSize eq 1>> a small hemlock seedling\s\n<<elseif $groupSize lte 4>> a patch of hemlock seedlings\s\n<<else>> a mass of hemlock seedlings\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'mature'>>\s\n<<property shortdescription>>a hemlock plant\s\n<<property description>>\s\nThe hemlock plant has sprays of green and purple leaves.\s\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>a hemlock plant\s\n<<elseif $groupSize lte 4>>a clump of hemlock plants\s\n<<else>>a rampant overgrowth of hemlock\s\n<<endif>>\s\n<<endproperty>>\s\n\s\n<<elseif $plantAge eq 'old'>>\s\n<<property shortdescription>>a wizened old hemlock bush\s\n<<property description>>\s\nThe hemlock plant has sprays of dark green and purple leaves, tangled in a mass of growth.\n<<property groupdescription>>\s\n<<if $groupSize eq 1>>a wizened old hemlock bush\s\n<<elseif $groupSize lte 4>>a clump of old hemlock bushes\s\n<<else>> a tangled thicket of old hemlock bushes\s\n<<endif>>\s\n<<endproperty>>\s\n<<endif>>\s\n\s\n<<property seed>>hemlock seeds\s\n<<property fruit>>\s\nSmall clusters of [[white flowers|flower_hemlock]] have bloomed.\s\n\s\n\s\n\s\n<<property detaildescription>>\s\n<<if $character eq 'character_geologist'>>\s\nSprays of green and purple leaves, it reminds you of wastelands and roadsides.\n<<elseif $character eq 'character_botanist'>>\s\nThe smooth green stems of Conium Maculatum are streaked with purple, it's sprays of lacy leaves potent with poison.\n<<elseif $character eq 'character_librarian'>>\s\nYou think of Socrates, and his excution. Narrating philosophy defiantly, even as the numbing poison froze his heart.\n<<endif>>\n