summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-util.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-01 16:07:23 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-01 16:07:23 +0000
commitce03c65515786c7f3c019314fe44019258236a94 (patch)
tree4f2215b3c665329834e2d654af4c2d43e009b3b9 /crawl-ref/source/spl-util.cc
parent8f8b5b59f645ca88bf6b821b04a899b8d779ea45 (diff)
downloadcrawl-ref-ce03c65515786c7f3c019314fe44019258236a94.tar.gz
crawl-ref-ce03c65515786c7f3c019314fe44019258236a94.zip
Slime:6 teleport control is enabled even if you kill the royal jelly off-level (sorear). TC is also enabled when banishing the royal jelly, which is a bit cheesy...
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4026 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-util.cc')
-rw-r--r--crawl-ref/source/spl-util.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc
index 7f6adfe75d..abf3ebabc6 100644
--- a/crawl-ref/source/spl-util.cc
+++ b/crawl-ref/source/spl-util.cc
@@ -114,10 +114,10 @@ spell_type spell_by_name(std::string name, bool partial_match)
for (int i = 0; i < NUM_SPELLS; i++)
{
spell_type type = static_cast<spell_type>(i);
- const char *sptitle = spell_title(type);
- if (!sptitle)
+ if (!is_valid_spell(type))
continue;
-
+
+ const char *sptitle = spell_title(type);
const std::string spell_name = lowercase_string(sptitle);
if (spell_name.find(name) != std::string::npos)