Use when entering dark locations or interacting with light sources. Handles the grue mechanic and player death in darkness.
Apply this skill when:
requires_light: trueflags.in_darkness is true)| Item | ID | Behavior |
|---|---|---|
| Brass Lantern | brass_lantern | Can be turned on/off. Found in living_room. |
| Ivory Torch | ivory_torch | Always lit when held. A treasure from torch_room. |
| Old Lantern | old_lantern | Useless. Provides no light. |
When the player moves to a new location:
requires_light is true in the location dataflags.lantern_lit is true (brass lantern is on), ORivory_torch is in inventory (always lit)If the player enters a requires_light location without light:
flags.in_darkness = true via update_game_stateOn the player's next action, if flags.in_darkness is still true:
restart_game immediatelyThe player gets exactly ONE action to light their lantern or retreat.
When the player says "turn on lantern", "light lantern", etc.:
brass_lantern is in inventoryflags.lantern_lit = true via update_game_stateflags.in_darkness if it was setWhen the player says "turn off lantern", "extinguish lantern", etc.:
flags.lantern_lit = false via update_game_staterequires_light: true):
flags.in_darkness = trueThe grue is never seen, only sensed:
The grue cannot exist in light. A lit lantern keeps them at bay.
The game tracks whether the lantern is lit and whether the player is in lethal darkness internally. These states persist across turns and are checked automatically when entering dark locations.
Sequence when entering dark location:
get_location_data shows requires_light: trueflags.lantern_lit or ivory_torch in inventoryin_darkness = trueIf the player says "go back" or moves to a different direction while in darkness:
in_darkness if new location doesn't require light