diff options
author | Vsevolod Kozlov <zaba@thorium.homeunix.org> | 2009-11-06 19:46:32 +0300 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-06 19:52:58 +0100 |
commit | b4b8747ec41b3fa6543d7c51e02515b0cec1496f (patch) | |
tree | efb1625c80d595b58b8bde933decd1dfc674ee04 /crawl-ref/source/mon-cast.cc | |
parent | 22adbee6a63d3fb1ee05d0e6ff41e80e95b4afc7 (diff) | |
download | crawl-ref-b4b8747ec41b3fa6543d7c51e02515b0cec1496f.tar.gz crawl-ref-b4b8747ec41b3fa6543d7c51e02515b0cec1496f.zip |
Move mons_is_friendly to monsters::friendly.
Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
Diffstat (limited to 'crawl-ref/source/mon-cast.cc')
-rw-r--r-- | crawl-ref/source/mon-cast.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc index 4593802638..25d217e1dc 100644 --- a/crawl-ref/source/mon-cast.cc +++ b/crawl-ref/source/mon-cast.cc @@ -1232,7 +1232,7 @@ bool handle_mon_spell(monsters *monster, bolt &beem) // Friendly monsters don't use polymorph other, for fear of harming // the player. - if (spell_cast == SPELL_POLYMORPH_OTHER && mons_friendly(monster)) + if (spell_cast == SPELL_POLYMORPH_OTHER && monster->friendly()) return (false); // Try to animate dead: if nothing rises, pretend we didn't cast it. @@ -1836,7 +1836,7 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast, return; case SPELL_SYMBOL_OF_TORMENT: - if (!monsterNearby || mons_friendly(monster)) + if (!monsterNearby || monster->friendly()) return; torment(monster_index(monster), monster->pos()); @@ -1911,7 +1911,7 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast, if (!mons_near(monster)) return; - const bool friendly = mons_friendly(monster); + const bool friendly = monster->friendly(); const bool buff_only = !friendly && is_sanctuary(you.pos()); const msg_channel_type channel = (friendly) ? MSGCH_FRIEND_ENCHANT : MSGCH_MONSTER_ENCHANT; @@ -2049,7 +2049,7 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast, return; } case SPELL_CHAIN_LIGHTNING: - if (!monsterNearby || mons_friendly(monster)) + if (!monsterNearby || monster->friendly()) return; cast_chain_lightning(4 * monster->hit_dice, monster); return; @@ -2477,9 +2477,9 @@ void mons_cast_noise(monsters *monster, bolt &pbolt, spell_type spell_cast) msg = replace_all(msg, "@beam@", beam_name); const msg_channel_type chan = - (unseen ? MSGCH_SOUND : - mons_friendly(monster) ? MSGCH_FRIEND_SPELL - : MSGCH_MONSTER_SPELL); + (unseen ? MSGCH_SOUND : + monster->friendly() ? MSGCH_FRIEND_SPELL + : MSGCH_MONSTER_SPELL); if (silent) mons_speaks_msg(monster, msg, chan, true); |