diff options
author | Neil Moore <neil@s-z.org> | 2014-05-10 14:14:19 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-05-10 14:21:41 -0400 |
commit | 2b8d6ef895db6532c4cff4c65f920d33580d527f (patch) | |
tree | 17a76316319de04da34d1766306a2b888f0cc54e /crawl-ref/source/mon-place.cc | |
parent | b4c3b502143418fb4fdb3faaa29a2ef6e9eabce5 (diff) | |
download | crawl-ref-2b8d6ef895db6532c4cff4c65f920d33580d527f.tar.gz crawl-ref-2b8d6ef895db6532c4cff4c65f920d33580d527f.zip |
Allow random monsters on random monster lists (#8520).
Diffstat (limited to 'crawl-ref/source/mon-place.cc')
-rw-r--r-- | crawl-ref/source/mon-place.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc index 6c75d2ecc4..3eedb2e16e 100644 --- a/crawl-ref/source/mon-place.cc +++ b/crawl-ref/source/mon-place.cc @@ -666,9 +666,14 @@ monster_type resolve_monster_type(monster_type mon_type, type = vault_mon_types[i]; // If the monster list says not to place, or to place - // by level, accept that. - if (type == MONS_NO_MONSTER || type == -1) + // by level, or to place a random monster, accept that. + // If it's random, we'll be recursively calling ourselves + // later on for the new monster type. + if (type == MONS_NO_MONSTER || type == -1 + || needs_resolution((monster_type)type)) + { break; + } } while (mon_type == RANDOM_MOBILE_MONSTER && mons_class_is_stationary((monster_type)type) |