Skip to content

Commit 5bf831c

Browse files
committed
Fix: Harbinger was not protecting worn armor from acid damage.
Just like Dichotomy needed a special case in burnarmor(), Harbinger needed the same treatment in erode_armor().
1 parent ceeb98b commit 5bf831c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

doc/evilhack-changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -4002,4 +4002,5 @@ The following changes to date are:
40024002
- Some more Caveperson role improvements
40034003
- Adjust the artifact Keolewa shock damage so it's better than a club
40044004
with the lightning object property
4005+
- Fix: Harbinger was not protecting worn armor from acid damage
40054006

src/uhitm.c

+12
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@ struct monst *mdef;
4040
int hurt;
4141
{
4242
struct obj *target;
43+
boolean youdefend;
44+
45+
if (!mdef)
46+
return;
47+
48+
youdefend = (mdef == &youmonst);
49+
50+
/* wielding Harbinger protects worn armor */
51+
if (youdefend ? wielding_artifact(ART_HARBINGER)
52+
: (MON_WEP(mdef)
53+
&& MON_WEP(mdef)->oartifact == ART_HARBINGER))
54+
return;
4355

4456
/* What the following code does: it keeps looping until it
4557
* finds a target for the rust monster.

0 commit comments

Comments
 (0)