summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-10-07 22:01:31 +0200
committerAdam Borowski <kilobyte@angband.pl>2009-10-07 22:01:31 +0200
commit50b9bb4b63d32d75b429469415e71f477116e2ae (patch)
tree203d1a30304d7be2da53e38180d5e96021b96241 /crawl-ref
parent34f6cf483cb58cd6130b71709df70338cc676a16 (diff)
downloadcrawl-ref-50b9bb4b63d32d75b429469415e71f477116e2ae.tar.gz
crawl-ref-50b9bb4b63d32d75b429469415e71f477116e2ae.zip
Allow Gastronok and Prince Ribbit to generate in the Lair. (due)
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/branch.cc6
-rw-r--r--crawl-ref/source/dungeon.cc9
2 files changed, 12 insertions, 3 deletions
diff --git a/crawl-ref/source/branch.cc b/crawl-ref/source/branch.cc
index 6d2851d98f..7a90464794 100644
--- a/crawl-ref/source/branch.cc
+++ b/crawl-ref/source/branch.cc
@@ -186,9 +186,9 @@ Branch branches[] = {
DNGN_ENTER_LAIR, DNGN_RETURN_FROM_LAIR,
"Lair", "the Lair of Beasts", "Lair",
NULL,
- true, false, GREEN, BROWN,
- mons_lair_rare, mons_lair_level,
- NULL, NULL, NULL, NULL,
+ true, true, GREEN, BROWN, // HACK to allow placement of
+ mons_lair_rare, mons_lair_level, // MONS_GASTRONOK. All other
+ NULL, NULL, NULL, NULL, // uniques are ignored.
5, 'L', false, false },
{ BRANCH_SWAMP, BRANCH_LAIR, 5, 3, BFLAG_ISLANDED, 0,
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 8f8cee0e81..c6c4bb3a84 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -3350,6 +3350,15 @@ static monster_type _pick_unique(int lev)
return MONS_PROGRAM_BUG;
}
+ else if (player_in_branch(BRANCH_LAIR))
+ {
+ if (player_branch_depth() > 5 && one_chance_in(3))
+ return MONS_GASTRONOK;
+ else if (player_branch_depth() < 3 && one_chance_in(4))
+ return MONS_PRINCE_RIBBIT;
+ else
+ return MONS_PROGRAM_BUG;
+ }
// First, pick generic unique depending on depth.
int which_unique =