diff options
author | Neil Moore <neil@s-z.org> | 2012-12-16 21:06:07 -0500 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2012-12-16 22:42:27 -0500 |
commit | 251c4eefad2ecb921549c0920a1de381aa801ce7 (patch) | |
tree | 943d7bfcf88e0a0b360cfcd0ae6c64312fecd954 /crawl-ref/source/player-stats.cc | |
parent | 64abc101d999d4d937e519d7acf787a5da99be88 (diff) | |
download | crawl-ref-251c4eefad2ecb921549c0920a1de381aa801ce7.tar.gz crawl-ref-251c4eefad2ecb921549c0920a1de381aa801ce7.zip |
Refactor amulet and equipment-checking functions.
Move most of the player_* functions related to amulets, and all of the
player_effect_* functions, into class actor, with some overridden in
class player. Likewise, move player_equip(), player_equip_ego_type(),
and scan_artefacts() into class player, with pure virtuals in class
actor and corresponding implementations in class monster. Also remove a
few now-redundant functions.
This commit doesn't actually make any kinds of equipment have an effect
on monsters that didn't already, but it should be much easier to do so
now, since the relevant methods are there now. Monster gourmand,
conservation, faith don't necessarily make sense, but those methods are
in actor anyway for consistency with the rest.
Fixes #6172. We now check for innate gourmand (etc.) without reference
to suppression.
Diffstat (limited to 'crawl-ref/source/player-stats.cc')
-rw-r--r-- | crawl-ref/source/player-stats.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/player-stats.cc b/crawl-ref/source/player-stats.cc index 07bc553fc6..2ce173831d 100644 --- a/crawl-ref/source/player-stats.cc +++ b/crawl-ref/source/player-stats.cc @@ -364,10 +364,10 @@ static int _strength_modifier() result += 3 * count_worn_ego(SPARM_STRENGTH); // rings of strength - result += player_equip(EQ_RINGS_PLUS, RING_STRENGTH); + result += you.wearing(EQ_RINGS_PLUS, RING_STRENGTH); // randarts of strength - result += scan_artefacts(ARTP_STRENGTH); + result += you.scan_artefacts(ARTP_STRENGTH); } // mutations @@ -409,10 +409,10 @@ static int _int_modifier() result += 3 * count_worn_ego(SPARM_INTELLIGENCE); // rings of intelligence - result += player_equip(EQ_RINGS_PLUS, RING_INTELLIGENCE); + result += you.wearing(EQ_RINGS_PLUS, RING_INTELLIGENCE); // randarts of intelligence - result += scan_artefacts(ARTP_INTELLIGENCE); + result += you.scan_artefacts(ARTP_INTELLIGENCE); } // mutations @@ -440,10 +440,10 @@ static int _dex_modifier() result += 3 * count_worn_ego(SPARM_DEXTERITY); // rings of dexterity - result += player_equip(EQ_RINGS_PLUS, RING_DEXTERITY); + result += you.wearing(EQ_RINGS_PLUS, RING_DEXTERITY); // randarts of dexterity - result += scan_artefacts(ARTP_DEXTERITY); + result += you.scan_artefacts(ARTP_DEXTERITY); } // mutations |