diff options
author | Jude Brown <bookofjude@users.sourceforge.net> | 2010-02-15 18:03:16 +1000 |
---|---|---|
committer | Jude Brown <bookofjude@users.sourceforge.net> | 2010-02-15 18:03:16 +1000 |
commit | 04479e72bd97c394a52170c4b5a81bf00bd34946 (patch) | |
tree | 19fcb353360c336295b70ca62698c52578329abb /crawl-ref/source/mon-death.h | |
parent | 09f666ae7af0e57535746ed8c4a678664cbd5845 (diff) | |
download | crawl-ref-04479e72bd97c394a52170c4b5a81bf00bd34946.tar.gz crawl-ref-04479e72bd97c394a52170c4b5a81bf00bd34946.zip |
Clean up monster death effects, elven twin death effects, mon-death.cc.
This commit moves the monster "death effects" (primarily for uniques)
out of mon-stuff.cc, and into mon-death.cc. This includes Kirke's
hogs_to_humans(), Pikel's band neutralisation, and Dowan and Duvessa's
death effects.
Introduce some new functions which should condense checks to
monster->type and monster->propes["original_name"]: mons_is_dowan,
mons_is_duvessa, mons_is_pikel, mons_is_kirke. This means that death
effects should trigger and affect monsters even through multiple
polymorphs.
It also with #797, pacification effects: pacifying one pacifies the
other, and experience and piety gain for Elyvilon are similar. This
should work for all forms of pacification (but not necessarily all forms
of neutrality). Attacking one of them while pacified will cause both of
them to turn hostile.
Finally, this commit introduces code and flavour speech for instances
where one of them accidentally kills the other (enslavement wands,
frenzy needles).
Still need to be looked at: turning hostile if friendly when killing a
twin, both confused when dying (#459), and stabbing when neutral
(doens't give a chance for the behaviour code to trigger).
Diffstat (limited to 'crawl-ref/source/mon-death.h')
-rw-r--r-- | crawl-ref/source/mon-death.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-death.h b/crawl-ref/source/mon-death.h new file mode 100644 index 0000000000..f32431dac1 --- /dev/null +++ b/crawl-ref/source/mon-death.h @@ -0,0 +1,17 @@ +/* + * File: mon-death.h + * Summary: Monster death functionality (kraken, uniques, and so-on). + */ + +bool mons_is_pikel (monsters* mons); +void pikel_band_neutralise(bool check_tagged = false); + +bool mons_is_duvessa (monsters *mons); +bool mons_is_dowan (monsters *mons); +bool mons_is_elven_twin (monsters *mons); +void elven_twin_died(monsters* twin, bool in_transit, killer_type killer, int killer_index); +void elven_twins_pacify (monsters* twin); +void elven_twins_unpacify (monsters* twin); + +bool mons_is_kirke (monsters* mons); +void hogs_to_humans(); |