diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-05 20:50:54 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-05 22:30:03 +0100 |
commit | dc3f573c6ef467ddcc4a837ce90ca9df3b502c2e (patch) | |
tree | f7915736d0a9bad11d83c3ff8a0263577a27e979 /crawl-ref/source/spells4.cc | |
parent | 31124ec682c2b826f169c23e808fa741a3033a04 (diff) | |
download | crawl-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/spells4.cc')
-rw-r--r-- | crawl-ref/source/spells4.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index 15566f5cf5..bf965913da 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -767,11 +767,10 @@ void cast_silence(int pow) if (you.duration[DUR_SILENCE] > 100) you.duration[DUR_SILENCE] = 100; - if (you.duration[DUR_MESMERISED]) + if (you.beheld()) { + you.clear_beholders(); mpr("You break out of your daze!", MSGCH_RECOVERY); - you.duration[DUR_MESMERISED] = 0; - you.mesmerised_by.clear(); } } |