From 4862ac7ba83dc160fdc3f5f4639e79d24eb88630 Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Tue, 20 Oct 2009 16:16:59 -0700 Subject: gods: added "Chronos", the slow god Signed-off-by: Brendan Hickey Acked-by: Steven Noonan --- crawl-ref/source/spells4.cc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'crawl-ref/source/spells4.cc') diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index ad6cdb8a78..5ac7df2a32 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -2041,3 +2041,29 @@ void cast_stoneskin(int pow) if (you.duration[DUR_STONESKIN] > 50) you.duration[DUR_STONESKIN] = 50; } + +bool do_slow_monster(monsters* mon, kill_category whose_kill) +{ + // Try to remove haste, if monster is hasted. + if (mon->del_ench(ENCH_HASTE, true)) + { + if (simple_monster_message(mon, " is no longer moving quickly.")) + { + return true; + } + } + + // Not hasted, slow it. + if (!mon->has_ench(ENCH_SLOW) + && !mons_is_stationary(mon) + && mon->add_ench(mon_enchant(ENCH_SLOW, 0, whose_kill))) + { + if (!mons_is_paralysed(mon) && !mons_is_petrified(mon) + && simple_monster_message(mon, " seems to slow down.")) + { + return true; + } + } + + return false; +} -- cgit v1.2.3-54-g00ecf