__________________________________________________________

		DamageTypes, and How to Use Them
			[version 1.0]
__________________________________________________________

		 A compilation by Vertebraker


SECTIONS
 I.   Resistances vs. AC
 II.  Types
 III. Crafting Armors
 IV.  The Monster
 V.   Examples
 VI.  What about...?


Res vs AC:

	The difference between AC and Resistance
      is very simple.  AC is randomized and subtracted
      from the damage given in a hit_player() call.
      Resistance is a percentage shaved from the
      damage given by that hit_player() call.
      Both of these figures are independent from one
      another, and in addition are independent
      from those figures in a separate Damage Type.
      Meaning physical AC is different from other|fire
      AC, for example, and other|light resistance
      won't seep into other|ice resistance, obviously.

Types:

      For a listing of all damage types, 
      cat /doc/build/dtype

Crafting Armors:

      To create an armor with resistance to a certain
      damage type is actually quite easy.

      Observe 'ice_shield.c' in this directory.

      There are several functions to mention that armor.c
      uses, but only set_params() needs to be used
      in order to create an armor with resistances easily.

      The format for set_params() is:
       set_params(dtype, ac, res, func_name);

       where:
        -dtype is a string, i.e. "other|fire" or "magical"
        -ac is an integer  [armor class]
        -res is an integer [resistance]
        -func_name is a string, i.e. "do_special" or "water_protect"

Monsters:

      Allowing resistances for monsters is likewise easy.

      See 'fire_beast.c' in this directory.

      Use:
         set_armor_params(dtype, ac, res, func_name);

      where:
        -dtype is a string, i.e. "other|fire" or "magical"
        -ac is an integer  [armor class]
        -res is an integer [resistance]
        -func_name is a string, i.e. "do_special" or "water_protect"

Examples:

	Along with examples in this directory, you may
      find additional examples in:

        /players/feldegast/equip/amulet.c
        /players/wocket/fire/ring.c
        /players/softly/winter/cameo.c
        /players/zeus/realm/NPC/ooze.c

What about _WEAPONS_:

   There isn't any real existing, finished code dealing
   with weapons and damage types.  Rather the code is
   in place [see RegisterWeapon() in living.c and
   set_weapon_params() in monster.c], but unfinished.


