Animate Dead

From: George (greerga@DRAGON.HAM.MUOHIO.EDU)
Date: 10/14/97


Quick patch to make animate dead work (correctly).  You may want to adjust
the mana cost in the spello() call to fit your desires.

diff -upPr -x *.o ../stk/magic.c ./magic.c
--- ../stk/magic.c      Fri Apr 12 23:39:21 1996
+++ ./magic.c   Tue Oct 14 20:44:53 1997
@@ -838,16 +838,19 @@ static char *mag_summon_fail_msgs[] = {
   "There is no corpse!\r\n"
 };

+/* These mobiles do not exist. */
 #define MOB_MONSUM_I           130
 #define MOB_MONSUM_II          140
 #define MOB_MONSUM_III         150
 #define MOB_GATE_I             160
 #define MOB_GATE_II            170
 #define MOB_GATE_III           180
-#define MOB_ELEMENTAL_BASE     110
-#define MOB_CLONE              69
-#define MOB_ZOMBIE             101
-#define MOB_AERIALSERVANT      109
+
+/* Defined mobiles. */
+#define MOB_ELEMENTAL_BASE     20      /* Only one for now. */
+#define MOB_CLONE              10
+#define MOB_ZOMBIE             11
+#define MOB_AERIALSERVANT      19


 void mag_summons(int level, struct char_data * ch, struct obj_data * obj,
@@ -872,13 +875,14 @@ void mag_summons(int level, struct char_
       act(mag_summon_fail_msgs[7], FALSE, ch, 0, 0, TO_CHAR);
       return;
     }
-    handle_corpse = 1;
+    handle_corpse = TRUE;
     msg = 12;
     mob_num = MOB_ZOMBIE;
-    a = number(0, 5);
-    if (a)
-      mob_num++;
-    pfail = 8;
+    /*
+     * if ((a = number(0, 5))) -- Removed because we only have one zombie.
+     *   mob_num++;
+     */
+    pfail = 8; /* This is hardcoded at 8%? */
     break;

   default:
@@ -894,7 +898,10 @@ void mag_summons(int level, struct char_
     return;
   }
   for (i = 0; i < num; i++) {
-    mob = read_mobile(mob_num, VIRTUAL);
+    if (!(mob = read_mobile(mob_num, VIRTUAL))) {
+      send_to_char("You don't quite remember how to make that creature.\r\n", ch);
+      return;
+    }
     char_to_room(mob, ch->in_room);
     IS_CARRYING_W(mob) = 0;
     IS_CARRYING_N(mob) = 0;
diff -upPr -x *.o ../stk/spell_parser.c ./spell_parser.c
--- ../stk/spell_parser.c       Sat Apr 13 20:11:36 1996
+++ ./spell_parser.c    Tue Oct 14 19:00:09 1997
@@ -862,6 +862,9 @@ void mag_assign_spells(void)
     unused_spell(i);
   /* Do not change the loop above */

+  spello(SPELL_ANIMATE_DEAD, 35, 10, 3, POS_STANDING,
+       TAR_OBJ_ROOM, FALSE, MAG_SUMMONS);
+
   spello(SPELL_ARMOR, 30, 15, 3, POS_FIGHTING,
        TAR_CHAR_ROOM, FALSE, MAG_AFFECTS);

--
George Greer  -  Me@Null.net   | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | 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/08/00 PST