From: nethack.rankin Date: Tue, 28 Mar 2006 04:57:40 +0000 (+0000) Subject: swallowed time (trunk only) X-Git-Tag: MOVE2GIT~1077 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=08e92802018e33ce9235410c0a2c343e0ff801b5;p=nethack swallowed time (trunk only) From a bug report, making engulf time longer for high AC didn't make sense for non-digestion attacks: taking longer to die from being digested (high AC lets you last longer there) is much different from being stuck inside a vortex or elemental and suffering extra buffettings or whatever. Calculate swallow time differently for non-digestion than for digestion. (The adjustment based around level 25 doesn't make much sense either, but I left that in.) If you survive total digestion via life saving, you get a message about the monster not liking your taste. I don't think that's appropriate, but haven't tried to figure out how to fix it. --- diff --git a/doc/fixes35.0 b/doc/fixes35.0 index b66e6ee8e..6e7fc3c86 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -131,6 +131,7 @@ avoid "Something's in the way" message with unidentified wand of locking better handling for Fort Ludios and endgame in wizard mode's `^V ?' menu no free lunch for gelatinous cubes eating scrolls of mail eating gold in front of the vault guard will make the guard angry +calculate engulf time differently for non-digestion attacks than for digestion Platform- and/or Interface-Specific Fixes diff --git a/src/mhitu.c b/src/mhitu.c index 32d4e9d3a..ddd5c1f10 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)mhitu.c 3.5 2006/02/01 */ +/* SCCS Id: @(#)mhitu.c 3.5 2006/03/27 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1662,11 +1662,22 @@ gulpmu(mtmp, mattk) /* monster swallows you, or damage if u.uswallow */ display_nhwindow(WIN_MESSAGE, FALSE); vision_recalc(2); /* hero can't see anything */ u.uswallow = 1; + /* for digestion, shorter time is more dangerous; + 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); + } else { + /* higher level attacker takes longer to eject hero */ + tim_tmp = rnd((int)mtmp->m_lev + 10 / 2); + } /* u.uswldtim always set > 1 */ - 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); - tim_tmp += -u.uac + 10; u.uswldtim = (unsigned)((tim_tmp < 2) ? 2 : tim_tmp); swallowed(1); for (otmp2 = invent; otmp2; otmp2 = otmp2->nobj)