Alabaster — 41 of 123

John Cater, Rob Dubbin, Eric Eve, Elizabeth Heller, Jayzee, Kazuki Mishima, Sarah Morayati, Mark Musante, Emily Short, Adam Thornton, and Ziv Wities

Release 1

Chapter 1 - Parsing Commands and Reprinting

Section 1 - Clarifying Directed Commands

After reading a command:

let N be indexed text;

let N be "[the player's command]";

replace the regular expression "(ask|tell|order|instruct|beg|request|encourage) (him|her) to (.+)" in N with "\2, \3";

replace the regular expression "(ask|tell|order|instruct|beg|request|encourage) (snow white|white|girl|princess) to (.+)" in N with "\2, \3";

replace the regular expression "(ask|tell|order|instruct|beg|request|encourage) (happy|hart corpse|corpse|decomposing hart corpse) to (.+)" in N with "\2, \3";

change the text of the player's command to N.

After reading a command: [1]

let N be indexed text;

let N be "[the player's command]";

if N matches the regular expression ".*snow$":

change N to "[N] white";

change the text of the player's command to N;

if N matches the regular expression "^(snow white|snow|white|princess|girl|vampire|lilith)\," :

while the player's command includes "yourself":

replace the matched text with "Snow White";

while the player's command includes "your":

replace the matched text with "Snow White's";

[replace the regular expression "^(snow white|snow|white|princess|girl|vampire|lilith)\, " in N with "";

now the direct command is N;]

otherwise if N matches the regular expression "^(hart|happy|corpse|decomposing corpse|hart corpse|decomposing hart corpse)\," :

while the player's command includes "yourself":

replace the matched text with "corpse";

while the player's command includes "your":

replace the matched text with "corpse's";

Note

[1]. This is to handle things like SNOW WHITE, SHOW ME YOUR TEETH. NB that the options in the regular expression must be in lower case because the player's command will have been flattened to LC before inspection, *but* regular expressions are case-sensitive by default. Rather than futz around with that, we just use lower case versions of the name.