diff options
author | Vsevolod Kozlov <zaba@thorium.homeunix.org> | 2009-11-05 22:03:07 +1000 |
---|---|---|
committer | Jude Brown <bookofjude@users.sourceforge.net> | 2009-11-05 22:03:07 +1000 |
commit | 504bcf4bd3bc5297ca3c508193d7590bae6c1836 (patch) | |
tree | f80a50efbea21577b6db8e5dabfd36aa876b090d /crawl-ref/source/item_use.cc | |
parent | fc0e79dabbc83e24ac32461ab67cdd1cef765e91 (diff) | |
download | crawl-ref-504bcf4bd3bc5297ca3c508193d7590bae6c1836.tar.gz crawl-ref-504bcf4bd3bc5297ca3c508193d7590bae6c1836.zip |
Combine player_knows_spell, player_has_spell into player::has_spell.
Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 50119d4f55..2bab2ccfce 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -196,10 +196,10 @@ static bool _valid_weapon_swap(const item_def &item) if (item.base_type == OBJ_MISSILES) { if (item.sub_type == MI_STONE) - return (player_knows_spell(SPELL_SANDBLAST)); + return (you.has_spell(SPELL_SANDBLAST)); if (item.sub_type == MI_ARROW) - return (player_knows_spell(SPELL_STICKS_TO_SNAKES)); + return (you.has_spell(SPELL_STICKS_TO_SNAKES)); return (false); } @@ -208,11 +208,11 @@ static bool _valid_weapon_swap(const item_def &item) if (item.base_type == OBJ_CORPSES) { return (item.sub_type == CORPSE_SKELETON - && player_knows_spell(SPELL_BONE_SHARDS)); + && you.has_spell(SPELL_BONE_SHARDS)); } // Sublimation of Blood. - if (!player_knows_spell(SPELL_SUBLIMATION_OF_BLOOD)) + if (!you.has_spell(SPELL_SUBLIMATION_OF_BLOOD)) return (false); if (item.base_type == OBJ_FOOD) |