<<set $link = "[["+passage()+"]]">>\n//examining...//\n''a deck of cards'', dog-eared and held together with a rubber band that's about to snap\n\n<<if $loc is "edge of the cliff">>[[chuck it|goodbye][$inv.splice($inv.indexOf($link), 1)]]<<endif>>\n\n<<if previous() is "inv">>[[close|inv]] <<else>>[[take it|previous()][$inv.push($link); $pile.splice($pile.indexOf($link), 1);$new++]] or [[leave it|previous()]]<<endif>>
<<set $link = "[["+passage()+"]]">>\n//examining...//\n''a set of lost keys'', worn and shiny\n\n<<if $loc is "edge of the cliff">>[[chuck it|goodbye][$inv.splice($inv.indexOf($link), 1); $trash.push($link)]]<<endif>>\n\n<<if previous() is "inv">>[[close|inv]] <<else>>[[take it|previous()][$inv.push($link); $pile.splice($pile.indexOf($link), 1);$new++]] or [[leave it|previous()]]<<endif>>
<<set $link = "[["+passage()+"]]">>\n//examining...//\n''some crumpled bills'', that might be enough to get you a cup of coffee\n\n<<if $loc is "edge of the cliff">>[[chuck it|goodbye][$inv.splice($inv.indexOf($link), 1)]]<<endif>>\n\n<<if previous() is "inv">>[[close|inv]] <<else>>[[take it|previous()][$inv.push($link); $pile.splice($pile.indexOf($link), 1);$new++]] or [[leave it|previous()]]<<endif>>
<<set $link = "[["+passage()+"]]">>\n//examining...//\n''a broken watch'', that doesn't really tell you anything\n\n<<if $loc is "edge of the cliff">>[[chuck it|goodbye][$inv.splice($inv.indexOf($link), 1)]]<<endif>>\n\n<<if previous() is "inv">>[[close|inv]] <<else>>[[take it|previous()][$inv.push($link); $pile.splice($pile.indexOf($link), 1);$new++]] or [[leave it|previous()]]<<endif>>
<<set $link = "[["+passage()+"]]">>\n//examining...//\n''<<if $fruit == 1>>a piece<<else>><<$fruit>> pieces<<endif>> of fruit'', from the tree that grows a little ways back from the cliff\n\n<<if $loc is "edge of the cliff">> <<if $fruit == 1>>[[chuck some|goodbye][$fruit--;$inv.splice($inv.indexOf($link),1 )]] <<else>> [[chuck some|goodbye][$fruit--]] <<endif>> <<endif>>\n\n[[close|inv]]
!&#28165;
//--[[about]]//
[[@modgethanc|http://twitter.com/modgethanc]]
[[inventory|inv]]<<if $new > 0>>(+<<$new>>)<<endif>>\n<<if not visited("under the tree")>><<else>>location:\n[[$loc]]<<endif>>
movement_test_items.tw
body, nav, #sidebar, #storyTitle, #storySubtitle {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: default;\n\tbackground-color: transparent;\n}\n#sidebar li a {\n\tcolor: #797979\n}\nhtml {\n\theight: 100%;\n background: linear-gradient(#333, #000 70%) no-repeat; /* Standard syntax */\nbackground-color: #000;\n}\n#storyTitle {\n\tfont-size: 1em;\n}
<center>\n!&#28165; \n!!!(q&#299;ng)\n//pure; clean; peaceful//</center>\n\nthis is a demonstration of an inventory feature, location tracking, and context-sensitive object interactions. it's written in twee and powered by tiddlywiki.\n\nit's also about letting go of things.\n\n//thanks to trevor, leo, and alex for feedback during rougher versions.//\n\n[[close|previous()]]
<<silently>>\n<<set $new = 0>>\n<<if ($fruit < 1) and ($inv.indexOf("[[fruit]]") != -1)>><<$inv.splice($inv.indexOf("[[fruit]]"),1 )>><<endif>>\n<<endsilently>>\n\n//inventory://\n<<if $inv.length == 0>>nothing.<<endif>>\s\n<<print $inv.join(", ")>>\n\n[[close|$loc]]
<<nobr>>\n<<set $inv = []>>\n<<set $loc = passage()>>\n<<set $pile = ["[[deck of cards]]", "[[lost keys]]", "[[crumpled bills]]", "[[broken watch]]"]>>\n<<set $fruit = 0>>\n<<set $fruitRemaining = 3>>\n<<endnobr>>\nas if waking from a dream, you find yourself [[under the tree]].
<<set $loc = passage()>>\n<<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>>\n\n<<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>>\n\n<<nobr>>\n<<if ($pile.length == 0) or ($fruitRemaining == 0)>>\n<<if ($pile.length == 0) and ($fruitRemaining == 0)>>\nsince there's not much to do here, you might as well go \n<<else>>\nyou feel a little bit more ready to go \n<<endif>>\n<<else>>\nat some point, you might be ready to go \n<<endif>>\nto the [[edge of the cliff]].\n<<endnobr>>
<<if $pile.length > 0>> //examining...//\n\na pile of objects:\n<<set $item= "[[deck of cards]]">><<if $pile.indexOf($item) != -1>>* <<print $item>><<endif>>\s\n<<set $item= "[[lost keys]]">><<if $pile.indexOf($item) != -1>>* <<print $item>><<endif>>\s\n<<set $item= "[[crumpled bills]]">><<if $pile.indexOf($item) != -1>>* <<print $item>><<endif>>\s\n<<set $item= "[[broken watch]]">><<if $pile.indexOf($item) != -1>>* <<print $item>><<endif>>\s\n<<else>>//not much to do here...//<<endif>>\n[[close|$loc]]
<<silently>>\n<<set $trash = []>>\n<<set $loc = passage()>>\n<<endsilently>>\nif this isn't very interesting, you can always go back to standing [[under the tree]].\n\n<<if ($pile.length == 0) and ($fruitRemaining == 0) and ($inv.length == 0)>>\n<<set $next = "jump">>\nbut you feel a sense of relief thinking about what you can [[throw|$next]].\n<<else>>\n<<set $next = "inv">>\nif there's anything you want to throw away, though, this is a good place to [[do it|$next]].\n<<endif>>
<<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>>\n\n<<if (previous() == "fruit") and ($fruit > 0)>>[[...|fruit]]<<else>>[[...|inv]]<<endif>>
wait[[...|jump2]]
you don't have anything left to throw[[...|jump3]]
might as well [[throw yourself|freefall]].
<<set $loc = passage()>>\n\nall of the objects you threw over the cliff are waiting to pad your landing.\n\ngood thing you put them there.\n\n[[contact|Start][state.restart()]]