diff options
author | Adam Borowski <kilobyte@angband.pl> | 2011-02-23 14:58:57 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2011-02-23 15:09:56 +0100 |
commit | d6fcea90f9bb5e4be51a876e0521eb2142484179 (patch) | |
tree | c99e8b65f5f986df66f0b27f8c916d0864b240ca /crawl-ref/source/spl-monench.cc | |
parent | 3c38b99e2e9d31ec260efeb9a4eef571a3f18286 (diff) | |
download | crawl-ref-d6fcea90f9bb5e4be51a876e0521eb2142484179.tar.gz crawl-ref-d6fcea90f9bb5e4be51a876e0521eb2142484179.zip |
Track the source of monster enchantments.
This fixes Injury Mirror not working for delayed damage, kills done
by undead/demon allies not counting as such, damage tracking not handling
ench damage, etc.
Diffstat (limited to 'crawl-ref/source/spl-monench.cc')
-rw-r--r-- | crawl-ref/source/spl-monench.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/spl-monench.cc b/crawl-ref/source/spl-monench.cc index cf605d1ba9..5593a4d4cb 100644 --- a/crawl-ref/source/spl-monench.cc +++ b/crawl-ref/source/spl-monench.cc @@ -74,7 +74,7 @@ bool backlight_monsters(coord_def where, int pow, int garbage) if (!mons->has_ench(ENCH_CORONA) && !mons->has_ench(ENCH_SILVER_CORONA)) { mons->add_ench( - mon_enchant(ENCH_CORONA, 1, KC_OTHER, random_range(30, 50))); + mon_enchant(ENCH_CORONA, 1, 0, random_range(30, 50))); simple_monster_message(mons, " is lined in light."); } return (true); @@ -92,7 +92,7 @@ bool backlight_monsters(coord_def where, int pow, int garbage) return (true); } -bool do_slow_monster(monster* mon, kill_category whose_kill) +bool do_slow_monster(monster* mon, const actor* agent) { // Try to remove haste, if monster is hasted. if (mon->del_ench(ENCH_HASTE, true)) @@ -104,7 +104,7 @@ bool do_slow_monster(monster* mon, kill_category whose_kill) // Not hasted, slow it. if (!mon->has_ench(ENCH_SLOW) && !mons_is_stationary(mon) - && mon->add_ench(mon_enchant(ENCH_SLOW, 0, whose_kill))) + && mon->add_ench(mon_enchant(ENCH_SLOW, 0, agent))) { if (!mon->paralysed() && !mon->petrified() && simple_monster_message(mon, " seems to slow down.")) |