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
committerDarshan Shaligram <dshaligram@users.sourceforge.net>2009-10-04 22:43:03 +0530
commit0a9bc55e9cd63d2badb476ff24d5cb66d4a15950 (patch)
tree51a13210ccbb94f8b7989b679779d9ba5393ee3a /crawl-ref/source/spl-cast.cc
parent51bad159a467557a48c665cb12b46acdaa5153fb (diff)
downloadcrawl-ref-0a9bc55e9cd63d2badb476ff24d5cb66d4a15950.tar.gz
crawl-ref-0a9bc55e9cd63d2badb476ff24d5cb66d4a15950.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 61be1b39c5..ff54ef83dd 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -690,7 +690,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)
{
@@ -753,13 +753,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);
}