Bronze — 18 of 46

Emily Short

Release 12

Section 2 - The Windchimes

[The windchimes need to guide the player through the darkness when he wears the helmet, so we have a fairly complicated set of rules determining whether they're audible and, if so, how this is described.]

Some iron windchimes are an ambiguously plural thing in the Rose Garden. Understand "guard" or "guards" or "chimes" or "chime" or "chain" or "padlock" or "small" or "lock" as the windchimes. "Strung up by a chain is a set of [iron windchimes]." The description of the windchimes is "Each chime is engraved with the staring eyes and exaggerated nostrils of a spirit warrior." The windchimes can be lockable. The windchimes can be locked. The windchimes are lockable and locked. [The windchimes have a thing called matching key.] The small key unlocks the windchimes. Instead of taking the windchimes when the windchimes are locked: say "The chimes have been locked to the chain that supports them."

Instead of pulling the locked windchimes, say "They refuse to come free, having been locked in place with a small padlock." Instead of pulling the unlocked windchimes when the windchimes are in the location: try taking the noun.

Understand "untie [something]" or "loosen [something]" or "free [something]" as taking. Understand "take down [something]" as taking.

Loudness is a kind of value. The loudnesses are noisy, loud, melodious, muted, and almost inaudible. Windchimes have a loudness.

After dropping the windchimes in the Rose Garden: say "You string the chimes again."

After taking the windchimes in the Rose Garden:

move windchimes to the Bellroom;

change windchimes to handled;

say "You take the chimes down, silencing them and muting their power. When they are entirely still, they fade from your grip and vanish."

Before doing something other than hinting about or examining or listening to the windchimes when the player is not on a supporter:

if the windchimes are handled, continue the action;

say "You cannot reach [the windchimes] from your present position; you'd need something to stand on." instead.

Instead of attacking the windchimes: say "They sound prettily only when hung up for the wind."

After deciding the scope of the player while listening:

if guards act, place the windchimes in scope;

if in darkness

begin;

repeat with item running through audible things

begin;

if item is enclosed by an adjacent room, place the item in scope;

end repeat;

end if.

Instead of touching an audible thing when in darkness:

say "You reach for the source of the [sound of the noun] noises, and feel what seems like [a noun]."

Instead of listening to a room:

play sounds.

A procedural rule while listening:

ignore the can't reach inside rooms rule. [1]

To play sounds:

begin the echolocating activity;

if the player can see the windchimes

begin;

try listening to the windchimes;

end the echolocating activity;

rule succeeds;

end if;

if guards act

begin;

now the windchimes are seen;

say "Windchimes ring, [loudness of windchimes],";

if in darkness

begin;

let way be the best route from the location to the Rose Garden;

if the way is up

begin;

say " from somewhere above you.";

end the echolocating activity;

rule succeeds;

end if;

if the way is a direction, say " from [the way]";

otherwise say " nearby";

if an audible thing is in an adjacent room, say ", competing with [a list of audible things which are in adjacent rooms]";

say "[if an audible thing is in the location]. You can also make out [a list of audible things in the location][end if].";

otherwise;

say " somewhere nearby. You cannot be quite certain of the direction[if an audible thing is visible]. You also hear [a list of audible visible things], nearer at hand[end if].";

end if;

otherwise;

if an audible thing is in the location

begin;

say "You hear [a list of audible things in the location]";

if the player wears the helmet

begin;

if an audible thing is in an adjacent room, say ", and [a list of audible things which are in adjacent rooms]";

end if;

say ".";

otherwise;

if the player wears the helmet

begin;

if an audible thing is in an adjacent room, say "You hear [a list of audible things which are in adjacent rooms].";

otherwise say "Everything is quiet, but loudly quiet: if there were any movement at all, you would sense it.";

otherwise;

if in darkness and an audible thing is in an adjacent room

begin;

say "You hear [a list of audible things which are in adjacent rooms].";

end the echolocating activity;

rule succeeds;

end if;

say "Nothing of note[if in darkness]. One might envy bats, at this moment[end if].";

end if;

end if;

end if;

end the echolocating activity.

To set chime strength:

if the player wears the helmet, now the windchimes are noisy;

otherwise now the windchimes are muted.

To decide whether guards act:

if the windchimes are not in the Rose Garden, no;

let length be the number of moves from the location to the Rose Garden, using doors;

set chime strength;

let length be length - 2;

repeat with N running from 0 to length

begin;

if windchimes are almost inaudible, no;

change loudness of windchimes to the loudness after the loudness of the windchimes;

end repeat;

yes.

Instead of listening to the windchimes:

if the windchimes are in the Garden, say "The chimes sound randomly, but not unpleasantly. It is only if you listen for a long time that they begin to remind you of a warning or a threat.";

otherwise say "The windchimes are silent now that they've been taken down."

Note

[1]. This allows us to listen to the windchimes even when we are not in the same room with them.