From 5feccd8e038752a00f9408159da613ba7fd02be1 Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 16 Jul 2009 12:49:37 +0000 Subject: Fix inconsistencies with resistance displays in the "%" screen, including a fix for [2822291]. (For the record, there still seem to be some inconsistencies with how many levels some resistances have; do acid resistance and clarity have 3 levels or 1?) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10229 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/player.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index a3af5c9ebb..853da7983e 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -1545,8 +1545,14 @@ int player_res_acid(bool calc_unid, bool items) res += player_mutation_level(MUT_YELLOW_SCALES) * 2 / 3; } - if (items && wearing_amulet(AMU_RESIST_CORROSION, calc_unid)) - res++; + if (items) + { + if (wearing_amulet(AMU_RESIST_CORROSION, calc_unid)) + res++; + + if (player_equip_ego_type(EQ_CLOAK, SPARM_PRESERVATION)) + res++; + } return (res); } @@ -4381,12 +4387,6 @@ std::string species_name(species_type speci, int level, bool genus, bool adj) return res; } -bool player_res_corrosion(bool calc_unid) -{ - return (player_equip(EQ_AMULET, AMU_RESIST_CORROSION, calc_unid) - || player_equip_ego_type(EQ_CLOAK, SPARM_PRESERVATION)); -} - bool player_item_conserve(bool calc_unid) { return (player_equip(EQ_AMULET, AMU_CONSERVATION, calc_unid) @@ -6703,7 +6703,7 @@ int player::warding() const && piety >= piety_breakpoint(2)) { // Clamp piety at 160 and scale that down to a max of 30. - const int wardpiety = piety > 160? 160 : piety; + const int wardpiety = piety > 160 ? 160 : piety; return (wardpiety * 3 / 16); } -- cgit v1.2.3-54-g00ecf