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

@@ -67,7 +67,7 @@ extern void save_artifacts(NHFILE *);
extern void restore_artifacts(NHFILE *);
extern const char *artiname(int);
extern struct obj *mk_artifact(struct obj *, aligntyp);
extern const char *artifact_name(const char *, short *);
extern const char *artifact_name(const char *, short *, boolean);
extern boolean exist_artifact(int, const char *);
extern void artifact_exists(struct obj *, const char *, boolean, unsigned);
extern void found_artifact(int);