summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r--crawl-ref/source/spl-cast.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index a140fb30d2..48b22f577a 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -742,7 +742,15 @@ bool cast_a_spell(bool check_range)
if (check_range && _spell_no_hostile_in_range(spell, minRange))
{
- mpr("There are no visible monsters within range! (Use <w>Z</w> to cast anyway.)");
+ // Abort if there are no hostiles within range, but flash the range
+ // markers for about half a second.
+ Options.target_range = _calc_spell_range(spell);
+ viewwindow(true, false);
+ mpr("There are no visible monsters within range! (Use <w>Z</w> to "
+ "cast anyway.)");
+ delay(500);
+ Options.target_range = 0;
+ viewwindow(true, false);
return (false);
}