diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-21 04:10:52 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-21 04:10:52 +0000 |
commit | a17368df4fcbdf37e3452c6bc4935ba4372aabd8 (patch) | |
tree | 05c1e1c8d83dfb48b191543e158c03e79d270729 /crawl-ref/source/fight.cc | |
parent | c2aad9d53735d0ac859227b27cd44733a28b31cf (diff) | |
download | crawl-ref-a17368df4fcbdf37e3452c6bc4935ba4372aabd8.tar.gz crawl-ref-a17368df4fcbdf37e3452c6bc4935ba4372aabd8.zip |
Allow unrandart launchers to modify the beam of the missile they fire.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10363 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r-- | crawl-ref/source/fight.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 7f22a6d48d..1802e37ac2 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -536,9 +536,14 @@ void melee_attack::check_autoberserk() bool melee_attack::check_unrand_effects(bool mondied) { - if (unrand_entry && unrand_entry->melee_effects_func) - { - unrand_entry->melee_effects_func(weapon, attacker, defender, mondied); + // If bashing the defender with a wielded unrandart launcher, don't use + // unrand_entry->fight_func, since that's the function used for + // launched missiles. + if (unrand_entry && unrand_entry->fight_func.melee_effects + && fires_ammo_type(*weapon) == MI_NONE) + { + unrand_entry->fight_func.melee_effects(weapon, attacker, defender, + mondied); return (!defender->alive()); } |