From dc3f573c6ef467ddcc4a837ce90ca9df3b502c2e Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Thu, 5 Nov 2009 20:50:54 +0100 Subject: 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. --- crawl-ref/source/spells4.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/spells4.cc') 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(); } } -- cgit v1.2.3-54-g00ecf