diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2013-05-06 14:56:31 -0600 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2013-05-06 14:56:31 -0600 |
commit | c494288c9e3e6f405f4286adf06a007055a3b08c (patch) | |
tree | a5c4e309325a1b3491d9e085a5fcd7141a7c4575 /crawl-ref/source/spl-damage.h | |
parent | 81797164b00afdef286fafed7f70d5a4e80c7c84 (diff) | |
download | crawl-ref-c494288c9e3e6f405f4286adf06a007055a3b08c.tar.gz crawl-ref-c494288c9e3e6f405f4286adf06a007055a3b08c.zip |
Round two of duplicate code pruning for LOS attack spells.
As a reminder for those of you that don't remember b4b189b, this merges
handling for player and monster casting of Drain Life, Ozocubu's
Refrigeration, and Olgreb's Toxic Radiance so as to prune a lot of
duplicate handling between the three spells/abilities; it was reverted
because the previous version of this cleanup exhibited problems when
several of the same type of monster were in sight (#6566).
The new version of the code splits player-as-target and
monster-as-target code into their own functions (another concern raised
with the original version of this code).
Probably this can be cleaned up more, but it's better than either the
original version or the first version of the pruned code!
This reverts commit bd9d7a8fecc46bef40d884854d0cc567ce64d912.
Diffstat (limited to 'crawl-ref/source/spl-damage.h')
-rw-r--r-- | crawl-ref/source/spl-damage.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/spl-damage.h b/crawl-ref/source/spl-damage.h index e343f6ca49..4b8bd0fc4b 100644 --- a/crawl-ref/source/spl-damage.h +++ b/crawl-ref/source/spl-damage.h @@ -13,9 +13,9 @@ spret_type cast_fire_storm(int pow, bolt &beam, bool fail); bool cast_hellfire_burst(int pow, bolt &beam); spret_type cast_chain_lightning(int pow, const actor *caster, bool fail = false); -spret_type cast_toxic_radiance(int pow, bool non_player = false, bool fail = false); -spret_type cast_refrigeration(int pow, bool non_player = false, - bool freeze_potions = true, bool fail = false); +spret_type cast_los_attack_spell(spell_type spell, int pow, actor* agent, + bool actual, bool added_effects = true, + bool fail = false); void sonic_damage(bool scream); bool mons_shatter(monster* caster, bool actual = true); void shillelagh(actor *wielder, coord_def where, int pow); |