Sybil 2

YES and NO directed to people
Example 93
★★

Making the character understand YES, SAY YES TO CHARACTER, TELL CHARACTER YES, ANSWER YES, and CHARACTER, YES.

Inform already understands YES, NO, and SORRY as commands in their own right, which can make things a little sticky when we want a character to ask a question of the player. The most important thing is not to cover some of the possible phrasings while ignoring others.

"Replies"
The Grove is a room. In the Grove is a woman called the Sybil.
Instead of asking the Sybil to try saying no: try saying no. Instead of asking the Sybil to try saying yes: try saying yes. Instead of asking the Sybil to try saying sorry: try saying sorry.
Instead of answering the Sybil that "yes", try saying yes. Instead of answering the Sybil that "no", try saying no. Instead of answering the Sybil that "sorry", try saying sorry.
Instead of saying yes in the presence of the Sybil:
   say "She looks interested."
Instead of saying no in the presence of the Sybil:
   say "She looks annoyed."
Instead of saying sorry in the presence of the Sybil:
   say "She looks bored."

The complexity arises from the fact that we want to handle both YES and SYBIL, YES. If we only had the latter, 'yes' would be treated as a text given to the Sybil, just as in the commands SAY YES TO SYBIL or ANSWER YES. But because we have defined it as a command (so that the player can use it independently), SYBIL, YES is understood as an order to the Sybil to do the YES action.

Fortunately, we can redirect everything, as here, so that the results wind up the same.

And if we want yet another variation not covered by the Inform standard:

Understand "tell [someone] [text]" as answering it that. Understand "tell [someone] that [text]" as answering it that.

But that is a matter for a later chapter.

Test me with "yes / sybil, yes / say yes to sybil / answer yes / tell sybil yes / no / sybil, no / say no to sybil / answer no / tell sybil no / sorry / sybil, sorry / say sorry to sybil / answer sorry / tell sybil sorry".
Test me with "yes / sybil, yes / say yes to sybil / answer yes / tell sybil yes / no / sybil, no / say no to sybil / answer no / tell sybil no / sorry / sybil, sorry / say sorry to sybil / answer sorry / tell sybil sorry".
Grove
You can see the Sybil here.

>(Testing.)

>[1] yes
She looks interested.

>[2] sybil, yes
She looks interested.

>[3] say yes to sybil
She looks interested.

>[4] answer yes
(to the Sybil)
She looks interested.

>[5] tell sybil yes
She looks interested.

>[6] no
She looks annoyed.

>[7] sybil, no
She looks annoyed.

>[8] say no to sybil
She looks annoyed.

>[9] answer no
(to the Sybil)
She looks annoyed.

>[10] tell sybil no
She looks annoyed.

>[11] sorry
She looks bored.

>[12] sybil, sorry
She looks bored.

>[13] say sorry to sybil
She looks bored.

>[14] answer sorry
(to the Sybil)
She looks bored.

>[15] tell sybil sorry
She looks bored.