fix #H4459 - shopkeeper/scare monster bug
Reported about 18 months ago: standing on a scroll of scare monster while next to a shopkeeper who was blocking the shop entrance because hero was carrying unpaid shop goods would yield "<shk> turns to flee" but <shk> wouldn't move. This was a side-effect of making standing on scrolls of scare monster be stronger than on "Elbereth" when the latter was nerfed. Make shopkeepers inside their own shops and temple priests inside their own temples be immune to the effect of hero standing on scare monster. Also, make the Wizard, lawful minions, Angels of any alignment, the Riders, and shopkeepers and priests in their own special rooms (ie, all creatures that now ignore standing on scare monster) be immune to the fright effect of tooled horns. Innate magic resistance usually prevented them from being scared anyway, but make it explicit. Reading a scroll of scare monster or casting the spell of cause fear still rely on innate resistance to avoid chasing away those monsters. I'm not sure whether they should have the same adjustment.
This commit is contained in:
@@ -503,6 +503,10 @@ a shop object stolen from outside the shop (via grappling hook) would be left
|
||||
"unpaid_cost: object wasn't on any bill" when looking at inventory
|
||||
a shop object stolen from outside the shop could trigger a crash if that shop
|
||||
had never been entered by the hero
|
||||
shopkeepers in their own shop and priests in their own temple are no longer
|
||||
frightened by hero standing on scroll of scare monster
|
||||
the Wizard, Angels and lawful minions, the Riders, shopkeep/priest in own room
|
||||
are never frightened by tooled horns
|
||||
|
||||
|
||||
Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 monmove.c $NHDT-Date: 1512808567 2017/12/09 08:36:07 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.95 $ */
|
||||
/* NetHack 3.6 monmove.c $NHDT-Date: 1517877380 2018/02/06 00:36:20 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.96 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -135,11 +135,19 @@ int x, y;
|
||||
struct monst *mtmp;
|
||||
{
|
||||
/* creatures who are directly resistant to magical scaring:
|
||||
* Rodney, lawful minions, angels, the Riders */
|
||||
* Rodney, lawful minions, Angels, the Riders, shopkeepers
|
||||
* inside their own shop, priests inside their own temple */
|
||||
if (mtmp->iswiz || is_lminion(mtmp) || mtmp->data == &mons[PM_ANGEL]
|
||||
|| is_rider(mtmp->data))
|
||||
|| is_rider(mtmp->data)
|
||||
|| (mtmp->isshk && inhishop(mtmp))
|
||||
|| (mtmp->ispriest && inhistemple(mtmp)))
|
||||
return FALSE;
|
||||
|
||||
/* <0,0> is used by musical scaring to check for the above;
|
||||
* it doesn't care about scrolls or engravings or dungeon branch */
|
||||
if (x == 0 && y == 0)
|
||||
return TRUE;
|
||||
|
||||
/* should this still be true for defiled/molochian altars? */
|
||||
if (IS_ALTAR(levl[x][y].typ)
|
||||
&& (mtmp->data->mlet == S_VAMPIRE || is_vampshifter(mtmp)))
|
||||
@@ -152,8 +160,9 @@ struct monst *mtmp;
|
||||
|
||||
/*
|
||||
* Creatures who don't (or can't) fear a written Elbereth:
|
||||
* all the above plus shopkeepers, guards, blind or
|
||||
* peaceful monsters, humans, and minotaurs.
|
||||
* all the above plus shopkeepers (even if poly'd into non-human),
|
||||
* vault guards (also even if poly'd), blind or peaceful monsters,
|
||||
* humans and elves, and minotaurs.
|
||||
*
|
||||
* If the player isn't actually on the square OR the player's image
|
||||
* isn't displaced to the square, no protection is being granted.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 music.c $NHDT-Date: 1514504228 2017/12/28 23:37:08 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.46 $ */
|
||||
/* NetHack 3.6 music.c $NHDT-Date: 1517877381 2018/02/06 00:36:21 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.47 $ */
|
||||
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -76,7 +76,9 @@ int distance;
|
||||
&& (mtmp->mstrategy & STRAT_WAITMASK) != 0)
|
||||
mtmp->mstrategy &= ~STRAT_WAITMASK;
|
||||
else if (distm < distance / 3
|
||||
&& !resist(mtmp, TOOL_CLASS, 0, NOTELL))
|
||||
&& !resist(mtmp, TOOL_CLASS, 0, NOTELL)
|
||||
/* some monsters are immune */
|
||||
&& onscary(0, 0, mtmp))
|
||||
monflee(mtmp, 0, FALSE, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user