From the NannyMUD documentation
2001-10-06
NAME
weapon - rules on weaponsDESCRIPTION
WEAPONS WITH WC LESS THAN 18 There are no limitations of the number of weapons you might create with a weapon class of 17 or lower. They still have to fulfill some requirements on weight and value (listed below), but thats all. HIGH CLASS WEAPONS "High class" is defined as "above 17". You should keep the number of those low in your area; especially should there be very few of those compared to the number of weapons with wc less or equal to 17. Weapons like this could be rewards for quests etc. Also, for weapons with wc > 17, there should be a check so that players with low level (level < 8 or con/int/dex/str < 10, xp < 200000, or any other suitable check) can't use it properly. Really low-class weapons can have the opposite checks, to prevent higher levels from snatching the newbie weapons (optional). VERY GOOD WEAPONS These are the weapons that have a wc of 20 to 24: You must have permission by the admin to introduce those into the game. If they have a wc higher than 20, they must have drawbacks, and be very hard to get. Players gang up on tough monsters, so something special is needed here. WEAPONS WITH EXTREME WC "Extreme wc" is 25 and above, or that the effective wc including results from hit_functions can be 30 or larger. Those weapons do not only need approval and heavy drawbacks; they must also be unique. This means that there must never be more than one such weapon in the game at a given time. NAMED WEAPONS Named weapons must be unique. It stands to reason that there is only one Excalibur, Stormbringer, Mjölnir etc. SPIKES IN WC It is not a good idea to make a weapon with a hit function that returns 100 in 20% of the cases, and "miss" the other 80. The average is then 20, but the peaks have a bad impact on the game. Do not use peaks that give a total wc higher than 40; such weapons will NOT be approved. OTHER HIT MESSAGES It is possible to change the hit message written when the weapon hits. Feel free to do so, just don't confuse the mortals. MORE TO READ Check out the documentation on simple_weapon. CLASS, VALUE AND WEIGHT There are certain limits on class, value and weight for weapons. The list below holds the figures. The weight is a lower minimum, while the value is a middle value; actual figures are allowed to be plus or minus 30%. Weapons with class 1 - 10 can cost anything below and up to 100 gold coins. If your weapon have extra qualities/powers, you are NOT allowed to use the minimum weight! Class Value Weight Class Value Weight Class Value Weight +-----+-------+-------+-----+-------+-------+-----+-----+-------+ | 1 <= 100 1 | 8 <= 100 1 | 15 700 3 | | 2 <= 100 1 | 9 <= 100 1 | 16 800 3 | | 3 <= 100 1 | 10 <= 100 2 | 17 900 3 | | 4 <= 100 1 | 11 175 2 | 18 1000 3 | | 5 <= 100 1 | 12 250 2 | 19 1000 4 | | 6 <= 100 1 | 13 320 2 | 20 2000 4 | | 7 <= 100 1 | 14 400 2 | | +-----+-------+-------+-----+-------+-------+-----+-----+-------+ IMPROVISED WEAPONS Common items can be coded as weapons, like chairs, shovels, hat pins etc. They are allowed a maximum wc of 7. Make sure that the items can be used in other ways; the hat pin should be possible to use - if you have a hat. WEAPONS USING HOOKS If your weapon is using a hook, you need to consider if the effect in the hook should apply every time it is called, or only when your weapon is actually being used. If the hook should only be used when the weapon is used, you will have to check that using the function 'query_weapon_in_use'. EXAMPLE OF DRAWBACKS Here is a short list of drawbacks. Use your imagination and come up with other drawbacks. * The weapon has a weight of 7. * Only players with an alignment of 500 or better can use it. * The weapon will not fight evil opponents. * The weapon will suddenly self-destruct after some time. * The wc is dependent on what area the weapon is used in. * The user can't wear any armour. * The wielder must not be wimpy in fights. This used to be considered a drawback, but it is doubtful if it is anymore: * The weapon talks with a loud voice, and much.EXAMPLE
CODE EXAMPLE FOR UNIQUE WEAPONS This shows how to keep track of a unique weapon. The code assumes that the weapon is defined in a separate file and loads without error. If you have trouble understanding this code, you are suggested to try something less complicated first void make_spear() { object the_spear; /* Let's see if we can find it. If so, it's already in the * game. */ the_spear = find_object("/players/me/weapons/sun-spear"); if (!the_spear) { /* Ok, not found. Let us load it and move it to where it should * be. */ the_spear = load_object("players/me/weapons/sun-spear"); move_object(the_spear, super_duper_mega_monster); } } // make_spear