diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-05-06 17:27:58 -0600 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-05-07 18:23:33 -0600 |
commit | 656b4adf42da07165d50591305f3d556d6530319 (patch) | |
tree | 2ee7938442d884647495e74949cb52cfdddbe753 /crawl-ref/source/godpassive.cc | |
parent | 6701b1f0ae42f5a218786a2aec37a9fc3d6091bc (diff) | |
download | crawl-ref-656b4adf42da07165d50591305f3d556d6530319.tar.gz crawl-ref-656b4adf42da07165d50591305f3d556d6530319.zip |
Rejig Q cloud generation again.
Mainly, don't place clouds in corridors, and don't try to avoid placing
clouds next to each other because it doesn't block autoexplore any
longer.
Since the cloud radius has been reduced, firewood is now eligible for
placement again; since cloud adjacency restrictions are gone, reduce the
number of clouds generated.
Diffstat (limited to 'crawl-ref/source/godpassive.cc')
-rw-r--r-- | crawl-ref/source/godpassive.cc | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/crawl-ref/source/godpassive.cc b/crawl-ref/source/godpassive.cc index b0157f54f0..1ab50469a0 100644 --- a/crawl-ref/source/godpassive.cc +++ b/crawl-ref/source/godpassive.cc @@ -712,13 +712,19 @@ void qazlal_storm_clouds() for (radius_iterator ri(you.pos(), radius, C_ROUND, LOS_SOLID, true); ri; ++ri) { - if (cell_is_solid(*ri) || env.cgrid(*ri) != EMPTY_CLOUD - || monster_at(*ri) && mons_is_firewood(monster_at(*ri))) + int count = 0; + if (cell_is_solid(*ri) || env.cgrid(*ri) != EMPTY_CLOUD) { continue; } - candidates.push_back(*ri); + // No clouds in corridors. + for (adjacent_iterator ai(*ri); ai; ++ai) + if (!cell_is_solid(*ai)) + count++; + + if (count >= 3) + candidates.push_back(*ri); } const int count = div_rand_round(LOS_RADIUS * @@ -726,26 +732,19 @@ void qazlal_storm_clouds() - piety_breakpoint(0)) * candidates.size() * you.time_taken / (piety_breakpoint(5) - piety_breakpoint(0)), - LOS_RADIUS * BASELINE_DELAY); + 10 * LOS_RADIUS * BASELINE_DELAY); if (count < 0) return; shuffle_array(candidates); int placed = 0; for (unsigned int i = 0; placed < count && i < candidates.size(); i++) { - bool skip = false, water = false; + bool water = false; for (adjacent_iterator ai(candidates[i]); ai; ++ai) { - if (env.cgrid(*ai) != EMPTY_CLOUD) - { - skip = true; - break; - } if (feat_is_watery(grd(*ai))) water = true; } - if (skip) - continue; // No flame clouds over water to avoid steam generation. cloud_type ctype; |