summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dungeon.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-19 19:04:23 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-19 19:04:23 +0000
commit2817900512f1f92a5d8738723373ab378fd1d6e5 (patch)
treebe26e14a39ad8bafe9b5a63b48b01ebb8772d9c2 /crawl-ref/source/dungeon.cc
parentaf7b69fc5936d24c9ee0bbb5bc787cb194f7c26f (diff)
downloadcrawl-ref-2817900512f1f92a5d8738723373ab378fd1d6e5.tar.gz
crawl-ref-2817900512f1f92a5d8738723373ab378fd1d6e5.zip
Add yet more Jiyva-related cleanups. Make sure his altars are never
generated if the royal jelly is dead, you don't worship Jiyva, and you're not under penance from Jiyva; don't destroy Jiyva's altars if the royal jelly dies after you start worshipping him or go under penance from him; and clean up the alternate method for unlocking the Slime Pits. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10332 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r--crawl-ref/source/dungeon.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 7d51dc92ea..ee9d3f61d4 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -45,6 +45,7 @@ REVISION("$Rev$");
#include "notes.h"
#include "place.h"
#include "player.h"
+#include "religion.h"
#include "spells3.h"
#include "spl-book.h"
#include "state.h"
@@ -4894,6 +4895,9 @@ static void _vault_grid( vault_placement &place,
(vgrid == '\0')? DNGN_ROCK_WALL
: DNGN_FLOOR); // includes everything else
+ if (grd(where) == DNGN_ALTAR_JIYVA && jiyva_is_dead())
+ grd(where) = DNGN_FLOOR;
+
// then, handle oddball grids {dlb}:
switch (vgrid)
{
@@ -5048,7 +5052,7 @@ static void _vault_grid( vault_placement &place,
"else; please file a bug report.",
mons_type_name(monster_type_thing.mid,
DESC_CAP_THE).c_str());
- // Force it to be generated anyways.
+ // Force it to be generated anyway.
you.unique_creatures[monster_type_thing.mid] = false;
}
}
@@ -5340,7 +5344,7 @@ static dungeon_feature_type _pick_an_altar()
dungeon_feature_type altar_type;
int temp_rand; // probability determination {dlb}
- if (player_in_branch( BRANCH_ECUMENICAL_TEMPLE )
+ if (player_in_branch(BRANCH_ECUMENICAL_TEMPLE)
|| you.level_type == LEVEL_LABYRINTH)
{
// No extra altars in Temple, none at all in Labyrinth.
@@ -5391,7 +5395,7 @@ static dungeon_feature_type _pick_an_altar()
break;
case BRANCH_SLIME_PITS:
- altar_type = DNGN_ALTAR_JIYVA;
+ altar_type = jiyva_is_dead() ? DNGN_FLOOR : DNGN_ALTAR_JIYVA;
break;
case BRANCH_TOMB: