diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-18 11:57:07 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-18 11:57:07 +0000 |
commit | 90b143eb00b78cfde147857c89a33833c849d1e0 (patch) | |
tree | 921aeccd4244c599c1cff21c35ce68695561f77d /crawl-ref/source/abyss.cc | |
parent | 5c1d15b2a0ba16caafbc5f426541386776e6ad70 (diff) | |
download | crawl-ref-90b143eb00b78cfde147857c89a33833c849d1e0.tar.gz crawl-ref-90b143eb00b78cfde147857c89a33833c849d1e0.zip |
Fix 1945348: Lugonu's Corruption attempting to "preserve" other altars.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4327 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/abyss.cc')
-rw-r--r-- | crawl-ref/source/abyss.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/crawl-ref/source/abyss.cc b/crawl-ref/source/abyss.cc index f75f48aee0..b1e2741ef5 100644 --- a/crawl-ref/source/abyss.cc +++ b/crawl-ref/source/abyss.cc @@ -720,9 +720,13 @@ static bool is_sealed_square(const coord_def &c) static void corrupt_square(const crawl_environment &oenv, const coord_def &c) { + // To prevent the destruction of, say, branch entries. + bool preserve_feat = true; dungeon_feature_type feat = DNGN_UNSEEN; if (grid_altar_god(grd(c)) != GOD_NO_GOD) { + // altars may be safely overwritten, ha! + preserve_feat = false; if (!one_chance_in(3)) feat = DNGN_ALTAR_LUGONU; } @@ -738,10 +742,12 @@ static void corrupt_square(const crawl_environment &oenv, const coord_def &c) if (!is_traversable(grd(c)) && is_traversable(feat) && is_sealed_square(c)) return; + // What's this supposed to achieve? (jpeg) + // I mean, won't exits from the Abyss only turn up in the Abyss itself? if (feat == DNGN_EXIT_ABYSS) feat = DNGN_ENTER_ABYSS; - dungeon_terrain_changed(c, feat, true, true, true); + dungeon_terrain_changed(c, feat, preserve_feat, true, true); if (feat == DNGN_ROCK_WALL) env.grid_colours(c) = oenv.rock_colour; else if (feat == DNGN_FLOOR) @@ -772,7 +778,6 @@ static void corrupt_level_features(const crawl_environment &oenv) corrupt_seeds.push_back(corrupt_markers[i]->pos); for (int y = MAPGEN_BORDER; y < GYM - MAPGEN_BORDER; ++y) - { for (int x = MAPGEN_BORDER; x < GXM - MAPGEN_BORDER; ++x) { const coord_def c(x, y); @@ -790,7 +795,6 @@ static void corrupt_level_features(const crawl_environment &oenv) corrupt_square(oenv, c); } } - } } static bool is_level_corrupted() @@ -799,7 +803,9 @@ static bool is_level_corrupted() || you.level_type == LEVEL_PANDEMONIUM || player_in_hell() || player_in_branch(BRANCH_VESTIBULE_OF_HELL)) + { return (true); + } return (!!env.markers.find(MAT_CORRUPTION_NEXUS)); } |