diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-11 18:15:44 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-11 18:15:44 +0000 |
commit | 357f6f846a84ba771abf9b2610de26adc4e658bb (patch) | |
tree | a87c785d871afa9a4dae4b7ddfceeb30d83f3655 | |
parent | 8139b72640321839d4f19245ed323030840294be (diff) | |
download | crawl-ref-357f6f846a84ba771abf9b2610de26adc4e658bb.tar.gz crawl-ref-357f6f846a84ba771abf9b2610de26adc4e658bb.zip |
Trunk->0.3 merge: 2434-2437 (efreets, Beogh, enchantment durations, Lugonu corruption).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.3@2438 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/abl-show.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/abyss.cc | 21 | ||||
-rw-r--r-- | crawl-ref/source/dat/shout.txt | 2 | ||||
-rw-r--r-- | crawl-ref/source/dat/speak.txt | 4 | ||||
-rw-r--r-- | crawl-ref/source/fight.cc | 17 | ||||
-rw-r--r-- | crawl-ref/source/it_use3.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/mon-util.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/view.cc | 5 |
8 files changed, 46 insertions, 16 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc index 3c43ddeccb..9090078ec5 100644 --- a/crawl-ref/source/abl-show.cc +++ b/crawl-ref/source/abl-show.cc @@ -294,7 +294,7 @@ static const ability_def Ability_List[] = { ABIL_LUGONU_BANISH, "Banish", 4, 0, 200, generic_cost::range(3, 4), ABFLAG_NONE }, { ABIL_LUGONU_CORRUPT, "Corrupt", - 7, 5, 500, generic_cost::fixed(10), ABFLAG_NONE }, + 7, 5, 500, generic_cost::range(10, 14), ABFLAG_NONE }, { ABIL_LUGONU_ABYSS_ENTER, "Enter the Abyss", 9, 0, 500, generic_cost::fixed(35), ABFLAG_NONE }, diff --git a/crawl-ref/source/abyss.cc b/crawl-ref/source/abyss.cc index 3a6a951205..84c8f02fb5 100644 --- a/crawl-ref/source/abyss.cc +++ b/crawl-ref/source/abyss.cc @@ -428,7 +428,7 @@ static bool spawn_corrupted_servant_near(const coord_def &pos) one_chance_in(5 + you.skills[SK_INVOCATIONS] / 4)? BEH_HOSTILE : BEH_NEUTRAL; const int mid = - create_monster( mons, 3, beh, p.x, p.y, MHITNOT, 250 ); + create_monster( mons, 5, beh, p.x, p.y, MHITNOT, 250 ); return (mid != -1); } @@ -447,7 +447,7 @@ static void apply_corruption_effect( for (int i = 0; i < neffects; ++i) { - if (random2(7000) < cmark->duration) + if (random2(4000) < cmark->duration) { if (!spawn_corrupted_servant_near(cmark->pos)) break; @@ -632,6 +632,20 @@ static bool is_level_incorruptible() return (false); } +static void corrupt_choose_colours() +{ + int colour = BLACK; + do + colour = random_uncommon_colour(); + while (colour == env.rock_colour || colour == LIGHTGREY || colour == WHITE); + env.rock_colour = colour; + do + colour = random_uncommon_colour(); + while (colour == env.floor_colour || colour == LIGHTGREY + || colour == WHITE); + env.floor_colour = colour; +} + bool lugonu_corrupt_level(int power) { if (is_level_incorruptible()) @@ -648,7 +662,8 @@ bool lugonu_corrupt_level(int power) generate_abyss(); generate_area(MAPGEN_BORDER, MAPGEN_BORDER, GXM - MAPGEN_BORDER, GYM - MAPGEN_BORDER); - dgn_set_colours_from_monsters(); + + corrupt_choose_colours(); std::auto_ptr<crawl_environment> abyssal(new crawl_environment(env)); env = *backup; diff --git a/crawl-ref/source/dat/shout.txt b/crawl-ref/source/dat/shout.txt index 491b36b8bb..e18fcdbd07 100644 --- a/crawl-ref/source/dat/shout.txt +++ b/crawl-ref/source/dat/shout.txt @@ -74,7 +74,7 @@ SOUND:You hear an angry hiss. %%%% __DEMON_TAUNT -@The_monster@ @says@: @demon_taunt@ +@The_monster@ @says@, "@demon_taunt@" ############################################ # End of default shouts ############################################ diff --git a/crawl-ref/source/dat/speak.txt b/crawl-ref/source/dat/speak.txt index 76214f39ac..897e868b22 100644 --- a/crawl-ref/source/dat/speak.txt +++ b/crawl-ref/source/dat/speak.txt @@ -300,11 +300,11 @@ VISUAL:@The_monster@ picks up a beetle and eats it. %%%% _demon_taunt_ -@The_monster@ @says@: @demon_taunt@ +@The_monster@ @says@, "@demon_taunt@" %%%% _imp_taunt_ -@The_monster@ @says@: @imp_taunt@ +@The_monster@ @says@, "@imp_taunt@" ########################################## # Messages by monster body shape ########################################## diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 5107b608df..225af20a2d 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -1118,10 +1118,21 @@ int melee_attack::player_apply_weapon_bonuses(int damage) if (get_equip_race(*weapon) == ISFLAG_ORCISH && you.species == SP_HILL_ORC) { - if (you.religion == GOD_BEOGH && !you.penance[GOD_BEOGH] - && (you.piety > 80 || coinflip())) + if (you.religion == GOD_BEOGH && !you.penance[GOD_BEOGH]) { - damage++; +#ifdef DEBUG_DIAGNOSTICS + const int orig_damage = damage; +#endif + if (you.piety > 80 || coinflip()) + damage++; + damage += + random2avg( + div_rand_round( + std::min(static_cast<int>(you.piety), 180), 33), 2); +#ifdef DEBUG_DIAGNOSTICS + mprf(MSGCH_DIAGNOSTICS, "Damage: %d -> %d, Beogh bonus: %d", + orig_damage, damage, damage - orig_damage); +#endif } if (coinflip()) diff --git a/crawl-ref/source/it_use3.cc b/crawl-ref/source/it_use3.cc index 8b4d01d9d5..0ae2f6524b 100644 --- a/crawl-ref/source/it_use3.cc +++ b/crawl-ref/source/it_use3.cc @@ -680,12 +680,13 @@ bool evoke_wielded( void ) static bool efreet_flask(void) { - const beh_type behaviour = ((you.skills[SK_EVOCATIONS] > random2(20)) - ? BEH_FRIENDLY : BEH_HOSTILE); + const beh_type behaviour = + ((you.skills[SK_EVOCATIONS] / 3 + 10 > random2(20)) + ? BEH_FRIENDLY : BEH_HOSTILE); mpr("You open the flask..."); - const int efreet = create_monster( MONS_EFREET, 5, behaviour, + const int efreet = create_monster( MONS_EFREET, 0, behaviour, you.x_pos, you.y_pos, MHITYOU, 250, false, false, true ); if (efreet != -1) diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 8c42ae01f5..76dbb429c6 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -4775,8 +4775,10 @@ int mon_enchant::calc_duration(const monsters *mons, cturn = 150 / (1 + modded_speed(mons, 5)); break; case ENCH_PARALYSIS: + cturn = std::max(90 / modded_speed(mons, 5), 3); + break; case ENCH_CONFUSION: - cturn = 120 / modded_speed(mons, 5); + cturn = std::max(100 / modded_speed(mons, 5), 3); break; case ENCH_HELD: cturn = 90 / mod_speed(25, mons->speed); diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index dbb211a3e6..25745ec121 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -4132,7 +4132,7 @@ void view_update_at(const coord_def &pos) flash_colour = viewmap_flash_colour(); gotoxy(vp.x, vp.y); - textcolor(flash_colour? flash_colour : colour); + textcolor(flash_colour? real_colour(flash_colour) : colour); putwch(ch); } @@ -4338,7 +4338,8 @@ void viewwindow(bool draw_it, bool do_updates) // alter colour if flashing the characters vision if (flash_colour && buffy[bufcount]) buffy[bufcount + 1] = - see_grid(gc.x, gc.y)? flash_colour : DARKGREY; + see_grid(gc.x, gc.y)? + real_colour(flash_colour) : DARKGREY; bufcount += 2; } |