summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarshan Shaligram <dshaligram@users.sourceforge.net>2010-01-17 16:06:13 +0530
committerDarshan Shaligram <dshaligram@users.sourceforge.net>2010-01-17 16:06:46 +0530
commit8a6746ad0a331b00efd6ac9964ac9444faa27c3f (patch)
tree03e00bf7012597ab60b27a1fcf664640ad5cc67f
parentf57c75887a571f5dfdc16f9a5dd7425d6b318623 (diff)
downloadcrawl-ref-8a6746ad0a331b00efd6ac9964ac9444faa27c3f.tar.gz
crawl-ref-8a6746ad0a331b00efd6ac9964ac9444faa27c3f.zip
Fix swamp drakes not getting effective meph cloud in Swamp.
-rw-r--r--crawl-ref/source/cloud.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/crawl-ref/source/cloud.cc b/crawl-ref/source/cloud.cc
index c7a01066db..8b4fab4c98 100644
--- a/crawl-ref/source/cloud.cc
+++ b/crawl-ref/source/cloud.cc
@@ -410,6 +410,11 @@ void place_cloud(cloud_type cl_type, const coord_def& ctarget, int cl_range,
colour, name, tile);
}
+bool cloud_is_inferior(cloud_type inf, cloud_type superior)
+{
+ return (inf == CLOUD_STINK && superior == CLOUD_POISON);
+}
+
// Places a cloud with the given stats. May delete old clouds to
// make way if there are too many on level. Will overwrite an old
// cloud under some circumstances.
@@ -428,7 +433,7 @@ void place_cloud(cloud_type cl_type, const coord_def& ctarget, int cl_range,
// There's already a cloud here. See if we can overwrite it.
cloud_struct& old_cloud = env.cloud[target_cgrid];
if (old_cloud.type >= CLOUD_GREY_SMOKE && old_cloud.type <= CLOUD_STEAM
- || old_cloud.type == CLOUD_STINK
+ || cloud_is_inferior(old_cloud.type, cl_type)
|| old_cloud.type == CLOUD_BLACK_SMOKE
|| old_cloud.type == CLOUD_MIST
|| old_cloud.decay <= 20) // soon gone
@@ -453,7 +458,6 @@ void place_cloud(cloud_type cl_type, const coord_def& ctarget, int cl_range,
{
cloud_struct& cloud = env.cloud[ci];
if (cloud.type >= CLOUD_GREY_SMOKE && cloud.type <= CLOUD_STEAM
- || cloud.type == CLOUD_STINK
|| cloud.type == CLOUD_BLACK_SMOKE
|| cloud.type == CLOUD_MIST
|| cloud.decay <= 20) // soon gone