summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-18 20:29:53 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-18 20:29:53 +0000
commitb4338a00f5d85699e599307f09d502e3cbd621dc (patch)
tree4d6a92ff46a4554fa68dc3086408678f133deca6 /crawl-ref/source/spl-cast.cc
parentef5094188d7c6837338f773c33e6cd5c05d17cd9 (diff)
downloadcrawl-ref-b4338a00f5d85699e599307f09d502e3cbd621dc.tar.gz
crawl-ref-b4338a00f5d85699e599307f09d502e3cbd621dc.zip
Change part of the z/Z handling:
* added option darken_beyond_range (defaults to true) * Z doesn't show the spell list anymore git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10278 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r--crawl-ref/source/spl-cast.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 645b3d4edf..e17370cdeb 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -671,7 +671,7 @@ bool cast_a_spell(bool check_range)
const int minRange = _get_dist_to_nearest_monster();
- int keyin = (check_range ? 0 : '?');
+ int keyin = 0;
while (true)
{
@@ -734,13 +734,17 @@ bool cast_a_spell(bool check_range)
{
// 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);
+
+ if (Options.target_range != -1)
+ {
+ Options.target_range = _calc_spell_range(spell);
+ viewwindow(true, false);
+ delay(500);
+ Options.target_range = 0;
+ viewwindow(true, false);
+ }
return (false);
}