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ISTRY/
LPMUD/MUDLIB/SECURE/
LPMUD/MUDLIB/SECURE/UDP_CMD_/
LPMUD/MUDLIB/SKILLS/
LPMUD/MUDLIB/SKILLS/FIGHTER/
LPMUD/MUDLIB/SKILLS/THIEF/
LPMUD/MUDLIB/USR/
LPMUD/MUDLIB/USR/CREATORS/
LPMUD/MUDLIB/USR/PLAYERS/
     ::: Weapons document, August 1993 Angel :::

Weapons are just one of the many tools utilized by players in the
game. It is very important to understand the usage of them so
that global conformity can be maintained. All over it will mean
a better MUD, and better play for the players who visit.

void set_short(string short)
  When a player sees an item first, in a room, or in a monsters
  inventory this is what he sees. The short of the sword should
  be simply the type of weapon it is, and perhaps a small amount
  of description. EG - set_short("A golden shortsword");


void set_long(string long)
  Simply put, this is what the player sees when he looks
  at the weapon. This should be where the information about
  what it looks like, its condition, etc is. HOWEVER, if the
  weapon is magical in nature donot give away its properties
  or its use in the long. This kind of information goes into
  the set_info(string info). Hints, however, can be given. EG -
  a longsword may have in its blade the word 'orc slayer' or
  'demon bane' or 'dragon slayer' etched into the blade. The
  exact nature of the item should only be granted through
  the use of magics which give access to query_info()

void set_info(string info)
  This contains the special player information within a weapon.
  It should tell the player about magical command words for
  special spells the weapon can cast, or special spells or
  abilities is grants the wielder.

void set_type(string valid_type)
string query_type()
  There are several weapon types, each giving mesages according 
  to the type of damage it deals out. If a valid_type is not set 
  then the attack messages given are those of hand to hand     
  combat. 
 
Table 1. Table of valid weapon types. 
-----------------------------------------------------
  Name              Descriptions
 Thrust        Spears, polearms, lance, etc
 Crush         Mace, flail, club
 Slash         Typical swords
 Cleave        Two handed swords, bastard swords
-----------------------------------------------------

string *set_attack_msg(string *msg) 
string *query_attack_msg()
  When you set the type, there are default weapon attack messages. If
  however you wish to customise your own weapon attack messages, use 
  set_attack_msg(({  "missed", "",
                     "smashed", "with a mighty blow",
                     "devastated", "\b, almost severing a limb",
                     verb,   clause,
                     verb2,  clause2,
                     etc...
  }));
  Notes: The backspace char '\b' so the comma ends up in right position.
         All sentences are appended automatically with ".\n"
         The array can be any size with the format,
          attacker +" "+ verb +" "+ victim +" "+ clause +".\n"
         You should still set type of weapon.           

void set_length(int i)
int query_length()
  The length of a weapon is set in inches, and used in         
  conjunction with two-weapon use, and the persons race.
  Those races under 5' (gnomes, dwarves, halfling, etc)
  cannot employ weapons over 60" in length. When a player
  tried to wield two weapons (if he has a skill in 2 weapon
  use) both lengths are added and divided by 6. If the total
  is equal to, or less than the 2 weapon skill, then he is
  allowed to wield both weapons.

Note: I don't think the racial length restriction is used any more.

void set_name(string name)
void set_alias(string othername)
  All players have access to certian weapons depending on the  
  classes that they are currently in. Fighters are allowed to  
  wield anything, thieves only weapons they can wield in one hand

  like short swords, daggers, longswords, and not two handed   
  swords, etc. Clerics can only wield crushing weapons, and mages

  can hardly wield any weapons at all, save the staff and dagger.

  When the name of the weapon is set it should be one of the   
  following (c.f table 2) valid names, and not, for example,   
  given as 'a short sword' or 'a short sword of light and      
  darkness'. The name is simply the name, and nothing else.

void set_wc(int wc)
void set_weight(int weight)
void set_value(int amount)

  Making weapons similar in nature is also imporant. Players like

  to know that when they pick up a longsword it will be very like

  any other longsword they find. The WC given is a guideline, but
  can be modified in either of the following ways -

     1) If the description says it looks old, or rusty or badly 
        treated in some way, the the WC can be lowered by as much

        as 5.

     2) If the weapon is magical, then for each 'plus' of the  
        weapon you may add 1 to the WC to a maximum of 5. The  
        only acception is a 'defender' or 'holy avenger' weapons 
        which may be up to +6.

     3) With regards to hit functions they must not make the   
        weapon have a total WC of more than double its orriginal.

        The only cases for hit functions are against the       
        following monsters -
          a) Certain alignment.
          b) Certain races.
          c) Certain name.
          d) Spell casters
          e) Where certain monsters are immune to a spell type.

  EG - A sword might be a +1 longsword, but be +3 against fire 
  immune creatures and be double damage against fire elementals, 
  while also giving the player immunity to fire. Such a sword is 
  a total of 16. It does, however return a total WC of 12x2 and 
  so is calculated on the value list as price somwhere between 
  1200 and 6700, with weight between 6 and 9. The lighter the  
  weapon is, then obviously, the more expensive the weapon will 
  be.

  Such magical weapons, infact any weapon over WC 15 should be
  RARE and SCARCE, either being UNIQUE, part of a quest, or on
  a very hard monster (level 15+) who also wields the weapon, or
  atleast guards the weapon. You should never have more than a 
  few such weapons in all your files and areas.

Table 2. Table of valid weapon names by length and wc
--------------------------------------------------------------
TYPE      NAME              LENGTH           WC       Classes  
--------------------------------------------------------------
SLASH     Sickle              24"             9          
          Dagger              15"             8        M,T 
          Knife               12"             6        M,T
          Scimitar            36"            10        T
          Sword,  
               Broad          42"            12        T
               Long           45"            13        T
               Short          24"            10        T

          Falchion            38"            12        T
          Khopesh             38"            11        T
          Rapier              48"            12        T 
          Sabre               45"            10        T
          Cutlas              36"            11        T

PIERCE    Halberd             60"            13
          Lance               120"-168"      10
          Ranseur             96"            11
          Spear               60"-156"       10
          Trident             48"-96"        10
          Javelin             60"-160"       10

THRUST    Dirk                                         M,T


CRUSH     Club                36"             9        C
          Mace                36"            12        C
          Flail               48"            10        C
          Hammer              24"            11        C
          War Hammer
          Staff               72"-96"        12        M,C 
          Rod                 40"-75"        10        M
          Sap                  6"             8        C,T
          
             

CLEAVE    Battle Axe          48"            12         
          Hand Axe            24"             8
          Sword,              
               Two Handed     72"            14
               Bastard        54"            13
          Morning Star        24"             9
          Claymore            72"            14

CUSTOMISE (yourself with set_attack_msg()) 
          Blowgun & darts*  1000"             5        M,T
          Sling & stones*   1000"             7        M,C
          Garrot            1000"             8        T
          Lasso              180"             ?        C
          Bow & Arrows*     1000"            10
           

*Range weapons- very limited usage may be allow, use is limited
                amount of ammunition. Ammunition can NOT be bought in
                shops. (Thus it must sell destruct).
*1000"        - set the length to a ridiculus number, 1000, to indicate
                that the weapon requires 2 hands to wield, and thus the
                player cannot use two weapons.

Classes       - Fighters can use any weapons. Mages are restricted to
                weapons name has been set to those marked with M, similarily,
                T for Thief, and C for Cleric.
-------------------------------------------------------------

Note: When setting the name it is to be in lower case, and in the
example of a space in the name do the following -
'set_name("bastardsword")' or 'set_name("battleaxe")'


Table 3. Weapon class of weapon by weight and value.
----------------------------------------------------
WC  1    2      3    4     5      6     7    8     9
------------------------------------------------------
 3  20   16    12   10     -     -     -     -     -
 4  40   32    25   20     -     -     -     -     -
 5  ?    80    64   50    40     -     -     -     -
 6  ?   140   110   90    70     -     -     -     -
 7  ?   200   160  130   100     -     -     -     -
 8  ?   350   280  275   180     -     -     -     -
 9       ?    500  400   320    260    -     -     -
10       ?    800  650   520    420    -     -     -
11       ?   1200  960   770    620    -     -     -
12       ?   1700 1300  1100    870    -     -     -
13            ?   2300  1800   1500  1180    -     -
14            ?   3100  2500   2000  1600    -     -
15            ?   4000  3200   2600  2100    -     -
16            ?   5000  4000   3300  2600    -     -
17                  ?   6200   4400  3800  3000    - 
18                  ?   7300   5900  5000  4100    -
19                  ?   8500   7000  6300  5300    -
20                  ?  10000   9000  7700  6600    -
21+                      ?    12000  9600  8200  7600
-------------------------------------------------------
NOTES -  ?          Possible ONLY with permission from ELDER.
         -          Not possible WC for this weight.

void set_modified(status flag)
  If you change the weapon from the way it was orriginally
  coded then you must set this flag. This includes sharpenning
  or even blessing the weapon, increasing or decreasing the WC
  weight, or value by any ammount.

void set_enchanted(status flag)
  If the weapon has a higher WC value than that suggested in
  the table then it is obviously of fine quality, or magical
  in some way. If this is true, or the weapon has some other
  ability that it can use, or grant to the wielder then this
  flag should be set.

void set_sell_destruct(stauts flag)
status query_sell_destruct()
  All magical items, quest items, and the like should be
  destructed when sold at the shop. If you wish a certain
  item to do this, then this flag should be set. Note that
  in some cases such items default to return true when 
  sell_destruct is queried.

set_hit_func(this_object())
int weapon_hit(target) { function(); }
  This enables different things to happen while the players
  is in combat with this weapon. An increase in the damage of
  the weapon as given in the example above can be coded here.

Note:
  Calling hit_player() in weapon_hit() { } function in the weapon 
  is ILLEGAL!! It has a potential of stopping the players heart beat.
  Any weapons which have it are to be removed.



                              Angel, August 1993.