From b4a3ec49e41c1def16cb4d9bc53f55e6e37bf61f Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Thu, 15 Jan 2026 00:40:42 +0000 Subject: [PATCH] Make the "totally digested" instadeath timer much faster This is one of the fairest instadeaths in the game (it gives multiple warnings and there are reliable ways to escape it), but is also where most of the threat of purple worms comes from. It was also pretty much nonfunctional: the previously used formula set the timer to somewhere around 50 turns (for a typical character in Gehennom, which is where purple worms are normally encountered). This new formula (which affects only purple worms, as the only monster that engulfs and digests) is based on the same inputs, but produces much smaller numbers, meaning that the instadeath is relevant sometimes. A typical character at purple worm depth will be able to kill faster than the timer if they focus on the purple worm and put some damage on it before they get engulfed, but it is much closer if the purple worm gets the first hit in (possibly requiring the use of escape items, but the common wand of digging works). Hopefully this brings purple worms closer to their intended threat level: previously they were somewhat more nonthreatening than they should have been. --- doc/fixes3-7-0.txt | 1 + src/mhitu.c | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 17667be2f..2f25851a3 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1572,6 +1572,7 @@ fix bug which caused engulf damage from air elementals and fog clouds to ignore damage reduction from armor class elementals do double damage on their home plane water elementals move slightly more slowly +the "totally digested" instadeath timer is much faster Fixes to 3.7.0-x General Problems Exposed Via git Repository diff --git a/src/mhitu.c b/src/mhitu.c index 160864c23..79b12a737 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -1374,15 +1374,14 @@ gulpmu(struct monst *mtmp, struct attack *mattk) for other swallowings, longer time means more chances for the swallower to attack */ if (mattk->adtyp == AD_DGST) { - tim_tmp = 25 - (int) mtmp->m_lev; - if (tim_tmp > 0) - tim_tmp = rnd(tim_tmp) / 2; - else if (tim_tmp < 0) - tim_tmp = -(rnd(-tim_tmp) / 2); /* having good armor & high constitution makes it take longer for you to be digested, but you'll end up trapped inside for longer too */ - tim_tmp += -u.uac + 10 + (ACURR(A_CON) / 3 - 1); + tim_tmp = (int)ACURR(A_CON) + 10 - (int)u.uac + rn2(20); + if (tim_tmp < 0) + tim_tmp = 0; + tim_tmp /= (int) mtmp->m_lev; + tim_tmp += 3; } else { /* higher level attacker takes longer to eject hero */ tim_tmp = rnd((int) mtmp->m_lev + 10 / 2);