From: Pasi Kallinen Date: Mon, 18 Jul 2022 14:00:20 +0000 (+0300) Subject: Allow entering a known pit without taking damage X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=88ec641770511fbf95e33f55f4a8b255e4af0d00;p=nethack Allow entering a known pit without taking damage --- diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 4286fb536..cbdcfd0d4 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -968,6 +968,7 @@ if blind hero was challanged by a vault guard, it wasn't possible to see how make taming via magic harp be consistent with scroll of taming and charm spell: an angry shopkeeper becomes pacified (but never tamed) wielding a bec de corbin makes ravens generate peaceful +moving with 'm' prefix allows hero to enter a known pit carefully Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/trap.c b/src/trap.c index 39b7e7269..9c7c12b4e 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1557,6 +1557,7 @@ trapeffect_pit( boolean conj_pit = conjoined_pits(trap, t_at(u.ux0, u.uy0), TRUE); boolean adj_pit = adj_nonconjoined_pit(trap); boolean already_known = trap->tseen ? TRUE : FALSE; + boolean deliberate = FALSE; int steed_article = ARTICLE_THE; int oldumort; @@ -1593,6 +1594,9 @@ trapeffect_pit( Sprintf(verbbuf, "lead %s", x_monnam(u.usteed, steed_article, "poor", SUPPRESS_SADDLE, FALSE)); + } else if (iflags.menu_requested && already_known) { + You("carefully %s into the pit.", u_locomotion("lower yourself")); + deliberate = TRUE; } else if (conj_pit) { You("move into an adjacent pit."); } else if (adj_pit) { @@ -1640,7 +1644,7 @@ trapeffect_pit( "killed while stuck in creature form" */ plunged ? "deliberately plunged into a pit of iron spikes" - : conj_pit + : (conj_pit || deliberate) ? "stepped into a pit of iron spikes" : adj_pit ? "stumbled into a pit of iron spikes" @@ -1648,7 +1652,7 @@ trapeffect_pit( NO_KILLER_PREFIX); if (!rn2(6)) poisoned("spikes", A_STR, - (conj_pit || adj_pit) + (conj_pit || adj_pit || deliberate) ? "stepping on poison spikes" : "fall onto poison spikes", /* if damage triggered life-saving, @@ -1656,7 +1660,7 @@ trapeffect_pit( (u.umortality > oldumort) ? 0 : 8, FALSE); } else { /* plunging flyers take spike damage but not pit damage */ - if (!conj_pit + if (!conj_pit && !deliberate && !(plunged && (Flying || is_clinger(g.youmonst.data)))) losehp(Maybe_Half_Phys(rnd(adj_pit ? 3 : 6)), plunged ? "deliberately plunged into a pit"