! Take a look at this:
Constant Story "THE PLOT IS AFOOT";
Constant Headline "^A Feat of Bravery^";
Include "parser";
Replace ShowSub;
! This version of ShowSub doesn't check that the noun is carried by the
! player:
[ ShowSub;
if (second==player) <<Examine noun>>;
if (RunLife(second,##Show)~=0) rfalse;
L__M(##Show,2,second);
];
Include "verblib";
Include "grammar";
Object Blank_Room "Blank Room"
with description "An empty room."
has light;
Nearby Nurse "nurse"
has animate
with name "nurse",
life [;
Show: if (noun == Foot) "~It'll have to come off, I'm afraid.~";
];
! The best way to have objects that are parts of the player's body is to
! use the player's `add_to_scope' property. We need a new player object
! for this:
Nearby NewPlayer "yourself"
has animate concealed transparent proper
with description "As good-looking as ever.",
number 0,
add_to_scope Foot;
Object Foot "injured foot"
has concealed
with name "injured" "foot",
article "your",
before [;
Take: "It's already attached to your leg.";
Drop: "It isn't quite dropping off yet.";
! etc
];
[ Initialise;
location = Blank_Room;
ChangePlayer(NewPlayer);
print "^^^^^Welcome to the chiropodist...^^";
];
Extend "show" replace
* noun "to" creature -> Show
* creature noun -> ShowR;
End;
-- Gareth Rees