:: StoryTitle
!&#28165;

:: StorySubtitle
//--[[about]]//

:: StoryAuthor
[[@modgethanc|http://twitter.com/modgethanc]]

:: StoryMenu
[[inventory|inv]]<<if $new > 0>>(+<<$new>>)<<endif>>
<<if not visited("under the tree")>><<else>>location:
[[$loc]]<<endif>>

:: StoryIncludes
movement_test_items.tw

:: css [stylesheet]
body, nav, #sidebar, #storyTitle, #storySubtitle {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: default;
	background-color: transparent;
}
#sidebar li a {
	color: #797979
}
html {
	height: 100%;
  background: linear-gradient(#333, #000 70%) no-repeat; /* Standard syntax */
background-color: #000;
}
#storyTitle {
	font-size: 1em;
}

:: about
<center>
!&#28165; 
!!!(q&#299;ng)
//pure; clean; peaceful//</center>

this is a demonstration of an inventory feature, location tracking, and context-sensitive object interactions. it's written in twee and powered by tiddlywiki.

it's also about letting go of things.

//thanks to trevor, leo, and alex for feedback during rougher versions.//

[[close|previous()]]

:: inv [container]
<<silently>>
<<set $new = 0>>
<<if ($fruit < 1) and ($inv.indexOf("[[fruit]]") != -1)>><<$inv.splice($inv.indexOf("[[fruit]]"),1 )>><<endif>>
<<endsilently>>

//inventory://
<<if $inv.length == 0>>nothing.<<endif>>\
<<print $inv.join(", ")>>

[[close|$loc]]

:: Start [place]
<<nobr>>
<<set $inv = []>>
<<set $loc = passage()>>
<<set $pile = ["[[deck of cards]]", "[[lost keys]]", "[[crumpled bills]]", "[[broken watch]]"]>>
<<set $fruit = 0>>
<<set $fruitRemaining = 3>>
<<endnobr>>
as if waking from a dream, you find yourself [[under the tree]].

:: under the tree [place]
<<set $loc = passage()>>
<<if $pile.length > 0>>under the fruit tree, there is a [[pile of objects]].  <<else>>it's neat and tidy under the fruit tree.<<endif>>

<<if $fruitRemaining > 0>><<set $item = "[[fruit]]">>if you want, you can <<if $fruit == 0>>[[pick some fruit|passage()][$inv.push($item);$fruit++;$fruitRemaining--;$new++]].<<else>>[[pick some fruit|passage()][$fruit++;$fruitRemaining--;$new++]].<<endif>><<else>>the fruit tree is bare.<<endif>>

<<nobr>>
<<if ($pile.length == 0) or ($fruitRemaining == 0)>>
<<if ($pile.length == 0) and ($fruitRemaining == 0)>>
since there's not much to do here, you might as well go 
<<else>>
you feel a little bit more ready to go 
<<endif>>
<<else>>
at some point, you might be ready to go 
<<endif>>
to the [[edge of the cliff]].
<<endnobr>>

:: pile of objects [container]
<<if $pile.length > 0>> //examining...//

a pile of objects:
<<set $item= "[[deck of cards]]">><<if $pile.indexOf($item) != -1>>* <<print $item>><<endif>>\
<<set $item= "[[lost keys]]">><<if $pile.indexOf($item) != -1>>* <<print $item>><<endif>>\
<<set $item= "[[crumpled bills]]">><<if $pile.indexOf($item) != -1>>* <<print $item>><<endif>>\
<<set $item= "[[broken watch]]">><<if $pile.indexOf($item) != -1>>* <<print $item>><<endif>>\
<<else>>//not much to do here...//<<endif>>
[[close|$loc]]

:: edge of the cliff [place]
<<silently>>
<<set $trash = []>>
<<set $loc = passage()>>
<<endsilently>>
if this isn't very interesting, you can always go back to standing [[under the tree]].

<<if ($pile.length == 0) and ($fruitRemaining == 0) and ($inv.length == 0)>>
<<set $next = "jump">>
but you feel a sense of relief thinking about what you can [[throw|$next]].
<<else>>
<<set $next = "inv">>
if there's anything you want to throw away, though, this is a good place to [[do it|$next]].
<<endif>>

:: goodbye [messages]

<<if $inv.length == 0>>with a quiet sigh of relief, you pitch the last thing you're holding into the abyss.<<else>>out into the abyss it goes. hope you weren't planning on getting it back.<<endif>>

<<if (previous() == "fruit") and ($fruit > 0)>>[[...|fruit]]<<else>>[[...|inv]]<<endif>>

:: jump [messages]

wait[[...|jump2]]

:: jump2 [messages]

you don't have anything left to throw[[...|jump3]]

:: jump3 [messages]

might as well [[throw yourself|freefall]].

:: freefall [place]
<<set $loc = passage()>>

all of the objects you threw over the cliff are waiting to pad your landing.

good thing you put them there.

[[contact|Start][state.restart()]]
