Fix AI cheating when chaining dmg spells with DividedAsYouChoose

This commit is contained in:
tool4EvEr
2022-05-27 11:35:04 +02:00
parent 9a14ec945a
commit 5e5ce90fa9

View File

@@ -1075,6 +1075,11 @@ public class DamageDealAi extends DamageAiBase {
return null;
}
// chaining to this could miscalculate
if (sa.isDividedAsYouChoose()) {
return null;
}
// Try to chain damage/debuff effects
if (StringUtils.isNumeric(damage) || (damage.startsWith("-") && StringUtils.isNumeric(damage.substring(1)))) {
// currently only works for predictable numeric damage