- Fixed AI freeze caused by Fireball.

This commit is contained in:
Sloth
2013-10-21 19:53:04 +00:00
parent 798e93af46
commit 178024e248
2 changed files with 5 additions and 1 deletions

View File

@@ -22,6 +22,10 @@ public abstract class DamageAiBase extends SpellAbilityAi {
if (!sa.canTarget(enemy)) {
return false;
}
if (sa.getTargets() != null && sa.getTargets().getTargets().contains(enemy)) {
return false;
}
// burn Planeswalkers
if (Iterables.any(enemy.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANEWALKERS)) {
return true;

View File

@@ -344,7 +344,7 @@ public class DamageDealAi extends DamageAiBase {
}
}
// fell through all the choices, no targets left?
if (((sa.getTargets().getNumTargeted() < tgt.getMinTargets(source, sa)) || (sa.getTargets().getNumTargeted() == 0))) {
if (sa.getTargets().getNumTargeted() < tgt.getMinTargets(source, sa) || sa.getTargets().getNumTargeted() == 0) {
if (!mandatory) {
sa.resetTargets();
return false;