bear trap wizard wishing

This commit is contained in:
arromdee
2002-07-20 06:45:48 +00:00
parent cdec686d09
commit 74c5eae064
2 changed files with 10 additions and 0 deletions

View File

@@ -168,6 +168,7 @@ minetown fountain warnings shouldn't prevent finding gems/coins in fountain
order of container and objects was different for mazelike and roomfilled levels
minetown guards only enforce town rules inside the town proper
electric damage heals hero polymorphed into flesh golem rather than iron golem
fix bug preventing wishing for bear traps (not beartrap objects) in debug mode
Platform- and/or Interface-Specific Fixes

View File

@@ -1521,6 +1521,15 @@ const char *u_str; /* from user, so might be variant spelling */
const char *o_str; /* from objects[], so is in canonical form */
boolean retry_inverted; /* optional extra "of" handling */
{
/* special case: wizards can wish for traps. The object is "beartrap"
* and the trap is "bear trap", so to let wizards wish for both we
* must not fuzzymatch.
*/
#ifdef WIZARD
if (wizard && !strcmp(o_str, "beartrap"))
return !strncmpi(o_str, u_str, 8);
#endif
/* ignore spaces & hyphens and upper/lower case when comparing */
if (fuzzymatch(u_str, o_str, " -", TRUE)) return TRUE;