summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/mon-place.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc
index 95d2c6897e..9ef799590c 100644
--- a/crawl-ref/source/mon-place.cc
+++ b/crawl-ref/source/mon-place.cc
@@ -592,11 +592,9 @@ static monster_type _resolve_monster_type(monster_type mon_type,
mon_type = MONS_DANCING_WEAPON;
else
{
- if (you.level_type == LEVEL_PORTAL_VAULT)
+ if (you.level_type == LEVEL_PORTAL_VAULT
+ && vault_mon_types.size() > 0)
{
- if (vault_mon_types.size() == 0)
- return (MONS_PROGRAM_BUG);
-
int i = choose_random_weighted(vault_mon_weights.begin(),
vault_mon_weights.end());
int type = vault_mon_types[i];
@@ -630,6 +628,13 @@ static monster_type _resolve_monster_type(monster_type mon_type,
return (mon_type);
}
}
+ else if (you.level_type == LEVEL_PORTAL_VAULT)
+ {
+ // XXX: We don't have a random monster list here, so pick one
+ // from where we were.
+ place.level_type = LEVEL_DUNGEON;
+ *lev_mons = place.absdepth();
+ }
int tries = 0;
while (tries++ < 300)