From 6622dd9e4820835af7bd93903346a6282db61cf3 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Fri, 11 Jul 2008 13:00:50 +0000 Subject: Add missing amulet types to autopickup_exceptions.txt (BR 2013462) Add short descriptions of Makhleb's powers. Fix wrong colouring of single level resistances. (BR 2015107) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6493 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/dat/descript/ability.txt | 16 +++++---- crawl-ref/source/output.cc | 56 +++++++++++++++++-------------- 2 files changed, 40 insertions(+), 32 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/dat/descript/ability.txt b/crawl-ref/source/dat/descript/ability.txt index d8fcdba891..b40790c49a 100644 --- a/crawl-ref/source/dat/descript/ability.txt +++ b/crawl-ref/source/dat/descript/ability.txt @@ -253,19 +253,21 @@ your magical contamination and may eventually cause glowing. # Makhleb Minor Destruction -There's currently no description for this ability... +Shoot a random harmful beam at the targetted monster. %%%% Lesser Servant of Makhleb -There's currently no description for this ability... +Summon a minor demon, with a chance of being hostile at low Invocations +skill. %%%% Major Destruction -There's currently no description for this ability... +Inflict a random harmful beam or explosion on the targetted monster. %%%% Greater Servant of Makhleb -There's currently no description for this ability... +Summon a major demon, with a chance of being hostile at low Invocations +skill. %%%% # Sif Muna Channel Energy @@ -376,9 +378,9 @@ which one to keep. Discard the other two. %%%% Mark Four -Draw four cards from your wielded deck, remember them and shuffle them -back into the deck. The deck will be inscribed as containing those -cards, and doing so will identify the deck. +Draw four cards from your wielded deck, mark and remember them and +shuffle them back into the deck. The deck will be inscribed as +containing those cards, and doing so will identify the deck. %%%% Stack Five diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index c0a57cabd7..cc48f273a0 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -1600,20 +1600,26 @@ int equip_name_to_slot(const char *s) return -1; } -static const char* _determine_color_string( int level ) +// Colour the string according to the level of an ability/resistance. +// Take maximum possible level into account. +static const char* _determine_colour_string( int level, int max_level ) { - switch ( level ) + switch (level) { case 3: case 2: - return ""; + if (max_level > 1) + return ""; + // else fall-through case 1: return ""; - case -1: - return ""; case -2: case -3: - return ""; + if (max_level > 1) + return ""; + // else fall-through + case -1: + return ""; default: return ""; } @@ -1889,14 +1895,14 @@ static std::vector _get_overview_resistances( "%sSust.Abil.: %s\n" "%sRes.Mut. : %s\n" "%sRes.Slow : %s\n", - _determine_color_string(rfire), itosym3(rfire), - _determine_color_string(rcold), itosym3(rcold), - _determine_color_string(rlife), itosym3(rlife), - _determine_color_string(rpois), itosym1(rpois), - _determine_color_string(relec), itosym1(relec), - _determine_color_string(rsust), itosym1(rsust), - _determine_color_string(rmuta), itosym1(rmuta), - _determine_color_string(rslow), itosym1(rslow)); + _determine_colour_string(rfire, 3), itosym3(rfire), + _determine_colour_string(rcold, 3), itosym3(rcold), + _determine_colour_string(rlife, 3), itosym3(rlife), + _determine_colour_string(rpois, 1), itosym1(rpois), + _determine_colour_string(relec, 1), itosym1(relec), + _determine_colour_string(rsust, 1), itosym1(rsust), + _determine_colour_string(rmuta, 1), itosym1(rmuta), + _determine_colour_string(rslow, 1), itosym1(rslow)); cols.add_formatted(0, buf, false); int saplevel = player_mutation_level(MUT_SAPROVOROUS); @@ -1914,7 +1920,7 @@ static std::vector _get_overview_resistances( postgourmand = itosym3(saplevel); } snprintf(buf, sizeof buf, "%s%s%s", - _determine_color_string(saplevel), pregourmand, postgourmand); + _determine_colour_string(saplevel, 3), pregourmand, postgourmand); cols.add_formatted(0, buf, false); @@ -1932,23 +1938,23 @@ static std::vector _get_overview_resistances( "%sRes.Corr. : %s\n" "%sClarity : %s\n" "\n", - _determine_color_string(rinvi), itosym1(rinvi), - _determine_color_string(rward), itosym1(rward), - _determine_color_string(rcons), itosym1(rcons), - _determine_color_string(rcorr), itosym1(rcorr), - _determine_color_string(rclar), itosym1(rclar)); + _determine_colour_string(rinvi, 1), itosym1(rinvi), + _determine_colour_string(rward, 1), itosym1(rward), + _determine_colour_string(rcons, 1), itosym1(rcons), + _determine_colour_string(rcorr, 1), itosym1(rcorr), + _determine_colour_string(rclar, 1), itosym1(rclar)); cols.add_formatted(1, buf, false); if ( scan_randarts(RAP_PREVENT_TELEPORTATION, calc_unid) ) { snprintf(buf, sizeof buf, "\n%sPrev.Telep.: %s", - _determine_color_string(-1), itosym1(1)); + _determine_colour_string(-1, 1), itosym1(1)); } else { const int rrtel = !!player_teleport(calc_unid); snprintf(buf, sizeof buf, "\n%sRnd.Telep. : %s", - _determine_color_string(rrtel), itosym1(rrtel)); + _determine_colour_string(rrtel, 1), itosym1(rrtel)); } cols.add_formatted(1, buf, false); @@ -1959,9 +1965,9 @@ static std::vector _get_overview_resistances( "%sCtrl.Telep.: %s\n" "%sLevitation : %s\n" "%sCtrl.Flight: %s\n", - _determine_color_string(rctel), itosym1(rctel), - _determine_color_string(rlevi), itosym1(rlevi), - _determine_color_string(rcfli), itosym1(rcfli)); + _determine_colour_string(rctel, 1), itosym1(rctel), + _determine_colour_string(rlevi, 1), itosym1(rlevi), + _determine_colour_string(rcfli, 1), itosym1(rcfli)); cols.add_formatted(1, buf, false); _print_overview_screen_equip(cols, equip_chars); -- cgit v1.2.3-54-g00ecf