From 74c5eae064fe65e63809bb859d724157d0eefb3a Mon Sep 17 00:00:00 2001 From: arromdee Date: Sat, 20 Jul 2002 06:45:48 +0000 Subject: [PATCH] bear trap wizard wishing --- doc/fixes34.1 | 1 + src/objnam.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index 75aecb916..34be4376a 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -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 diff --git a/src/objnam.c b/src/objnam.c index e02ae10f5..2dd2a0a90 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -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; -- 2.40.0