summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorBrendan Hickey <brendan@bhickey.net>2009-11-15 18:01:51 -0500
committerAdam Borowski <kilobyte@angband.pl>2009-11-16 00:17:05 +0100
commit9545c801bea5a95123b1a1c5ce031c12c112a334 (patch)
tree11c1c2725ecc82006881d726bd51192a2421d603 /crawl-ref/source/player.cc
parente99302324e74bd0a6dc88c08842c03e2807e1318 (diff)
downloadcrawl-ref-9545c801bea5a95123b1a1c5ce031c12c112a334.tar.gz
crawl-ref-9545c801bea5a95123b1a1c5ce031c12c112a334.zip
Used cannonical ego counting.
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc15
1 files changed, 2 insertions, 13 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 0c8e9cf601..689b69834a 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -1796,17 +1796,6 @@ int player_prot_life(bool calc_unid, bool temp, bool items)
return (pl);
}
-int _ponderous_count(){
- int count = 0;
-
- for( int slot = EQ_CLOAK ; slot <= EQ_BODY_ARMOUR; ++slot){
- if (player_equip_ego_type( slot, SPARM_PONDEROUSNESS ))
- count += 1;
- }
-
- return count;
-}
-
// New player movement speed system... allows for a bit more than
// "player runs fast" and "player walks slow" in that the speed is
// actually calculated (allowing for centaurs to get a bonus from
@@ -1842,7 +1831,7 @@ int player_movement_speed(void)
mv -= 2;
// ponderous brand
- mv += 2 * _ponderous_count();
+ mv += 2 * player_equip_ego_type(EQ_ALL_ARMOUR, SPARM_PONDEROUSNESS);
// In the air, can fly fast (should be lightly burdened).
if (you.light_flight())
@@ -2115,7 +2104,7 @@ int player_evasion(ev_ignore_type evit)
ev += scan_artefacts( ARTP_EVASION );
// ponderous ev mod
- ev -= 2 * _ponderous_count();
+ ev -= 2 * player_equip_ego_type(EQ_ALL_ARMOUR, SPARM_PONDEROUSNESS);
if (player_mutation_level(MUT_REPULSION_FIELD) > 0)
ev += (player_mutation_level(MUT_REPULSION_FIELD) * 2) - 1;