Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
Loading…
/* 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>/* Set game constants */
<<set $DEFAULT_ZONE to 0>>/* Display */
<div class='container'>
<div class='txtbar'>
[[Return home|Home]]<br><br>
You purchase the <span class='greentext'><<print setup.itemList[$goodie].name>></span> — <<print setup.itemList[$goodie].text>>
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
[[Return home|Home]]<br><br>
This bar is a pokey, dimly lit hole in the wall. Always a space free to sit down. Drinks are TN100. The bartender asks if you will [[order a drink|BarDrink][$playerInventory.push('coaster')]]?
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
You ask for a <<print either(setup.vocabList.bar)>> and bring it with you to a a free table looking onto the laneway. The bar hums with quiet bustle, but the laneway outside is dark and quiet. Take it in [[as long as you like|Home]].
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
[[Return home|Home]]<br><br>
This café has wooden tables and chairs and crates and barrels and old maps on the walls. You can see the main street entrance across the counter. A coffee is TN80. Do you want to [[order a drink|CafeDrink][$playerInventory.push('coffeetoken')]]?
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
You place your order and take a seat at a table by the laneway. One of the baristas brings over a <<print either(setup.vocabList.cafe)>> and a <span class='greentext'>coffee token</span>. Remain here [[as long as you like|Home]].
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
You step out into the <<if $isRainy is true>>rainy<<else>>clear<</if>> $currentPeriod.
<<if $isCatAround is true>>The black and white cat you sometimes see is resting on the concrete wall opposite, among the overhanging leaves.<</if>>
You [[pick a route|Walking]].
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
<<switch $currentPeriod>>
<<case 'sunrise'>>
The thick foliage hanging over the flood chamber is covered in dew and thin wisps rise from the surface of the water. The chamber itself remains in darkness.
<<case 'day'>>
By light you explore the flood chamber. Its wooden beams are sagging under the weight of branches, leaves and vines, and rotting from the moisture. Through it runs the floodway stream down to the river.
<<case 'sunset'>>
Cool, wet air flows out of the flood chamber. Warm yellow light reflects off the outer beams and the foliage, but the chamber itself is becoming gloomy again.
<<case 'night'>>
You step carefully in the darkness so as not to fall into the floodway. Frogs are croaking and plunking and ribbiting in the wet undergrowth and puddles. The river quietly bubbles past underneath the bustle.
<</switch>>
Stay [[as long as you please|Home]].
</div>
</div>/* Pre-display */
<<set $goodie to either('earthcat', 'marscat', 'mercurycat', 'mooncat', 'suncat', 'venuscat')>>
/* Display */
<div class='container'>
<div class='txtbar'>
[[Return home|Home]]<br><br>
This machine offers six planetary cats. Behind the label, you can see them orbiting about in the dome. One capsule is TN200. Will you [[turn the crank|GachaponSuccess][$playerInventory.push($goodie)]]?
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
[[Return home|Home]]<br><br>
You receive the <span class='greentext'><<print setup.itemList[$goodie].name>></span> — <<print setup.itemList[$goodie].text>>
</div>
</div>/* Update the current time */
<<update_previous_time>>
<<update_current_time>>
<<update_new_day>>
/* Create a list of maps you can visit */
<<set _mapListKeys to Object.keys(setup.mapList)>>
<<set $mapsOpen to []>>
<<for _i to 0; _i lt _mapListKeys.length; _i++>>
<<set _map to _mapListKeys[_i]>>
<<if setup.mapList[_map].open.includes($currentPeriod)>>
<<set $mapsOpen.push(_map)>>
<</if>>
<</for>>
/* Display */
<div class='container'>
<div class='txtbar'>
$currentDay <<print setup.calendar[$currentMonth].name>>, <span class='capitalize'>$currentPeriod</span>:
[[Go for a walk|Entrance][$destination to either($mapsOpen)]]<br><br>
<<if $playerInventory.length gt 0>>
<<set _itemKey to either($playerInventory)>>
<span class='greentext capitalize'><<print setup.itemList[_itemKey].name>></span> — <<print setup.itemList[_itemKey].text>>
[[>>|Home]]
<</if>>
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
You step out into the <<if $isRainy is true>>rainy<<else>>clear<</if>> $currentPeriod.
<<if $isCatAround is true>>The black and white cat you sometimes see is resting on the concrete wall opposite, among the overhanging leaves.<</if>>
You [[pick a route|IntroWalking]].
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
<<print setup.mapList[$destination].road>>
</div>
</div>/* Pre-display */
<<set $goodie to either('sushirollgreen', 'sushirollred',)>>
/* Display */
<div class='container'>
<div class='txtbar'>
[[Return home|Home]]<br><br>
No matter the weather outside, Tommy Mart is a brightly lit climate-controlled zone of abundance. All the convenience foods in this mart are TN60. Will you [[get something|MartSuccess][$playerInventory.push($goodie), $playerInventory.push('beaglesticker')]]?
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
[[Return home|Home]]<br><br>
You purchase the <span class='greentext'><<print setup.itemList[$goodie].name>></span> — <<print setup.itemList[$goodie].text>>
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
[[Return home|Home]]<br><br>
This café has warm yellow lights which just illuminate the tables. You see shadowy branches and foliage through the window. A coffee is TN100. Do you want to [[order a drink|NightCafeDrink][$playerInventory.push('moontoken')]]?
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
You place your order and sit down at the table in the corner. The barista brings over a <<print either(setup.vocabList.cafe)>> and a <span class='greentext'>moon token</span>. Remain here [[as long as you like|Home]].
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
[[Changed my mind|Shrine]]<br><br>
What will you leave in the shrine?<br>
<<for _i to 0; _i lt $playerInventory.length; _i++>>
<<capture _i>>
<<set _itemname to setup.itemList[$playerInventory[_i]].name>>
<<link [[_itemname|OfferItemSuccess]]>>
<<set $leftOffering to true>>
<<set $shrineItem to $playerInventory[_i]>>
<<set $playerInventory.splice(_i, 1)>>
<</link>><br>
<</capture>>
<</for>>
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
You place the <span class='greentext'><<print setup.itemList[$shrineItem].name>></span> in the little room. Birds chirp in the trees around you. Remain here [[as long as you like|Shrine]].
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
[[Return home|Home]]<br><br>
A long wall of lockers, all different sizes. The computer terminal in the centre asks if you are [[sending a parcel|SendParcel]] or [[picking up a parcel|PickupParcel]].
</div>
</div>/* Pre-display */
<<set _itemListKeys to Object.keys(setup.itemList)>>
/* Display */
<div class='container'>
<div class='txtbar'>
[[Changed my mind|ParcelPost]]<br><br>
<span id='shift'>Please enter your parcel password:</span><br>
<<textbox '_password' '' autofocus>><br>
<<link 'Request'>>
<<if checkEncoding(_password) is true>>
<<set $parcelName to atob(_password)>>
<<if _itemListKeys.includes($parcelName)>>
<<set $playerInventory.push($parcelName)>>
<<set $playerInventory.push('parcelstub')>>
<<goto 'PickupParcelSuccess'>>
<<else>>
<<replace '#shift'>>
This is not your parcel! Please enter your parcel password:
<</replace>>
<</if>>
<<else>>
<<replace '#shift'>>
Incorrect password! Please enter your parcel password:
<</replace>>
<</if>>
<</link>>
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
[[Return home|Home]]<br><br>
You receive the <span class='greentext'><<print setup.itemList[$parcelName].name>></span> — <<print setup.itemList[$parcelName].text>>
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
[[Changed my mind|ParcelPost]]<br><br>
What will you send?<br>
<<for _i to 0; _i lt $playerInventory.length; _i++>>
<<capture _i>>
<<set _itemname to setup.itemList[$playerInventory[_i]].name>>
<<link [[_itemname|SendParcelSuccess]]>>
<<set $parcelName to $playerInventory[_i]>>
<<set $playerInventory.splice(_i, 1)>>
<</link>><br>
<</capture>>
<</for>>
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
[[Return home|Home]]<br><br>
Please send this parcel password to your friend so they can pick it up:
<span class='greentext'><<print btoa($parcelName)>></span>
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
[[Return home|Home]]<br><br>
The low, concrete shrine is hidden in the undergrowth.
<<if $leftOffering is false>>
<<if $playerInventory.length gt 0>>
Its little room is just big enough to [[leave an offering|OfferItem]].
<<else>>
You have nothing to leave in its little room.
<</if>>
<<else>>
Its little room holds the <span class='greentext'><<print setup.itemList[$shrineItem].name>>.</span>
<</if>>
</div>
</div>/* Pre-display */
<<set $goodie to either('berrycroissant', 'cakeapple', 'chocolatehorn', 'redbeanbun')>>
/* Display */
<div class='container'>
<div class='txtbar'>
[[Return home|Home]]<br><br>
The Sunrise Bakery opens only for an hour each day. Underneath the service window is a glass display cabinet with the pastries and buns of the day. Each one is TN120. Will you [[buy something|BakerySuccess][$playerInventory.push($goodie)]]?
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
[[Return home|Home]]<br><br>
The truck is slowly making its way down the lane. The disposal cost is TN5 per item.
<<if $playerInventory.length gt 0>>
Do you want to dispose anything?<br>
<<for _i to 0; _i lt $playerInventory.length; _i++>>
<<capture _i>>
<<set _itemname to setup.itemList[$playerInventory[_i]].name>>
[[_itemname|Truck][$playerInventory.splice(_i, 1)]]<br>
<</capture>>
<</for>>
<<else>>
You have nothing to dispose.
<</if>>
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
[[>>|Walking][$destination to either($mapsOpen)]]<br><br>
<<print setup.mapList[$destination].road>>
</div>
</div>/* Display */
<div class='container'>
<div class='txtbar'>
[[Start|GameInit]]
</div>
</div>/* Update time widget */
<<widget 'update_current_time'>>
<<set $currentDate to new Date()>>
<<set $currentDay to $currentDate.getDate()>>
<<set $currentMonth to $currentDate.getMonth()>>
<<set $currentYear to $currentDate.getFullYear()>>
<<set $currentHour to $currentDate.getHours()>>
<<set $currentMinute to $currentDate.getMinutes()>>
<<set $currentSunriseHour to setup.calendar[$currentMonth].sunrise>>
<<set $currentSunsetHour to setup.calendar[$currentMonth].sunset>>
<<set $clockHour to setup.addZero($currentHour)>>
<<set $clockMinute to setup.addZero($currentMinute)>>
<<set $moonPhase to setup.getMoonPhase($currentYear, $currentMonth, $currentDay)>>
<<if $currentHour is $currentSunriseHour>>
<<set $currentPeriod to 'sunrise'>>
<<set $(document.body).css('background-image', 'url(sunrise.gif)')>>
<<elseif $currentHour is $currentSunsetHour>>
<<set $currentPeriod to 'sunset'>>
<<set $(document.body).css('background-image', 'url(sunset.gif)')>>
<<elseif $currentHour gt $currentSunriseHour and $currentHour lt $currentSunsetHour>>
<<set $currentPeriod to 'day'>>
<<set $(document.body).css('background-image', 'url(day.gif)')>>
<<else>>
<<set $currentPeriod to 'night'>>
<<set $(document.body).css('background-image', 'url(night.gif)')>>
<</if>>
<</widget>>
/* Update previous time */
<<widget 'update_previous_time'>>
<<set $previousDay to $currentDay>>
<<set $previousMonth to $currentMonth>>
<</widget>>
/* Update weather widget */
<<widget 'update_rain'>>
<<set _rainCheck to random(0,3)>>
<<if _rainCheck gt setup.calendar[$currentMonth].rain>>
<<set $isRaining to true>>
<<else>>
<<set $isRaining to false>>
<</if>>
<</widget>>
/* Update the shrine */
<<widget 'update_shrine'>>
<<if $leftOffering is true>>
<<set $leftOffering to false>>
<<set $shrinePool.push($shrineItem)>>
<</if>>
<</widget>>
/* If it's a new day, update */
<<widget 'update_new_day'>>
<<if $currentDay isnot $previousDay>>
<<update_shrine>>
<<set $isCatAround to either(true,false)>>
<</if>>
<</widget>>