- Improved AI using Knight of the Reliquary.

This commit is contained in:
Sloth
2015-03-01 09:30:36 +00:00
parent c22d9eff42
commit 3d6a7a25f2
4 changed files with 12 additions and 3 deletions

View File

@@ -859,7 +859,8 @@ public class ComputerUtil {
&& sa.getPayCosts().hasTapCost() && sa.getPayCosts().hasTapCost()
&& (ph.getPhase().isBefore(PhaseType.COMBAT_DECLARE_BLOCKERS) && (ph.getPhase().isBefore(PhaseType.COMBAT_DECLARE_BLOCKERS)
|| !ph.getNextTurn().equals(sa.getActivatingPlayer())) || !ph.getNextTurn().equals(sa.getActivatingPlayer()))
&& !sa.getHostCard().hasSVar("EndOfTurnLeavePlay")); && !sa.getHostCard().hasSVar("EndOfTurnLeavePlay")
&& !sa.hasParam("ActivationPhases"));
} }
//returns true if it's better to wait until blockers are declared). //returns true if it's better to wait until blockers are declared).

View File

@@ -295,6 +295,10 @@ public class ChangeZoneAi extends SpellAbilityAi {
} }
} }
} }
if (ComputerUtil.playImmediately(ai, sa)) {
return true;
}
// don't use fetching to top of library/graveyard before main2 // don't use fetching to top of library/graveyard before main2
if (ai.getGame().getPhaseHandler().getPhase().isBefore(PhaseType.MAIN2) if (ai.getGame().getPhaseHandler().getPhase().isBefore(PhaseType.MAIN2)
@@ -308,6 +312,10 @@ public class ChangeZoneAi extends SpellAbilityAi {
} }
} }
if (ComputerUtil.waitForBlocking(sa)) {
return false;
}
final AbilitySub subAb = sa.getSubAbility(); final AbilitySub subAb = sa.getSubAbility();
return subAb == null || SpellApiToAi.Converter.get(subAb.getApi()).chkDrawbackWithSubs(ai, subAb); return subAb == null || SpellApiToAi.Converter.get(subAb.getApi()).chkDrawbackWithSubs(ai, subAb);
} }

View File

@@ -99,7 +99,7 @@ public class DiscardAi extends SpellAbilityAi {
} }
// Don't tap creatures that may be able to block // Don't tap creatures that may be able to block
if (ComputerUtil.waitForBlocking(sa) && !sa.hasParam("ActivationPhases")) { if (ComputerUtil.waitForBlocking(sa)) {
return false; return false;
} }

View File

@@ -121,7 +121,7 @@ public class DrawAi extends SpellAbilityAi {
} }
// Don't tap creatures that may be able to block // Don't tap creatures that may be able to block
if (ComputerUtil.waitForBlocking(sa) && !sa.hasParam("ActivationPhases")) { if (ComputerUtil.waitForBlocking(sa)) {
return false; return false;
} }