From: nethack.allison Date: Sat, 19 Jul 2003 12:39:55 +0000 (+0000) Subject: multiple statues and stone-to-flesh X-Git-Tag: MOVE2GIT~1892 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=43d7d6f27d03b91c454326b108536b6f222dc1a3;p=nethack multiple statues and stone-to-flesh stone-to-flesh of spot with multiple statues can animate more than one by using adjacent locations --- diff --git a/doc/fixes34.2 b/doc/fixes34.2 index 86b17bd8d..36e200d2e 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -108,6 +108,7 @@ ensure mksobj() always attaches timer to corpse, even if called with init FALSE only charge for eating one stacked tin, not all at once add flag to makemon() to allow monster to be created adjacent to the supplied coordinates if there is already a monster at the target location +stone-to-flesh of spot with multiple statues can animate more than one Platform- and/or Interface-Specific Fixes diff --git a/src/trap.c b/src/trap.c index 4129cef57..987f99897 100644 --- a/src/trap.c +++ b/src/trap.c @@ -412,6 +412,9 @@ int *fail_reason; struct obj *item; coord cc; boolean historic = (Role_if(PM_ARCHEOLOGIST) && !flags.mon_moving && (statue->spe & STATUE_HISTORIC)); + char statuename[BUFSZ]; + + Strcpy(statuename,the(xname(statue))); if (statue->oxlth && statue->oattached == OATTACHED_MONST) { cc.x = x, cc.y = y; @@ -434,7 +437,8 @@ int *fail_reason; if (fail_reason) *fail_reason = AS_MON_IS_UNIQUE; return (struct monst *)0; } - mon = makemon(mptr, x, y, NO_MINVENT); + mon = makemon(mptr, x, y, (cause == ANIMATE_SPELL) ? + (NO_MINVENT | MM_ADJACENTOK) : NO_MINVENT); } if (!mon) { @@ -463,12 +467,16 @@ int *fail_reason; if ((x == u.ux && y == u.uy) || cause == ANIMATE_SPELL) { const char *comes_to_life = nonliving(mon->data) ? "moves" : "comes to life"; - pline_The("statue %s!", - canspotmon(mon) ? comes_to_life : "disappears"); - if (historic) { + if (cause == ANIMATE_SPELL) + pline("%s %s!", upstart(statuename), + canspotmon(mon) ? comes_to_life : "disappears"); + else + pline_The("statue %s!", + canspotmon(mon) ? comes_to_life : "disappears"); + if (historic) { You_feel("guilty that the historic statue is now gone."); adjalign(-1); - } + } } else if (cause == ANIMATE_SHATTER) pline("Instead of shattering, the statue suddenly %s!", canspotmon(mon) ? "comes to life" : "disappears");