diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-10-16 12:20:21 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-10-16 23:59:13 +0200 |
commit | e322a3c4051aec1761ba563e45cb62759e0c327c (patch) | |
tree | 57370bb80bc05dbd314a87a3ab4c12c5a6e73a76 /crawl-ref/source/fineff.h | |
parent | 2ee5dd9bf5074d0a33e969f6e71310d33f339d58 (diff) | |
download | crawl-ref-e322a3c4051aec1761ba563e45cb62759e0c327c.tar.gz crawl-ref-e322a3c4051aec1761ba563e45cb62759e0c327c.zip |
Use final effects to pass kraken damage upwards.
This should avoid the rest of still notorious crashes[1], and unlike
DracoOmega's ideas, doesn't turn krakens into a boring summoner-with-a-swarm
-of-pets we have too many examples of.
(Improvements to tentacle AI and connectivity are very welcome, I just
vehemently oppose making tentacles obstacles rather than parts of the kraken
itself.)
I did not yet purge a lot of no longer needed checks, to reduce possible
conflicts.
[1]. Even though such crashes are rare now, this is what killed my record
Abyss stress test run after over a week and umpteen million turns.
Diffstat (limited to 'crawl-ref/source/fineff.h')
-rw-r--r-- | crawl-ref/source/fineff.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crawl-ref/source/fineff.h b/crawl-ref/source/fineff.h index b2eb7f4969..a3bd370b24 100644 --- a/crawl-ref/source/fineff.h +++ b/crawl-ref/source/fineff.h @@ -121,6 +121,20 @@ protected: int blood; }; +class kraken_damage_fineff : public final_effect +{ +public: + kraken_damage_fineff(const actor *attack, const actor *defend, int dam) + : final_effect(attack, defend, coord_def()), damage(dam) + { + } + bool mergeable(const final_effect &a) const; + void merge(const final_effect &a); + void fire(); +protected: + int damage; +}; + void fire_final_effects(); #endif |