Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
Loading…
/* Display */
<div class='container'>
<div class='txtbar'>
You pick up the <<print setup.item[$itemKey].name>>.
<<print setup.item[$itemKey].text>><br><br>
[[Return to the garden|Garden]].
</div>
</div>/* Update the current time */
<<update_time>>
<<update_world>>
/* Display */
<div class='container'>
<div class='txtbar'>
You descend into the night garden.
<<print setup.state[$stateKey].stateText>>
<<if setup.state[$stateKey].hasWell is true and $well.length is 0>>
<<if $inventory.length gt 0>>
You spot, hidden among the undergrowth, an opening just wide enough to [[drop something into|Offering]].
<<else>>
You spot, hidden among the undergrowth, an opening into a deep pit.
<</if>>
<</if>><br><br>
<<print setup.state[$stateKey].animaText>>
<<if $item.length gt 0 and $inventory.length lt 5>>
<<set _itemIndex to $item.length-1>>
<<set _itemKey to $item[_itemIndex]>>
<<set _itemName to setup.item[_itemKey].name>>
You find the
<<link [[_itemName|Collect]]>>
<<set $inventory.push(_itemKey)>>
<<set $item.splice(_itemIndex,1)>>
<<set $itemKey to _itemKey>>
<</link>>.
<</if>><br><br>
You have [[logged|Journal][$journalIndex to $journal.length-1]] today's observations.
/*<br>[[DB advance day|Garden][$currentDay to 99]]*/
</div>
</div>/* Set the grotto variables for the first time */
<<set $shrinePool to []>>
<<set $leftOffering to false>>
/* Set the player variables for the first times */
<<set $playerInventory to ['loosechange']>>
/* Set the time to a warm, clear sunset */
<<update_current_time>>
<<set $currentWeather to 'clear'>>
<<set $currentPeriod to 'sunset'>>
<<set $(document.body).css('background-image', 'url(sunset.gif)')>>
/* Set the first destination to the Treasure Shrine */
<<set $destination to 'shrine'>>
/* Place the cat at home */
<<set $isCatAround to true>>
/* Display */
<div class='container'>
<div class='txtbar'>
The garbage trucks are playing <i>Für Elise</i> throughout the neighborhood. The tune blends with the late afternoon murmer of the district and rises past your balcony. On afternoons like this you sometimes [[go for a walk|IntroEntrance]].
</div>
</div>/* Display */
<div class='container'>
<div class='navbar'>
Options
</div>
<div class='txtbar'>
[[Back to home|Home]]<br><br>
<<link 'Backup save data'>>
<<script>>Save.export('homerange')<</script>>
<</link>><br><br>
<<linkappend 'Load save data'>><br>
This will overwrite your existing data.<br>
Still <<link 'load data?'>>
<<script>>
$(document.createElement('input'))
.css({
display : 'block',
visibility : 'hidden',
position : 'fixed',
left : '-9999px',
top : '-9999px',
width : '1px',
height : '1px'
})
.attr({
type : 'file',
id : 'saves-import-file',
tabindex : -1,
'aria-hidden' : true
})
.on('change', Save.import)
.trigger('click');
<</script>>
<</link>><br>
<</linkappend>><br><br>
<<linkappend 'Clear data forever'>><br>
Data once cleared cannot be restored.<br>
Still <<link [[clear data forever?|Start]]>>
<<script>>Save.autosave.delete()<</script>>
<</link>>
<</linkappend>>
</div>
<div class='imgbar'>
</div>
</div><div id="passages"></div>/* Update time widget */
<<widget 'update_time'>>
<<set $previousDay to $currentDay>>
<<set $previousHour to $currentHour>>
<<set $currentDate to new Date()>>
<<set $currentDay to $currentDate.getDate()>>
<<set $currentHour to $currentDate.getHours()>>
<<set $currentMonth to $currentDate.getMonth()>>
<</widget>>
/* If it's a new day, update */
<<widget 'update_world'>>
<<if $currentDay isnot $previousDay or $currentHour isnot $previousHour>>
/* If there's something in the well, use that to determine the next state */
<<if $well.length gt 0>>
<<set _itemIndex to random(0,$well.length-1)>>
<<set _itemKey to $well[_itemIndex]>>
<<set $stateKey to setup.item[_itemKey].nextKey>>
<<set $well.splice(_itemIndex,1)>>
/* Otherwise, go off the currentState */
<<else>>
<<set $stateKey to setup.state[$stateKey].nextKey>>
<</if>>
/* If the current state has an item, drop it into the garden */
<<if setup.state[$stateKey].hasItem is true>>
<<set $item.push(setup.state[$stateKey].itemKey)>>
<</if>>
<<set _newLog to {}>>
<<set _newLog.month to $currentMonth>>
<<set _newLog.day to $currentDay>>
<<set _newLog.stateKey to $stateKey>>
<<set $journal.push(_newLog)>>
/* A little tidying up of the items list */
<<if $item.length gt 3>>
<<set $item.shift()>>
<</if>>
<</if>>
<</widget>>/* Display */
<div class='container'>
<div class='txtbar'>
You check your bag.<br><br>
<<if $inventory.length gt 0>>
<<for _itemIndex to 0; _itemIndex lt $inventory.length; _itemIndex++>>
<<set _itemKey to $inventory[_itemIndex]>>
<i>The <<print setup.item[_itemKey].name>>.</i>
<<print setup.item[_itemKey].text>><br>
<</for>>
<<else>>
It is empty.<br>
<</if>><br>
[[Return to observations|Journal]].
</div>
</div>/* Pre-display */
<<set _stateKey to $journal[$journalIndex].stateKey>>
/* Display */
<div class='container'>
<div class='txtbar'>
You open your journal.<br><br>
$journal[$journalIndex].day
<<print setup.month[$journal[$journalIndex].month]>>.<br>
Weather like <<print setup.state[_stateKey].stateName>>.<br>
Spotted the <<print setup.state[_stateKey].animaName>>.<br>
<<if setup.state[_stateKey].hasItem is true>>
<<set _itemKey to setup.state[_stateKey].itemKey>>
Found the <<print setup.item[_itemKey].name>>.<br>
<</if>><br>
<<if $journalIndex gt 0>>
[[Previous entry|Journal][$journalIndex--]] 
<</if>>
<<if $journalIndex lt $journal.length-1>>
[[Next entry|Journal][$journalIndex++]] 
<</if>>
[[View your items|Inventory]]<br><br>
[[Return to the garden|Garden]].
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
What will you drop down?<br><br>
<<for _itemIndex to 0; _itemIndex lt $inventory.length; _itemIndex++>>
<<set _itemKey to $inventory[_itemIndex]>>
<<set _itemName to setup.item[_itemKey].name>>
<<capture _itemIndex, _itemKey>>
<<link [[_itemName|Success]]>>
<<set $well.push(_itemKey)>>
<<set $inventory.splice(_itemIndex,1)>>
<<set $offerKey to _itemKey>>
<</link>>
<</capture>><br>
<</for>><br>
[[Changed my mind|Garden]].
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
<<if Save.autosave.has()>>
<<link 'Night garden'>>
<<script>>Save.autosave.load()<</script>>
<</link>>
/*<br><br><<link [[DB Clear Data Forever|Start]]>>
<<script>>Save.autosave.delete()<</script>>
<</link>>*/
<<else>>
<<link [[Night garden|Garden]]>>
<<set $stateKey to 'template'>>
<<set $inventory to []>>
<<set $journal to []>>
<<set $item to []>>
<<set $well to []>>
<<set $currentDay to 99>>
<<set $currentHour to 99>>
<</link>>
<</if>>
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
You drop the <<print setup.item[$offerKey].name>> into the pit.
<<print setup.item[$offerKey].well>><br><br>
[[Return to the garden|Garden]].
</div>
</div>