]> granicus.if.org Git - nethack/commitdiff
multiple statues and stone-to-flesh
authornethack.allison <nethack.allison>
Sat, 19 Jul 2003 12:39:55 +0000 (12:39 +0000)
committernethack.allison <nethack.allison>
Sat, 19 Jul 2003 12:39:55 +0000 (12:39 +0000)
stone-to-flesh of spot with multiple statues can animate more than one
by using adjacent locations

doc/fixes34.2
src/trap.c

index 86b17bd8d7bf7146b9235619ce95ee8aab8ffcc4..36e200d2e92b9fcd2c2817b7a289c36399bb6887 100644 (file)
@@ -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
index 4129cef578d47213489f33d54f7352554c981c0b..987f99897086ba37d6d9e734361bca62e427a57c 100644 (file)
@@ -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");