Blood left behind

From: Rasdan (rasdan@PEAK.ORG)
Date: 04/19/98


Want to add blood left behind from kills to rooms? Try this:

In structs.h, room structure: add this:
byte blood;

In utils.h, add: #define RM_BLOOD(rm)   ((int)world[rm].blood)

In wherever you want, add:

void update_blood(void)
{
  int i;
  extern int top_of_world;

  for (i = 0; i < top_of_world; i++)
    if (RM_BLOOD(i) > 0)
      RM_BLOOD(i) -= 1;
}

In fight.c add this (above the damage function):
void increase_blood(int rm)
{
  RM_BLOOD(rm) = MIN(RM_BLOOD(rm) + 1, 10);
}

In die(), before anything else, add:

increase_blood(victim->in_room);

In act.informative.c:

Top of do_look:

char *blood_messages[] = {
  "Should never see this.",
  "There's a little blood here.",
  "You're standing in some blood.",
  "The blood in this room is flowing.",
  "There's so much blood here it's intoxicating!",
  "How much more blood can there be in any one room?",
  "Such carnage. The God of Death is feastin' tonight!",
  "You are splashing around in the blood of the slain!",
  "Even the walls are revolted by the death and destruction!",
  "The Gods should show some mercy and cleanse this horrid room!",
  "So much blood has been shed here, you are drowning in it!",
  "\n"
};

IMMEDIATELY below the room description sending add:

if (RM_BLOOD(ch->in_room) > 0)
  act(blood_messages[RM_BLOOD(ch->in_room)], FALSE, ch, 0, 0, TO_CHAR);

--
And that's it. :)

Adding spells that require a certain amount of blood in the room should be
no problem if you use this :)

If you use this, just drop me an email letting me know, and maybe (if you
are so inclined) a message in the credits of your mud.

Rasdan


                                  /   \
        _                 )      ((   ))     (
       (@)               /|\      ))_((     /|\                 _
       |-|`\            / | \    (/\|/\)   / | \               (@)
       | | ------------/--|-voV---\`|'/--Vov-|--\--------------|-|
       |-|                  '^`   (o o)  '^`                   | |
       | |  James C. Thomas Jr.   `\Y/'  Founder of Finality   |-|
       |-|            rasdan@finality.drachen.com              | |
       | |             finality.drachen.com 4000               |-|
       |_|_____________________________________________________| |
       (@)       l   /\ /         ( (       \ /\   l         `\|-|
                 l /   V           \ \       V   \ l           (@)
                 l/                _) )_          \I
                                   `\ /'
                                     `


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST