MANUAL FOR THE USAGE OF hostile.c INHERITANCE

Version 1.2

Introduction:

Hostile.c is a file that is used instead of room/room
in hostile enviroments like very cold, very warm and
underwater places (the more ideas, the better). When
a person comes in a room that uses hostile.c, and he/
she hasn't got something that protects him/her, she/
he will slowly die (or fast, depending on defaults).

Usage:

First check if there already is an inheritance using
hostile.c for your kind of environment. For example:
there already IS an inheritance for water.c. If there
isn't mail me (Cashimor) and describe the inheritance
you want. Then make it, using hostile.c and the
parameters in it (how that is done, is described in
this file), then use this new inheritance for your
rooms.

Variables:

nodanger: If nodanger=1, the environment isn't hostile,
          and doesn't do anything. But it still returns
          the 'envname' as the environment and allows
          additions like things floating down in water.
          Use it for surfaces, edges, cool spots in
          lava (whatever they are) ect.

damage:   Damage is the number of hits the player loses
          each cycle he/she is in this hostile
          environment. A player WILL die if the hits
          become lower than zero.

timer:    This determines the cyclelength in seconds.
          Avoid making this one, except if the damage
          is very high, otherwise too many messages
          will crowd the screen of the player.

survivor: This is the id of the object needed to
          survive in this world. Please make this
          rather unique: 'allows_breathing' for water,
          or 'warm_clothes' for ice worlds. If you
          want to check in this item if someone is
          in the specific environment, program this
          in id. Remember that you may NOT use the
          present EFUN in the id.

envname:  This is the general name of your environment.
          This name has to be registered. Monsters that
          can survive in this environment should have
          the same envname has the environment. This
          can be set in the monster using set_env_name.
          (And asked for using can_survive).

saymsg:   This message will be prepended with the name
          of this_player(), and is what other players
          will see if he/she loses hits.

wrtmsg:   This message will be written to the screen of
          victim while losing hits.

Functions:

Only one new function is defined in hostile.c,
query_env_name. This does what it seems to do: it
returns the name of the environment. This can be checked
after from everywhere.
Version 1.2: Function query_danger added, which returns
             the inverse of the nodanger variable. At the
             moment only used in /obj/torch.c.

Includes:

extinguish.h: This includefile, when the function
              extinguish is mentioned in init(), will
              extinguish all lighted objects in the
              hands of the player.

float.h:      When mentioned in the reset(arg), this
              function will float all objects down to
             a lower room (defined by floats=
              "filename").

smell.h:      This include file will disable the
              smell command in the specific
              environment, IF nodanger=0.

Hope everyone will like hostile.c, Bye!

Ethereal Cashimor


