stone-to-flesh vs golem statues and figurines (trunk only)
Back in <email deleted> in #U1216
suggested that statues of stone golems which are hit by stone-to-flesh
spell should leave flesh golem corpses instead of meatballs. But they
should actually have revived as flesh golems. Stone-to-flesh revival of
golem statues and golem figurines didn't work as intended because golems
other than flesh or leather were considered to be vegan/vegatarian, which
caused them to produce meat rather than living monsters. Also, S-to-F of
a leather golem statue worked as intended and created a flesh golem, but
S-to-F of a leather golem firugine created a leather golem out of stone
object. This fixes it so that any type of golem statue or golem figurine
revives as a flesh golem.
Two other bugs noticed and fixed: (1) S-to-F cast on self while a
figurine of a non-veggy monster was "worn" in one of the three weapon
slots triggered an "extract_nobj: object lost" panic similar to several
similar cases which were recently fixed (that was 3.4.3; for development
code, it gave "obfree: deleting worn obj" warning instead). (2) S-to-F
activating a shop-owned figurine didn't charge for it.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)trap.c 3.5 2007/02/10 */
|
||||
/* SCCS Id: @(#)trap.c 3.5 2007/03/30 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -458,7 +458,7 @@ int *fail_reason;
|
||||
coord cc;
|
||||
boolean historic = (Role_if(PM_ARCHEOLOGIST) &&
|
||||
(statue->spe & STATUE_HISTORIC) != 0),
|
||||
use_saved_traits;
|
||||
golem_xform = FALSE, use_saved_traits;
|
||||
const char *comes_to_life;
|
||||
char statuename[BUFSZ], tmpbuf[BUFSZ];
|
||||
static const char historic_statue_is_gone[] =
|
||||
@@ -470,9 +470,10 @@ int *fail_reason;
|
||||
use_saved_traits = FALSE;
|
||||
} else if (is_golem(mptr) && cause == ANIMATE_SPELL) {
|
||||
/* statue of any golem hit by stone-to-flesh becomes flesh golem */
|
||||
golem_xform = (mptr != &mons[PM_FLESH_GOLEM]);
|
||||
mnum = PM_FLESH_GOLEM;
|
||||
mptr = &mons[PM_FLESH_GOLEM];
|
||||
use_saved_traits = FALSE;
|
||||
use_saved_traits = (has_omonst(statue) && !golem_xform);
|
||||
} else {
|
||||
use_saved_traits = has_omonst(statue);
|
||||
}
|
||||
@@ -530,6 +531,7 @@ int *fail_reason;
|
||||
}
|
||||
|
||||
comes_to_life = !canspotmon(mon) ? "disappears" :
|
||||
golem_xform ? "turns into flesh" :
|
||||
(nonliving(mon->data) || is_vampshifter(mon)) ?
|
||||
"moves" : "comes to life";
|
||||
if ((x == u.ux && y == u.uy) || cause == ANIMATE_SPELL) {
|
||||
|
||||
Reference in New Issue
Block a user