diff options
author | Jude Brown <bookofjude@users.sourceforge.net> | 2011-10-07 18:01:39 +1000 |
---|---|---|
committer | Jude Brown <bookofjude@users.sourceforge.net> | 2011-10-07 18:30:41 +1000 |
commit | 530f8949f2f3172fd6d1605379ce73ccd7160700 (patch) | |
tree | 7703010a87d64384e459b58f2628f225e6237c26 /crawl-ref/source/mon-cast.h | |
parent | dfe1758b7f570c94c3d5af0edac7e2fc38543600 (diff) | |
download | crawl-ref-530f8949f2f3172fd6d1605379ce73ccd7160700.tar.gz crawl-ref-530f8949f2f3172fd6d1605379ce73ccd7160700.zip |
Implement breath timeouts for dragons, draconians, and, slightly, drakes.
This commit is only designed to implement breath-weapon timeouts for
draconians and dragons of every taste and flavour. This is slightly
problematic because it relies on mons_genus to return MONS_DRAGON, and
usees this to determine whether or not the monster should be allowed to
use the breath weapon.
The current time-out is 1d5. I had previously suggested
1+random2(10-(HD/3)) but it was suggested this might be a bit too much.
1d5 is subject to change, of course, and as this uses a function to set
the time-out, the exact value can be defined per-monster, per-genus,
etc.
Hopefully, I've caught every use of breath weapon. I need to test drakes
a little bit more extensively.
Problematically, the code currently classes a breath weapon either by a
draconian's breath weapon being cast (in mon-cast.cc:1684) and the
monster's genus being draconian, or the monster's genus being a dragon.
Abilities are handled differently.
This might thus prove problematic for monsters which have both beams for
breath weapons, as well as other auxiliary spells. These, if they exist
(and I do not think they currently do), would be unusable until the end
of the duration.
Also, it nerfs dragons a bit! Pearl dragons will no longer spam holy
breath at you, etc: this primarily is the reason for the code. If it's
found to be too much of a nerf, it maybe be adjusted to only trigger on
certain types of dragon, etc.
Diffstat (limited to 'crawl-ref/source/mon-cast.h')
-rw-r--r-- | crawl-ref/source/mon-cast.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-cast.h b/crawl-ref/source/mon-cast.h index 6537aeb61e..4b3d64f659 100644 --- a/crawl-ref/source/mon-cast.h +++ b/crawl-ref/source/mon-cast.h @@ -29,6 +29,7 @@ void mons_cast_haunt(monster* mons); void mons_cast_mislead(monster* mons); bool actor_is_illusion_cloneable(actor *target); void mons_cast_spectral_orcs(monster* mons); +void setup_breath_timeout(monster* mons); bool ms_direct_nasty(spell_type monspell); bool ms_useful_fleeing_out_of_sight(const monster* mon, spell_type monspell); |