diff options
author | DracoOmega <draco_omega@live.com> | 2013-06-12 18:41:45 -0230 |
---|---|---|
committer | DracoOmega <draco_omega@live.com> | 2013-06-24 02:21:01 -0230 |
commit | 581bb0a6783789181c6b80e42bd7bcabb34f4b9c (patch) | |
tree | 035c08de4dc05ad70efea07f134d103c4a18e890 /crawl-ref/source/spl-clouds.cc | |
parent | 4b864096be4e8e1cfd2ba8e5f34788ffec595333 (diff) | |
download | crawl-ref-581bb0a6783789181c6b80e42bd7bcabb34f4b9c.tar.gz crawl-ref-581bb0a6783789181c6b80e42bd7bcabb34f4b9c.zip |
Secondary effect for Control Winds: boost ally missile accuracy
Allies monsters within a few squares of someone with Control Winds
active now get a boost to their accuracy with missile and thrown
weapons, so long as the enchantment lasts.
This doesn't currently affect spells, and I'm not sure it should.
Somewhat awkwardly, it also doesn't affect things like manticore
spines, due to seperate codepaths. Perhaps this effect should
actually be checked in the beam code itself?
Diffstat (limited to 'crawl-ref/source/spl-clouds.cc')
-rw-r--r-- | crawl-ref/source/spl-clouds.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/crawl-ref/source/spl-clouds.cc b/crawl-ref/source/spl-clouds.cc index 0aabf50ebb..59a6f145f6 100644 --- a/crawl-ref/source/spl-clouds.cc +++ b/crawl-ref/source/spl-clouds.cc @@ -472,4 +472,20 @@ void apply_control_winds(const monster* mon) } } } + + // Now give a ranged accuracy boost to nearby allies + for (monster_iterator mi(mon); mi; ++mi) + { + if (distance2(mon->pos(), mi->pos()) < 33 && mons_aligned(mon, *mi)) + { + if (!mi->has_ench(ENCH_WIND_AIDED)) + mi->add_ench(mon_enchant(ENCH_WIND_AIDED, 1, mon, 20)); + else + { + mon_enchant aid = mi->get_ench(ENCH_WIND_AIDED); + aid.duration = 20; + mi->update_ench(aid); + } + } + } } |