summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/godabil.cc
diff options
context:
space:
mode:
authorCharles Otto <ottochar@gmail.com>2010-01-09 19:52:48 -0500
committerCharles Otto <ottochar@gmail.com>2010-01-09 19:57:03 -0500
commitf058457322c9c3df4e0c997330589d052acf9910 (patch)
tree0c50259b44269b005b625d1786536e7e845d3355 /crawl-ref/source/godabil.cc
parent6aafe49570c2dda213826294fdffcb2d0b3089e1 (diff)
downloadcrawl-ref-f058457322c9c3df4e0c997330589d052acf9910.tar.gz
crawl-ref-f058457322c9c3df4e0c997330589d052acf9910.zip
Restrict sunlight's plant creating
Restrict sunlight to only have a chance of making plants when it evaporates water
Diffstat (limited to 'crawl-ref/source/godabil.cc')
-rw-r--r--crawl-ref/source/godabil.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/godabil.cc b/crawl-ref/source/godabil.cc
index a1259291ac..f5b0d609de 100644
--- a/crawl-ref/source/godabil.cc
+++ b/crawl-ref/source/godabil.cc
@@ -525,6 +525,7 @@ bool sunlight()
// If this is a water square we will evaporate it.
dungeon_feature_type ftype = grd(target);
+ dungeon_feature_type orig_type = ftype;
switch (ftype)
{
@@ -540,7 +541,7 @@ bool sunlight()
break;
}
- if (grd(target) != ftype)
+ if (orig_type != ftype)
{
dungeon_terrain_changed(target, ftype);
@@ -581,7 +582,8 @@ bool sunlight()
}
else if (one_chance_in(100)
&& ftype >= DNGN_FLOOR_MIN
- && ftype <= DNGN_FLOOR_MAX)
+ && ftype <= DNGN_FLOOR_MAX
+ && orig_type == DNGN_SHALLOW_WATER)
{
// Create a plant.
const int plant = create_monster(mgen_data(MONS_PLANT,