Object dwarf "threatening little dwarf" with name 'dwarf' 'threatening' 'nasty' 'little' 'mean', description "It's probably not a good idea to get too close. Suffice it to say the little guy's pretty aggressive.", initial "A threatening little dwarf hides in the shadows.", number 5, daemon [; if (location == thedark) return; if (self.number == 0) { StopDaemon(self); return; } if (parent(self) == nothing) { if (location has nodwarf || location has light) return; if (random(100) <= self.number) { if (Bear in location || Troll in location) return; new_line; if (Dragon in location) { self.number--; "A dwarf appears, but with one casual blast the dragon vapourises him!"; } move self to location; "A threatening little dwarf comes out of the shadows!"; } return; } if (parent(self) ~= location) { if (location == thedark) return; if (location has nodwarf || location has light) return; if (random(100) <= 96 && parent(self) ~= In_Mirror_Canyon) { move self to location; print "^The dwarf stalks after you...^"; } else { remove self; return; } } if (random(100) <= 75) { new_line; if (self.has_thrown_axe == false) { move axe to location; self.has_thrown_axe = true; remove self; "The dwarf throws a nasty little axe at you, misses, curses, and runs away."; } if (location == In_Mirror_Canyon) "The dwarf admires himself in the mirror."; print "The dwarf throws a nasty little knife at you, "; if (random(1000) <= 95) { deadflag = 1; "and hits!"; } "but misses!"; } if (random(3) == 1) { remove self; "^Tiring of this, the dwarf slips away."; } ], before [; Kick: "You boot the dwarf across the room. He curses, then gets up and brushes himself off. Now he's madder than ever!"; ], life [; ThrowAt: if (noun == axe) { if (random(3) ~= 1) { remove self; move axe to location; self.number--; "You killed a little dwarf! The body vanishes in a cloud of greasy black smoke."; } move axe to location; "Missed! The little dwarf dodges out of the way of the axe."; } <>; Give: if (noun == tasty_food) "You fool, dwarves eat only coal! Now you've made him *really* mad!"; "The dwarf is not at all interested in your offer. (The reason being, perhaps, that if he kills you he gets everything you have anyway.)"; Attack: "Not with your bare hands. No way."; ], has_thrown_axe false, has animate; Object axe "dwarvish axe" with name 'axe' 'little' 'dwarvish' 'dwarven', description "It's just a little axe.", initial "There is a little axe here.", before [; if (~~self.is_near_bear) rfalse; Examine: "It's lying beside the bear."; Take: "No chance. It's lying beside the ferocious bear, quite within harm's way."; ], is_near_bear false;