- Minor logic tweak (Buyback)

- hasXInAnyCostPart doesn't need a SA parameter now that it's in Cost.
- Fixed a minor mistype on mobile Forge.
This commit is contained in:
Agetian
2018-12-04 16:11:08 +03:00
parent 4d1b7a9aec
commit a2ca811136
3 changed files with 10 additions and 12 deletions

View File

@@ -671,7 +671,7 @@ public class AiController {
// This is for playing spells regularly (no Cascade/Ripple etc.)
private AiPlayDecision canPlayAndPayFor(final SpellAbility sa) {
boolean xCost = sa.getPayCosts().hasXInAnyCostPart(sa);
boolean xCost = sa.getPayCosts().hasXInAnyCostPart();
if (!xCost && !ComputerUtilCost.canPayCost(sa, player)) {
// for most costs, it's OK to check if they can be paid early in order to avoid running a heavy API check
@@ -708,7 +708,7 @@ public class AiController {
return canPlaySa(((WrappedAbility) sa).getWrappedAbility());
}
// Trying to play a card that has Buyback without a Buyback cost
// Trying to play a card that has Buyback without a Buyback cost, look for possible additional considerations
if (card.hasKeyword(Keyword.BUYBACK) && !sa.isBuyBackAbility() && !canPlaySpellWithoutBuyback(card, sa)) {
return AiPlayDecision.NeedsToPlayCriteriaNotMet;
}