mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
CardProperty: hasXCost, it should check ManaCost
This commit is contained in:
@@ -5,6 +5,7 @@ import com.google.common.collect.Lists;
|
||||
|
||||
import forge.card.ColorSet;
|
||||
import forge.card.MagicColor;
|
||||
import forge.card.mana.ManaCost;
|
||||
import forge.card.mana.ManaCostShard;
|
||||
import forge.game.Direction;
|
||||
import forge.game.EvenOdd;
|
||||
@@ -1389,8 +1390,8 @@ public class CardProperty {
|
||||
return false;
|
||||
}
|
||||
} else if (property.startsWith("hasXCost")) {
|
||||
SpellAbility sa1 = card.getFirstSpellAbility();
|
||||
if (sa1 != null && !sa1.costHasManaX()) {
|
||||
ManaCost cost = card.getManaCost();
|
||||
if (cost == null || cost.countX() <= 0) {
|
||||
return false;
|
||||
}
|
||||
} else if (property.startsWith("suspended")) {
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
package forge.game.cost;
|
||||
|
||||
import forge.card.mana.ManaCost;
|
||||
import forge.card.mana.ManaCostShard;
|
||||
import forge.game.mana.ManaConversionMatrix;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
@@ -77,7 +76,7 @@ public class CostPartMana extends CostPart {
|
||||
}
|
||||
|
||||
public final int getAmountOfX() {
|
||||
return this.cost.getShardCount(ManaCostShard.X);
|
||||
return this.cost.countX();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user