summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monster.cc
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2010-01-03 22:30:38 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2010-01-03 23:54:24 +1000
commit865ad15a82f21145b5623417549107317cb44b5b (patch)
treeaaf4bc18e85aca4ce5650d0de34e58c477ddc644 /crawl-ref/source/monster.cc
parent12e2dc2661d4ecb2344b75a2fd9d6f4a4dcdc1a2 (diff)
downloadcrawl-ref-865ad15a82f21145b5623417549107317cb44b5b.tar.gz
crawl-ref-865ad15a82f21145b5623417549107317cb44b5b.zip
Fix put_to_sleep, implement for monsters.
Diffstat (limited to 'crawl-ref/source/monster.cc')
-rw-r--r--crawl-ref/source/monster.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index e79967096c..1171a3c2c3 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -5716,6 +5716,15 @@ void monsters::hibernate(int)
add_ench(ENCH_SLEEP_WARY);
}
+void monsters::put_to_sleep(actor *attacker, int strength)
+{
+ if (has_ench(ENCH_SLEEPY))
+ return;
+
+ behaviour = BEH_SLEEP;
+ add_ench(ENCH_SLEEPY);
+}
+
void monsters::check_awaken(int)
{
// XXX