mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- 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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user