From ce71111835c88253978c5c0b0417bff0c2afbd17 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Thu, 11 Oct 2007 18:09:32 +0000 Subject: Fixed Lugonu's Corruption, remaining cases of truncated monster shouts. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2437 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/abl-show.cc | 2 +- crawl-ref/source/abyss.cc | 21 ++++++++++++++++++--- crawl-ref/source/beam.cc | 5 ++++- crawl-ref/source/dat/shout.txt | 2 +- crawl-ref/source/dat/speak.txt | 4 ++-- crawl-ref/source/view.cc | 5 +++-- 6 files changed, 29 insertions(+), 10 deletions(-) diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc index 05e698dcd2..cd375800bc 100644 --- a/crawl-ref/source/abl-show.cc +++ b/crawl-ref/source/abl-show.cc @@ -295,7 +295,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 5bf3c7d763..17885b967b 100644 --- a/crawl-ref/source/abyss.cc +++ b/crawl-ref/source/abyss.cc @@ -565,7 +565,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); } @@ -584,7 +584,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; @@ -769,6 +769,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()) @@ -785,7 +799,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 abyssal(new crawl_environment(env)); env = *backup; diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 3542b790ef..d48cfc979f 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -2193,6 +2193,8 @@ void fire_tracer(const monsters *monster, bolt &pbolt) // init tracer variables pbolt.foe_count = pbolt.fr_count = 0; pbolt.foe_power = pbolt.fr_power = 0; + pbolt.fr_helped = pbolt.fr_hurt = 0; + pbolt.foe_helped = pbolt.foe_hurt = 0; pbolt.foe_ratio = 80; // default - see mons_should_fire() // foe ratio for summon gtr. demons & undead -- they may be @@ -4770,7 +4772,8 @@ bolt::bolt() : range(0), rangeMax(0), type(SYM_ZAP), colour(BLACK), is_thrown(false), target_first(false), aimed_at_spot(false), aux_source(), affects_nothing(false), obvious_effect(false), effect_known(true), fr_count(0), foe_count(0), fr_power(0), - foe_power(0), is_tracer(false), aimed_at_feet(false), + foe_power(0), fr_hurt(0), foe_hurt(0), fr_helped(0), + foe_helped(0), is_tracer(false), aimed_at_feet(false), msg_generated(false), in_explosion_phase(false), smart_monster(false), can_see_invis(false), attitude(ATT_HOSTILE), foe_ratio(0), chose_ray(false) 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 3d501b0bcb..228e8e5bc3 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/view.cc b/crawl-ref/source/view.cc index 15445edea6..f643b4a8de 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -4250,7 +4250,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); } @@ -4461,7 +4461,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; } -- cgit v1.2.3-54-g00ecf