diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-30 18:18:31 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-30 18:18:31 +0000 |
commit | d47f4a6ad3a9e994174d2c658615b8e0f41fcd7c (patch) | |
tree | 8da991aae3605f8d803dd0cb0621e33a6e31e597 /crawl-ref/source/lev-pand.cc | |
parent | ed6695050844ec27b944856ab7496e44d47e40ad (diff) | |
download | crawl-ref-d47f4a6ad3a9e994174d2c658615b8e0f41fcd7c.tar.gz crawl-ref-d47f4a6ad3a9e994174d2c658615b8e0f41fcd7c.zip |
Add miscellaneous minor fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6257 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/lev-pand.cc')
-rw-r--r-- | crawl-ref/source/lev-pand.cc | 23 |
1 files changed, 15 insertions, 8 deletions
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)); |