]> granicus.if.org Git - nethack/commitdiff
polymorph dropping in-use wielded leash
authorcohrs <cohrs>
Mon, 12 Feb 2007 21:25:52 +0000 (21:25 +0000)
committercohrs <cohrs>
Mon, 12 Feb 2007 21:25:52 +0000 (21:25 +0000)
From a bug report, if you polymorph into
something, like a killer bee, that causes you to drop your weapon, but the
weapon is a wielded, in-use leash, the leash would be dropped but retain
it's in-use state.  However, the leash was tied to you, so it seems it
should remain attached, just unwielded, just as it would if it hadn't been
wielded.  I've changed the behavior to do this.  I wonder whether one
should be able to wield an in-use leash.

doc/fixes34.4
src/polyself.c

index 3d0eade1663b03829a495a900c777808f870ed7c..c36634c4f318a858f9994231e10ab15eea6c70cb 100644 (file)
@@ -320,6 +320,7 @@ cursed corpse wielded by a monster isn't welded to its hand or paw
 fix grammar errors in samurai quest, wakarimasu ka?
 fix spelling of Dr Dolittle
 hero's sleep resistance shouldn't protect steed from sleeping gas trap
+dropped wielded, in use leash should remain in inventory, since it's in-use
 
 
 Platform- and/or Interface-Specific Fixes
index ffdaeab2b47c8d1dbf2c7ae8c7b33f3721b9d15a..62d2f950a60bc05b9997823ba8474e8007b9e12e 100644 (file)
@@ -736,7 +736,8 @@ int alone;
                                u.twoweap ? "s" : "");
            otmp2 = u.twoweap ? uswapwep : 0;
            uwepgone();
-           if (!wep->cursed || wep->otyp != LOADSTONE)
+           if ((!wep->cursed || wep->otyp != LOADSTONE) &&
+               (wep->otyp != LEASH && wep->leashmon != 0))
                dropx(otmp);
            if (otmp2 != 0) {
                uswapwepgone();