Counterfeit Monkey — 70 of 292

Emily Short

Release 6

Section 5 - Instruments and Performance

[I am not great at music — that is, I really enjoy listening to it, but theory, analysis, and most musical performance is beyond my ability, and I have the sort of singing voice I would only dare exercise when hiking alone in a wilderness preserve.

So there was no initial plan to feature anything about instruments; it just turned out that several introduced themselves into the game, either as scenery (the piano in the Fleur d'Or) or as makeable objects (the oboe). Once enough of them turned up, I figured I should handle them in some systematic fashion.]

An instrument is a kind of thing. Understand "instrument" as an instrument.

After reading a command:

if the player's command includes "play darts" and the location is the Counterfeit Monkey:

replace the matched text with "playdarts";

if the player's command includes "play" and the location is not the Counterfeit Monkey:

replace the matched text with "perform". [This is a hack because we have to get around "play" also turning up in dialogue for the game at the Counterfeit Monkey.]

Understand "perform [something] on [something]" as performing it on. Understand "perform [piece] on [instrument]" as performing it on. Understand "perform [something] on [instrument]" as performing it on.

Understand "perform on [instrument]" or "perform [instrument]" as performing vaguely on.

Understand "perform [piece]" or "perform [something]" as performing it on.

Performing it on is an action applying to one visible thing and one thing.

Performing vaguely on is an action applying to one thing.

Sanity-check performing vaguely on something:

try performing the player on the noun instead.

Rule for supplying a missing second noun while performing something on:

if an instrument (called target instrument) is visible:

now the second noun is the target instrument;

otherwise:

if game-selection is visible:

now the second noun is the game-selection;

else:

say "There's no instrument handy." instead.

Rule for supplying a missing noun while performing something on:

now the noun is the player. [as a safe generically-present thing]

Sanity-check performing something on game-selection:

say "It's not really a game-playing occasion." instead.

Sanity-check performing something on a person:

say "If [the second noun] wish[es] to sing something, that is up to [it-them]." instead.

Sanity-check performing something on something which is not an instrument:

say "[The second noun] [is-are]n't much of an instrument." instead.

Understand "perform [text] on [something]" as improvising it on. Understand "perform [text] on [instrument]" as improvising it on. Improvising it on is an action applying to one topic and one thing.

Understand "perform [text]" as improvising it on.

Rule for supplying a missing second noun while improvising the topic understood on:

if an instrument (called target instrument) is visible:

now the second noun is the target instrument;

otherwise:

say "There's no instrument handy." instead.

Check improvising the topic understood on something which is not an instrument:

say "[The second noun] [is-are]n't much of an instrument." instead.