Commonly Used Properties in Monsters Monsters use all of the properties defined in the standard living object. They also use the following special properties: stats. Stats is a mapping whose keys are the names of the statistics and whose values are integers, in the default mudlib between 5 and 25 for players. There is no enforced limitation on them other than integerness. Players have four stats in the default: strength, constitution, dexterity, and intelligence. Monsters can have the same, fewer, or additional. Each skill the monster has must have a stat to go with it, so that most monsters have a strength stat and a dexterity stat. hit_points. Hit_points is an integer which is the current number of hits the beastie has. 0=alive, -1=dead. max_hp. Max_hp is an integer which is the maximum number of hits the beastie can ever have. attack_strength. attack_strength is a positive integer which indicates how likely it is that the monster will hit its target. 0 is quite unlikely, 10 is pretty good, 20 is awesome in the default mudlib. As usual, you can change these things. npc. The npc property designates whether the living object is a monster or is actually a user. This attribute is LOCKED and is unchangable. weapon_name. weapon_name is a string that is the name of the weapon or body part the monster uses to make its attack. If the monster wields a weapon, then this property has no effect; the weapon takes precedence. However, if the monster loses his weapon (has it stolen, perhaps) then he will revert to his "weapon_name" for attacks. damage. damage is an array of two integers, the first being the minimum base damage the attack will do, and the second being the maximum base damage the attack will do. The base damage is further modified by stats and skills. As with weapon_name, if the monster wields a weapon, the weapon damage will take precedence until the monster unwields the weapon. weapon1. weapon1 is an object which points to the weapon the monster is currently wielding. Don't set this directly: instead, call the lfun wield_weapon() in the monster, which will take care of all wielding effects. armor_class. armor_class is a positive integer indicating how resistant to being hit the monster is. 0 is unarmored, 10 is quite armored, and 20 is skin of steel in the default mudlib. Can be changed. If a monster equips armor, this property will be overwritten by the armor class of the armor. If the armor is then unequipped or stolen, then the monster will revert to AC 0. Thus, it is probably best if monsters that wear armor are designed to have armor_class 0 when they aren't wearing any. We hope to make this more flexible in future releases. armor. armor is a mapping of integers where the keys are the types of armor and the values are the armor classes of the various pieces of armor. You should not set this property directly. Instead, call the lfun equip_armor in the monster which does all the bookkeeping for you. aggressive. aggressive is an integer. If a monster's aggressive property is 1, the monster will attack any player entering the room automatically. If aggressive is 0, the monster will wait to be attacked before engaging in combat. set("aggressive",1) replaces set_aggressive(1) in most applications. killer. killer is an integer. If killer==1, the monster attacks any object that triggers its init function. This way, it attacks monsters in a room that it enters (rather than waiting for the player to come to it). Killer monsters are rather dangerous. forgetful. Forgetful is an integer. If forgetful==1, then the monster does not remember players who attack it and leave. If the monster is not forgetful, it will keep track of players who have fought it and attack them when they reappear. pursuing. pursuing is an integer. If it is not zero, then the monster will chase after its opponents if they leave during a fight. It uses receive_message() to detect leaving, so a fast player can get away by making several quick moves. spellcasting. spellcasting is an integer. If a monster's spellcasting property is 1, the monster will contemplate casting a spell in each combat round (if not already casting one). Usually should be set by calling the set_spell() lfun in the monster, rather than being set directly. spell_to_cast. spell_to_cast is a string indicating which spell the monster will try to cast. Setting spell_to_cast to "foo" will cause the monster to call the function "foo_cast" in itself: make sure this is defined. Usually this property should be set via the lfun set_spell() rather than being set directly. spell_chance. spell_chance is an integer between 1 and 100 which is the chance of a monster commencing a spell cast on any given round. Usually should be set by calling the set_spell() lfun in the monster rather than by setting it directly. Also, since monsters do NOT have a spell point limitation, setting it to high values can cause a very large number of spells to be thrown. It might be best not to use values above 50 or so. moving. Moving is an integer which controls the movement of a monster through the rooms of the MUD. If a monster is moving, then he will spontaneously move to a random adjacent room every "speed" heartbeats (see below). To start a monster will commence movement on its next heart_beat. If movement is set to -1, it means the monster is moving about. If movement is set at 0, the monster will not move around. speed. speed is an integer which controls how fast the monster will move. It will move every <speed> seconds, so low speeds are faster than high ones. We should rename this property. patrol. patrol is an array of strings. If it is set, then a monster will move, once per speed seconds, in the directions specified by the array. EG, if patrol is set to ({ "north", "south" }) then the monster will move north, then south, then north, then south, etc. stop_attack. stop_attack is an integer which is used to prevent monsters from making attacks in combat. When a monster (or player) casts a spell or takes some other action that should require the use of his hands and attention, we increase stop_attack by the amount of time it takes to complete that action, thus preventing the monster from engaging in combat for that long. It is decreased, if positive, in the monster's heartbeat: when it reaches 0 the monster can attack normally again. You should not set this property's value directly because if a monster is already stopped, you want to add to the existing stop time rather than overwrite. Call the block_attack lfun in the monster object instead, it handles this properly. chat_chance. Chat_chance is an integer which represents the percentile chance out of 100 that the monster will utter a chat at a given heartbeat. chat_output. Chat_output is an array holding all possible chat outputs. If a chat is called, it will pick one of the chats randomly and output it. att_chat_output. Att_chat_output is also an array like chat_output, but it holds the chat outputs given when the monster is in a fight.