wishing for artifacts

Use 'fuzzymatch(,," -",)' when checking whether the name specified
in a player's wish text matches an artifact name so that extra or
omitted spaces and dashes are ignored.  Wishing for "firebrand" will
yield "Fire Brand" and "demon bane" will yield "Demonbane".
This commit is contained in:
PatR
2022-04-02 00:28:48 -07:00
parent d7630ebff8
commit eea362249c
6 changed files with 30 additions and 26 deletions

View File

@@ -1269,7 +1269,8 @@ do_oname(register struct obj *obj)
*/
/* relax restrictions over proper capitalization for artifacts */
if ((aname = artifact_name(buf, &objtyp)) != 0 && objtyp == obj->otyp)
if ((aname = artifact_name(buf, &objtyp, TRUE)) != 0
&& objtyp == obj->otyp)
Strcpy(buf, aname);
if (obj->oartifact) {