Bonus(3)                                                              Bonus(3)



NNAAMMEE
       Bonus - Inheritable component for defining bonuses.

SSYYNNOOPPSSIISS
   PPuubblliicc MMeetthhooddss
       mapping qquueerryy__bboonnuusseess ()
       void sseett__bboonnuusseess (mapping m)
       string bboonnuuss__iinnffoo ()

       SSeettss
       Functions for setting bonus values.

           void sseett__ssttrr__bboonnuuss (x)
           void sseett__ddeexx__bboonnuuss (x)
           void sseett__ccoonn__bboonnuuss (x)
           void sseett__ssppdd__bboonnuuss (x)
           void sseett__wwiill__bboonnuuss (x)
           void sseett__iinntt__bboonnuuss (x)
           void sseett__eemmpp__bboonnuuss (x)
           void sseett__cchhaa__bboonnuuss (x)

       QQuueerriieess
       Functions to query bonus values and settings. If you don't recognize an
       abbreviation, check the matching set_ function.

           int qquueerryy__ssttrr__bboonnuuss ()
           int qquueerryy__ddeexx__bboonnuuss ()
           int qquueerryy__ccoonn__bboonnuuss ()
           int qquueerryy__ssppdd__bboonnuuss ()
           int qquueerryy__wwiill__bboonnuuss ()
           int qquueerryy__iinntt__bboonnuuss ()
           int qquueerryy__eemmpp__bboonnuuss ()
           int qquueerryy__cchhaa__bboonnuuss ()
           qquueerryy__uussee__bboonnuusseess ()

   PPuubblliicc AAttttrriibbuutteess
       mapping bboonnuuss = ([ ])

DDEETTAAIILLEEDD DDEESSCCRRIIPPTTIIOONN
       Inheritable component for defining bonuses.

       #include <bboonnuuss.h> ttoo uussee tthhiiss oobbjjeecctt..

       AArrmmoouurr, weapons, magical items and similar may all be capable of
       conferring bonuses to a player's stats. You may hard-code these bonuses
       into your source code if you wish, but a simpler way to handle them is
       to simply inherit this file and allow them to be modified with the
       object editor. Bonuses are always temporary; they are removed from the
       player's stats as soon as the bonus-giving object is discarded or
       removed.

       TTooddoo::
            We still need to provide a mechanism so that an object can decide
           under what conditions bonuses are conferred; for weapons, the
           bonuses should only be conferred if the weapon is wielded. For
           magic items, etc. they may be conferred always. This file will need
           a rewrite after we have completely decided what all our bonuses
           will be.

       Definition at line 20 of file bonus.c.

MMEEMMBBEERR FFUUNNCCTTIIOONN DDOOCCUUMMEENNTTAATTIIOONN
   ssttrriinngg bboonnuuss__iinnffoo (())
       Returns a \n separated list of variables for which this file contains
       queries and sets. You may call this function to find out if an object
       inherits this one.

       Definition at line 98 of file bonus.c.

   mmaappppiinngg qquueerryy__bboonnuusseess (())
       Query the mapping of bonuses on this object.

       Definition at line 81 of file bonus.c.

       References bonus.

   qquueerryy__uussee__bboonnuusseess (())
       RReettuurrnnss::
           True, indicating that bonuses defined in this object should be
           applied to any living holding it. This function may be overridden
           in classes which inherit it (such as weapons or armour), so that
           bonuses may be conditional on the object being worn/wielded, paired
           with another object, etc.

       Definition at line 77 of file bonus.c.

   vvooiidd sseett__bboonnuusseess ((mmaappppiinngg mm))
       Set all the bonuses in a single function call.

       PPaarraammeetteerrss::

       _m      A mapping of the form ([ 'type': (int) amount ])

       Definition at line 88 of file bonus.c.

       References bonus.

   vvooiidd sseett__cchhaa__bboonnuuss ((xx))
       Sets the bonus for charisma. This forces a recalculation of bonuses
       when it is called.

       Definition at line 53 of file bonus.c.

       References bonus.

   vvooiidd sseett__ccoonn__bboonnuuss ((xx))
       Sets the bonus for constitution. This forces a recalculation of bonuses
       when it is called.

       Definition at line 38 of file bonus.c.

       References bonus.

   vvooiidd sseett__ddeexx__bboonnuuss ((xx))
       Sets the bonus for dexterity. This forces a recalculation of bonuses
       when it is called.

       Definition at line 35 of file bonus.c.

       References bonus.

   vvooiidd sseett__eemmpp__bboonnuuss ((xx))
       Sets the bonus for empathy. This forces a recalculation of bonuses when
       it is called.

       Definition at line 50 of file bonus.c.

       References bonus.

   vvooiidd sseett__iinntt__bboonnuuss ((xx))
       Sets the bonus for intelligence. This forces a recalculation of bonuses
       when it is called.

       Definition at line 47 of file bonus.c.

       References bonus.

   vvooiidd sseett__ssppdd__bboonnuuss ((xx))
       Sets the bonus for speed. This forces a recalculation of bonuses when
       it is called.

       Definition at line 41 of file bonus.c.

       References bonus.

   vvooiidd sseett__ssttrr__bboonnuuss ((xx))
       Sets the bonus for strength. This forces a recalculation of bonuses
       when it is called.

       Definition at line 32 of file bonus.c.

       References bonus.

   vvooiidd sseett__wwiill__bboonnuuss ((xx))
       Sets the bonus for will. This forces a recalculation of bonuses when it
       is called.

       Definition at line 44 of file bonus.c.

       References bonus.

MMEEMMBBEERR DDAATTAA DDOOCCUUMMEENNTTAATTIIOONN
   mmaappppiinngg bboonnuuss == (([[ ]]))
       A mapping of all the bonuses.

       Definition at line 24 of file bonus.c.

       Referenced by query_bonuses(), set_bonuses(), set_cha_bonus(),
       set_con_bonus(), set_dex_bonus(), set_emp_bonus(), set_int_bonus(),
       set_spd_bonus(), set_str_bonus(), and set_wil_bonus().


AAUUTTHHOORR
       Generated automatically by Doxygen for Walraven from the source code.



Walraven                          8 Jan 2004                          Bonus(3)
