]> granicus.if.org Git - nethack/commitdiff
article fix for polymorphing steed
authornhmall <nhmall@nethack.org>
Fri, 6 Dec 2019 22:50:59 +0000 (17:50 -0500)
committernhmall <nhmall@nethack.org>
Fri, 6 Dec 2019 22:50:59 +0000 (17:50 -0500)
doc/fixes36.4
src/trap.c

index 376382a9733f53a3376c974c93ecd398dfc2f50f..e841af4f6ec6a0626b3ebdf9e78be3a7210b4e57 100644 (file)
@@ -9,6 +9,7 @@ General Fixes and Modified Features
 GDBPATH and GREPPATH from sysconf or -D... on compilation command line were
        being processed even if PANICTRACE was disabled but only being freed
        at end of game when that was enabled
+fix the article used in the message when your steed encounters a polymorph trap
 
 
 Fixes to Post-3.6.3 Problems that Were Exposed Via git Repository
index fe63d2b664b493ba5cfd134eba8862561dc72eeb..d1014fafc460935a2548304852b95ef9b3cd2e64 100644 (file)
@@ -1627,13 +1627,20 @@ struct obj *otmp;
         break;
     case POLY_TRAP:
         if (!resists_magm(steed) && !resist(steed, WAND_CLASS, 0, NOTELL)) {
+            struct permonst *mdat = steed->data;
+
             (void) newcham(steed, (struct permonst *) 0, FALSE, FALSE);
-            if (!can_saddle(steed) || !can_ride(steed))
+            if (!can_saddle(steed) || !can_ride(steed)) {
                 dismount_steed(DISMOUNT_POLY);
-            else
-                You("have to adjust yourself in the saddle on %s.",
-                    x_monnam(steed, ARTICLE_A, (char *) 0, SUPPRESS_SADDLE,
-                             FALSE));
+            } else {
+                char buf[BUFSZ];
+
+                Strcpy(buf, x_monnam(steed, ARTICLE_YOUR, (char *) 0,
+                                            SUPPRESS_SADDLE, FALSE));
+                if (mdat != steed->data)
+                    (void) strsubst(buf, "your ", "your new ");
+                You("have to adjust yourself in the saddle on %s.", buf);
+            }
         }
         steedhit = TRUE;
         break;