summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-05-09 21:12:00 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2014-05-09 21:13:23 -0600
commiteb650435c201bb873f7fa15f984ccdb042f15524 (patch)
treefdef1cde0876da0276e55f48849d63e9b46bcc9c /crawl-ref/source/spl-cast.cc
parent2821b36c4d7dd51232b9cfe24305f43647f3554d (diff)
downloadcrawl-ref-eb650435c201bb873f7fa15f984ccdb042f15524.tar.gz
crawl-ref-eb650435c201bb873f7fa15f984ccdb042f15524.zip
Staticify.
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r--crawl-ref/source/spl-cast.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 4c18ce892d..5a4cbfb2d5 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -1176,7 +1176,7 @@ static targetter* _spell_targetter(spell_type spell, int pow, int range)
}
}
-double chance_miscast_prot()
+static double _chance_miscast_prot()
{
double miscast_prot = 0;
@@ -1402,7 +1402,7 @@ spret_type your_spells(spell_type spell, int powc,
flush_input_buffer(FLUSH_ON_FAILURE);
learned_something_new(HINT_SPELL_MISCAST);
- if(random_real_inc() > chance_miscast_prot())
+ if(random_real_inc() > _chance_miscast_prot())
// Using random_real_inc() is a bit hacky but it's
// better than duplcating the miscast protection code.
{
@@ -1992,10 +1992,10 @@ double get_miscast_chance(spell_type spell, int severity)
return chance;
}
-double get_miscast_chance_with_miscast_prot(spell_type spell)
+static double _get_miscast_chance_with_miscast_prot(spell_type spell)
{
double raw_chance = get_miscast_chance(spell);
- double miscast_prot = chance_miscast_prot();
+ double miscast_prot = _chance_miscast_prot();
double chance = raw_chance * (1 - miscast_prot);
return chance;
@@ -2005,7 +2005,7 @@ double get_miscast_chance_with_miscast_prot(spell_type spell)
// based on the chance of getting a severity >= 2 miscast.
int failure_rate_colour(spell_type spell)
{
- double chance = get_miscast_chance_with_miscast_prot(spell);
+ double chance = _get_miscast_chance_with_miscast_prot(spell);
return (chance < 0.001) ? LIGHTGREY :
(chance < 0.005) ? YELLOW :