Skip to content

Commit 077ed1c

Browse files
k21971entrez
andcommitted
Tweak feedback if killing yourself from a cursed weapon.
Him/herself instead of 'themselves'. Co-authored-by: entrez <[email protected]>
1 parent 461f453 commit 077ed1c

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

doc/evilhack-changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2683,4 +2683,5 @@ The following changes to date are:
26832683
- Latest merges from 'vanilla' NetHack 3.6.6 official release (as of January 23rd, 2022)
26842684
- Initial preparation for new version (0.8.2)
26852685
- Prevent bypassing demon boss lairs via level teleport
2686+
- Tweak feedback if killing yourself from a cursed weapon
26862687

src/dothrow.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,7 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
12681268
slipok = FALSE;
12691269
}
12701270
if (slipok) {
1271+
char tmpbuf[BUFSZ];
12711272
int dmg = dmgval(obj, &youmonst);
12721273

12731274
u.dx = rn2(3) - 1;
@@ -1296,7 +1297,9 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
12961297
searmsg(&youmonst, &youmonst, obj, FALSE);
12971298
exercise(A_CON, FALSE);
12981299
}
1299-
losehp(dmg, "hitting themselves with a cursed projectile", KILLED_BY);
1300+
Sprintf(tmpbuf, "hitting %sself with a cursed projectile",
1301+
uhim());
1302+
losehp(dmg, tmpbuf, KILLED_BY);
13001303
}
13011304
impaired = TRUE;
13021305
}

src/uhitm.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,8 @@ struct attack *uattk;
753753
if (!rn2(5)) {
754754
You("swing wildly and miss!");
755755
} else {
756+
char tmpbuf[BUFSZ];
757+
756758
Your("cursed %s turns against you!", simpleonames(uwep));
757759
You("hit yourself in the %s!", body_part(FACE));
758760
if (uwep->oartifact
@@ -770,7 +772,8 @@ struct attack *uattk;
770772
searmsg(&youmonst, &youmonst, uwep, FALSE);
771773
exercise(A_CON, FALSE);
772774
}
773-
losehp(dmg_wep, "hitting themselves in the face", KILLED_BY);
775+
Sprintf(tmpbuf, "hitting %sself in the face", uhim());
776+
losehp(dmg_wep, tmpbuf, KILLED_BY);
774777
}
775778
return 0;
776779
}

0 commit comments

Comments
 (0)