poly'd hero who exploded when attacking a monster didn't wake up other
monsters in the vicinity; when attacking thin air, hero's explosion
woke other monsters within different radius than same monster's would
+troll corpse revival was inhibited by hero wielding Trollsbane; do that if
+ anyone on level is wielding it
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
extern void mkot_trap_warn(void);
extern boolean is_magic_key(struct monst *, struct obj *);
extern struct obj *has_magic_key(struct monst *);
+extern boolean Trollsbane_wielded(void);
/* ### attrib.c ### */
return (struct obj *) 0;
}
+/* True if anyone on the level is wielding Trollsbane, False otherwise;
+ used to prevent troll resurrection (FIXME: really ought to be inhibited
+ when killed by Trollsbane rather than whether anyone wields that) */
+boolean
+Trollsbane_wielded(void)
+{
+ struct monst *mtmp;
+ struct obj *mw_tmp;
+
+ if (uwep && uwep->oartifact == ART_TROLLSBANE)
+ return TRUE;
+ for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
+ if (DEADMONSTER(mtmp))
+ continue;
+ if ((mw_tmp = MON_WEP(mtmp)) != 0
+ && mw_tmp->oartifact == ART_TROLLSBANE)
+ return TRUE;
+ }
+ return FALSE;
+}
+
/*artifact.c*/
}
if ((mons[montype].mlet == S_EEL && !IS_POOL(levl[x][y].typ))
- || (mons[montype].mlet == S_TROLL
- && uwep && uwep->oartifact == ART_TROLLSBANE)) {
+ || (mons[montype].mlet == S_TROLL && Trollsbane_wielded())) {
if (by_hero && cansee(x, y))
pline("%s twitches feebly.",
upstart(corpse_xname(corpse, (const char *) 0, CXN_PFX_THE)));