egg hatching message bug

>     From the newsgroup:  an egg carried by the hero hatched and the
> resulting monster was placed in hiding underneath an adjacent object.
> The silly hatching message given was "You see it drop from your pack."
> (Player said he was using 3.4.1, but the relevant code hasn't changed
> since then.)
This commit is contained in:
nethack.allison
2003-11-29 18:48:13 +00:00
parent 5b74be68fe
commit c1c4ba99d9
2 changed files with 32 additions and 8 deletions
+1
View File
@@ -96,6 +96,7 @@ when you're asleep you shouldn't "notice" monsters that have become undetected
must be able to reach floor in order to use stethoscope on corpse or statue must be able to reach floor in order to use stethoscope on corpse or statue
fix a few coordinate (y,y) -> (x,y) typos in apply.c, mon.c, and wizard.c fix a few coordinate (y,y) -> (x,y) typos in apply.c, mon.c, and wizard.c
killing a long worm on a drawbridge could produce a panic killing a long worm on a drawbridge could produce a panic
suppress "it" and adjust message when you see a figurine transform, then hide
Platform- and/or Interface-Specific Fixes Platform- and/or Interface-Specific Fixes
+31 -8
View File
@@ -1705,22 +1705,44 @@ long timeout;
cansee_spot = cansee(cc.x, cc.y); cansee_spot = cansee(cc.x, cc.y);
mtmp = make_familiar(figurine, cc.x, cc.y, TRUE); mtmp = make_familiar(figurine, cc.x, cc.y, TRUE);
if (mtmp) { if (mtmp) {
Sprintf(monnambuf, "%s",a_monnam(mtmp)); char hidebuf[BUFSZ];
struct obj *mshelter;
/*
* We're suppressing "it" here because if
* the monster ends up undetected, the "it"
* makes no sense since monnambuf is only
* used in "You see <mon>" type messages.
*
* It has been suggested that it might be
* better to have the transformed figurine
* monster wait until the next turn before
* hiding, but that is currently not implemented.
*/
Sprintf(monnambuf, "%s",
x_monnam(mtmp, ARTICLE_A, (char *)0,
SUPPRESS_IT, FALSE));
if (mtmp->mundetected) {
if ((mshelter = level.objects[mtmp->mx][mtmp->my]) != 0)
Sprintf(hidebuf, " and %s under %s",
locomotion(mtmp->data, "crawl"), doname(mshelter));
else
Strcpy(hidebuf, " and hide");
} else hidebuf[0] = '\0';
switch (figurine->where) { switch (figurine->where) {
case OBJ_INVENT: case OBJ_INVENT:
if (Blind) if (Blind)
You_feel("%s %s from your pack!", something, You_feel("%s %s from your pack!", something,
locomotion(mtmp->data,"drop")); locomotion(mtmp->data,"drop"));
else else
You("see %s %s out of your pack!", You("see %s %s out of your pack%s!",
monnambuf, monnambuf, locomotion(mtmp->data,"drop"), hidebuf);
locomotion(mtmp->data,"drop"));
break; break;
case OBJ_FLOOR: case OBJ_FLOOR:
if (cansee_spot && !silent) { if (cansee_spot && !silent) {
You("suddenly see a figurine transform into %s!", You("suddenly see a figurine transform into %s%s!",
monnambuf); monnambuf, hidebuf);
redraw = TRUE; /* update figurine's map location */ redraw = TRUE; /* update figurine's map location */
} }
break; break;
@@ -1738,8 +1760,9 @@ long timeout;
Strcpy(carriedby, "empty water"); Strcpy(carriedby, "empty water");
else else
Strcpy(carriedby, "thin air"); Strcpy(carriedby, "thin air");
You("see %s %s out of %s!", monnambuf, You("see %s %s out of %s%s!", monnambuf,
locomotion(mtmp->data, "drop"), carriedby); locomotion(mtmp->data, "drop"), carriedby,
hidebuf);
} }
break; break;
#if 0 #if 0