summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authorCharles Otto <ottochar@gmail.com>2009-10-14 21:51:06 -0400
committerCharles Otto <ottochar@gmail.com>2009-10-14 21:51:06 -0400
commitf907dae0dbbfa319ba02c2a2e59cb81a8af0ce1a (patch)
tree7b029c2bd7a0eaf3276f7d67c66c612043c400e7 /crawl-ref/source/spells2.cc
parent150ccf9c56650ccce51f4ee286ca3e439b5e8dfd (diff)
downloadcrawl-ref-f907dae0dbbfa319ba02c2a2e59cb81a8af0ce1a.tar.gz
crawl-ref-f907dae0dbbfa319ba02c2a2e59cb81a8af0ce1a.zip
Give Feawn's rain ability a chance of making rainclouds.
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 364aa2484c..8fa13a1247 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -2299,6 +2299,25 @@ int rain(coord_def & target)
if (mon && mon->has_ench(ENCH_AQUATIC_LAND))
mon->del_ench(ENCH_AQUATIC_LAND);
}
+
+ if(ftype >= DNGN_MINMOVE)
+ {
+ // Maybe place a raincloud
+ // The rainfall area is 20 (5*5 - 4 (corners) -1 (center))
+ // the expected number of clouds generated by a fixed chance per
+ // tile is 20 * p = expected.
+ // Say an invo of 27 gives expected 5 clouds
+ int max_expected = 5;
+ int expected = div_rand_round(max_expected *
+ you.skills[SK_INVOCATIONS], 27);
+
+ if(x_chance_in_y(expected, 20))
+ {
+ place_cloud(CLOUD_RAIN, *rad, 10, KC_YOU);
+ }
+ }
+
+
// We can also turn shallow water into deep water, but we're
// just going to skip cases where there is something on the
// shallow water. Destroying items will probably be annoying,