Parser messages that are delivered with a speech impediment.

If we want to change individual responses to player action, then the best thing to do is to use the response facility to modify those selections, as shown in the chapter on Responses.

However, suppose what we want is to give the parser a speech impediment that slightly alters all of the responses it issues. For this purpose, we might need to do a bit of text replacement…

"Wesponses"
The Office is a room. Barry Kripke is a man in the Office.
The response inhibition is initially false.
Rule for issuing the response text of a response (called R) when response inhibition is false:
   now response inhibition is true;
   let output be "[text of R]";
   now response inhibition is false;
   replace the text "r" in output with "w";
   replace the text "R" in output with "W";
   say "[output]".
Test me with "i / x barry / listen / waffle / jump"
Test me with "i / x barry / listen / waffle / jump"
Office
You can see Barry Kripke hewe.

>(Testing.)

>[1] i
You awe cawwying nothing.

>[2] x barry
You see nothing special about Bawwy Kwipke.

>[3] listen
You heaw nothing unexpected.

>[4] waffle
That's not a vewb I wecognise.

>[5] jump
You jump on the spot.

Notice that this doesn't affect the printed names of objects in the room description or other kinds of output text – only those that are issued by the response mechanism.

It would also not work to try to give our parser a nervous personality by simply adding "Um, " to the beginning of each response, because responses are not guaranteed to be full standalone sentences. For example, we could imagine writing

Rule for issuing the response text of a response (called R) when response inhibition is false:
   now response inhibition is true;
   let output be "Um, [text of R]";
   now response inhibition is false;
   say "[output]".

but here is what the room description would say as a result:

Office
Um, You Um, can see Barry KripkeUm, here