From the NannyMUD documentation

LAST CHANGE

2001-09-22

NAME

        basic_monster - A very basic living object.

INHERITS

        /std/stationary
        /obj/living_functions

FUNCTIONS

SETUP FUNCTIONS

        set_aggressive
        set_race
        set_level
        set_hp
        set_ep
        set_al
        set_wc
        set_ac
        set_frog
        set_wet
        set_wimpy
        add_object

QUERY FUNCTIONS

        query_race
        query_aggressive
        query_real_name
        query_npc /* always returns 1 */
        query_wet
        query_wimpy

OTHER FUNCTIONS

        remote_monster_init
        remote_monster_died
        remote_real_monster_died
        remote_prevent_attack

PROPERTIES

INTERNAL PROPERTIES


PROPERTY NAME

        see_invisible - Monster can see invisible players.

DESCRIPTION

        Adding this property will make the monster able to see
        and therefore attack invisible players.

PROPERTY NAME

        monster_heal_reset - Heal the monster at reset.

DESCRIPTION

        Adding this property will make the monster heal itself
        when reset is called.


FUNCTION


NAME

        set_aggressive - Set how aggressive the monster is.

SYNTAX

void set_aggressive(int delay)

DESCRIPTION

        Set how long the monster waits before attacking someone, setting
        the delay to zero means you should wait forever.

FUNCTION


NAME

        set_race - Set the race of the monster.

SYNTAX

void set_race(string race)

DESCRIPTION

        Set the value returned by query_race(). Valid values include:
        human, dog, horse, elf, bird, bear, dwarf, wolf, bluebird, etc.
        Invalid values include: priest, profezzorn, adventurer, etc.

FUNCTION


NAME

        set_level - Set the level of the monster.

SYNTAX

void set_level(int level)

DESCRIPTION

        Set the level of the monster, this function also sets hit points,
        stats and experience to appropriate values for a monster of this
        level with little or no equipment.

NOTE

        Make sure to call this function _before_ calling any functions
        that specifics of the monster such as xp, hp, or stats.

FUNCTION


NAME

        set_hp - Set how many hit points the monster has.

SYNTAX

void set_hp(int hp)

DESCRIPTION

        Set how many hp the monster has, both current hp and max hp will
        be set.

FUNCTION


NAME

        set_ep - Set the number of experience points the monster has.

SYNTAX

void set_ep(int experience)

DESCRIPTION

        This function sets the number of experience points the monster
        has. This also controls how much experience the monster will
        give to whoever kills it. 

FUNCTION


NAME

        set_al - Set alignment.

SYNTAX

void set_al(int alignment)

DESCRIPTION

        Set the alignment of the monster, valid range is -1000 to 1000.
        Traditionally, players use a description rather than the bare
        number. The exact details can be found in the source code of
        the player object, but traditionally the following applies:
                1000 and up     means saintly
                 201 to  999    means good
                  41 to  200    means nice
                 -40 to  40     means neutral
                -200 to -41     means nasty
                -999 to -201    means evil
               -1000 and below  means demonic

FUNCTION


NAME

        set_wc - Set the monsters natural weapon class.

SYNTAX

void set_wc(int wc)

DESCRIPTION

        Set the monsters natural weapon class, see the RULES for a
        list of allowed and recommended values.

SEE ALSO

        set_level in std/monster/basic_monster

SEE ALSO

        monster in RULES/monster
        monster in std/monster/monster

FUNCTION


NAME

        set_ac - Set the monsters natural armour class.

SYNTAX

void set_ac(int ac)

DESCRIPTION

        Set the monsters natural armour class, see the RULES for a 
        list of allowed and recommended values.

SEE ALSO

        set_level in std/monster/basic_monster

FUNCTION


NAME

        set_frog - Turn the monster into a frog.

SYNTAX

void set_frog()

DESCRIPTION

        Sets the 'frog' flag in living_functions.c

NOTE

        there is no way to turn it back to what it was without
        affecting the variable 'frog' directly.

FUNCTION


NAME

        set_wet - Pour water on the monster.

SYNTAX

void set_wet(int time)

DESCRIPTION

        Makes the monster wet for 'time' seconds.

FUNCTION


NAME

        set_wimpy - Set the wimpy percentage.

SYNTAX

void set_wimpy(mixed wimpy)

DESCRIPTION

        This set the wimpy percentage. The argument can be 2 things:
        1/ a percentage nr, i.e. 0-100. At 0, the monster will never run away
           (this is the default behavior), and at 100 it will always run.
        2/ a string on the eval() format. This string will be run through
           eval(), and the called function should return an integer in the
           range 0-100.

FUNCTION


NAME

        add_object - Add an object to the container.

SYNTAX

        add_object(file_name)
        add_object(file_name, use_load)

DESCRIPTION

        This is a convenience function. In it's most simple form, it clones
        the object specified by 'file_name' to the monster, but it can
        handle several other cases:

        + If the 'file_name' is a string, and 'use_load' is non-zero, then
          load_object() will be used instead of clone_object().
        + If 'file_name' is an object, that object will be moved to the
          monster.

NOTE

        Unlike add_object() in rooms, this function will NOT make the item
        reappear every reset.

FUNCTION


NAME

        remote_monster_init - Init callback.

SYNTAX

void remote_monster_init(object monster)

DESCRIPTION

        This function is called in the 'remote object' from init() in the
        monster. The argument will be the monster itself.        To set the remote object, do add_property("__remote",remote_object)

FUNCTION


NAME

        remote_monster_died - Monster died callback.

SYNTAX

int remote_monster_died(object monster)

DESCRIPTION

        This function is called in the 'remote object' after the monster has
        died, and a corpse has been cloned. If this function returns true, the
        dead monster will not be destructed. The argument is the monster
        itself.

FUNCTION


NAME

        remote_real_monster_died - Monster really died callback.

SYNTAX

int remote_real_monster_died(object monster)

DESCRIPTION

        This function is called in the 'remote object' when the monster
        dies, but before it clones the corpse. If this function returns
        true, the dead monster will not be destructed and no corpse will
        be cloned.

FUNCTION


NAME

        remote_prevent_attack - Aggressive control callback.

SYNTAX

int remote_prevent_attack(object monster, object victim)

DESCRIPTION

        Before an aggressive monster attacks it's victim, this function
        is called in the 'remote object'. If it returns true (that is, not
        zero) the victim will not be attacked. Note that this will not
        save the player if he chooses to attack the monster.

FUNCTION


NAME

        query_race - What race does the monster have?

SYNTAX

         string query_race()     

DESCRIPTION

        This function returns the race of the monster. This string
        is the same as has been set using set_race().

FUNCTION


NAME

        query_aggressive - How aggressive is the monster?

SYNTAX

        int query_aggressive()   

DESCRIPTION

        This function returns the value set by set_aggressive().

FUNCTION


NAME

        query_real_name - Return lower_case() of name.

SYNTAX

        string query_real_name()

DESCRIPTION

        This function returns the lower-cased string set with
        set_name().

FUNCTION


NAME

        query_npc - Is this object a monster?

SYNTAX

        int query_npc()

DESCRIPTION

        This function always returns 1. This marks the object as being
        a monster. It is a convenience function.

FUNCTION


NAME

        query_wet - How wet is the monster.

SYNTAX

        int query_wet()

DESCRIPTION

        THis function reveals how wet the monster is.

FUNCTION


NAME

        query_wimpy - How wimpy is the monster?

SYNTAX

        int query_wimpy()

DESCRIPTION

        This function returns how wimpy the monster is, as set with
        set_wimpy().