OBJECT
	/obj/weapon


SYNOPSIS
	#include <properties.h>
	#include <combat.h>
	inherit "/obj/weapon";

	  OR

	clone_object ("/obj/weapon");

LAST UPDATE
	Mateese, 27-Apr-95 00:30 MET


DESCRIPTION
	The /obj/weapon is a simple generic weapon.
	It implements the commands needed for an weapon, and can be
	preconfigured to something sensible.

	The weapon can be worn and unworn:

	  wield <weapon>
	  unwield <weapon>

	It is a direct descendant of /std/thing and /std/combat.
	The standard functions

	  void create ()
	  void init ()
	  int move (mixed dest, int method, void | mixed extra)
	  int remove ()
	  int QueryValue()
	  string InvShort (string what)
	  string Short (string what)

	are redefined approbiately, so that a move of the weapon
	automatically unwields it, the value decreases by degradation,
	that the commands are added, and that the state (wielded or
	not) is shown in the inventory listing.

	  int SetClass (int class, void|string type)
	    This function sets the P_DAMAGE and P_WP_PER_QP according
	    to the given <class> and the actual P_WEAPON_TYPE setting.

	  void SetType (string type, int class)
	    This function (re)sets the weapon to be of <type> (or the
	    actual P_WEAPON_TYPE if <type> is 0) and of class <class>.
	    All important properties are set to default values.
	    This functions accepts every type mentioned in /sys/combat.h.
	    For easier use with a rooms AddItem(), the first argument
	    <type> may also be an array of the ({ type, class }) to set.

	The setup by SetType(class, type) up sets or changes these
	properties: 
	  P_SHORT	  P_LONG	  P_IDS
	  P_VALUE	  P_WEIGHT	  P_DAMAGE
	  P_WEAPON_TYPE   P_NUMBER_HANDS  P_ATTACK_VERBS
	  P_WP_PER_QP     P_CLASS
	  P_DEFENSE       P_AP_PER_QP (CS_STAFF only)


	For the easier programming of generic weapons (like those in
	/obj/weapon/*), the following two properties help restricting
	the class range a preconfigured weapon can be set to:

	  int P_MIN_CLASS   "MinClass"
	  int P_MAX_CLASS   "MaxClass"
	    Both values are integers and determine the possible
	    minimum or maximum setting for P_CLASS. Class values
	    outside this range are mapped inside.


NOTE
	The directory /obj/weapon/ contains several ready-made weapons
	for direct cloneage. Use them as far as possible.

	Though they are ready-made, you can change their 'class' after
	cloning using SetClass() or this function:

	  void SetUp (int class)
	    Setup the weapon to be of strength <class>. This call also
	    initializes some extra data (like P_ADJECTIVES).


INHERITANCE TREE
	weapon
	  |-std/combat
	  `-std/thing
	      |-std/base
	      |-std/thing/moving
	      |-std/thing/properties
	      `-std/thing/description



SEE ALSO
	combat(C), combat(S), thing(S)
