polymorph dropping in-use wielded leash

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.
This commit is contained in:
cohrs
2007-02-12 21:25:52 +00:00
parent 0b95104f0e
commit 5c3651e055
2 changed files with 3 additions and 1 deletions

View 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

View 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();