]> granicus.if.org Git - nethack/commitdiff
U393 - jousting puddings into a polymorph trap caused 2 identical new monsters
authorcohrs <cohrs>
Sun, 8 Jun 2003 19:36:45 +0000 (19:36 +0000)
committercohrs <cohrs>
Sun, 8 Jun 2003 19:36:45 +0000 (19:36 +0000)
Because hmon_hitmon caches the monster data type, it needs to update this
whenever the monster might polymorph.  It already did this for potions, but
not for jousting.  There are other more complex ways this could be addressed.

doc/fixes34.2
src/uhitm.c

index 89e3c53136a77c12dd6771bc3a9a84bc720bdb41..7738c4e4a855583d8578942dcedcd70850cf199b 100644 (file)
@@ -91,6 +91,8 @@ hostile monsters who follow you between levels won't do so if they're fleeing
 options for font_size for map, menu, message, status, and text all had the 
        same description of "the size of the map font" in options.c
 when dismounting by choice and unimpaired, try not to land in a known trap
+when jousting a pudding into a polymorh trap, it was possible to end up
+       with two of the new type of monster
 
 
 Platform- and/or Interface-Specific Fixes
index 7027ab05b4adae73cc62cb5d49f9b1e8563e73b0..45517c483b99af55f8ba1f56e0b1ad6b2687609f 100644 (file)
@@ -970,6 +970,7 @@ int thrown;
            /* avoid migrating a dead monster */
            if (mon->mhp > tmp) {
                mhurtle(mon, u.dx, u.dy, 1);
+               mdat = mon->data; /* in case of a polymorph trap */
                if (DEADMONSTER(mon)) already_killed = TRUE;
            }
            hittxt = TRUE;
@@ -986,6 +987,7 @@ int thrown;
                /* avoid migrating a dead monster */
                if (mon->mhp > tmp) {
                    mhurtle(mon, u.dx, u.dy, 1);
+                   mdat = mon->data; /* in case of a polymorph trap */
                    if (DEADMONSTER(mon)) already_killed = TRUE;
                }
                hittxt = TRUE;