diff options
author | Jesse Luehrs <doy@tozt.net> | 2010-01-10 12:24:09 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2010-01-10 13:54:23 -0600 |
commit | 67cbd7ec7637054540c4f8a547c92790a6a5ba9c (patch) | |
tree | 15253e3cd8cfe902130d0ec1453038f6135b3f53 /crawl-ref/source/dungeon.cc | |
parent | b1ff610c3ab9951b28f60747c70d81bcb21a6229 (diff) | |
download | crawl-ref-67cbd7ec7637054540c4f8a547c92790a6a5ba9c.tar.gz crawl-ref-67cbd7ec7637054540c4f8a547c92790a6a5ba9c.zip |
give doors a smaller chance to be removed
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r-- | crawl-ref/source/dungeon.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index b2c91cb99f..09949dca20 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -7744,8 +7744,8 @@ static void _ruin_level() for (rectangle_iterator ri(1); ri; ++ri) { - /* only try to replace wall tiles */ - if (!feat_is_wall(grd(*ri))) + /* only try to replace wall and door tiles */ + if (!feat_is_wall(grd(*ri)) && !feat_is_door(grd(*ri))) { continue; } @@ -7753,7 +7753,7 @@ static void _ruin_level() int floor_count = 0; for (adjacent_iterator ai(*ri); ai; ++ai) { - if (!feat_is_wall(grd(*ai))) + if (!feat_is_wall(grd(*ai)) && !feat_is_door(grd(*ai))) { floor_count++; } @@ -7771,9 +7771,12 @@ static void _ruin_level() it != to_replace.end(); ++it) { + /* only remove some doors, to preserve tactical options */ /* XXX: should this pick a random adjacent floor type, rather than * just hardcoding DNGN_FLOOR? */ - grd(*it) = DNGN_FLOOR; + if (feat_is_wall(grd(*it)) || (coinflip() && feat_is_door(grd(*it)))) { + grd(*it) = DNGN_FLOOR; + } /* replace some ruined walls with plants/fungi */ if (one_chance_in(5)) { |