summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-07-10 01:35:12 -0400
committerNeil Moore <neil@s-z.org>2014-07-10 01:35:26 -0400
commit058f5593ce4eddafaed5da1aa383ad73a830ba91 (patch)
treecf80a5f0a8842d8a909b0cf95a335b763fb2fccf /crawl-ref
parent201bb1394833a7f418da3c511a7f7eb47b79918a (diff)
downloadcrawl-ref-058f5593ce4eddafaed5da1aa383ad73a830ba91.tar.gz
crawl-ref-058f5593ce4eddafaed5da1aa383ad73a830ba91.zip
Allow &Pminivault (Grunt)
If the player specified a minivault with &P, try to build a level containing that minivault. If the level doesn't try to place minivaults (encompass levels) there is no effect, but otherwise the level will be vetoed if the requested vault did not place.
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/dungeon.cc8
-rw-r--r--crawl-ref/source/wiz-dgn.cc10
2 files changed, 11 insertions, 7 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 2751878a01..d402d3f0e9 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -3225,8 +3225,14 @@ static void _place_chance_vaults()
static void _place_minivaults()
{
- // Always try to place PLACE:X minivaults.
const map_def *vault = NULL;
+ // First place the vault requested with &P
+ if (you.props.exists("force_minivault")
+ && (vault = find_map_by_name(you.props["force_minivault"])))
+ {
+ _dgn_ensure_vault_placed(_build_secondary_vault(vault), false);
+ }
+ // Always try to place PLACE:X minivaults.
if ((vault = random_map_for_place(level_id::current(), true)))
_build_secondary_vault(vault);
diff --git a/crawl-ref/source/wiz-dgn.cc b/crawl-ref/source/wiz-dgn.cc
index 38748f66f6..937fd154c9 100644
--- a/crawl-ref/source/wiz-dgn.cc
+++ b/crawl-ref/source/wiz-dgn.cc
@@ -614,13 +614,11 @@ static void debug_load_map_by_name(string name, bool primary)
if (primary)
{
if (toplace->is_minivault())
- {
- mpr("This is a mini-vault, can't base a layout on it.");
- return;
- }
-
- you.props["force_map"] = toplace->name;
+ you.props["force_minivault"] = toplace->name;
+ else
+ you.props["force_map"] = toplace->name;
wizard_recreate_level();
+ you.props.erase("force_minivault");
you.props.erase("force_map");
// We just saved with you.props["force_map"] set; save again in