diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-01-28 12:52:55 -0700 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-01-28 12:52:55 -0700 |
commit | dab6825aa234e9b898c620ce05327b67264fedaf (patch) | |
tree | 6238bc89ec8b90e98f063969f5ef3a668a173567 /crawl-ref/source/throw.cc | |
parent | 7ad9fedfe6f1e7b45d9f49b8369ed327c58aec27 (diff) | |
parent | 1437299f7f3f6ffcd2f4fcd5b787d84df729bb69 (diff) | |
download | crawl-ref-dab6825aa234e9b898c620ce05327b67264fedaf.tar.gz crawl-ref-dab6825aa234e9b898c620ce05327b67264fedaf.zip |
Merge branch 'demonspawn-enemies'
With the forest dispersal work done, and with everything working up to
the original designer's standards, this is ready for trunk.
Conflicts:
crawl-ref/source/beam.cc
crawl-ref/source/dat/des/branches/pan.des
crawl-ref/source/enum.h
crawl-ref/source/hiscores.cc
crawl-ref/source/melee_attack.cc
crawl-ref/source/mgen_enum.h
crawl-ref/source/mon-cast.cc
crawl-ref/source/mon-data.h
crawl-ref/source/mon-ench.cc
crawl-ref/source/mon-info.cc
crawl-ref/source/mon-info.h
crawl-ref/source/mon-place.cc
crawl-ref/source/mon-spll.h
crawl-ref/source/mon-stuff.cc
crawl-ref/source/mon-util.cc
crawl-ref/source/mutation.cc
crawl-ref/source/output.cc
crawl-ref/source/player.cc
crawl-ref/source/spl-data.h
crawl-ref/source/status.cc
crawl-ref/source/wiz-you.cc
Diffstat (limited to 'crawl-ref/source/throw.cc')
-rw-r--r-- | crawl-ref/source/throw.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/throw.cc b/crawl-ref/source/throw.cc index df020637c4..f8d2a19ecd 100644 --- a/crawl-ref/source/throw.cc +++ b/crawl-ref/source/throw.cc @@ -37,6 +37,7 @@ #include "religion.h" #include "shout.h" #include "skills2.h" +#include "spl-summoning.h" #include "state.h" #include "stuff.h" #include "teleport.h" @@ -2117,6 +2118,9 @@ bool mons_throw(monster* mons, bolt &beam, int msl, bool teleport) mons->lose_energy(EUT_MISSILE); const int throw_energy = mons->action_energy(EUT_MISSILE); + actor* victim = actor_at(beam.target); + const int old_hp = (victim) ? victim->stat_hp() : 0; + // Dropping item copy, since the launched item might be different. item_def item = mitm[msl]; item.quantity = 1; @@ -2476,6 +2480,14 @@ bool mons_throw(monster* mons, bolt &beam, int msl, bool teleport) if (beam.special_explosion != NULL) delete beam.special_explosion; + if (mons->has_ench(ENCH_GRAND_AVATAR)) + { + // We want this to be a ranged attack, like the spell mirroring, + // so any spell that fires a battlesphere will do here. + // XXX: make triggering of this less hacky + trigger_grand_avatar(mons, victim, SPELL_MAGIC_DART, old_hp); + } + return true; } |