From cdaf940f3b02b68afe1414535e966d3e40cc854d Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Wed, 10 Jun 2009 22:43:43 +0000 Subject: 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 --- crawl-ref/source/spl-cast.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'crawl-ref/source/spl-cast.cc') 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 Z to cast anyway.)"); + delay(500); + Options.target_range = 0; + viewwindow(true, false); return (false); } -- cgit v1.2.3-54-g00ecf