From b88e0a13ab12ab8c45f3cff6e1f567adf6111ba7 Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Sat, 12 Jul 2003 14:55:44 +0000 Subject: [PATCH] fix B04005 and B04006 [B04003 and B04004 are still marked "Reported"] : > You aren't very skilled at reaching from the saddled blue dragon. > Continue your attempt to set the land mine? [yn] (n) > You begin setting your land mine. > There is the trigger of your mine in a pile of soil below you. > KAABLAMM!!! The air currents set your land mine off! > I somehow suspect that it'd be more than the air currents, if I were > trying to arm a land mine from dragonback while not very good at > controlling it. : > What do you want to use or apply? [cmu or ?*] > You aren't very skilled at reaching from the saddled warhorse. > Continue your attempt to set the land mine? [yn] (n) > You begin setting your land mine. You escape your land mine. > Is "escape" really the right word here? --- include/hack.h | 1 + src/apply.c | 2 +- src/trap.c | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/include/hack.h b/include/hack.h index f5277babd..298f54c05 100644 --- a/include/hack.h +++ b/include/hack.h @@ -179,6 +179,7 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */ /* Flags to control dotrap() in trap.c */ #define NOWEBMSG 0x01 /* suppress stumble into web message */ +#define FORCEBUNGLE 0x02 /* adjustments appropriate for bungling */ /* Flags to control test_move in hack.c */ #define DO_MOVE 0 /* really doing the move */ diff --git a/src/apply.c b/src/apply.c index 2aebb6cbe..56559316a 100644 --- a/src/apply.c +++ b/src/apply.c @@ -2094,7 +2094,7 @@ set_trap() You("finish arming %s.", the(defsyms[trap_to_defsym(what_trap(ttyp))].explanation)); if (((otmp->cursed || Fumbling) && (rnl(10) > 5)) || trapinfo.force_bungle) - dotrap(ttmp, 0); + dotrap(ttmp, trapinfo.force_bungle ? FORCEBUNGLE : 0); } else { /* this shouldn't happen */ Your("trap setting attempt fails."); diff --git a/src/trap.c b/src/trap.c index 379640fb5..be3623120 100644 --- a/src/trap.c +++ b/src/trap.c @@ -526,7 +526,8 @@ unsigned trflags; register struct obj *otmp; boolean already_seen = trap->tseen; boolean webmsgok = (!(trflags & NOWEBMSG)); - + boolean forcebungle = (trflags & FORCEBUNGLE); + nomul(0); /* KMH -- You can't escape the Sokoban level traps */ @@ -552,7 +553,8 @@ unsigned trflags; defsyms[trap_to_defsym(ttype)].explanation); return; } - if(!Fumbling && ttype != MAGIC_PORTAL && ttype != ANTI_MAGIC && + if(!Fumbling && ttype != MAGIC_PORTAL && + ttype != ANTI_MAGIC && !forcebungle && (!rn2(5) || ((ttype == PIT || ttype == SPIKED_PIT) && is_clinger(youmonst.data)))) { You("escape %s %s.", @@ -1043,7 +1045,9 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); trap->madeby_u ? "the trigger of your mine" : "a trigger"); if (already_seen && rn2(3)) break; - pline("KAABLAMM!!! The air currents set %s%s off!", + pline("KAABLAMM!!! %s %s%s off!", + forcebungle ? "Your inept attempt sets" : + "The air currents set", already_seen ? a_your[trap->madeby_u] : "", already_seen ? " land mine" : "it"); } else { -- 2.40.0