diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-16 12:49:37 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-16 12:49:37 +0000 |
commit | 5feccd8e038752a00f9408159da613ba7fd02be1 (patch) | |
tree | b651e9a18e33bd0a9fd6ae96bc896909dacc9e3f /crawl-ref/source/player.cc | |
parent | 419037df3337c41f70d12818c780a52b691265d2 (diff) | |
download | crawl-ref-5feccd8e038752a00f9408159da613ba7fd02be1.tar.gz crawl-ref-5feccd8e038752a00f9408159da613ba7fd02be1.zip |
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
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 18 |
1 files changed, 9 insertions, 9 deletions
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); } |