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:
@@ -150,11 +150,11 @@ struct obj *wep;
|
||||
} else if (wep->otyp == CORPSE && cant_wield_corpse(wep)) {
|
||||
/* hero must have been life-saved to get here; use a turn */
|
||||
res++; /* corpse won't be wielded */
|
||||
} else if (uarms && bimanual(wep))
|
||||
} else if (uarms && bimanual(wep)) {
|
||||
You("cannot wield a two-handed %s while wearing a shield.",
|
||||
is_sword(wep) ? "sword" :
|
||||
wep->otyp == BATTLE_AXE ? "axe" : "weapon");
|
||||
else if (wep->oartifact && !touch_artifact(wep, &youmonst)) {
|
||||
} else if (!retouch_object(&wep, FALSE)) {
|
||||
res++; /* takes a turn even though it doesn't get wielded */
|
||||
} else {
|
||||
/* Weapon WILL be wielded after this point */
|
||||
|
||||
Reference in New Issue
Block a user