From: cohrs Date: Sun, 8 Jun 2003 19:36:45 +0000 (+0000) Subject: U393 - jousting puddings into a polymorph trap caused 2 identical new monsters X-Git-Tag: MOVE2GIT~1930 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=42d336aa94102c845a59824f4846174b7b1460a3;p=nethack U393 - jousting puddings into a polymorph trap caused 2 identical new monsters 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. --- diff --git a/doc/fixes34.2 b/doc/fixes34.2 index 89e3c5313..7738c4e4a 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -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 diff --git a/src/uhitm.c b/src/uhitm.c index 7027ab05b..45517c483 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -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;