]> granicus.if.org Git - nethack/commitdiff
fix B04005 and B04006
authornethack.allison <nethack.allison>
Sat, 12 Jul 2003 14:55:44 +0000 (14:55 +0000)
committernethack.allison <nethack.allison>
Sat, 12 Jul 2003 14:55:44 +0000 (14:55 +0000)
[B04003 and B04004 are still marked "Reported"]

<Someone>:
> 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.

<Someone>:
> 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
src/apply.c
src/trap.c

index f5277babd062d39ef728dabe88879c2a7acfeb9d..298f54c0548e3fd92d3070e8486bb8b5c48026c9 100644 (file)
@@ -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 */
index 2aebb6cbed0a63ccc973d32f4bec45926d56c187..56559316a1b26efd7abcf9846779b84e2858b225 100644 (file)
@@ -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.");
index 379640fb5d7750fd0add8e631d8a7676f3fe920c..be36231207a04b591f5145fff255026def18374a 100644 (file)
@@ -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 {