Fix logic from refactoring

This commit is contained in:
tool4EvEr
2022-08-04 23:04:35 +02:00
parent e75c456524
commit caad3bff44

View File

@@ -778,10 +778,13 @@ public class ComputerUtilCost {
// Check if the AI intends to play the card and if it can pay for it with the mana it has // Check if the AI intends to play the card and if it can pay for it with the mana it has
boolean willPlay = ComputerUtil.hasReasonToPlayCardThisTurn(payer, c); boolean willPlay = ComputerUtil.hasReasonToPlayCardThisTurn(payer, c);
boolean canPay = c.getManaCost().canBePaidWithAvailable(ColorSet.fromNames(getAvailableManaColors(payer, source)).getColor()); boolean canPay = c.getManaCost().canBePaidWithAvailable(ColorSet.fromNames(getAvailableManaColors(payer, source)).getColor());
return canPay && willPlay; if (canPay && willPlay) {
return true;
} }
} }
} }
return false;
}
} }
} }