summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monplace.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-21 00:53:32 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-21 00:53:32 +0000
commit98d71af18e34930c1e4e8ac4a42a0b76edc21415 (patch)
tree55a85088fe0d5f778408d82c322af10cb59aeb8d /crawl-ref/source/monplace.cc
parentb79c592eaecb4703b0aa03c5b12c502aaa284788 (diff)
downloadcrawl-ref-98d71af18e34930c1e4e8ac4a42a0b76edc21415.tar.gz
crawl-ref-98d71af18e34930c1e4e8ac4a42a0b76edc21415.zip
Moderate OOD on D:1 is activated only after 700 turns spent on D:1. Other levels continue to enjoy moderate OOD as normal.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4429 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r--crawl-ref/source/monplace.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 5590bf84b2..c5a21548a1 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -147,13 +147,18 @@ bool monster_can_submerge(const monsters *mons, dungeon_feature_type grid)
}
}
-static bool need_super_ood(int lev_mons)
+static bool _need_moderate_ood(int lev_mons)
+{
+ return (env.turns_on_level > 700 - lev_mons * 117);
+}
+
+static bool _need_super_ood(int lev_mons)
{
return (env.turns_on_level > 1400 - lev_mons * 117
&& one_chance_in(5000));
}
-static int fuzz_mons_level(int level)
+static int _fuzz_mons_level(int level)
{
if (one_chance_in(7))
{
@@ -247,10 +252,13 @@ monster_type pick_random_monster(const level_id &place,
if (place.branch == BRANCH_MAIN_DUNGEON
&& lev_mons < 28)
{
- lev_mons = fuzz_mons_level(lev_mons);
+ // If on D:1, allow moderately out-of-depth monsters only after
+ // a certain elapsed turn count on the level (currently 700 turns).
+ if (lev_mons || _need_moderate_ood(lev_mons))
+ lev_mons = _fuzz_mons_level(lev_mons);
// potentially nasty surprise, but very rare
- if (need_super_ood(lev_mons))
+ if (_need_super_ood(lev_mons))
lev_mons += random2(12);
// slightly out of depth monsters are more common: