mirror of
https://github.com/ganelson/inform.git
synced 2024-07-18 06:54:26 +03:00
28 lines
1.7 KiB
Plaintext
28 lines
1.7 KiB
Plaintext
** Removing things from play
|
|
(Faux-infinite supply of red pens; Extra Supplies)
|
|
A supply of red pens from which the player can take another pen only if he doesn't already have one somewhere in the game world.
|
|
|
|
Suppose we have a supply closet in our game from which the player is allowed to take red pens. To keep modeling simple, we only allow him to have one in play at a time, and we test this by seeing whether the red pen is "off-stage" before moving it to his possession.
|
|
|
|
This approach might seem no different from having a single red pen sitting in the closet, but it may be preferable, for two reasons. First, it's not very plausible for a supply closet to contain nothing but a single red pen (well, assuming a well-regulated supplier, anyway); and second, it gives the player a way to get a new red pen should the original be destroyed in a tragic handwriting accident.
|
|
|
|
{*}"Extra Supplies"
|
|
|
|
The Supply Closet is a room. A supply of red pens is in the Supply Closet. Understand "pen" as the supply of red pens when the red pen is not visible.
|
|
|
|
There is a red pen.
|
|
|
|
Instead of taking the supply of red pens:
|
|
if the red pen is off-stage:
|
|
move the red pen to the player;
|
|
say "You help yourself to a fresh red pen.";
|
|
otherwise:
|
|
say "You're only allowed one pen at a time. The department secretary is very strict."
|
|
|
|
South of the Supply Closet is the Furnace Room. The incinerator is a thing in the Furnace Room. It is a container. "The incinerator is here, working full blast."
|
|
|
|
After inserting something into the incinerator:
|
|
now the noun is nowhere;
|
|
say "A fiery blast consumes [the noun]!"
|
|
|
|
Test me with "get pen / i / get pen / get supply / s / put pen in incinerator / n / get pen". |