diff options
author | abrahamwl <abrahamwl@gmail.com> | 2009-10-27 22:04:57 -0700 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2009-10-28 14:54:38 +0100 |
commit | 1cd5f5996970da48788b3bdc615652ed66763b70 (patch) | |
tree | 29022993b49c92c1c5070b4f9ecc02331f3688c3 /crawl-ref/source/fight.h | |
parent | 67ab2ff904da3b6a3f426ee6d6a6b8e4116f199a (diff) | |
download | crawl-ref-1cd5f5996970da48788b3bdc615652ed66763b70.tar.gz crawl-ref-1cd5f5996970da48788b3bdc615652ed66763b70.zip |
Electrocution discharge in water ala FR 1637214
Weapons of electrocution now discharge in water, if the target is
touching the water and not rElec, hitting all adjacent
water-touching non-rElec creatures for about half the normal
electrocution damage.
Particularly notable new code is the implementation of an
area-of-effect callback for beams, as well as a function and
structure for weapon effects that should only happen after the
target would have died, if it was going to die, and therefore
cannot safely make use of its data.
Issues that still need to be decided:
- How doe Xom feel about this? (eg. If creatures hurt themselves
this way.)
- Should it ask you if you want to attack when you know the
discharge will hit yourself?
Diffstat (limited to 'crawl-ref/source/fight.h')
-rw-r--r-- | crawl-ref/source/fight.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crawl-ref/source/fight.h b/crawl-ref/source/fight.h index ec1102c80a..98bbe75346 100644 --- a/crawl-ref/source/fight.h +++ b/crawl-ref/source/fight.h @@ -37,6 +37,16 @@ enum unchivalric_attack_type UCAT_SLEEPING }; +enum attack_final_effect_flavor +{ + FINEFF_LIGHTNING_DISCHARGE +}; +struct attack_final_effect +{ + attack_final_effect_flavor flavor; + coord_def location; +}; + struct mon_attack_def; int effective_stat_bonus( int wepType = -1 ); @@ -197,6 +207,8 @@ private: int random_chaos_brand(); void do_miscast(); + std::vector<attack_final_effect> final_effects; + private: // Monster-attack specific stuff bool mons_attack_you(); @@ -248,6 +260,7 @@ private: int player_calc_base_unarmed_damage(); bool player_hurt_monster(); void player_exercise_combat_skills(); + bool player_monattk_final_hit_effects(bool mondied); bool player_monattk_hit_effects(bool mondied); void player_sustain_passive_damage(); int player_staff_damage(int skill); |