Flashlight
Example 218
★"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".
Test me with "look under cabinet / get lantern / look under cabinet".
Schoolhouse
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.
A hurricane lantern hangs from a peg.
You can also see a cabinet (empty) here.
>(Testing.)
>[1] look under cabinet
It is pitch dark, and you can't see a thing.
>[2] get lantern
Taken.
>[3] look under cabinet
You shine the hurricane lantern under the cabinet...
Billy's lost marble! So that's where it got to!
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.
A hurricane lantern hangs from a peg.
You can also see a cabinet (empty) here.
>(Testing.)
>[1] look under cabinet
It is pitch dark, and you can't see a thing.
>[2] get lantern
Taken.
>[3] look under cabinet
You shine the hurricane lantern under the cabinet...
Billy's lost marble! So that's where it got to!
Because visibility is checked before instead rules, this discovery will (correctly) occur only when the player does have enough light.