Skip to content

Commit

Permalink
Tweaks to monster behavior when wielding/wearing a bane artifact.
Browse files Browse the repository at this point in the history
From EvilHack commit f9a7db8a185463d8323455ae7bcb873845bf19a7.

This builds on previous commit 30785e4. In that commit I neglected to give credit to K2 for idea for shopkeepers banning the player. Credit also to hothraxxa for reporting the behavior of banes alerting all monsters on the level regardless of sight to me in the first place.
  • Loading branch information
elunna committed Sep 26, 2023
1 parent c0f79f2 commit fd889b2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion src/allmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,8 +666,14 @@ boolean resuming;
monsters that they are against hostile should they
be tame or peaceful */
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
boolean is_shkp = has_eshk(mtmp) && inhishop(mtmp);
boolean is_prst = has_epri(mtmp) && inhistemple(mtmp);

if (!(mtmp->mcansee && m_canseeu(mtmp)))
continue;
/* coaligned temple priests will stay civil */
if (is_prst && p_coaligned(mtmp))
continue;

if ((wielding_artifact(ART_DRAGONBANE)
&& is_dragon(mtmp->data))
Expand Down Expand Up @@ -703,7 +709,6 @@ boolean resuming;
|| (wielding_artifact(ART_VORPAL_BLADE)
&& is_jabberwock(mtmp->data))) {

boolean is_shkp = has_eshk(mtmp) && inhishop(mtmp);
/* Shopkeepers will get angry but just ban you, to
* avoid cheap early Sting deaths */
if (is_shkp)
Expand Down
6 changes: 3 additions & 3 deletions src/priest.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,10 +615,10 @@ register struct monst *priest;
boolean strayed = (u.ualign.record < 0);

/* KMH, conduct */
if(!u.uconduct.gnostic++)
if (!u.uconduct.gnostic++)
livelog_printf(LL_CONDUCT,
"rejected atheism by consulting with %s",
mon_nam(priest));
"rejected atheism by consulting with %s",
mon_nam(priest));

if (priest->mflee || (!priest->ispriest && coaligned && strayed)) {
pline("%s doesn't want anything to do with you!", Monnam(priest));
Expand Down

0 comments on commit fd889b2

Please sign in to comment.