version 1/120327 by Kevin Norris
Example: * Revised Terror of the Sierra Madre - Recipe book example modified to use Protagonists.
This is based on Example 121 from Chapter 5.6 of the Recipe Book (8.1 in Writing with Inform). In the original example, the viewpoint alternated between two people. We're going to allow the player to choose who to play as.
*:"Revised Terror of the Sierra Madre"
Include Protagonists by Kevin Norris.
The Hay-Strewn Corridor is a room. "[if the player is Maleska]The horse stalls are empty: you have already drained the animals, and carried off their corpses. The house will not long sustain you now.
The window throws on the floor a bright square of malevolent sunlight[otherwise]The stalls for horses run down one side of the room, but the house has long stood empty. A square window without shutters looks out over the ranch, away toward the Sierras[end if]."
Teresa is a playable woman in the Hay-Strewn Corridor. "Teresa stands opposite you[if Teresa carries something], her fingers wrapped tightly around [a list of things carried by Teresa][end if]." Teresa carries a bulb of garlic and a cross.
Maleska is a playable man in the Hay-Strewn Corridor. "Maleska watches you from eyes entirely black." Maleska carries a skull.
The player is Maleska.
Every person has a number called strength. The strength of Teresa is 3. The strength of Maleska is 5.
When play begins:
now the command prompt is "[bold type][player][roman type] > ";
now the left hand status line is "[player]";
now the right hand status line is "STR: [strength of the player]".
Rule for printing the name of Teresa: say "Teresa".
Rule for printing the name of Maleska: say "Maleska".
Test me with "look / i / play as teresa / look / i / play as teresa / play as maleska".