POISONS
=======

The poison system is quite simple, but can be expanded by wizards in many ways,
since the standard poison_effect object is quite simple. It should be noted
that the poison_effect object is only the agent of damage. Another object must
give this object to the player, and start it.

The main function of the poison object is to repeatedly call a function until a
time limit has expired. To support this, the object is made autoloading. This
prevents the players from quitting to rid themselves of the poison. Only the
remaining time is stored, not the original time limit.

DAMAGE
------

Damage is repeatedly applied to the player until he is dead or the time limit
is lifted. There are four types of poison damage supported. Hit points, mana,
and fatigue may all be reduced by an amount supplied by the wizard. Stats may
be reduced as well. Stats are only reduced temporarily, and only by one point
per "hit". A given poison might hit the player quite often, or very rarely,
depending on the setings. You may also define your own type, but a type must be
set. 

The poison types are defined respectively with POISON_HP, POISON_MANA,
POISON_FATIGUE and POISON_STAT. Or you can use a string for your own type. 

Poison strength cannot exceed 100. A poison of 100 strength is very difficult
to cure. Be realistic with your poison strengths. Not every poison is going to
be uncureable or nearly uncureable. The poison strength range is 1 - 100, no
higher.

It is hoped that this will cover most common poison situations, but if needed,
all kinds of effects may be achieved by replacing the damage_player() function.
For example, the poison can be made quite deadly by actually killing the player
upon the timeout period expiring (or in the damage_player() routine, if more
randomness is desired.)  

The method in which the poison is activated can be widely varied. Possibilities
include poisoned weapons, poison stings and bites, and poison potions. Multi
stage poisons can be made where no damage is done unless another poison type is
also there.

ANTIDOTES
---------

Each poison MUST have a type. An antidote can only apply to the correct poison
type. To test for poison, one can call query_poison_type(). If this function is
defined, the object is poison. Type "all" cures all poisons, but its strength
is reduced by half in it's attempt. Any other poison type must match exactly.
If you don't set the type of your poison it will be set to "standard". Type
"standard" should not be used as a type. 

Antidotes may also attempt to undo the effect of a particular poison damage.
For this, the effects POISON_CURE_FATIGUE, POISON_CURE_HP, POISON_CURE_MANA
and POISON_CURE_STAT are defined.

To actually cure the poison, call cure_poison(string *cure_type, int success).
This tells the poison that a cure of effectiveness "success" was tried on it
for the poison types listed in "cure_type". This will cure, depending on a
formula involving the strength of the poison. The success of the cure is
returned.

However, when making herbs and potions you do not have to handle the curing
of poisons yourself. That is done automatically. You only need to call the
function cure_poison() if you want to cure from something else, like a spell
or amulet.


EXAMPLE POISON
--------------

/*
 * A simple spider poison.
 */
#pragma strict_types

inherit "/std/poison_effect";

#include <poison_types.h>

void
create_poison_effect()
{
    set_interval(20);
    set_time(500);
    set_damage( ({ POISON_FATIGUE, 100, POISON_HP, 30 }) );
    set_strength(20);
    set_poison_type("spider");
}

Note that you can make your own poison effects too. Notes on which functions
can be redefined are with the functions below. All kinds of effects can be
created.

Usage: from the poisoning object, when the poison should be started,
       execute the following code fragment.

    poison = clone_object("/d/Domain/dir/our_poison");
    poison->move(living_we_want_to_poison);
    poison->start_poison(living_responsible_for_the_poisoning);

EXAMPLE ANTIDOTE
----------------

/*
 * A simple antidote for spider poisons.
 */
#pragma strict_types

inherit "std/potion";

#include <herb.h>

public void
create_potion()
{
    set_potion_name("spider cure potion");
    set_unid_long("This is a strange herb brew.\n");
    set_id_long("This potions cures spider poisons.\n");
    set_adj("clear");
    set_id_diff(17);
    set_soft_amount(30);
    set_alco_amount(0);
    set_potion_value(1100);
    set_effect(HERB_CURING, "spider", 50);
}
