From d3c2214dea8cb19bcaa4dfe1303f0368e8cdf4aa Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Thu, 5 Nov 2009 23:30:01 -0800 Subject: Error for non-monster spells in monster specs Give an error when parsing a monster spec if it lists a spell a monster can't cast, rather than causing an assertion when the monster tries to cast it. --- crawl-ref/source/mon-cast.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/mon-cast.h') diff --git a/crawl-ref/source/mon-cast.h b/crawl-ref/source/mon-cast.h index 5d10125d98..6d7d023abc 100644 --- a/crawl-ref/source/mon-cast.h +++ b/crawl-ref/source/mon-cast.h @@ -12,9 +12,13 @@ class monsters; class bolt; +void init_mons_spells(); +bool is_valid_mon_spell(spell_type spell); + bool handle_mon_spell(monsters *monster, bolt &beem); -bolt mons_spells(monsters *mons, spell_type spell_cast, int power); +bolt mons_spells(monsters *mons, spell_type spell_cast, int power, + bool check_validity = false); void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast, bool do_noise = true); void mons_cast_noise(monsters *monster, bolt &pbolt, spell_type spell_cast); -- cgit v1.2.3-54-g00ecf