Change poison instakill to damage with attrib and maxhp loss

This commit is contained in:
Pasi Kallinen
2022-08-15 10:51:17 +03:00
parent 7d27dca47f
commit d0b11fd2c0
2 changed files with 16 additions and 4 deletions
+1
View File
@@ -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 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 on or off can be determined that way so still gives on/off message
turn on statushilites automatically if any are defined 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 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
+15 -4
View File
@@ -314,10 +314,21 @@ poisoned(const char *reason, /* controls what messages we display */
i = !fatal ? 1 : rn2(fatal + (thrown_weapon ? 20 : 0)); i = !fatal ? 1 : rn2(fatal + (thrown_weapon ? 20 : 0));
if (i == 0 && typ != A_CHA) { if (i == 0 && typ != A_CHA) {
/* instant kill */ /* sometimes survivable instant kill */
u.uhp = -1; loss = 6 + d(4, 6);
g.context.botl = TRUE; if (u.uhp <= loss) {
pline_The("poison was deadly..."); 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) { } else if (i > 5) {
boolean cloud = !strcmp(reason, "gas cloud"); boolean cloud = !strcmp(reason, "gas cloud");