diff options
author | Steven Noonan <steven@uplinklabs.net> | 2009-10-20 16:16:59 -0700 |
---|---|---|
committer | Steven Noonan <steven@uplinklabs.net> | 2009-10-20 16:46:47 -0700 |
commit | 4862ac7ba83dc160fdc3f5f4639e79d24eb88630 (patch) | |
tree | 76b2c4954424aed30bf99b9957ce8026d4fecfbc /crawl-ref/source/spells4.cc | |
parent | d6ea58e6f13e85f4121ab488c09721f6d388a977 (diff) | |
download | crawl-ref-4862ac7ba83dc160fdc3f5f4639e79d24eb88630.tar.gz crawl-ref-4862ac7ba83dc160fdc3f5f4639e79d24eb88630.zip |
gods: added "Chronos", the slow god
Signed-off-by: Brendan Hickey <brendan@bhickey.net>
Acked-by: Steven Noonan <steven@uplinklabs.net>
Diffstat (limited to 'crawl-ref/source/spells4.cc')
-rw-r--r-- | crawl-ref/source/spells4.cc | 26 |
1 files changed, 26 insertions, 0 deletions
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; +} |