diff --git a/common/ruletypes.h b/common/ruletypes.h index 24998930a..74a1c5ffa 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -515,6 +515,8 @@ RULE_BOOL(Spells, ManaTapsOnAnyClass, false, "Enabling this will allow you to ca RULE_INT(Spells, HealAmountMessageFilterThreshold, 100, "Lifetaps below this threshold will not have a message sent to the client (Heal will still process) 0 to Disable.") RULE_BOOL(Spells, SnareOverridesSpeedBonuses, false, "Enabling will allow snares to override any speed bonuses the entity may have. Default: False") RULE_INT(Spells, TargetedAOEMaxTargets, 4, "Max number of targets a Targeted AOE spell can cast on. Set to 0 for no limit.") +RULE_INT(Spells, PointBlankAOEMaxTargets, 0, "Max number of targets a Point-Blank AOE spell can cast on. Set to 0 for no limit.") +RULE_INT(Spells, DefaultAOEMaxTargets, 4, "Max number of targets that an AOE spell which does not meet other descriptions 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 f97d5e8b5..63e349f1b 100644 --- a/zone/effects.cpp +++ b/zone/effects.cpp @@ -1096,7 +1096,7 @@ void EntityList::AESpell( max_targets = nullptr; } - int max_targets_allowed = 4; + int max_targets_allowed = RuleI(Spells, DefaultAOEMaxTargets);; 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].aoe_max_targets) { @@ -1109,6 +1109,12 @@ void EntityList::AESpell( !IsEffectInSpell(spell_id, SE_Mez) ) { max_targets_allowed = RuleI(Spells, TargetedAOEMaxTargets); + } else if ( + IsPBAENukeSpell(spell_id) && + IsDetrimentalSpell && + !is_npc + ) { + max_targets_allowed = RuleI(Spells, PointBlankAOEMaxTargets); } int target_hit_counter = 0;