git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@458 c06c8d41-db1a-0410-9941-cceddc491573
NFOXLH722RGWYY5D63VV6SF2XEJBEOQEFQME6FSA4HZRK3CPLSRQC static bool handle_monster_spell(monsters *monster, bolt &beem){// shapeshifters don't get spellsif (!mons_has_ench( monster, ENCH_GLOWING_SHAPESHIFTER,ENCH_SHAPESHIFTER )|| !mons_class_flag( monster->type, M_ACTUAL_SPELLS )){if (handle_spell(monster, beem))return (true);}return (false);}
if (handle_special_ability(monster, beem))
// [ds] Special abilities shouldn't overwhelm spellcasting// in monsters that have both. This aims to give them both// roughly the same weight.if (coinflip()?handle_special_ability(monster, beem)|| handle_monster_spell(monster, beem): handle_monster_spell(monster, beem)|| handle_special_ability(monster, beem)){
// shapeshifters don't get spellsif (!mons_has_ench( monster, ENCH_GLOWING_SHAPESHIFTER,ENCH_SHAPESHIFTER )|| !mons_class_flag( monster->type, M_ACTUAL_SPELLS )){if (handle_spell(monster, beem))continue;}