diff options
-rw-r--r-- | crawl-ref/source/spells2.cc | 19 |
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, |