Room In_Front_Of_Barren_Room "In Front of Barren Room" with name 'front' 'of' 'entrance' 'to' 'barren' 'room', description "You are standing at the entrance to a large, barren room. A sign posted above the entrance reads: ~Caution! Bear in room!~", w_to In_Limestone_Passage, u_to In_Limestone_Passage, e_to In_Barren_Room, in_to In_Barren_Room, has nodwarf; Scenic -> "caution sign" with name 'sign' 'barren' 'room' 'caution', description "The sign reads, ~Caution! Bear in room!~"; ! ------------------------------------------------------------------------------ Room In_Barren_Room "In Barren Room" with name 'in' 'barren' 'room', description "You are inside a barren room. The center of the room is completely empty except for some dust. Marks in the dust lead away toward the far end of the room. The only exit is the way you came in.", w_to In_Front_Of_Barren_Room, out_to In_Front_Of_Barren_Room, has nodwarf; Scenic -> "dust" with name 'dust' 'marks', description "It just looks like ordinary dust."; Object -> Bear "large cave bear" with name 'bear' 'large' 'tame' 'ferocious' 'cave', describe [; if (self.is_following_you) "You are being followed by a very large, tame bear."; if (self.is_friendly == false) "There is a ferocious cave bear eyeing you from the far end of the room!"; if (location == In_Barren_Room) "There is a gentle cave bear sitting placidly in one corner."; "There is a contented-looking bear wandering about nearby."; ], life [; Attack: if (axe in player) <>; if (self.is_friendly) "The bear is confused; he only wants to be your friend."; "With what? Your bare hands? Against *his* bear hands??"; ThrowAt: if (noun ~= axe) <>; if (self.is_friendly) "The bear is confused; he only wants to be your friend."; move axe to location; axe.is_near_bear = true; "The axe misses and lands near the bear where you can't get at it."; Give: if (noun == tasty_food) { axe.is_near_bear = false; remove tasty_food; self.is_friendly = true; "The bear eagerly wolfs down your food, after which he seems to calm down considerably and even becomes rather friendly."; } if (self.is_friendly) "The bear doesn't seem very interested in your offer."; "Uh-oh -- your offer only makes the bear angrier!"; Order, Ask, Answer: "This is a Bear of very little brain."; ], before [; Examine: print "The bear is extremely large, "; if (self.is_friendly) "but appears to be friendly."; "and seems quite ferocious!"; Take, Catch: if (self.is_friendly == false) "Surely you're joking!"; if (golden_chain has locked) "The bear is still chained to the wall."; self.is_following_you = true; StartDaemon(self); "Ok, the bear's now following you around."; Drop, Release: if (self.is_following_you == false) "What?"; self.is_following_you = false; StopDaemon(self); if (Troll in location) { remove Troll; "The bear lumbers toward the troll, who lets out a startled shriek and scurries away. The bear soon gives up the pursuit and wanders back."; } "The bear wanders away from you."; ], daemon [; if (location == thedark) rfalse; if (self in location) { if (location == At_Breath_Taking_View) "^The bear roars with delight."; rfalse; } move self to location; "^The bear lumbers along behind you."; ], is_following_you false, is_friendly false, has animate; Treasure -> golden_chain "golden chain" with name 'chain' 'links' 'shackles' 'solid' 'gold' 'golden' 'thick' 'chains', description "The chain has thick links of solid gold!", describe [; if (self has locked) "The bear is held back by a solid gold chain."; "A solid golden chain lies in coils on the ground!"; ], with_key set_of_keys, before [; Take: if (self has locked) { if (Bear.is_friendly) "It's locked to the friendly bear."; "It's locked to the ferocious bear!"; } Unlock: if (Bear.is_friendly == false) "There is no way to get past the bear to unlock the chain, which is probably just as well."; Lock: if (self hasnt locked) "The mechanism won't lock again."; ], after [; Unlock: "You unlock the chain, and set the tame bear free."; ], depositpoints 14, has lockable locked;