diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-10 22:43:43 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-10 22:43:43 +0000 |
commit | cdaf940f3b02b68afe1414535e966d3e40cc854d (patch) | |
tree | 0aee3cf608af0094b5dd7b314b19c80905b1dc9c /crawl-ref/source/spl-cast.cc | |
parent | 8139324f50a0685218d606c7e89e44f3c3ab9da8 (diff) | |
download | crawl-ref-cdaf940f3b02b68afe1414535e966d3e40cc854d.tar.gz crawl-ref-cdaf940f3b02b68afe1414535e966d3e40cc854d.zip |
For spells with inadequate range with 'z', add a brief flash of the spell range.
The delay might need tweaking.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9948 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 16fc91295d..3e1ac00721 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -732,7 +732,14 @@ bool cast_a_spell(bool check_range) if (check_range && _spell_no_hostile_in_range(spell, minRange)) { + // 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); } |