- Fixed AI using Idle Thoughts.

This commit is contained in:
Sloth
2014-02-12 21:28:28 +00:00
parent fa3a140470
commit dcccae1f7c
2 changed files with 6 additions and 3 deletions

View File

@@ -103,6 +103,10 @@ public class DrawAi extends SpellAbilityAi {
return true;
}
if (sa.getConditions() != null && !sa.getConditions().areMet(sa) && sa.getSubAbility() == null) {
return false;
}
// Don't use draw abilities before main 2 if possible
if (game.getPhaseHandler().getPhase().isBefore(PhaseType.MAIN2)
&& !sa.hasParam("ActivationPhases") && !ComputerUtil.castSpellInMain1(ai, sa)) {
@@ -161,8 +165,7 @@ public class DrawAi extends SpellAbilityAi {
//if (n)
// TODO: if xPaid and one of the below reasons would fail, instead of
// bailing
// reduce toPay amount to acceptable level
// bailing reduce toPay amount to acceptable level
if (tgt != null) {
// ability is targeted