From fb0146106d3060d34fe2c187a73e0bc3f1ba4082 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Fri, 6 Jul 2007 12:37:58 +0000 Subject: [1748706] Increase monster spawn rate after the player gets the Orb, add Pandemonium-type demons into the defender mix. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1773 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/acr.cc | 4 +-- crawl-ref/source/enum.h | 1 + crawl-ref/source/mon-util.cc | 5 +++- crawl-ref/source/monplace.cc | 59 +++++++++++++++++++++++++++++++++++--------- 4 files changed, 54 insertions(+), 15 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 7b0d2197b0..71d9ccc754 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -2465,14 +2465,14 @@ static void world_reacts() // place normal dungeon monsters, but not in player LOS if (you.level_type == LEVEL_DUNGEON && !player_in_branch( BRANCH_ECUMENICAL_TEMPLE ) - && one_chance_in((you.char_direction == DIR_DESCENDING) ? 240 : 10)) + && one_chance_in((you.char_direction == DIR_DESCENDING) ? 240 : 8)) { proximity_type prox = (one_chance_in(10) ? PROX_NEAR_STAIRS : PROX_AWAY_FROM_PLAYER); // The rules change once the player has picked up the Orb... if (you.char_direction == DIR_ASCENDING) - prox = (one_chance_in(10) ? PROX_CLOSE_TO_PLAYER : PROX_ANYWHERE); + prox = (one_chance_in(6) ? PROX_CLOSE_TO_PLAYER : PROX_ANYWHERE); mons_place( WANDERING_MONSTER, BEH_HOSTILE, MHITNOT, false, 50, 50, LEVEL_DUNGEON, prox ); diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index cd33d6c0e0..e62edb2b48 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -297,6 +297,7 @@ enum band_type BAND_BLINK_FROGS, BAND_SKELETAL_WARRIORS, // 44 BAND_DRACONIAN, // 45 + BAND_PANDEMONIUM_DEMON, NUM_BANDS // always last }; diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index bd1cc4da2c..8653c1cfd5 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -3163,7 +3163,10 @@ void monsters::pandemon_init() ev = ghost->values[ GVAL_EV ]; speed = (one_chance_in(3) ? 10 : 6 + roll_dice(2, 9)); speed_increment = 70; - colour = random_colour(); // demon's colour + if (you.char_direction == DIR_ASCENDING && you.level_type == LEVEL_DUNGEON) + colour = LIGHTRED; + else + colour = random_colour(); // demon's colour load_spells(MST_GHOST); } diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index a82b3303ab..3410ee40fb 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -762,6 +762,11 @@ static band_type choose_band( int mon_type, int power, int &band_size ) } break; + case MONS_PANDEMONIUM_DEMON: + band = BAND_PANDEMONIUM_DEMON; + band_size = random_range(4, 8); + break; + case MONS_HELLWING: if (coinflip()) { @@ -1013,7 +1018,28 @@ static int band_member(band_type band, int power) break; case BAND_EXECUTIONER: - mon_type = (coinflip() ? MONS_ABOMINATION_SMALL : MONS_ABOMINATION_LARGE); + mon_type = (coinflip() ? MONS_ABOMINATION_SMALL + : MONS_ABOMINATION_LARGE); + break; + + case BAND_PANDEMONIUM_DEMON: + if (one_chance_in(7)) + mon_type = random_choose_weighted(50, MONS_LICH, + 10, MONS_ANCIENT_LICH, + 0); + else if (one_chance_in(6)) + mon_type = random_choose_weighted(50, MONS_ABOMINATION_SMALL, + 40, MONS_ABOMINATION_LARGE, + 10, MONS_TENTACLED_MONSTROSITY, + 0); + else + mon_type = + summon_any_demon( + static_cast( + random_choose_weighted(50, DEMON_COMMON, + 20, DEMON_GREATER, + 10, DEMON_RANDOM, + 0))); break; case BAND_HELLWING: @@ -1204,13 +1230,29 @@ void mark_interesting_monst(struct monsters* monster, beh_type behaviour) // PUBLIC FUNCTION -- mons_place(). +static int pick_zot_exit_defender() +{ + if (one_chance_in(9)) + return (MONS_PANDEMONIUM_DEMON); + + const int temp_rand = random2(276); + const int mon_type = + ((temp_rand > 184) ? MONS_WHITE_IMP + random2(15) : // 33.33% + (temp_rand > 104) ? MONS_HELLION + random2(10) : // 28.99% + (temp_rand > 78) ? MONS_HELL_HOUND : // 9.06% + (temp_rand > 54) ? MONS_ABOMINATION_LARGE : // 8.70% + (temp_rand > 33) ? MONS_ABOMINATION_SMALL : // 7.61% + (temp_rand > 13) ? MONS_RED_DEVIL // 7.25% + : MONS_PIT_FIEND); // 5.07% + + return (mon_type); +} + int mons_place( int mon_type, beh_type behaviour, int target, bool summoned, int px, int py, int level_type, proximity_type proximity, int extra, int dur, bool permit_bands ) { int mon_count = 0; - int temp_rand; // probability determination {dlb} - for (int il = 0; il < MAX_MONSTERS; il++) { if (menv[il].type != -1) @@ -1234,15 +1276,8 @@ int mons_place( int mon_type, beh_type behaviour, int target, bool summoned, if (you.char_direction == DIR_ASCENDING && mon_type == RANDOM_MONSTER && you.level_type == LEVEL_DUNGEON) { - temp_rand = random2(276); - - mon_type = ((temp_rand > 184) ? MONS_WHITE_IMP + random2(15) : // 33.33% - (temp_rand > 104) ? MONS_HELLION + random2(10) : // 28.99% - (temp_rand > 78) ? MONS_HELL_HOUND : // 9.06% - (temp_rand > 54) ? MONS_ABOMINATION_LARGE : // 8.70% - (temp_rand > 33) ? MONS_ABOMINATION_SMALL : // 7.61% - (temp_rand > 13) ? MONS_RED_DEVIL // 7.25% - : MONS_PIT_FIEND); // 5.07% + mon_type = pick_zot_exit_defender(); + permit_bands = true; } if (permit_bands -- cgit v1.2.3-54-g00ecf