diff --git a/common/ruletypes.h b/common/ruletypes.h index 5a30bfc2c..36a5630e4 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -369,6 +369,7 @@ RULE_BOOL(Spells, NPCInnateProcOverride, true, "NPC innate procs override the ta RULE_BOOL(Spells, OldRainTargets, false, "Use old incorrectly implemented maximum targets for rains") RULE_BOOL(Spells, NPCSpellPush, false, "Enable spell push on NPCs") RULE_BOOL(Spells, July242002PetResists, true, "Enable Pets using PCs resist change from July 24 2002") +RULE_INT(Spells, AOEMaxTargets, 0, "Max number of targets a Targeted AOE spell can cast on. Set to 0 for no limit.") RULE_CATEGORY_END() RULE_CATEGORY(Combat) diff --git a/zone/effects.cpp b/zone/effects.cpp index b095c84a3..6123ede4a 100644 --- a/zone/effects.cpp +++ b/zone/effects.cpp @@ -784,14 +784,14 @@ void EntityList::AESpell( /** * Max AOE targets */ - int max_targets_allowed = 0; // unlimited + int max_targets_allowed = RuleI(Range, AOEMaxTargets); // unlimited if (max_targets) { // rains pass this in since they need to preserve the count through waves max_targets_allowed = *max_targets; } else if (spells[spell_id].aemaxtargets) { max_targets_allowed = spells[spell_id].aemaxtargets; } - else if (IsTargetableAESpell(spell_id) && is_detrimental_spell && !is_npc) { + else if (IsTargetableAESpell(spell_id) && is_detrimental_spell && !is_npc && !IsEffectInSpell(spell_id, SE_Lull) && !IsEffectInSpell(spell_id, SE_Mez)) { max_targets_allowed = 4; }