From f058457322c9c3df4e0c997330589d052acf9910 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Sat, 9 Jan 2010 19:52:48 -0500 Subject: Restrict sunlight's plant creating Restrict sunlight to only have a chance of making plants when it evaporates water --- crawl-ref/source/godabil.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/godabil.cc') 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, -- cgit v1.2.3-54-g00ecf