summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dungeon.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-05-05 15:34:59 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2014-05-07 18:23:32 -0600
commita9a44cf2848c743385d41895723180b0cce83255 (patch)
tree8c69e36ea8338c1d869f87ed3bc1e99a57cef0ac /crawl-ref/source/dungeon.cc
parenta4fdc1954e59915d32eb3bb293020e54e167e641 (diff)
downloadcrawl-ref-a9a44cf2848c743385d41895723180b0cce83255.tar.gz
crawl-ref-a9a44cf2848c743385d41895723180b0cce83255.zip
Fixes for Gozag bugs related to level generation.
* Properly unmark off-level shops (#8498). * Don't deduct bribes for vetoed levels (if, say, Elf:3 vetoed a lot you'd notice your bribe running out immediately on entering the level).
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r--crawl-ref/source/dungeon.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 51e35b7b24..9204390017 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -17,7 +17,9 @@
#include "abyss.h"
#include "acquire.h"
+#include "act-iter.h"
#include "artefact.h"
+#include "attitude-change.h"
#include "branch.h"
#include "chardump.h"
#include "cloud.h"
@@ -342,7 +344,15 @@ bool builder(bool enable_random_maps, dungeon_feature_type dest_stairs_type)
try
{
if (_build_level_vetoable(enable_random_maps, dest_stairs_type))
+ {
+ for (monster_iterator mi; mi; ++mi)
+ gozag_set_bribe(*mi);
+
+ if (you.props.exists(GOZAG_ANNOUNCE_SHOP_KEY))
+ unmark_offlevel_shop(level_id::current());
+
return true;
+ }
}
catch (map_load_exception &mload)
{
@@ -371,9 +381,6 @@ bool builder(bool enable_random_maps, dungeon_feature_type dest_stairs_type)
}
}
- if (you.props.exists(GOZAG_ANNOUNCE_SHOP_KEY))
- unmark_offlevel_shop(level_id::current());
-
env.level_layout_types.clear();
return false;
}