diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-09-13 07:13:30 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-09-13 07:13:30 +0200 |
commit | e5f0be714222620701b36ee5cc7bed69b78eb56d (patch) | |
tree | f6f152d78b1254ce6ba96d51c9f0d24410a33cb2 /crawl-ref/source/spl-monench.cc | |
parent | a2d0eab8a23003d8b096265efd7b4c76303b2dac (diff) | |
download | crawl-ref-e5f0be714222620701b36ee5cc7bed69b78eb56d.tar.gz crawl-ref-e5f0be714222620701b36ee5cc7bed69b78eb56d.zip |
Move mons_is_stationary() to struct actor.
Simplifies code in a number of places, and also fixes a few tree-moving bugs.
Diffstat (limited to 'crawl-ref/source/spl-monench.cc')
-rw-r--r-- | crawl-ref/source/spl-monench.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crawl-ref/source/spl-monench.cc b/crawl-ref/source/spl-monench.cc index 4954deb590..7b3c7a11c4 100644 --- a/crawl-ref/source/spl-monench.cc +++ b/crawl-ref/source/spl-monench.cc @@ -31,8 +31,7 @@ int englaciate(coord_def where, int pow, int, actor *agent) monster* mons = victim->as_monster(); if (victim->res_cold() > 0 - || (mons && mons_is_stationary(mons)) - || (!mons && you.form == TRAN_TREE)) + || victim->is_stationary()) { if (!mons) canned_msg(MSG_YOU_UNAFFECTED); @@ -107,7 +106,7 @@ bool do_slow_monster(monster* mon, const actor* agent, int dur) return true; if (!mon->has_ench(ENCH_SLOW) - && !mons_is_stationary(mon) + && !mon->is_stationary() && mon->add_ench(mon_enchant(ENCH_SLOW, 0, agent, dur))) { if (!mon->paralysed() && !mon->petrified() |