]> granicus.if.org Git - nethack/commitdiff
fix B14003 - "bashing" with mounted polearms
authornethack.rankin <nethack.rankin>
Mon, 21 Oct 2002 10:20:29 +0000 (10:20 +0000)
committernethack.rankin <nethack.rankin>
Mon, 21 Oct 2002 10:20:29 +0000 (10:20 +0000)
     Attacking with a polearm while mounted behaves differently than
while on foot, so make mounting and dismounting when wielding one adjust
weapon status accordingly.  Don't give a bashing message on first attack
if you mount with a polearm already wielded; do give one on your next
hand-to-hand attack if you just dismounted with one wielded.

doc/fixes34.1
src/steed.c

index e6d88963abf418915bb20359bea70f577ab0e12e..1c2d0562be5908aca1c0f1408f54241daa8a2c84 100644 (file)
@@ -286,6 +286,8 @@ stinking clouds in bones files do not get their ttl set reasonably
 stinking clouds in bones files may incorrectly set player_inside
 breaking wand of digging on a drawbridge shouldn't dig/hole a pit in the bridge
 avoid mimicking gold when the character has the Unchanging attribute
+handle polearm wielded prior to mounting the same as one wielded while mounted,
+       and one still used after dismounting like one wielded while not mounted
 
 
 Platform- and/or Interface-Specific Fixes
index 83a46bc07e452487690e8889d308cbec2b56782d..04a23cca363a127f82f0dbe50de6a886f17c8a76 100644 (file)
@@ -339,6 +339,8 @@ mount_steed(mtmp, force)
                pline("%s magically floats up!", Monnam(mtmp));
            You("mount %s.", mon_nam(mtmp));
        }
+       /* setuwep handles polearms differently when you're mounted */
+       if (uwep && is_pole(uwep)) unweapon = FALSE;
        u.usteed = mtmp;
        remove_monster(mtmp->mx, mtmp->my);
        teleds(mtmp->mx, mtmp->my, TRUE);
@@ -598,14 +600,17 @@ dismount_steed(reason)
        }
 
        /* Return the player to the floor */
-    if (reason != DISMOUNT_ENGULFED) {
-       in_steed_dismounting = TRUE;
-       (void) float_down(0L, W_SADDLE);
-       in_steed_dismounting = FALSE;
-       flags.botl = 1;
-       (void)encumber_msg();
-       vision_full_recalc = 1;
-    } else flags.botl = 1;
+       if (reason != DISMOUNT_ENGULFED) {
+           in_steed_dismounting = TRUE;
+           (void) float_down(0L, W_SADDLE);
+           in_steed_dismounting = FALSE;
+           flags.botl = 1;
+           (void)encumber_msg();
+           vision_full_recalc = 1;
+       } else
+           flags.botl = 1;
+       /* polearms behave differently when not mounted */
+       if (uwep && is_pole(uwep)) unweapon = TRUE;
        return;
 }