From 1cd5f5996970da48788b3bdc615652ed66763b70 Mon Sep 17 00:00:00 2001 From: abrahamwl Date: Tue, 27 Oct 2009 22:04:57 -0700 Subject: 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? --- crawl-ref/source/fight.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'crawl-ref/source/fight.h') 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 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); -- cgit v1.2.3-54-g00ecf