immediately if applying the monster's enchantments caused the monster structure to be reset, thus rendering the monster invalid.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2482 c06c8d41-db1a-0410-9941-cceddc491573
QDYSUC5PAW44LDO2AAA4QNZNB6RW5EWRAXBSYATFKLYJXNLQZWZQC
// Don't return if the monster died, since we have to deal
// with giant spores and ball lightning exploding at the
// end of the function.
if (!monster->alive())
// If the monster *merely* died just break from the loop
// rather than quit altogether, since we have to deal with
// giant spores and ball lightning exploding at the end of the
// function, but do return if the monster's data has been
// reset, since then the monster type is invalid.
if (monster->type == -1)
return;
else if (monster->hit_points < 1)