- Fix a logic error in RearrangeTopOfLibrary AI

This commit is contained in:
Agetian
2019-05-25 07:05:18 +03:00
parent 9cd92946b0
commit 1c0f98e55a

View File

@@ -26,7 +26,7 @@ public class RearrangeTopOfLibraryAi extends SpellAbilityAi {
final PhaseHandler ph = aiPlayer.getGame().getPhaseHandler();
final Card source = sa.getHostCard();
if (source.isPermanent() && sa.getPayCosts() != null
if (source.isPermanent() && sa.getRestrictions().isInstantSpeed() && sa.getPayCosts() != null
&& (sa.getPayCosts().hasTapCost() || sa.getPayCosts().hasManaCost())) {
// If it has an associated cost, try to only do this before own turn
if (!(ph.is(PhaseType.END_OF_TURN) && ph.getNextTurn() == aiPlayer)) {