From 5c3651e0554f0e53f89b2686b378d7e682e39630 Mon Sep 17 00:00:00 2001 From: cohrs Date: Mon, 12 Feb 2007 21:25:52 +0000 Subject: [PATCH] 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. --- doc/fixes34.4 | 1 + src/polyself.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 3d0eade16..c36634c4f 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -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 diff --git a/src/polyself.c b/src/polyself.c index ffdaeab2b..62d2f950a 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -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();