diff options
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/beam.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 5ab52b9fe1..4b5a3c0071 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -4098,9 +4098,9 @@ static int _affect_player( bolt &beam, item_def *item ) was_affected = true; } - if (one_chance_in( 3 + 2 * player_prot_life() )) + if (one_chance_in(3 + 2 * player_prot_life())) { - potion_effect( POT_SLOWING, 5 ); + potion_effect(POT_SLOWING, 5); was_affected = true; } } 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); } |