[SNIPPET] Merciful Mobs

From: Mulder (mulder@CLOUD9.NET)
Date: 10/16/98


Merciful Mob Snippet
Michael J. Fara <mulder@cloud9.net>

This will implement a mercy flag for mobs. If a mob is mercy flagged,
combat will end when the player/mob fighting the flagged mob is
mortally wounded. What might this be useful for? Cleric interaction,
more excitingn combat, rescue missions. You name it. If you are honest,
you will give me some credit :P

For all the "+" add the line.

In constants.c, search for "!BLIND"

  "!SLEEP",
  "!BASH",
  "!BLIND",
+ "MERCY",
   "\n"
};

In fight.c, search for "scrambles to"

      {
         GET_POS (ch) = POS_FIGHTING;
        act ("$n scrambles to $s feet!", TRUE, ch, 0, 0, TO_ROOM);
          }
+       if ((GET_POS (FIGHTING(ch)) == POS_MORTALLYW) &&
+         (MOB_FLAGGED(ch, MOB_MERCY))) {
+
+        stop_fighting(FIGHTING(ch));
+        stop_fighting(ch);
+          }
        }

In structs.h, search for "MOB_NOBLIND"

#define MOB_NOSUMMON     (1 << 14) /* Mob can't be summoned */
#define MOB_NOSLEEP      (1 << 15) /* Mob can't be slept */
#define MOB_NOBASH       (1 << 16) /* Mob can't be bashed (e.g. trees)  */
#define MOB_NOBLIND      (1 << 17) /* Mob can't be blinded */
+#define MOB_MERCY        (1 << 18) /* Mob won't kill you */

If you have OasisOLC, adjusted "NUM_MOB_FLAGS" in olc.h accordingly.
And that it is. Quite easy I suppose, hmm?


     +------------------------------------------------------------+
     | 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