nightmare3_fluffos_v2/
nightmare3_fluffos_v2/bin/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/ChangeLog.old/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/Win32/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/compat/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/compat/simuls/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/include/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/clone/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/command/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/data/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/etc/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/include/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/inherit/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/inherit/master/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/log/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/single/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/single/tests/compiler/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/single/tests/efuns/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/single/tests/operators/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/u/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/tmp/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/windows/
nightmare3_fluffos_v2/lib/cmds/ambassador/
nightmare3_fluffos_v2/lib/cmds/database/
nightmare3_fluffos_v2/lib/cmds/hm/
nightmare3_fluffos_v2/lib/cmds/soul/
nightmare3_fluffos_v2/lib/daemon/cfg/
nightmare3_fluffos_v2/lib/daemon/cfg/mon_races/
nightmare3_fluffos_v2/lib/daemon/cfg/races/
nightmare3_fluffos_v2/lib/daemon/include/
nightmare3_fluffos_v2/lib/daemon/save/
nightmare3_fluffos_v2/lib/daemon/services/
nightmare3_fluffos_v2/lib/daemon/soul/
nightmare3_fluffos_v2/lib/doc/
nightmare3_fluffos_v2/lib/doc/TestPlans/
nightmare3_fluffos_v2/lib/doc/approval/
nightmare3_fluffos_v2/lib/doc/approval/QC/
nightmare3_fluffos_v2/lib/doc/approval/balance/
nightmare3_fluffos_v2/lib/doc/build/
nightmare3_fluffos_v2/lib/doc/build/armours/
nightmare3_fluffos_v2/lib/doc/build/economy/
nightmare3_fluffos_v2/lib/doc/build/etc/
nightmare3_fluffos_v2/lib/doc/build/monster/
nightmare3_fluffos_v2/lib/doc/build/room/
nightmare3_fluffos_v2/lib/doc/build/virtual/
nightmare3_fluffos_v2/lib/doc/build/weapon/
nightmare3_fluffos_v2/lib/doc/classes/
nightmare3_fluffos_v2/lib/doc/efun/
nightmare3_fluffos_v2/lib/doc/etc/
nightmare3_fluffos_v2/lib/doc/help/creator/
nightmare3_fluffos_v2/lib/doc/help/hm/
nightmare3_fluffos_v2/lib/doc/law/
nightmare3_fluffos_v2/lib/doc/lpc/basic/
nightmare3_fluffos_v2/lib/doc/lpc/data_types/
nightmare3_fluffos_v2/lib/doc/lpc/etc/
nightmare3_fluffos_v2/lib/doc/lpc/intermediate/
nightmare3_fluffos_v2/lib/doc/lpc/types/
nightmare3_fluffos_v2/lib/doc/mudlib/
nightmare3_fluffos_v2/lib/doc/mudlib/features/
nightmare3_fluffos_v2/lib/domains/Examples/etc/
nightmare3_fluffos_v2/lib/domains/Examples/room/
nightmare3_fluffos_v2/lib/domains/Examples/virtual/
nightmare3_fluffos_v2/lib/domains/Examples/virtual/exaA/
nightmare3_fluffos_v2/lib/domains/Examples/virtual/exaB/
nightmare3_fluffos_v2/lib/domains/Examples/weapon/
nightmare3_fluffos_v2/lib/domains/Praxis/
nightmare3_fluffos_v2/lib/domains/Praxis/adm/
nightmare3_fluffos_v2/lib/domains/Praxis/attic/
nightmare3_fluffos_v2/lib/domains/Praxis/cemetary/
nightmare3_fluffos_v2/lib/domains/Praxis/cemetary/mon/
nightmare3_fluffos_v2/lib/domains/Praxis/data/
nightmare3_fluffos_v2/lib/domains/Praxis/death/
nightmare3_fluffos_v2/lib/domains/Praxis/mountains/
nightmare3_fluffos_v2/lib/domains/Praxis/obj/armour/
nightmare3_fluffos_v2/lib/domains/Praxis/obj/magic/
nightmare3_fluffos_v2/lib/domains/Praxis/obj/weapon/
nightmare3_fluffos_v2/lib/domains/Praxis/orc_valley/
nightmare3_fluffos_v2/lib/domains/Praxis/quests/
nightmare3_fluffos_v2/lib/domains/Praxis/standardOld/
nightmare3_fluffos_v2/lib/include/
nightmare3_fluffos_v2/lib/log/
nightmare3_fluffos_v2/lib/log/errors/
nightmare3_fluffos_v2/lib/log/reports/
nightmare3_fluffos_v2/lib/log/watch/
nightmare3_fluffos_v2/lib/news/
nightmare3_fluffos_v2/lib/secure/cfg/
nightmare3_fluffos_v2/lib/secure/cmds/ambassador/
nightmare3_fluffos_v2/lib/secure/cmds/mortal/
nightmare3_fluffos_v2/lib/secure/save/users/d/
nightmare3_fluffos_v2/lib/secure/std/
nightmare3_fluffos_v2/lib/std/hm/
nightmare3_fluffos_v2/lib/std/living/
nightmare3_fluffos_v2/lib/std/room/
nightmare3_fluffos_v2/lib/std/user/
nightmare3_fluffos_v2/lib/std/virtual/
nightmare3_fluffos_v2/lib/www/
nightmare3_fluffos_v2/lib/www/errors/
nightmare3_fluffos_v2/lib/www/gateways/
nightmare3_fluffos_v2/win32/
	       Infections Tutorial for Nightmare 3.2.2
		 written by Descartes of Borg 940906
			Last modified: 940906

This document details how to create infectious and non-infectious
aflictions for the Nightmare Mudlib.  Disease was introduced into the
mudlib at version 3.2.2.  The inheritable infectious object, germ.c,
may be used for three types of afflictions:

1) bacterial (rusty sword cuts, the plague, strep throat)
2) viral (flu, cold, cancer)
3) magical (use your imagination)

Infections need not be contagious.  You set how contagious and how
fast the germs replicate and spread.

********************************************************************
I. A basic germ

There is really very little to creating a germ.  Like all other
inheritables, you do the normal:

****
#include <std.h>

inherit GERM;
****

so that you have the standard germ code inherited into your germ.  YOU
CANNOT CLONE /std/germ.  They have to be in their own little file so that
they can reproduce and stay on a player across logins.  In the
create() function of your germ, you must make the following calls to
set up the germ:

****
void create() {
    germ::create();
    set_name("cold")
    set_id( ({ "cold" }) );
    set_short("the cold");
    set_long(
      "A viral infection generally harmless, but annoying which  "
      "most people get at one point or another.");
    set_communicable(10);
    set_cure_level(10);
    set_life_span(100);
    set_type("viral");
}
****

Of course, the name of this disease is cold.  So the set_name() and
set_id() functions set up this fact.  Although no one ever sees the
disease, the short and long descriptions are used by magic spells to
allow certain people to tell something about the disease.

The four main calls for infections are:
set_communicable()
set_cure_level()
set_life_span()
set_type()

The first, set_communicable(), only gets called if the disease can be
passed around from player to player.  The number you pass determines
how communicable it is.  The number is chance in 1000 of someone
getting it.  These numbers should be fairly low.  I am sure balance
has something to say about the exact nature (and approval/balance
documents rule over any numbers which might be presented here), but in
general, the more communicable a germ is, the less nasty it is.  More
on nastiness later.

The second, set_cure_level(), is used to set how much of an "antidote"
is needed to cure the infection.  I use antidote in quotes, because
antidote can be anything which is used to cure the germ.  The higher
the number, the more of an antidote is required (and some antidotes
may cause side effects!).

Third is the life span of the infection outside of a host.  If the
germ is sitting in a room, it will only sit there so long before it
dies.  This number should never be longer than 10 minutes (600
seconds).

Fourth, set_type(), is one of "bacterial", "viral", or "magical".

Unlike most other inheritables, however, this is not all there is to
creating an infection.  You also have to write your own functions.
The minimum one you *MUST* write is:

void suffer(object ob);

For example:

****
void suffer(object ob) {
    ob->add_hp(-random(5));
    message("my_action", "You cough.", ob);
    message("other_action", (string)ob->query_cap_name()+" coughs.",
      environment(ob), ob);
}
****

This, of course, is really dull.  But this is the meat of any disease.
This function gets called every 5 seconds the entire time the person
suffers from the disease.  Ideally, you would write up a bunch of
possible symptoms from which a person could suffer in here.  

IMPORTANT NOTE:
The efun this_player() does not work in this function!!!  It has no
meaning.  The variable passed to the function, ob, is the sick person.
Since this_player() does not work, write() and say() do not work
either.  So you need to use the message() efun to send messages.  Type
"man message" for detailed help, but basically, you have:

message(type, msg, who_gets_it, who_does_not);

Type is a string, in most cases "my_action" for the sick person (they
did something), and "other_action" for everyone else.  There is a doc
somewhere detailing message types.  Do not worry too much about what
you put here.

msg is what you want people to see.

who_gets_it is a list of people who see the message.  In this case, it
is everyone in the same room as the player.  So you just send the room
as this argument, and the driver understands you mean everyone in the
room since rooms do not get messages!

who_does_not is a list of exceptions.  After all, the sick person is
in the room, and you do not want them to see the messages meant for
others.  So, if it is one person, just put them there.  If it is a
list of people, put them in ({ }).

This is all you need to write a working disease!  Keep in mind that if
you make an incurable disease, it should never be deadly, and it
should somehow go away on its own.

*****************************************************************
II. Advanced Infection Writing

There are many functions in the germ object which you can override to
modify functionality.  This section basically assumes that you
understand the concept of overriding functions.  If you do not, then
you should look into the relevant chapters in the Intermediate LPC.

The germ object has the following functions whose behaviour you can
override: