diff options
author | Neil Moore <neil@s-z.org> | 2014-07-10 01:35:12 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-07-10 01:35:26 -0400 |
commit | 058f5593ce4eddafaed5da1aa383ad73a830ba91 (patch) | |
tree | cf80a5f0a8842d8a909b0cf95a335b763fb2fccf /crawl-ref/source/dungeon.cc | |
parent | 201bb1394833a7f418da3c511a7f7eb47b79918a (diff) | |
download | crawl-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/source/dungeon.cc')
-rw-r--r-- | crawl-ref/source/dungeon.cc | 8 |
1 files changed, 7 insertions, 1 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); |