summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.h
diff options
context:
space:
mode:
authorelliptic <hyperelliptical@gmail.com>2012-01-16 14:58:07 -0500
committerelliptic <hyperelliptical@gmail.com>2012-01-16 14:58:07 -0500
commitbcbd6ec1f116f367c48f341ac857a8be542e269f (patch)
tree70e4457d9ed729a15cb969a886403591493775a6 /crawl-ref/source/spl-cast.h
parenta77a15b234c933ee89f38923058fcd63982402f1 (diff)
downloadcrawl-ref-bcbd6ec1f116f367c48f341ac857a8be542e269f.tar.gz
crawl-ref-bcbd6ec1f116f367c48f341ac857a8be542e269f.zip
Colour failure rates based on how likely the spell is to cause a dangerous miscast effect.
In the casting and memorization list, "12%" is now coloured one of four colours based on the chance that casting the spell will cause a severity 2 or 3 miscast. This does not take into account Sif or Kiku's protection or penance. The cutoff points are currently at 0.001, 0.005, and 0.025, and the colours used are lightgrey, yellow, lightred, and red.
Diffstat (limited to 'crawl-ref/source/spl-cast.h')
-rw-r--r--crawl-ref/source/spl-cast.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/spl-cast.h b/crawl-ref/source/spl-cast.h
index 2ef1471d7c..676819205d 100644
--- a/crawl-ref/source/spl-cast.h
+++ b/crawl-ref/source/spl-cast.h
@@ -73,6 +73,8 @@ void do_cast_spell_cmd(bool force);
spret_type your_spells(spell_type spell, int powc = 0, bool allow_fail = true,
bool check_range = true);
+int failure_rate_colour(spell_type spell);
+int failure_rate_to_int(int fail);
char* failure_rate_to_string(int fail);
std::string spell_power_string(spell_type spell, bool rod = false);