Skip to content

Commit

Permalink
Wielding banes will only anger monsters in view; shopkeepers will ban…
Browse files Browse the repository at this point in the history
… you.

Before wielding a bane would render all the hated monsters on the level hostile no matter their location.

We also use setmangry, which gives the player an indication something has happened. It will also ding their alignment for angering peacefuls.

Shopkeepers will not become angry, but will ban you for life if your bane matches their race. This is similar to how convicts are banned and uses the same shopkeeper flag. An interesting note is that this fits perfectly with existing store hawker code, so instead of inviting you in, they openly show their contempt for you.
  • Loading branch information
elunna committed Sep 24, 2023
1 parent d6de8c8 commit 30785e4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/allmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,9 @@ boolean resuming;
monsters that they are against hostile should they
be tame or peaceful */
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
if (!(mtmp->mcansee && m_canseeu(mtmp)))
continue;

if ((wielding_artifact(ART_DRAGONBANE)
&& is_dragon(mtmp->data))
|| (wielding_artifact(ART_DEATHSWORD)
Expand Down Expand Up @@ -699,8 +702,16 @@ boolean resuming;
&& is_angel(mtmp->data))
|| (wielding_artifact(ART_VORPAL_BLADE)
&& is_jabberwock(mtmp->data))) {
if (mtmp->mpeaceful || mtmp->mtame)

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)
ESHK(mtmp)->pbanned = TRUE;
else if (mtmp->mpeaceful || mtmp->mtame) {
mtmp->mpeaceful = mtmp->mtame = 0;
setmangry(mtmp, FALSE);
}
}
}
}
Expand Down

0 comments on commit 30785e4

Please sign in to comment.