summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/godabil.cc
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2010-01-10 17:38:30 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2010-01-10 18:39:03 +1000
commit28adee417435dac7697fb385b13e560084d170db (patch)
tree8f2e68ba101c5d85f37454a9c805a4f94be57d38 /crawl-ref/source/godabil.cc
parent958627e9c8f506c7183eac5dd05e89d41d62e759 (diff)
downloadcrawl-ref-28adee417435dac7697fb385b13e560084d170db.tar.gz
crawl-ref-28adee417435dac7697fb385b13e560084d170db.zip
New type of cloud: thick gloom.
It's a fast-moving, long-lasting cloud that clumps together. It will dissipate very quickly unless it is near other clouds. It is opaque, and blocks line of sight with two or more clouds, but unlike other clouds, it does not actually use the '#' glyph. Instead, it colours the ground underneath it magenta. It's currently unused, and while it's an interesting visual effect that will have some great potential in portal vaults and specific branches, should probably be used very rarely. Also includes a tile for these, though I'm not too happy with the effect.
Diffstat (limited to 'crawl-ref/source/godabil.cc')
-rw-r--r--crawl-ref/source/godabil.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/crawl-ref/source/godabil.cc b/crawl-ref/source/godabil.cc
index f6a1d82c1d..07b6fd42aa 100644
--- a/crawl-ref/source/godabil.cc
+++ b/crawl-ref/source/godabil.cc
@@ -536,6 +536,9 @@ bool sunlight()
int plant_count = 0;
int processed_count = 0;
+ // This is dealt with outside of the main loop.
+ int cloud_count = 0;
+
// FIXME: Uncomfortable level of code duplication here but the explosion
// code in bolt subjects the input radius to r*(r+1) for the threshold and
// since r is an integer we can never get just the 4-connected neighbours.
@@ -634,6 +637,20 @@ bool sunlight()
}
}
+ // We damage clousd for a large radius, though.
+ for (radius_iterator ai(base, 7); ai; ++ai)
+ {
+ if (env.cgrid(*ai) != EMPTY_CLOUD)
+ {
+ const int cloudidx = env.cgrid(*ai);
+ if (env.cloud[cloudidx].type == CLOUD_GLOOM)
+ {
+ cloud_count++;
+ delete_cloud(cloudidx);
+ }
+ }
+ }
+
#ifndef USE_TILE
// Move the cursor out of the way (it looks weird).
cgotoxy(base.x, base.y, GOTO_DNGN);
@@ -650,6 +667,9 @@ bool sunlight()
if (evap_count)
mprf("Some water evaporates in the bright sunlight.");
+ if (cloud_count)
+ mprf("Sunlight penetrates the thick gloom.");
+
return (processed_count);
}