Change the rules for Elbereth erosion
If you attack a monster under Elbereth protection, and it wasn't scuffed by the attack itself, then it'll be automatically removed with an alignment penalty. It no longer fades from scaring monsters; only from being abused to attack monsters while protected.
This commit is contained in:
16
src/mon.c
16
src/mon.c
@@ -2593,7 +2593,21 @@ setmangry(mtmp, via_attack)
|
|||||||
struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
boolean via_attack;
|
boolean via_attack;
|
||||||
{
|
{
|
||||||
(void) via_attack; /* AIS: not used yet */
|
if (via_attack && sengr_at("Elbereth", u.ux, u.uy, TRUE)) {
|
||||||
|
You_feel("like a hypocrite.");
|
||||||
|
/* AIS: Yes, I know alignment penalties and bonuses aren't balanced at
|
||||||
|
the moment. This is about correct relative to other "small"
|
||||||
|
penalties; it should be fairly large, as attacking while standing on
|
||||||
|
an Elbereth means that you're requesting peace and then violating
|
||||||
|
your own request. I know 5 isn't actually large, but it's
|
||||||
|
intentionally larger than the 1s and 2s that are normally given for
|
||||||
|
this sort of thing. */
|
||||||
|
adjalign(-5);
|
||||||
|
if (!Blind)
|
||||||
|
pline("The engraving beneath you fades.");
|
||||||
|
del_engr_at(u.ux, u.uy);
|
||||||
|
}
|
||||||
|
|
||||||
/* AIS: Should this be in both places, or just in wakeup()? */
|
/* AIS: Should this be in both places, or just in wakeup()? */
|
||||||
mtmp->mstrategy &= ~STRAT_WAITMASK;
|
mtmp->mstrategy &= ~STRAT_WAITMASK;
|
||||||
if (!mtmp->mpeaceful)
|
if (!mtmp->mpeaceful)
|
||||||
|
|||||||
@@ -320,12 +320,6 @@ int *inrange, *nearby, *scared;
|
|||||||
|| (!mtmp->mpeaceful && in_your_sanctuary(mtmp, 0, 0)))) {
|
|| (!mtmp->mpeaceful && in_your_sanctuary(mtmp, 0, 0)))) {
|
||||||
*scared = 1;
|
*scared = 1;
|
||||||
monflee(mtmp, rnd(rn2(7) ? 10 : 100), TRUE, TRUE);
|
monflee(mtmp, rnd(rn2(7) ? 10 : 100), TRUE, TRUE);
|
||||||
|
|
||||||
/* magical protection won't last forever, so there'll be a
|
|
||||||
* chance of the magic being used up regardless of type */
|
|
||||||
if (sawscary) {
|
|
||||||
wipe_engr_at(seescaryx, seescaryy, 1, TRUE);
|
|
||||||
}
|
|
||||||
} else
|
} else
|
||||||
*scared = 0;
|
*scared = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user