'R' behavior for rings (trunk only)
A bug in some post-3.4.3 code made attempting to remove a worn ring when wearing two skip inventory the selection and give "you don't have anything else to remove" if you were wearing gloves and weren't wearing an amulet or blindfold. The intent was that rings wouldn't be included as likely candidates in the list of inventory letters to choose from if you were wearing cursed gloves, but had a copy+paste mistake in the argument controlling whether to consider the gloves curse state and was in the wrong section of getobj()'s "ugly hacks". Also, it makes more sense to require that the player know that those gloves are cursed, so inaccessibe_equipment() got changed too. [Not knowing that the gloves are cursed leaves rings listed as candidates; picking a ring will get removal failure feedback later and mark the gloves as known cursed then.]
This commit is contained in:
@@ -901,8 +901,7 @@ register const char *let,*word;
|
||||
|
||||
/* ugly check: remove inappropriate things */
|
||||
if ((taking_off(word) &&
|
||||
(!(otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL))
|
||||
|| inaccessible_equipment(otmp, (const char *)0, FALSE)))
|
||||
!(otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL)))
|
||||
|| (putting_on(word) &&
|
||||
(otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL)))
|
||||
/* already worn */
|
||||
@@ -985,7 +984,11 @@ register const char *let,*word;
|
||||
|| (!strcmp(word, "sacrifice") &&
|
||||
/* (!astral && amulet) || (astral && !amulet) */
|
||||
(!Is_astralevel(&u.uz) ^ (otmp->oclass != AMULET_CLASS)))
|
||||
/* suppress container being stashed into */
|
||||
|| (!strcmp(word, "stash") && !ck_bag(otmp))
|
||||
/* worn armor or accessory covered by cursed worn armor */
|
||||
|| (taking_off(word) &&
|
||||
inaccessible_equipment(otmp, (const char *)0, TRUE))
|
||||
) {
|
||||
/* acceptable but not listed as likely candidate */
|
||||
foo--;
|
||||
|
||||
Reference in New Issue
Block a user