check for dead curse-magician

This commit is contained in:
Enno Rehling 2021-05-01 21:53:01 +02:00
parent 3715f21e6c
commit ff7cd7d20d
1 changed files with 1 additions and 1 deletions

View File

@ -1091,7 +1091,7 @@ variant magic_resistance(unit * target)
c = (curse *)a->data.v;
mage = c->magician;
if (mage != NULL) {
if (mage != NULL && mage->number > 0) {
if (good_resist && c->type == &ct_goodmagicresistancezone) {
if (alliedunit(mage, target->faction, HELP_GUARD)) {
/* TODO: legacy. magicresistance-effect is an integer-percentage stored in a double */