[Bug Fix] Correctly limit max targets of PBAOE (#4507)

* fix pbaoe max targets incorrectly set

* fix scratch copy
This commit is contained in:
catapultam-habeo
2024-10-11 12:15:19 -05:00
committed by GitHub
parent 448a33a60c
commit ed2130f649
2 changed files with 9 additions and 1 deletions
+7 -1
View File
@@ -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;