Skip to content

Instantly share code, notes, and snippets.

@eevee
Last active August 29, 2015 14:22
Show Gist options
  • Save eevee/61b9bd3a29a4bca7665e to your computer and use it in GitHub Desktop.
Save eevee/61b9bd3a29a4bca7665e to your computer and use it in GitHub Desktop.
randomized item descriptions in inform7
Sandbox
An Interactive Fiction by Eevee
Release 1 / Serial number 150527 / Inform 7 build 6L38 (I6/v6.33 lib 6/12N) SD
courtyard
It's a big old courtyard.
You can see a wooden door, a hedge maze, a foo, a bar and a baz here.
>x foo
It's colored blue.
>x bar
It's colored green.
>x baz
It's colored red.
>x foo
It's colored blue.
>x foo
It's colored blue.
A foo, a bar, and a baz are in the courtyard.
When play begins:
repeat with item running through {foo, bar, baz}:
now the description of item is the substituted form of "It's colored [one of]red[or]green[or]blue[at random]."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment