mirror of
https://github.com/ganelson/inform.git
synced 2024-07-08 01:54:21 +03:00
26 lines
1.3 KiB
Plaintext
26 lines
1.3 KiB
Plaintext
* Changing visibility
|
|
(LOOK UNDER shows nothing unless the player has a light; Flashlight)
|
|
Visibility set so that looking under objects produces no result unless the player has a light source to shine there (regardless of the light level of the room).
|
|
|
|
{*}"Flashlight"
|
|
|
|
The Schoolhouse is a room. "Though normally comfortable, the room is dark and menacing during the storm; rain sheets on the windows, and you can barely see the flash of the lighthouse only a few miles away."
|
|
|
|
The cabinet is a fixed in place openable container in the Schoolhouse. The hurricane lantern is a thing in the Schoolhouse. "A hurricane lantern hangs from a peg." The lantern is lit.
|
|
|
|
Visibility rule when looking under something:
|
|
if the player is carrying a lit thing (called lamp):
|
|
say "You shine [the lamp] under [the noun]...";
|
|
there is sufficient light;
|
|
there is insufficient light.
|
|
|
|
There is a marble. The marble can be found or lost. The marble is lost.
|
|
|
|
Instead of looking under the cabinet when the marble is lost:
|
|
move the marble to the player;
|
|
now the marble is found;
|
|
say "Billy's lost marble! So that's where it got to!"
|
|
|
|
Test me with "look under cabinet / get lantern / look under cabinet".
|
|
|
|
Because visibility is checked before instead rules, this discovery will (correctly) occur only when the player does have enough light. |