diff options
Diffstat (limited to 'crawl-ref/source/debug.cc')
-rw-r--r-- | crawl-ref/source/debug.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc index 8ef16c9685..c83b4c584a 100644 --- a/crawl-ref/source/debug.cc +++ b/crawl-ref/source/debug.cc @@ -493,8 +493,20 @@ void wizard_create_spec_monster_name() if (!err.empty()) { - mpr(err.c_str()); - return; + // Try for a partial match, but not if the user accidently entered + // only a few letters. + monster_type partial = get_monster_by_name(specs); + if (strlen(specs) >= 3 && partial != NON_MONSTER) + { + mlist.clear(); + err = mlist.add_mons(mons_type_name(partial, DESC_PLAIN)); + } + + if (!err.empty()) + { + mpr(err.c_str()); + return; + } } mons_spec mspec = mlist.get_monster(0); |