summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/files.cc7
-rw-r--r--crawl-ref/source/lev-pand.cc23
2 files changed, 19 insertions, 11 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index 78a766b910..60edca7c98 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -1109,9 +1109,10 @@ bool load( dungeon_feature_type stair_taken, load_mode_type load_mode,
if (you.char_direction == GDT_GAME_START
&& you.level_type == LEVEL_DUNGEON)
{
- // If we're leaving the Abyss for the first time as a Chaos Knight
- // of Lugonu (who start out there), force a return into the first
- // dungeon level and enable normal monster generation.
+ // If we're leaving the Abyss for the first time as a Chaos
+ // Knight of Lugonu (who start out there), force a return
+ // into the first dungeon level and enable normal monster
+ // generation.
you.your_level = 0;
you.char_direction = GDT_DESCENDING;
}
diff --git a/crawl-ref/source/lev-pand.cc b/crawl-ref/source/lev-pand.cc
index c5060b5df0..a5eac58c7c 100644
--- a/crawl-ref/source/lev-pand.cc
+++ b/crawl-ref/source/lev-pand.cc
@@ -25,11 +25,10 @@
void init_pandemonium(void)
{
int pc = 0;
- struct monsters *monster = 0; // NULL
- for (pc = 0; pc < MAX_MONSTERS; pc++)
+ for (pc = 0; pc < MAX_MONSTERS; ++pc)
{
- monster = &menv[pc];
+ monsters *monster = &menv[pc];
// Looks for unique demons and sets appropriate lists of demons.
// NB - also sets the level colours.
@@ -94,10 +93,10 @@ void init_pandemonium(void)
}
}
-// colour of monster 9 is colour of floor, 8 is colour of rock
-// IIRC, BLACK is set to LIGHTGRAY
+ // colour of monster 9 is colour of floor, 8 is colour of rock
+ // IIRC, BLACK is set to LIGHTGRAY
- for (pc = 0; pc < 10; pc++)
+ for (pc = 0; pc < 10; ++pc)
{
switch (random2(17))
{
@@ -116,8 +115,10 @@ void init_pandemonium(void)
}
if (one_chance_in(10))
+ {
env.mons_alloc[pc] =
static_cast<monster_type>(MONS_HELLION + random2(10));
+ }
if (one_chance_in(30))
env.mons_alloc[pc] = MONS_RED_DEVIL;
@@ -126,21 +127,29 @@ void init_pandemonium(void)
env.mons_alloc[pc] = MONS_IMP;
if (one_chance_in(20))
+ {
env.mons_alloc[pc] =
static_cast<monster_type>(MONS_DEMONIC_CRAWLER + random2(5));
+ }
}
if (one_chance_in(8))
+ {
env.mons_alloc[7] =
static_cast<monster_type>(MONS_EXECUTIONER + random2(5));
+ }
if (one_chance_in(5))
+ {
env.mons_alloc[8] =
static_cast<monster_type>(MONS_EXECUTIONER + random2(5));
+ }
if (one_chance_in(3))
+ {
env.mons_alloc[9] =
static_cast<monster_type>(MONS_EXECUTIONER + random2(5));
+ }
if (one_chance_in(10))
env.mons_alloc[7 + random2(3)] = MONS_FIEND;
@@ -170,9 +179,7 @@ void pandemonium_mons(void)
if (one_chance_in(40))
{
do
- {
pan_mons = random2(NUM_MONSTERS); // was random2(400) {dlb}
- }
while (!mons_pan(pan_mons));
}
mgen_data mg(static_cast<monster_type>(pan_mons));