From 857863c5912806cf0b63989d211c8d9d46dbfc1e Mon Sep 17 00:00:00 2001 From: Erik Lunna Date: Thu, 12 Oct 2023 21:01:27 +0200 Subject: [PATCH] Fix: Archons and other non lich monsters could cast call undead. --- src/mcastu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mcastu.c b/src/mcastu.c index d9118f2c1..cf47f1340 100644 --- a/src/mcastu.c +++ b/src/mcastu.c @@ -1389,11 +1389,9 @@ int spellnum; if ((!mtmp->iswiz || context.no_of_wizards > 1) && (spellnum == MGC_CLONE_WIZ || spellnum == MGC_CALL_UNDEAD)) return TRUE; - /* only lichs can cast call undead */ - /* [BarclayII] so can necromancers */ + /* only lichs and necromancers can cast call undead */ if (spellnum == MGC_CALL_UNDEAD - && mtmp->data->mlet != S_LICH - && mtmp->data != &mons[PM_NECROMANCER]) + && mtmp->data->mlet != S_LICH && mtmp->data != &mons[PM_NECROMANCER]) return TRUE; /* pools can only be created in certain locations and then only * rarely unless you're carrying the amulet. @@ -1524,6 +1522,10 @@ int spellnum; || spellnum == MGC_CALL_UNDEAD) || (!mtmp->iswiz && spellnum == MGC_CLONE_WIZ))) return TRUE; + /* only lichs and necromancers can cast call undead */ + if (spellnum == MGC_CALL_UNDEAD + && mtmp->data->mlet != S_LICH && mtmp->data != &mons[PM_NECROMANCER]) + return TRUE; if ((!mtmp->iswiz || context.no_of_wizards > 1) && spellnum == MGC_CLONE_WIZ) return TRUE;