held artifacts evading your grasp (trunk only)

From a bug report, trying
to invoke a wielded artifact after changing alignment resulted in "the
<artifact> evades your grasp" but it remained wielded, contradicting the
message.  This adjusts the message in touch_artifact() if the object is
already in inventory, and adds retouch_object() to handle cases where
failing to be able to touch ought to force unwearing/unwielding.
This commit is contained in:
nethack.rankin
2007-03-10 05:54:17 +00:00
parent b8a51d3649
commit f67a4547ac
7 changed files with 73 additions and 15 deletions

View File

@@ -2974,7 +2974,7 @@ doapply()
obj = getobj(class_list, "use or apply");
if(!obj) return 0;
if (obj->oartifact && !touch_artifact(obj, &youmonst))
if (!retouch_object(&obj, FALSE))
return 1; /* evading your grasp costs a turn; just be
grateful that you don't drop it as well */