]> granicus.if.org Git - nethack/commitdiff
fix B04004 "lead steed" into pit after landmine
authornethack.allison <nethack.allison>
Sat, 12 Jul 2003 16:59:32 +0000 (16:59 +0000)
committernethack.allison <nethack.allison>
Sat, 12 Jul 2003 16:59:32 +0000 (16:59 +0000)
<Someone> wrote:
KAABLAMM!!!  You triggered [your|a] land mine!
You lead the poor warhorse into a pit!
Is "lead" really the right word here?

include/hack.h
src/trap.c

index 298f54c0548e3fd92d3070e8486bb8b5c48026c9..ea54f9f87be6b2fede01cd1b31752416eda14b5c 100644 (file)
@@ -180,6 +180,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 */
+#define RECURSIVETRAP  0x04    /* trap changed into another type this same turn */
 
 /* Flags to control test_move in hack.c */
 #define DO_MOVE                0       /* really doing the move */
index be36231207a04b591f5145fff255026def18374a..383533de139eac41facdc39bd0a48f15b650c2a3 100644 (file)
@@ -812,12 +812,18 @@ glovecheck:               (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
                if (!In_sokoban(&u.uz)) {
                    char verbbuf[BUFSZ];
 #ifdef STEED
-                   if (u.usteed)
-                       Sprintf(verbbuf,"lead %s",
+                   if (u.usteed) {
+                       if ((trflags & RECURSIVETRAP) != 0)
+                           Sprintf(verbbuf, "and %s fall",
+                               x_monnam(u.usteed,
+                                   u.usteed->mnamelth ? ARTICLE_NONE : ARTICLE_THE,
+                                   (char *)0, SUPPRESS_SADDLE, FALSE));
+                       else
+                           Sprintf(verbbuf,"lead %s",
                                x_monnam(u.usteed,
                                         u.usteed->mnamelth ? ARTICLE_NONE : ARTICLE_THE,
                                         "poor", SUPPRESS_SADDLE, FALSE));
-                   else
+                   else
 #endif
                    Strcpy(verbbuf,"fall");
                    You("%s into %s pit!", verbbuf, a_your[trap->madeby_u]);
@@ -1076,7 +1082,7 @@ glovecheck:               (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
                newsym(u.ux,u.uy);              /* update trap symbol */
                losehp(rnd(16), "land mine", KILLED_BY_AN);
                /* fall recursively into the pit... */
-               if ((trap = t_at(u.ux, u.uy)) != 0) dotrap(trap, 0);
+               if ((trap = t_at(u.ux, u.uy)) != 0) dotrap(trap, RECURSIVETRAP);
                fill_pit(u.ux, u.uy);
                break;