summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/directn.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-05 20:50:54 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-05 22:30:03 +0100
commitdc3f573c6ef467ddcc4a837ce90ca9df3b502c2e (patch)
treef7915736d0a9bad11d83c3ff8a0263577a27e979 /crawl-ref/source/directn.cc
parent31124ec682c2b826f169c23e808fa741a3033a04 (diff)
downloadcrawl-ref-dc3f573c6ef467ddcc4a837ce90ca9df3b502c2e.tar.gz
crawl-ref-dc3f573c6ef467ddcc4a837ce90ca9df3b502c2e.zip
Unify mesmerisation code.
There were several places that had copies of the same code, checking whether mesmerisation blocked movement to a given target. The various mesmerisation functions have become methods of player and were moved into behold.cc.
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r--crawl-ref/source/directn.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc
index 4ea97767f0..cd75cf221d 100644
--- a/crawl-ref/source/directn.cc
+++ b/crawl-ref/source/directn.cc
@@ -627,7 +627,7 @@ void full_describe_view()
std::string str = get_monster_equipment_desc(list_mons[i], true,
DESC_CAP_A, true);
- if (player_mesmerised_by(list_mons[i]))
+ if (you.beheld_by(list_mons[i]))
str += ", keeping you mesmerised";
if (damage_level != MDAM_OKAY)
@@ -3123,7 +3123,7 @@ static std::string _get_monster_desc(const monsters *mon)
std::string text = "";
std::string pronoun = mon->pronoun(PRONOUN_CAP);
- if (player_mesmerised_by(mon))
+ if (you.beheld_by(mon))
text += "You are mesmerised by her song.\n";
if (!mons_is_mimic(mon->type) && mons_behaviour_perceptible(mon))