inv_test.tw 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. :: StoryTitle
  2. a sandbox
  3. :: StoryAuthor
  4. @modgethanc
  5. :: StoryMenu
  6. [[inventory|inv]]
  7. :: inv [container]
  8. you are carrying:
  9. <<print $inv.join(", ")>>
  10. <<back>>
  11. :: Start
  12. <<set $inv = []>>
  13. hey, you.
  14. let's [[try something|1]]
  15. :: 1 [place]
  16. under the fruit tree, there is a [[pile of objects]].
  17. if you want you can [[pick some fruit|passage()][$inv.push("a piece of fruit")]].
  18. :: pile of objects [container]
  19. a pile of objects:
  20. <<set $item= "[[deck of cards]]">><<if $inv.indexOf($item) == -1>>* <<print $item>><<endif>>\
  21. <<set $item= "[[lost keys]]">><<if $inv.indexOf($item) == -1>>* <<print $item>><<endif>>\
  22. <<set $item= "[[crumpled bill]]">><<if $inv.indexOf($item) == -1>>* <<print $item>><<endif>>\
  23. <<set $item= "[[broken watch]]">><<if $inv.indexOf($item) == -1>>* <<print $item>><<endif>>\
  24. <<back>>
  25. :: deck of cards [thing]
  26. <<set $link = "[["+passage()+"]]">>
  27. ''a deck of cards'', dog-eared and held together with a rubber band that's about to snap
  28. <<if previous() is "inv">><<back>><<else>> [[take it|previous()][$inv.push($link)]] or [[leave it|previous()]] <<endif>>
  29. :: lost keys [thing]
  30. <<set $link = "[["+passage()+"]]">>
  31. ''a set of lost keys'', worn and shiny
  32. <<if previous() is "inv">><<back>><<else>> [[take it|previous()][$inv.push($link)]] or [[leave it|previous()]] <<endif>>
  33. :: crumpled bill [thing]
  34. <<set $link = "[["+passage()+"]]">>
  35. ''some crumpled bills'', that might be enough to get you a cup of coffee
  36. <<if previous() is "inv">><<back>><<else>> [[take it|previous()][$inv.push($link)]] or [[leave it|previous()]] <<endif>>
  37. :: broken watch [thing]
  38. <<set $link = "[["+passage()+"]]">>
  39. ''a broken watch'', that doesn't really tell you anything
  40. <<if previous() is "inv">><<back>><<else>> [[take it|previous()][$inv.push($link)]] or [[leave it|previous()]] <<endif>>