Wesponses
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…
Test me with "i / x barry / listen / waffle / jump"
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
but here is what the room description would say as a result: