--++ ARMOUR ++--

DESCRIPTION

    This object (I_ARMOUR or "/std/armour") should be inherited by all armours 
    in the game. When you are coding your own armours always begin your code 
    by inheriting I_ARMOUR. 


INHERITANCE

    I_OBJECT
      |
    I_ITEM   I_MODIFIERS
        |      |
        I_ARMOUR

    Read also documentation of inherited functions in I_OBJECT, I_ITEM and 
    I_MODIFIER!


FUNCTIONS

    void set_race_fit(mixed races)
        Sets which races that can use this armour. Other races will 
        not be able to wear it. If you use ALL (the default), all races 
        will be able to use the armour. This function is only used on 
        players, monsters will not be affected by this. You can find 
        out which races are set with query_race_fit(). 
        Examples:
            set_race_fit(({"dwarf","gnome"}))
            set_race_fit("ALL")

    string *query_race_fit()
        Returns an array with all races that can wear the armour.

    void set_type(string t)
        Sets the type of the armour. These are the types you can use: 
        helmet, amulet, armour, shield, ring, glove, cloak and boot.

    string query_type()
        Returns the type of the armour.

    void set_ac(int a)
        Sets the armour class to a. A random value up to 'a' is subtracted 
        from the hit. Armour of type "armour" can have ac 0-4, the others 0-1.

    int query_ac()
        Returns the armour class of the armour.

    mixed query_max_ac(string type)
        Returns the maximum armour class for a certain kind of armour.

    int query_worn()
        Returns 1 if the armour is worn, 0 if it is not worn.

    object query_worn_by()
        Returns the living object wearing the armour or 0 if the armour
        isn't worn.

    int test_armour(string loc)
        Returns 1 if the armour is worn at location 'loc', or zero if it
        is not worn or on a different location.

    varargs int wear(int silent)
        This function causes the owner of the armour to wear it. All
        checks and hooks are tested. If silent is true, no messages are
        printed.

    varargs int remove(int silent, int forced)
        This function causes the owner of the armour to remove it. All
        checks and hooks are tested. If silent is true, no messages are 
        printed. If forced is true, all blocking checks are disabled.


INTERNAL FUNCTIONS

    string short()
        Adds a worn message to the short description if the armour is worn.
    void on_destruct()
        Removes the armour from the wearer before it gets destructed.
    string extra_look()
        Adds a message to the look info of a living when the armour is worn.
    int drop(int silent)
        Removes the armour before it is dropped.
    void leave_env(object a, object b)
        Removes the armour before it is moved out of the livings environment.
    void show_stats()
        Adds statistics information about the armour.


PROPERTIES
    worn_msg         The string to be appended to the armours short
                     description if it is worn.
    unwearable       If defined the armour cannot be worn
    unremovable      If defined the armour cannot be removed (e.g. cursed)
    wear_msg         User defined message to player when armour is worn
    wear_other_msg   User defined message to others when armour is worn
    remove_msg       User defined message to player when armour is removed
    remove_other_msg User defined message to others when armour is removed


HOOKS CALLED FROM THIS OBJECT
    __wear, __bwear, __remove, __bremove


SEE ALSO
    
    Functions available to parent classes:
        /doc/build/object
        /doc/build/item
        /doc/build/modifiers

    For more information about how to make armours look at the crashcourse.


IcewindMUD mudlib documentation - Copyright 2004 - written by Ghorwin