- Fixed AI chosing illigal targets with DestroyAll effects (Mogg Infestation).

This commit is contained in:
Sloth
2015-09-23 22:39:06 +00:00
parent 3425e4f10c
commit 4aa20f654f

View File

@@ -40,8 +40,12 @@ public class DestroyAllAi extends SpellAbilityAi {
if (sa.usesTargeting()) { if (sa.usesTargeting()) {
sa.resetTargets(); sa.resetTargets();
if (sa.canTarget(ai.getOpponent())) {
sa.getTargets().add(ai.getOpponent()); sa.getTargets().add(ai.getOpponent());
computerlist.clear(); computerlist.clear();
} else {
return false;
}
} }
humanlist = CardLists.filter(humanlist, predicate); humanlist = CardLists.filter(humanlist, predicate);