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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user