From a5f6b9ec2ffcbdebca189f4fed30b8f1e24727dc Mon Sep 17 00:00:00 2001 From: dshaligram Date: Sun, 21 Oct 2007 13:05:22 +0000 Subject: [1800206] Ghoul food cleanup (dolorous). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2504 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/output.cc | 77 ++++++---------------------------------------- 1 file changed, 9 insertions(+), 68 deletions(-) (limited to 'crawl-ref/source/output.cc') diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index b5d219a19f..32c2572f9d 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -917,30 +917,7 @@ std::vector get_full_detail(bool calc_unid, long sc) determine_color_string(rcorr), itosym1(rcorr)); cols.add_formatted(2, buf, false); - int saplevel = 0; - switch (you.species) - { - case SP_GHOUL: - saplevel = 3; - snprintf(buf, sizeof buf, "%sSaprovore : %s", - determine_color_string(3), itosym3(3) ); - break; - - case SP_KOBOLD: - case SP_TROLL: - saplevel = 2; - snprintf(buf, sizeof buf, "%sSaprovore : %s", - determine_color_string(2), itosym3(2) ); - break; - - case SP_HILL_ORC: - case SP_OGRE: - saplevel = 1; - break; - default: - saplevel = 0; - break; - } + int saplevel = you.mutation[MUT_SAPROVOROUS]; const char* pregourmand; const char* postgourmand; if ( wearing_amulet(AMU_THE_GOURMAND, calc_unid) ) @@ -1171,30 +1148,7 @@ void print_overview_screen() determine_color_string(rslow), itosym1(rslow)); cols.add_formatted(0, buf, false); - int saplevel = 0; - switch (you.species) - { - case SP_GHOUL: - saplevel = 3; - snprintf(buf, sizeof buf, "%sSaprovore : %s", - determine_color_string(3), itosym3(3) ); - break; - - case SP_KOBOLD: - case SP_TROLL: - saplevel = 2; - snprintf(buf, sizeof buf, "%sSaprovore : %s", - determine_color_string(2), itosym3(2) ); - break; - - case SP_HILL_ORC: - case SP_OGRE: - saplevel = 1; - break; - default: - saplevel = 0; - break; - } + int saplevel = you.mutation[MUT_SAPROVOROUS]; const char* pregourmand; const char* postgourmand; if ( wearing_amulet(AMU_THE_GOURMAND, calc_unid) ) @@ -1598,16 +1552,6 @@ std::string status_mut_abilities() have_any = true; break; - case SP_TROLL: - text += "saprovore 2"; - have_any = true; - break; - - case SP_GHOUL: - text += "saprovore 3"; - have_any = true; - break; - case SP_GREY_ELF: if (you.experience_level > 4) { @@ -1714,16 +1658,6 @@ std::string status_mut_abilities() } break; - case SP_KOBOLD: - text += "saprovore 2"; - have_any = true; - break; - - case SP_HILL_ORC: - case SP_OGRE: - text += "saprovore 1"; - have_any = true; - break; default: break; } //end switch - innate abilities @@ -1798,6 +1732,13 @@ std::string status_mut_abilities() text += "poison resistance"; have_any = true; break; + case MUT_SAPROVOROUS: + if (have_any) + text += ", "; + snprintf(info, INFO_SIZE, "saprovore %d", level); + text += info; + have_any = true; + break; case MUT_CARNIVOROUS: if (have_any) text += ", "; -- cgit v1.2.3-54-g00ecf