mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Check the amount of X on the SA, not necessarily on the card itself.
This commit is contained in:
@@ -670,8 +670,8 @@ public class AiController {
|
|||||||
|
|
||||||
// This is for playing spells regularly (no Cascade/Ripple etc.)
|
// This is for playing spells regularly (no Cascade/Ripple etc.)
|
||||||
private AiPlayDecision canPlayAndPayFor(final SpellAbility sa) {
|
private AiPlayDecision canPlayAndPayFor(final SpellAbility sa) {
|
||||||
boolean XCost = sa.getHostCard() != null && sa.getHostCard().getManaCost() != null
|
boolean XCost = sa.getPayCosts() != null && sa.getPayCosts().getCostMana() != null
|
||||||
&& sa.getHostCard().getManaCost().countX() > 0;
|
&& sa.getPayCosts().getCostMana().getAmountOfX() > 0;
|
||||||
|
|
||||||
if (!XCost && !ComputerUtilCost.canPayCost(sa, player)) {
|
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
|
// for most costs, it's OK to check if they can be paid early in order to avoid running a heavy API check
|
||||||
|
|||||||
Reference in New Issue
Block a user