Skip to content

Commit

Permalink
Change poison instakill to damage with attrib and maxhp loss
Browse files Browse the repository at this point in the history
  • Loading branch information
paxed committed Aug 15, 2022
1 parent 7d27dca commit d0b11fd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions doc/fixes3-7-0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,7 @@ blind hero was notified when brass lantern burned out even though it isn't
warm enough to detect that by touch; manually switching the lantern
on or off can be determined that way so still gives on/off message
turn on statushilites automatically if any are defined
change poison instakill to damage with attribute and max hp loss


Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
Expand Down
19 changes: 15 additions & 4 deletions src/attrib.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,21 @@ poisoned(const char *reason, /* controls what messages we display */

i = !fatal ? 1 : rn2(fatal + (thrown_weapon ? 20 : 0));
if (i == 0 && typ != A_CHA) {
/* instant kill */
u.uhp = -1;
g.context.botl = TRUE;
pline_The("poison was deadly...");
/* sometimes survivable instant kill */
loss = 6 + d(4, 6);
if (u.uhp <= loss) {
u.uhp = -1;
g.context.botl = TRUE;
pline_The("poison was deadly...");
} else {
/* survived, but with severe reaction */
u.uhpmax = max(3, u.uhpmax - (loss / 2));
losehp(loss, pkiller, kprefix); /* poison damage */
if (adjattrib(A_CON, (typ != A_CON) ? -1 : -3, TRUE))
poisontell(A_CON, TRUE);
if (typ != A_CON && adjattrib(typ, -3, 1))
poisontell(typ, TRUE);
}
} else if (i > 5) {
boolean cloud = !strcmp(reason, "gas cloud");

Expand Down

0 comments on commit d0b11fd

Please sign in to comment.