a sandbox
@modgethanc
[[inventory|inv]]
you are carrying:\n<<print $inv.join(", ")>>\n\n<<back>>
<<set $inv = []>>\nhey, you.\n\nlet's [[try something|1]]
under the fruit tree, there is a [[pile of objects]].\n\nif you want you can [[pick some fruit|passage()][$inv.push("a piece of fruit")]].
a pile of objects:\n<<set $item= "[[deck of cards]]">><<if $inv.indexOf($item) == -1>>* <<print $item>><<endif>>\s\n<<set $item= "[[lost keys]]">><<if $inv.indexOf($item) == -1>>* <<print $item>><<endif>>\s\n<<set $item= "[[crumpled bill]]">><<if $inv.indexOf($item) == -1>>* <<print $item>><<endif>>\s\n<<set $item= "[[broken watch]]">><<if $inv.indexOf($item) == -1>>* <<print $item>><<endif>>\s\n\n<<back>>
<<set $link = "[["+passage()+"]]">>\n''a deck of cards'', dog-eared and held together with a rubber band that's about to snap\n\n<<if previous() is "inv">><<back>><<else>> [[take it|previous()][$inv.push($link)]] or [[leave it|previous()]] <<endif>>
<<set $link = "[["+passage()+"]]">>\n''a set of lost keys'', worn and shiny\n\n<<if previous() is "inv">><<back>><<else>> [[take it|previous()][$inv.push($link)]] or [[leave it|previous()]] <<endif>>
<<set $link = "[["+passage()+"]]">>\n''some crumpled bills'', that might be enough to get you a cup of coffee\n\n<<if previous() is "inv">><<back>><<else>> [[take it|previous()][$inv.push($link)]] or [[leave it|previous()]] <<endif>>
<<set $link = "[["+passage()+"]]">>\n''a broken watch'', that doesn't really tell you anything\n\n<<if previous() is "inv">><<back>><<else>> [[take it|previous()][$inv.push($link)]] or [[leave it|previous()]] <<endif>>