Manipulating room descriptions so that only interesting items are mentioned, while objects that are present but not currently useful to the player are ignored.

In a very dense environment, we might want to offer the player room descriptions in which only the currently-interesting items are mentioned, while other objects are suppressed even if they are present. In effect, this takes the idea of scenery and makes it more flexible: different things might become background objects or foreground objects at different times during play.

There are a wide range of possible reasons to do this – to shift the narrative emphasis, to change the mood of the game by highlighting different parts of the environment, to show the game from the perspective of different viewpoint characters – but in the following example, our goal is to show the player only the objects that are currently useful for puzzles.

To do this, we need some notion of what puzzles are currently available and unsolved, so we make an "unsolved" adjective; we also need to know which things solve the puzzle, so we create a "resolving" relation, to indicate which objects resolve which problems.

Given that information, we can create rules about which objects in the game world are currently interesting, which are currently dull, and describe accordingly:

"Copper River"
Use scoring.
Section 1 - Procedure
Resolving relates various things to various things. The verb to resolve means the resolving relation.
Definition: a thing is interesting if it is not dull.
Definition: a person is dull:
   no.
Definition: a thing is dull:
   if it is unsolved, no;
   if it resolves an unsolved thing, no;
   yes.
Definition: a supporter is dull:
   if it is unsolved, no;
   if it resolves an unsolved thing, no;
   if it supports an interesting thing, no;
   yes.
Definition: a container is dull:
   if it is unsolved, no;
   if it resolves an unsolved thing, no;
   if it contains an interesting thing, no;
   yes.
After choosing notable locale objects:
   repeat with item running through unsolved things:
      set the locale priority of the item to 1.
For printing a locale paragraph about a dull thing (called item):
   now the item is mentioned.
Before printing a locale paragraph about a supporter (called item):
   now every dull thing on the item is mentioned.
Before printing a locale paragraph about a container (called item):
   now every dull thing on the item is mentioned.
Instead of searching a supporter:
   if the noun supports something interesting:
      say "[A list of interesting things on the noun] [are] on [the noun]";
      if the noun supports something dull:
         say " (alongside [a list of dull things on the noun])";
      say ".";
   otherwise if the noun supports something dull:
      say "There's nothing very useful here, only [a list of dull things on the noun].";
   otherwise:
      say "[The noun] [are] completely bare."
Instead of searching a container:
   if the noun contains something interesting:
      say "[A list of interesting things in the noun] [are] in [the noun]";
      if the noun contains something dull:
         say " (alongside [a list of dull things in the noun])";
      say ".";
   otherwise if the noun contains something dull:
      say "There's nothing very useful here, only [a list of dull things in the noun].";
   otherwise:
      say "[The noun] [are] completely empty."
Before listing contents when not taking inventory: group dull things together.
Rule for grouping together dull things: say "assorted dull items".
Section 2 - Scenario World and Objects
The Kitchen is a room. "Your Aunt Fiona's kitchen looks as though it has been at the eye of a glitter storm. Fine, sparkling grit dusts every surface. The appliances are slightly askew, too, as though they hadn't quite settled after a vigorous earthquake."
The shelf is a scenery supporter in the Kitchen. On the shelf is a can of beans, a can of potato leek soup, and a tin of deflating powder.
The cabinet is a scenery container in the Kitchen. In the cabinet is a book of matches, a bottle of descaling solution, a fish hook, and a rusty knife. It is openable and closed.
The counter is a scenery supporter in the Kitchen. On the counter is an espresso machine, a blender, and a mortar. The blender and the mortar are containers. In the mortar is a pestle. Understand "countertop" as the counter.
The stove is a scenery supporter in the Kitchen. The oven is part of the stove. The oven is a closed openable container.
The refrigerator is a fixed in place container in the Kitchen.
   Understand "fridge" as the refrigerator.
   The description is "The refrigerator is a dull blue-green, and has a puffy, marshmallow texture on the outside, which means that it's no good for sticking magnets to. Aunt Fiona has never been willing to explain where she got it." The refrigerator is openable and closed.
In the refrigerator are a bottle of ice wine, a bag of carrot sticks, and an egg.
Aunt Fiona is a woman in the Kitchen. Aunt Fiona can be inflated or deflated. Aunt Fiona is inflated. "[if Aunt Fiona is inflated]Aunt Fiona stands nearby. Or perhaps 'stands' is the wrong word: she has been sort of puffed up in her own skin like a balloon, and is now propped in a corner of the room with her head lolling back[otherwise]Aunt Fiona stands -- on her own two slender legs -- at the center of the room[end if]."
Every turn when Fiona is unsolved and Fiona can see the player:
   if a random chance of 1 in 3 succeeds:
      say "[one of]Aunt Fiona's eyes follow you, wide and desperate, but it doesn't look like she's able to do anything[or]Aunt Fiona is still looking reproachful[or]A faint gurgling comes from Aunt Fiona[or]Aunt Fiona makes a funny croak noise[or]Aunt Fiona is still having trouble speaking. Perhaps her throat is as swollen as the rest of her[or]Aunt Fiona twitches[stopping]."
There is a thing called a salmon. Understand "fish" as the salmon. The salmon can be scaly or prepared. The salmon is scaly. The description is "[if scaly]It looks delicious, but is still covered with scales[otherwise]The salmon has been scaled and is ready to eat[end if]."
Before printing the name of the salmon when the salmon is scaly:
   say "very scaly ".
Section 3 - Scenario Puzzles
Definition: Aunt Fiona is unsolved if she is inflated.
Definition: the salmon is unsolved:
   if the salmon is off-stage, no;
   if the salmon is scaly, yes;
   no.
The deflating powder resolves Aunt Fiona.
Instead of putting the deflating powder on Aunt Fiona:
   try throwing the deflating powder at Aunt Fiona.
Instead of giving the deflating powder to Aunt Fiona:
   try throwing the deflating powder at Aunt Fiona.
Instead of throwing the deflating powder at Aunt Fiona:
   if Aunt Fiona is inflated:
      say "You toss some of the powder in Aunt Fiona's direction, and with a sudden gaseous HUFF! she returns to her usual shape and size. [paragraph break]'Well!' she says, brushing herself off. 'That was bracing!' [paragraph break]You give her an embarrassed smile, to apologize for not curing her faster.";
      now Aunt Fiona is deflated;
      increase the score by 2;
   otherwise:
      say "[one of]You throw another hefty dose of the powder at your aunt. [paragraph break]'Thank you, child,' she says, sneezing. 'But I think you've done enough now.'[or]You throw another hefty dose of the powder at your aunt. [paragraph break]'You're too kind,' she wheezes, through a cloud of glittering dust.[or]You've probably done enough with the powder.[stopping]".
Every turn when Aunt Fiona is deflated and the salmon is off-stage:
   move the salmon to the counter;
   say "'At least they didn't get this,' she says, producing from somewhere on her person a fresh-caught salmon. An odd pattern around its eye sockets makes it looks comically as though it wears spectacles. 'It's the Salmon of Knowledge,' she explains casually. 'We just need to scale and cook it.'"
The bottle of descaling solution resolves the salmon.
Does the player mean putting the descaling solution on the fish hook: it is unlikely.
Does the player mean putting the descaling solution on the salmon: it is very likely.
Instead of putting the bottle of descaling solution on the salmon:
   if the salmon is scaly:
      now the salmon is prepared;
      say "With just a single squirt of the descaling solution (which confusingly has a picture of bathroom tiles on the label), you remove the scales from the salmon, leaving its pink flesh ready for preparation.";
      increase the score by 2;
   otherwise:
      say "'Don't do that,' Aunt Fiona warns you. 'Excessive applications could damage the flesh.'"
Test me with "look / get powder / drop powder / look / look in cabinet / get powder / put powder on fiona / look / open cabinet / look in cabinet / get solution / open fridge / put solution in fridge / look / get solution / put solution on salmon / look".
Test me with "look / get powder / drop powder / look / look in cabinet / get powder / put powder on fiona / look / open cabinet / look in cabinet / get solution / open fridge / put solution in fridge / look / get solution / put solution on salmon / look".
Kitchen
Your Aunt Fiona's kitchen looks as though it has been at the eye of a glitter storm. Fine, sparkling grit dusts every surface. The appliances are slightly askew, too, as though they hadn't quite settled after a vigorous earthquake.

Aunt Fiona stands nearby. Or perhaps "stands" is the wrong word: she has been sort of puffed up in her own skin like a balloon, and is now propped in a corner of the room with her head lolling back.

On the shelf is a tin of deflating powder.

>(Testing.)

>[1] look
Kitchen
Your Aunt Fiona's kitchen looks as though it has been at the eye of a glitter storm. Fine, sparkling grit dusts every surface. The appliances are slightly askew, too, as though they hadn't quite settled after a vigorous earthquake.

Aunt Fiona stands nearby. Or perhaps "stands" is the wrong word: she has been sort of puffed up in her own skin like a balloon, and is now propped in a corner of the room with her head lolling back.

On the shelf is a tin of deflating powder.

>[2] get powder
Taken.

>[3] drop powder
Dropped.

Aunt Fiona's eyes follow you, wide and desperate, but it doesn't look like she's able to do anything.

>[4] look
Kitchen
Your Aunt Fiona's kitchen looks as though it has been at the eye of a glitter storm. Fine, sparkling grit dusts every surface. The appliances are slightly askew, too, as though they hadn't quite settled after a vigorous earthquake.

Aunt Fiona stands nearby. Or perhaps "stands" is the wrong word: she has been sort of puffed up in her own skin like a balloon, and is now propped in a corner of the room with her head lolling back.

You can also see a tin of deflating powder here.

>[5] look in cabinet
There's nothing very useful here, only assorted dull items.

>[6] get powder
Taken.

>[7] put powder on fiona
You toss some of the powder in Aunt Fiona's direction, and with a sudden gaseous HUFF! she returns to her usual shape and size.

"Well!" she says, brushing herself off. "That was bracing!"

You give her an embarrassed smile, to apologize for not curing her faster.

"At least they didn't get this," she says, producing from somewhere on her person a fresh-caught salmon. An odd pattern around its eye sockets makes it looks comically as though it wears spectacles. "It's the Salmon of Knowledge," she explains casually. "We just need to scale and cook it."

[Your score has just gone up by two points.]

>[8] look
Kitchen
Your Aunt Fiona's kitchen looks as though it has been at the eye of a glitter storm. Fine, sparkling grit dusts every surface. The appliances are slightly askew, too, as though they hadn't quite settled after a vigorous earthquake.

On the counter is a very scaly salmon.

Aunt Fiona stands -- on her own two slender legs -- at the center of the room.

>[9] open cabinet
You open the cabinet, revealing a bottle of descaling solution and assorted dull items.

>[10] look in cabinet
A bottle of descaling solution is in the cabinet (alongside assorted dull items).

>[11] get solution
Taken.

>[12] open fridge
You open the refrigerator, revealing assorted dull items.

>[13] put solution in fridge
You put the bottle of descaling solution into the refrigerator.

>[14] look
Kitchen
Your Aunt Fiona's kitchen looks as though it has been at the eye of a glitter storm. Fine, sparkling grit dusts every surface. The appliances are slightly askew, too, as though they hadn't quite settled after a vigorous earthquake.

On the counter is a very scaly salmon.

Aunt Fiona stands -- on her own two slender legs -- at the center of the room.

You can also see a refrigerator (in which are a bottle of descaling solution and assorted dull items) here.

>[15] get solution
Taken.

>[16] put solution on salmon
With just a single squirt of the descaling solution (which confusingly has a picture of bathroom tiles on the label), you remove the scales from the salmon, leaving its pink flesh ready for preparation.

[Your score has just gone up by two points.]

>[17] look
Kitchen
Your Aunt Fiona's kitchen looks as though it has been at the eye of a glitter storm. Fine, sparkling grit dusts every surface. The appliances are slightly askew, too, as though they hadn't quite settled after a vigorous earthquake.

Aunt Fiona stands -- on her own two slender legs -- at the center of the room.