summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
diff options
context:
space:
mode:
authorStefan O'Rear <stefanor@cox.net>2009-11-12 18:23:50 -0800
committerStefan O'Rear <stefanor@cox.net>2009-11-12 18:24:03 -0800
commit3c1420d0049511a857ff147b6eefdf78b0e1fd0e (patch)
treedd2613a8ddd03e30d2de64778200d8341637c524 /crawl-ref/source/mon-util.cc
parentb5f8d2289d34d9aca973267ab8234319578b7814 (diff)
downloadcrawl-ref-3c1420d0049511a857ff147b6eefdf78b0e1fd0e.tar.gz
crawl-ref-3c1420d0049511a857ff147b6eefdf78b0e1fd0e.zip
Implement monster swiftness, and give it to Gastronok
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r--crawl-ref/source/mon-util.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 06ec8b7a61..d070c47b98 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -2209,6 +2209,7 @@ bool ms_useful_fleeing_out_of_sight( const monsters *mon, spell_type monspell )
switch (monspell)
{
case SPELL_HASTE:
+ case SPELL_SWIFTNESS:
case SPELL_INVISIBILITY:
case SPELL_MINOR_HEALING:
case SPELL_MAJOR_HEALING:
@@ -2369,6 +2370,11 @@ bool ms_waste_of_time( const monsters *mon, spell_type monspell )
ret = true;
break;
+ case SPELL_SWIFTNESS:
+ if (mon->has_ench(ENCH_SWIFT))
+ ret = true;
+ break;
+
case SPELL_INVISIBILITY:
if (mon->has_ench(ENCH_INVIS)
|| mon->friendly() && !you.can_see_invisible(false))
@@ -2522,6 +2528,7 @@ static bool _ms_ranged_spell(spell_type monspell, bool attack_only = false,
case SPELL_INVISIBILITY:
case SPELL_BLINK:
case SPELL_BERSERKER_RAGE:
+ case SPELL_SWIFTNESS:
return (false);
// The animation spells don't work through transparent walls and thus