summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_you.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2013-06-08 20:15:00 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2013-06-08 20:17:21 -0600
commitedae9ecf94c17e809fdaf72a144fb50b47e2a6e2 (patch)
tree9a7d78ec318552915f73b8137e4c8a5795848395 /crawl-ref/source/l_you.cc
parentd95c1a3bdae3f59786066b8a189a993967872580 (diff)
downloadcrawl-ref-edae9ecf94c17e809fdaf72a144fb50b47e2a6e2.tar.gz
crawl-ref-edae9ecf94c17e809fdaf72a144fb50b47e2a6e2.zip
Force exact matching for unique name in Lua you.uniques (#7179).
If a unique name is the same as a branch name or abbreviation, the underlying code apparently interprets the branch name first; this has obviously never been a problem before now, but was causing Pan-the-unique to appear in duplicate for a forest end vault.
Diffstat (limited to 'crawl-ref/source/l_you.cc')
-rw-r--r--crawl-ref/source/l_you.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/l_you.cc b/crawl-ref/source/l_you.cc
index 4d140fe168..25b19ed940 100644
--- a/crawl-ref/source/l_you.cc
+++ b/crawl-ref/source/l_you.cc
@@ -538,7 +538,11 @@ static int _you_uniques(lua_State *ls)
bool unique_found = false;
if (lua_gettop(ls) >= 1 && lua_isstring(ls, 1))
- unique_found = you.unique_creatures[get_monster_by_name(lua_tostring(ls, 1))];
+ {
+ unique_found =
+ you.unique_creatures[get_monster_by_name(lua_tostring(ls, 1),
+ true)];
+ }
lua_pushboolean(ls, unique_found);
return 1;