away after polymorphing someone so that they don't just repeat that
if an invisible hero managed to convert an unaligned altar to an aligned one
with color enabled, altar wasn't immediately redrawn with new color
+repair some regressions to (a)pply introduced by "getobj refactor" patch
curses: 'msg_window' option wasn't functional for curses unless the binary
also included tty support
* else to foo". */
GETOBJ_EXCLUDE_INACCESS = -1,
/* invalid for purposes of not showing a prompt if nothing is valid but
- * psuedo-valid for selecting - identical to GETOBJ_EXCLUDE but
+ * psuedo-valid for selecting - identical to GETOBJ_EXCLUDE_INACCESS but
* without the "else" in "You don't have anything else to foo". */
GETOBJ_EXCLUDE_SELECTABLE = 0,
/* valid - invlet not presented in the summary or the ? menu as a
- * recommendation, but is selectable if the player enters it anyway. Used
- * for objects that are actually valid but unimportantly so, such as shirts
- * for reading. */
+ * recommendation, but is selectable if the player enters it anyway.
+ * Used for objects that are actually valid but unimportantly so, such
+ * as shirts for reading. */
GETOBJ_DOWNPLAY = 1,
/* valid - will be shown in summary and ? menu */
GETOBJ_SUGGEST = 2,
return GETOBJ_EXCLUDE;
/* all tools, all wands (breaking), all spellbooks (flipping through -
- * including blank/novel/Book of the Dead) */
+ including blank/novel/Book of the Dead) */
if (obj->oclass == TOOL_CLASS || obj->oclass == WAND_CLASS
|| obj->oclass == SPBOOK_CLASS)
return GETOBJ_SUGGEST;
|| obj->otyp == BULLWHIP))
return GETOBJ_SUGGEST;
- /* only applicable potion is oil, and it will only be offered as a choice
- * when already discovered */
- if (obj->otyp == POT_OIL && obj->dknown
- && objects[obj->otyp].oc_name_known)
- return GETOBJ_SUGGEST;
+ if (obj->oclass == POTION_CLASS) {
+ /* permit applying unknown potions, but don't suggest them */
+ if (!obj->dknown || !objects[obj->otyp].oc_name_known)
+ return GETOBJ_DOWNPLAY;
+
+ /* only applicable potion is oil, and it will only be suggested as a
+ choice when already discovered */
+ if (obj->otyp == POT_OIL)
+ return GETOBJ_SUGGEST;
+ }
/* certain foods */
if (obj->otyp == CREAM_PIE || obj->otyp == EUCALYPTUS_LEAF
if (is_graystone(obj)) {
/* The only case where we don't suggest a gray stone is if we KNOW it
- * isn't a touchstone. */
+ isn't a touchstone. */
if (!obj->dknown)
return GETOBJ_SUGGEST;
if (obj->otyp != TOUCHSTONE
&& (objects[TOUCHSTONE].oc_name_known
|| objects[obj->otyp].oc_name_known))
- return GETOBJ_EXCLUDE;
+ return GETOBJ_EXCLUDE_SELECTABLE;
return GETOBJ_SUGGEST;
}
- return GETOBJ_EXCLUDE;
+ /* item can't be applied; if picked anyway,
+ _EXCLUDE would yield "That is a silly thing to apply.",
+ _EXCLUDE_SELECTABLE yields "Sorry, I don't know how to use that." */
+ return GETOBJ_EXCLUDE_SELECTABLE;
}
/* the 'a' command */