summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilereg-cmd.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2012-12-16 21:06:07 -0500
committerNeil Moore <neil@s-z.org>2012-12-16 22:42:27 -0500
commit251c4eefad2ecb921549c0920a1de381aa801ce7 (patch)
tree943d7bfcf88e0a0b360cfcd0ae6c64312fecd954 /crawl-ref/source/tilereg-cmd.cc
parent64abc101d999d4d937e519d7acf787a5da99be88 (diff)
downloadcrawl-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/tilereg-cmd.cc')
-rw-r--r--crawl-ref/source/tilereg-cmd.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/tilereg-cmd.cc b/crawl-ref/source/tilereg-cmd.cc
index e057152d5f..353c6c9a22 100644
--- a/crawl-ref/source/tilereg-cmd.cc
+++ b/crawl-ref/source/tilereg-cmd.cc
@@ -198,7 +198,7 @@ static bool _command_not_applicable(const command_type cmd, bool safe)
return // shamefully copied from _can_cast in spl-cast.cc
(player_in_bat_form() || you.form == TRAN_PIG) ||
(you.stat_zero[STAT_INT]) ||
- (player_effect_nocast()) ||
+ (you.no_cast()) ||
(!you.spell_no) ||
(you.berserk()) ||
(you.confused()) ||