fix #K3455 - rocks vs xorns
Implement the suggestion that falling rock traps and rolling boulder traps be harmless to xorns. I've extended that to all missiles made of stone (rocks, gems, boulders, a handful of other things that will only matter if poly'd hero throws in '<' direction or is hit by stuff scattered by an explosion). I excluded ghosts because they would become even harder to kill and the missile handling would need extra checks to test for blessed objs.
This commit is contained in:
13
src/zap.c
13
src/zap.c
@@ -3309,11 +3309,16 @@ exclam(int force)
|
||||
}
|
||||
|
||||
void
|
||||
hit(const char *str, struct monst *mtmp,
|
||||
const char *force) /* usually either "." or "!" */
|
||||
hit(const char *str, /* zap text or missile name */
|
||||
struct monst *mtmp, /* target; for missile, might be hero */
|
||||
const char *force) /* usually either "." or "!" via exclam() */
|
||||
{
|
||||
if ((!cansee(g.bhitpos.x, g.bhitpos.y) && !canspotmon(mtmp)
|
||||
&& !engulfing_u(mtmp)) || !flags.verbose)
|
||||
boolean verbosely = (mtmp == &g.youmonst
|
||||
|| (flags.verbose
|
||||
&& (cansee(g.bhitpos.x, g.bhitpos.y)
|
||||
|| canspotmon(mtmp) || engulfing_u(mtmp))));
|
||||
|
||||
if (!verbosely)
|
||||
pline("%s %s it.", The(str), vtense(str, "hit"));
|
||||
else
|
||||
pline("%s %s %s%s", The(str), vtense(str, "hit"),
|
||||
|
||||
Reference in New Issue
Block a user