From 442a5ea7681686ad1a8b65d7043ff69a55f87817 Mon Sep 17 00:00:00 2001 From: dolorous Date: Wed, 16 Jul 2008 02:34:07 +0000 Subject: Add miscellaneous minor fixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6572 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/player.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index f21bba49f5..8b974881a3 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -1781,13 +1781,13 @@ int player_prot_life(bool calc_unid, bool temp) } if (wearing_amulet(AMU_WARDING, calc_unid)) - ++pl; + pl++; // rings - pl += player_equip( EQ_RINGS, RING_LIFE_PROTECTION, calc_unid ); + pl += player_equip(EQ_RINGS, RING_LIFE_PROTECTION, calc_unid); // armour (checks body armour only) - pl += player_equip_ego_type( EQ_ALL_ARMOUR, SPARM_POSITIVE_ENERGY ); + pl += player_equip_ego_type(EQ_ALL_ARMOUR, SPARM_POSITIVE_ENERGY); // randart wpns pl += scan_randarts(RAP_NEGATIVE_ENERGY, calc_unid); @@ -1795,8 +1795,7 @@ int player_prot_life(bool calc_unid, bool temp) // undead/demonic power pl += player_mutation_level(MUT_NEGATIVE_ENERGY_RESISTANCE); - if (pl > 3) - pl = 3; + pl = std::min(3, pl); return (pl); } -- cgit v1.2.3-54-g00ecf