mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
replaced all instances of converted mana cost with mana value
This commit is contained in:
parent
cb0df438dd
commit
a61d5543fa
610 changed files with 1781 additions and 1796 deletions
|
|
@ -363,7 +363,7 @@
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compare(MageCard o1, MageCard o2) {
|
public int compare(MageCard o1, MageCard o2) {
|
||||||
int val = Integer.compare(o1.getOriginal().getConvertedManaCost(), o2.getOriginal().getConvertedManaCost());
|
int val = Integer.compare(o1.getOriginal().getManaValue(), o2.getOriginal().getManaValue());
|
||||||
if (val == 0) {
|
if (val == 0) {
|
||||||
return o1.getOriginal().getName().compareTo(o2.getOriginal().getName());
|
return o1.getOriginal().getName().compareTo(o2.getOriginal().getName());
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -435,7 +435,7 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
|
||||||
public enum Sort {
|
public enum Sort {
|
||||||
NONE("No Sort", new CardViewNoneComparator()),
|
NONE("No Sort", new CardViewNoneComparator()),
|
||||||
CARD_TYPE("Card Type", new CardViewCardTypeComparator()),
|
CARD_TYPE("Card Type", new CardViewCardTypeComparator()),
|
||||||
CMC("Converted Mana Cost", new CardViewCostComparator()),
|
CMC("Mana Value", new CardViewCostComparator()),
|
||||||
COLOR("Color", new CardViewColorComparator()),
|
COLOR("Color", new CardViewColorComparator()),
|
||||||
COLOR_IDENTITY("Color Identity", new CardViewColorIdentityComparator()),
|
COLOR_IDENTITY("Color Identity", new CardViewColorIdentityComparator()),
|
||||||
RARITY("Rarity", new CardViewRarityComparator()),
|
RARITY("Rarity", new CardViewRarityComparator()),
|
||||||
|
|
@ -1475,7 +1475,7 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
|
||||||
mc = mc.replaceAll("#2\\/", "#");
|
mc = mc.replaceAll("#2\\/", "#");
|
||||||
mc = mc.replaceAll("p}", "}");
|
mc = mc.replaceAll("p}", "}");
|
||||||
mc = mc.toLowerCase(Locale.ENGLISH);
|
mc = mc.toLowerCase(Locale.ENGLISH);
|
||||||
int cmc = card.getConvertedManaCost();
|
int cmc = card.getManaValue();
|
||||||
|
|
||||||
// Do colorless mana pips
|
// Do colorless mana pips
|
||||||
Pattern regex = Pattern.compile("#([0-9]+)}");
|
Pattern regex = Pattern.compile("#([0-9]+)}");
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ public final class DeckGenerator {
|
||||||
while (count < spellCount) {
|
while (count < spellCount) {
|
||||||
Card card = cardPool.get(RandomUtil.nextInt(retrievedCount)).getMockCard();
|
Card card = cardPool.get(RandomUtil.nextInt(retrievedCount)).getMockCard();
|
||||||
if (genPool.isValidSpellCard(card)) {
|
if (genPool.isValidSpellCard(card)) {
|
||||||
int cardCMC = card.getConvertedManaCost();
|
int cardCMC = card.getManaValue();
|
||||||
for (DeckGeneratorCMC.CMC deckCMC : deckCMCs) {
|
for (DeckGeneratorCMC.CMC deckCMC : deckCMCs) {
|
||||||
if (cardCMC >= deckCMC.min && cardCMC <= deckCMC.max) {
|
if (cardCMC >= deckCMC.min && cardCMC <= deckCMC.max) {
|
||||||
int currentAmount = deckCMC.getAmount();
|
int currentAmount = deckCMC.getAmount();
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@ public class MageCardComparator implements CardViewComparator {
|
||||||
break;
|
break;
|
||||||
// Cost
|
// Cost
|
||||||
case 2:
|
case 2:
|
||||||
aCom = a.getConvertedManaCost();
|
aCom = a.getManaValue();
|
||||||
bCom = b.getConvertedManaCost();
|
bCom = b.getManaValue();
|
||||||
break;
|
break;
|
||||||
// Color
|
// Color
|
||||||
case 3:
|
case 3:
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,11 @@ public class CardViewCostComparator implements CardViewComparator {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compare(CardView o1, CardView o2) {
|
public int compare(CardView o1, CardView o2) {
|
||||||
return Integer.compare(o1.getConvertedManaCost(), o2.getConvertedManaCost());
|
return Integer.compare(o1.getManaValue(), o2.getManaValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getCategoryName(CardView sample) {
|
public String getCategoryName(CardView sample) {
|
||||||
return "CMC: " + sample.getConvertedManaCost();
|
return "CMC: " + sample.getManaValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ public class ActionData {
|
||||||
"paid",
|
"paid",
|
||||||
"hand",
|
"hand",
|
||||||
"stack",
|
"stack",
|
||||||
"convertedManaCost",
|
"manaValue",
|
||||||
"gameId",
|
"gameId",
|
||||||
"canPlayInHand",
|
"canPlayInHand",
|
||||||
"gameView",
|
"gameView",
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,7 @@ public final class DeckBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getManaCostScore(Card card, List<ColoredManaSymbol> allowedColors) {
|
private int getManaCostScore(Card card, List<ColoredManaSymbol> allowedColors) {
|
||||||
int converted = card.getConvertedManaCost();
|
int converted = card.getManaValue();
|
||||||
final Map<String, Integer> singleCount = new HashMap<>();
|
final Map<String, Integer> singleCount = new HashMap<>();
|
||||||
int maxSingleCount = 0;
|
int maxSingleCount = 0;
|
||||||
int multicolor = 0;
|
int multicolor = 0;
|
||||||
|
|
@ -276,7 +276,7 @@ public final class DeckBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getConvertedCost() {
|
public int getConvertedCost() {
|
||||||
return this.card.getConvertedManaCost();
|
return this.card.getManaValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Card getCard() {
|
public Card getCard() {
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ public class CardView extends SimpleCardView {
|
||||||
// can combine multiple costs for MockCard from deck editor or db (left/right, card/adventure)
|
// can combine multiple costs for MockCard from deck editor or db (left/right, card/adventure)
|
||||||
protected String manaCostLeftStr;
|
protected String manaCostLeftStr;
|
||||||
protected String manaCostRightStr;
|
protected String manaCostRightStr;
|
||||||
protected int convertedManaCost;
|
protected int manaValue;
|
||||||
protected Rarity rarity;
|
protected Rarity rarity;
|
||||||
|
|
||||||
protected MageObjectType mageObjectType = MageObjectType.NULL;
|
protected MageObjectType mageObjectType = MageObjectType.NULL;
|
||||||
|
|
@ -174,7 +174,7 @@ public class CardView extends SimpleCardView {
|
||||||
this.frameStyle = cardView.frameStyle;
|
this.frameStyle = cardView.frameStyle;
|
||||||
this.manaCostLeftStr = cardView.manaCostLeftStr;
|
this.manaCostLeftStr = cardView.manaCostLeftStr;
|
||||||
this.manaCostRightStr = cardView.manaCostRightStr;
|
this.manaCostRightStr = cardView.manaCostRightStr;
|
||||||
this.convertedManaCost = cardView.convertedManaCost;
|
this.manaValue = cardView.manaValue;
|
||||||
this.rarity = cardView.rarity;
|
this.rarity = cardView.rarity;
|
||||||
|
|
||||||
this.mageObjectType = cardView.mageObjectType;
|
this.mageObjectType = cardView.mageObjectType;
|
||||||
|
|
@ -389,7 +389,7 @@ public class CardView extends SimpleCardView {
|
||||||
} else {
|
} else {
|
||||||
this.rules = card.getRules(game);
|
this.rules = card.getRules(game);
|
||||||
}
|
}
|
||||||
this.convertedManaCost = card.getConvertedManaCost();
|
this.manaValue = card.getManaValue();
|
||||||
|
|
||||||
if (card instanceof Permanent) {
|
if (card instanceof Permanent) {
|
||||||
this.mageObjectType = MageObjectType.PERMANENT;
|
this.mageObjectType = MageObjectType.PERMANENT;
|
||||||
|
|
@ -565,7 +565,7 @@ public class CardView extends SimpleCardView {
|
||||||
this.color = object.getColor(game);
|
this.color = object.getColor(game);
|
||||||
this.manaCostLeftStr = String.join("", object.getManaCostSymbols());
|
this.manaCostLeftStr = String.join("", object.getManaCostSymbols());
|
||||||
this.manaCostRightStr = "";
|
this.manaCostRightStr = "";
|
||||||
this.convertedManaCost = object.getManaCost().convertedManaCost();
|
this.manaValue = object.getManaCost().manaValue();
|
||||||
if (object instanceof PermanentToken) {
|
if (object instanceof PermanentToken) {
|
||||||
this.mageObjectType = MageObjectType.TOKEN;
|
this.mageObjectType = MageObjectType.TOKEN;
|
||||||
PermanentToken permanentToken = (PermanentToken) object;
|
PermanentToken permanentToken = (PermanentToken) object;
|
||||||
|
|
@ -686,7 +686,7 @@ public class CardView extends SimpleCardView {
|
||||||
this.frameStyle = FrameStyle.M15_NORMAL;
|
this.frameStyle = FrameStyle.M15_NORMAL;
|
||||||
this.manaCostLeftStr = "";
|
this.manaCostLeftStr = "";
|
||||||
this.manaCostRightStr = "";
|
this.manaCostRightStr = "";
|
||||||
this.convertedManaCost = 0;
|
this.manaValue = 0;
|
||||||
|
|
||||||
// the controller can see more information (e.g. enlarged image) than other players for face down cards (e.g. Morph played face down)
|
// the controller can see more information (e.g. enlarged image) than other players for face down cards (e.g. Morph played face down)
|
||||||
if (!controlled) {
|
if (!controlled) {
|
||||||
|
|
@ -848,8 +848,8 @@ public class CardView extends SimpleCardView {
|
||||||
return CardUtil.concatManaSymbols(CardInfo.SPLIT_MANA_SEPARATOR_FULL, this.manaCostLeftStr, this.manaCostRightStr);
|
return CardUtil.concatManaSymbols(CardInfo.SPLIT_MANA_SEPARATOR_FULL, this.manaCostLeftStr, this.manaCostRightStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getConvertedManaCost() {
|
public int getManaValue() {
|
||||||
return convertedManaCost;
|
return manaValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Rarity getRarity() {
|
public Rarity getRarity() {
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ public class TinyLeaders extends Constructed {
|
||||||
* would be legal independently.
|
* would be legal independently.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (commander == null || commander.getConvertedManaCost() > 3) {
|
if (commander == null || commander.getManaValue() > 3) {
|
||||||
if (commander == null) {
|
if (commander == null) {
|
||||||
if (deck.getName() == null) {
|
if (deck.getName() == null) {
|
||||||
addError(DeckValidatorErrorType.PRIMARY, "Leader", "You have to save your deck with the leader card name entered to the DECK NAME field of the DECK EDITOR (top left) so that XMage knows your leader."
|
addError(DeckValidatorErrorType.PRIMARY, "Leader", "You have to save your deck with the leader card name entered to the DECK NAME field of the DECK EDITOR (top left) so that XMage knows your leader."
|
||||||
|
|
@ -141,8 +141,8 @@ public class TinyLeaders extends Constructed {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (commander != null && commander.getConvertedManaCost() > 3) {
|
if (commander != null && commander.getManaValue() > 3) {
|
||||||
addError(DeckValidatorErrorType.PRIMARY, "Leader", "Commanders converted mana cost is greater than 3");
|
addError(DeckValidatorErrorType.PRIMARY, "Leader", "Commanders mana value is greater than 3");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -201,13 +201,13 @@ public class TinyLeaders extends Constructed {
|
||||||
// as zero for this purpose. Split cards are legal only if both of their halves would be legal independently.
|
// as zero for this purpose. Split cards are legal only if both of their halves would be legal independently.
|
||||||
List<Integer> costs = new ArrayList<>();
|
List<Integer> costs = new ArrayList<>();
|
||||||
if (card instanceof SplitCard) {
|
if (card instanceof SplitCard) {
|
||||||
costs.add(((SplitCard) card).getLeftHalfCard().getConvertedManaCost());
|
costs.add(((SplitCard) card).getLeftHalfCard().getManaValue());
|
||||||
costs.add(((SplitCard) card).getRightHalfCard().getConvertedManaCost());
|
costs.add(((SplitCard) card).getRightHalfCard().getManaValue());
|
||||||
} else if (card instanceof ModalDoubleFacesCard) {
|
} else if (card instanceof ModalDoubleFacesCard) {
|
||||||
costs.add(((ModalDoubleFacesCard) card).getLeftHalfCard().getConvertedManaCost());
|
costs.add(((ModalDoubleFacesCard) card).getLeftHalfCard().getManaValue());
|
||||||
costs.add(((ModalDoubleFacesCard) card).getRightHalfCard().getConvertedManaCost());
|
costs.add(((ModalDoubleFacesCard) card).getRightHalfCard().getManaValue());
|
||||||
} else {
|
} else {
|
||||||
costs.add(card.getConvertedManaCost());
|
costs.add(card.getManaValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
return costs.stream().allMatch(cost -> {
|
return costs.stream().allMatch(cost -> {
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ public class ComputerPlayer7 extends ComputerPlayer6 {
|
||||||
boolean doThis = true;
|
boolean doThis = true;
|
||||||
if (root.abilities.size() == 1) {
|
if (root.abilities.size() == 1) {
|
||||||
for (Ability ability : root.abilities) {
|
for (Ability ability : root.abilities) {
|
||||||
if (ability.getManaCosts().convertedManaCost() == 0
|
if (ability.getManaCosts().manaValue() == 0
|
||||||
&& ability.getCosts().isEmpty()) {
|
&& ability.getCosts().isEmpty()) {
|
||||||
if (actionCache.contains(ability.getRule() + '_' + ability.getSourceId())) {
|
if (actionCache.contains(ability.getRule() + '_' + ability.getSourceId())) {
|
||||||
doThis = false; // don't do it again
|
doThis = false; // don't do it again
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ public class SimulatedPlayer2 extends ComputerPlayer {
|
||||||
@Override
|
@Override
|
||||||
protected void addVariableXOptions(List<Ability> options, Ability ability, int targetNum, Game game) {
|
protected void addVariableXOptions(List<Ability> options, Ability ability, int targetNum, Game game) {
|
||||||
// calculate the mana that can be used for the x part
|
// calculate the mana that can be used for the x part
|
||||||
int numAvailable = getAvailableManaProducers(game).size() - ability.getManaCosts().convertedManaCost();
|
int numAvailable = getAvailableManaProducers(game).size() - ability.getManaCosts().manaValue();
|
||||||
|
|
||||||
Card card = game.getCard(ability.getSourceId());
|
Card card = game.getCard(ability.getSourceId());
|
||||||
if (card != null && numAvailable > 0) {
|
if (card != null && numAvailable > 0) {
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ public final class ArtificialScoringSystem {
|
||||||
return score;
|
return score;
|
||||||
}
|
}
|
||||||
|
|
||||||
final int score = value * 100 - card.getManaCost().convertedManaCost() * 20;
|
final int score = value * 100 - card.getManaCost().manaValue() * 20;
|
||||||
if (card.getCardType().contains(CardType.CREATURE)) {
|
if (card.getCardType().contains(CardType.CREATURE)) {
|
||||||
return score + (card.getPower().getValue() + card.getToughness().getValue()) * 10;
|
return score + (card.getPower().getValue() + card.getToughness().getValue()) * 10;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1719,7 +1719,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
||||||
//TODO: improve this
|
//TODO: improve this
|
||||||
int xMin = min * multiplier;
|
int xMin = min * multiplier;
|
||||||
int xMax = (max == Integer.MAX_VALUE ? max : max * multiplier);
|
int xMax = (max == Integer.MAX_VALUE ? max : max * multiplier);
|
||||||
int numAvailable = getAvailableManaProducers(game).size() - ability.getManaCosts().convertedManaCost();
|
int numAvailable = getAvailableManaProducers(game).size() - ability.getManaCosts().manaValue();
|
||||||
if (numAvailable < 0) {
|
if (numAvailable < 0) {
|
||||||
numAvailable = 0;
|
numAvailable = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ public class MCTSPlayer extends ComputerPlayer {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void simulateVariableCosts(Ability ability, List<Ability> options, Game game) {
|
protected void simulateVariableCosts(Ability ability, List<Ability> options, Game game) {
|
||||||
int numAvailable = getAvailableManaProducers(game).size() - ability.getManaCosts().convertedManaCost();
|
int numAvailable = getAvailableManaProducers(game).size() - ability.getManaCosts().manaValue();
|
||||||
int start = 0;
|
int start = 0;
|
||||||
if (!(ability instanceof SpellAbility)) {
|
if (!(ability instanceof SpellAbility)) {
|
||||||
//only use x=0 on spell abilities
|
//only use x=0 on spell abilities
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!ability.getManaCosts().getVariableCosts().isEmpty()) {
|
if (!ability.getManaCosts().getVariableCosts().isEmpty()) {
|
||||||
int amount = getAvailableManaProducers(game).size() - ability.getManaCosts().convertedManaCost();
|
int amount = getAvailableManaProducers(game).size() - ability.getManaCosts().manaValue();
|
||||||
if (amount > 0) {
|
if (amount > 0) {
|
||||||
ability = ability.copy();
|
ability = ability.copy();
|
||||||
ability.getManaCostsToPay().add(new GenericManaCost(RandomUtil.nextInt(amount)));
|
ability.getManaCostsToPay().add(new GenericManaCost(RandomUtil.nextInt(amount)));
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ public final class GameStateEvaluator {
|
||||||
}
|
}
|
||||||
value += permanent.getAbilities().getStaticAbilities(Zone.BATTLEFIELD).size();
|
value += permanent.getAbilities().getStaticAbilities(Zone.BATTLEFIELD).size();
|
||||||
value += permanent.getAbilities().getTriggeredAbilities(Zone.BATTLEFIELD).size();
|
value += permanent.getAbilities().getTriggeredAbilities(Zone.BATTLEFIELD).size();
|
||||||
value += permanent.getManaCost().convertedManaCost();
|
value += permanent.getManaCost().manaValue();
|
||||||
//TODO: add a difficulty to calculation to ManaCost - sort permanents by difficulty for casting when evaluating game states
|
//TODO: add a difficulty to calculation to ManaCost - sort permanents by difficulty for casting when evaluating game states
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ public class SimulatedPlayer extends ComputerPlayer {
|
||||||
|
|
||||||
//add a generic mana cost for each amount possible
|
//add a generic mana cost for each amount possible
|
||||||
protected void simulateVariableCosts(Ability ability, Game game) {
|
protected void simulateVariableCosts(Ability ability, Game game) {
|
||||||
int numAvailable = getAvailableManaProducers(game).size() - ability.getManaCosts().convertedManaCost();
|
int numAvailable = getAvailableManaProducers(game).size() - ability.getManaCosts().manaValue();
|
||||||
int start = 0;
|
int start = 0;
|
||||||
if (!(ability instanceof SpellAbility)) {
|
if (!(ability instanceof SpellAbility)) {
|
||||||
//only use x=0 on spell abilities
|
//only use x=0 on spell abilities
|
||||||
|
|
|
||||||
|
|
@ -2118,7 +2118,7 @@ public class HumanPlayer extends PlayerImpl {
|
||||||
|
|
||||||
// hide on alternative cost activated
|
// hide on alternative cost activated
|
||||||
if (!getCastSourceIdWithAlternateMana().contains(ability.getSourceId())
|
if (!getCastSourceIdWithAlternateMana().contains(ability.getSourceId())
|
||||||
&& ability.getManaCostsToPay().convertedManaCost() > 0) {
|
&& ability.getManaCostsToPay().manaValue() > 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.ComparisonType;
|
import mage.constants.ComparisonType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterNonlandPermanent;
|
import mage.filter.common.FilterNonlandPermanent;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.target.common.TargetNonlandPermanent;
|
import mage.target.common.TargetNonlandPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -22,10 +22,10 @@ import mage.target.common.TargetNonlandPermanent;
|
||||||
*/
|
*/
|
||||||
public final class AbruptDecay extends CardImpl {
|
public final class AbruptDecay extends CardImpl {
|
||||||
|
|
||||||
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent("nonland permanent with converted mana cost 3 or less");
|
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent("nonland permanent with mana value 3 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
public AbruptDecay(UUID ownerId, CardSetInfo setInfo) {
|
public AbruptDecay(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.dynamicvalue.DynamicValue;
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
import mage.abilities.dynamicvalue.common.HighestConvertedManaCostValue;
|
import mage.abilities.dynamicvalue.common.HighestManaValueCount;
|
||||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
|
@ -21,7 +21,7 @@ public final class AcceleratedMutation extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}{G}");
|
||||||
|
|
||||||
// Target creature gets +X/+X until end of turn, where X is the highest converted mana cost among permanents you control.
|
// Target creature gets +X/+X until end of turn, where X is the highest converted mana cost among permanents you control.
|
||||||
DynamicValue amount = new HighestConvertedManaCostValue();
|
DynamicValue amount = new HighestManaValueCount();
|
||||||
this.getSpellAbility().addEffect(new BoostTargetEffect(amount, amount, Duration.EndOfTurn, true));
|
this.getSpellAbility().addEffect(new BoostTargetEffect(amount, amount, Duration.EndOfTurn, true));
|
||||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ class AdNauseamEffect extends OneShotEffect {
|
||||||
|
|
||||||
public AdNauseamEffect() {
|
public AdNauseamEffect() {
|
||||||
super(Outcome.DrawCard);
|
super(Outcome.DrawCard);
|
||||||
this.staticText = "Reveal the top card of your library and put that card into your hand. You lose life equal to its converted mana cost. You may repeat this process any number of times";
|
this.staticText = "Reveal the top card of your library and put that card into your hand. You lose life equal to its mana value. You may repeat this process any number of times";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AdNauseamEffect(final AdNauseamEffect effect) {
|
public AdNauseamEffect(final AdNauseamEffect effect) {
|
||||||
|
|
@ -54,7 +54,7 @@ class AdNauseamEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
String message = "Reveal the top card of your library and put that card into your hand? You lose life equal to its converted mana cost.";
|
String message = "Reveal the top card of your library and put that card into your hand? You lose life equal to its mana value.";
|
||||||
Card sourceCard = game.getCard(source.getSourceId());
|
Card sourceCard = game.getCard(source.getSourceId());
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller == null || sourceCard == null) {
|
if (controller == null || sourceCard == null) {
|
||||||
|
|
@ -66,7 +66,7 @@ class AdNauseamEffect extends OneShotEffect {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
controller.moveCards(card, Zone.HAND, source, game);
|
controller.moveCards(card, Zone.HAND, source, game);
|
||||||
int cmc = card.getConvertedManaCost();
|
int cmc = card.getManaValue();
|
||||||
if (cmc > 0) {
|
if (cmc > 0) {
|
||||||
controller.loseLife(cmc, game, source, false);
|
controller.loseLife(cmc, game, source, false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.dynamicvalue.common.TargetConvertedManaCost;
|
import mage.abilities.dynamicvalue.common.TargetManaValue;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -25,7 +25,7 @@ public final class AetherMutation extends CardImpl {
|
||||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
// create X 1/1 green Saproling creature tokens, where X is that creature's converted mana cost.
|
// create X 1/1 green Saproling creature tokens, where X is that creature's converted mana cost.
|
||||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), TargetConvertedManaCost.instance));
|
this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), TargetManaValue.instance));
|
||||||
}
|
}
|
||||||
|
|
||||||
private AetherMutation(final AetherMutation card) {
|
private AetherMutation(final AetherMutation card) {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
@ -53,7 +53,7 @@ class AetherVialEffect extends OneShotEffect {
|
||||||
|
|
||||||
public AetherVialEffect() {
|
public AetherVialEffect() {
|
||||||
super(Outcome.PutCreatureInPlay);
|
super(Outcome.PutCreatureInPlay);
|
||||||
this.staticText = "You may put a creature card with converted mana cost equal to the number of charge counters on {this} from your hand onto the battlefield";
|
this.staticText = "You may put a creature card with mana value equal to the number of charge counters on {this} from your hand onto the battlefield";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AetherVialEffect(final AetherVialEffect effect) {
|
public AetherVialEffect(final AetherVialEffect effect) {
|
||||||
|
|
@ -76,8 +76,8 @@ class AetherVialEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
int count = permanent.getCounters(game).getCount(CounterType.CHARGE);
|
int count = permanent.getCounters(game).getCount(CounterType.CHARGE);
|
||||||
|
|
||||||
FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost equal to " + count);
|
FilterCreatureCard filter = new FilterCreatureCard("creature card with mana value equal to " + count);
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, count));
|
filter.add(new ManaValuePredicate(ComparisonType.EQUAL_TO, count));
|
||||||
String choiceText = "Put a " + filter.getMessage() + " from your hand onto the battlefield?";
|
String choiceText = "Put a " + filter.getMessage() + " from your hand onto the battlefield?";
|
||||||
|
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ class AgadeemOccultistEffect extends OneShotEffect {
|
||||||
|
|
||||||
public AgadeemOccultistEffect() {
|
public AgadeemOccultistEffect() {
|
||||||
super(Outcome.GainControl);
|
super(Outcome.GainControl);
|
||||||
this.staticText = "Put target creature card from an opponent's graveyard onto the battlefield under your control if its converted mana cost is less than or equal to the number of Allies you control";
|
this.staticText = "Put target creature card from an opponent's graveyard onto the battlefield under your control if its mana value is less than or equal to the number of Allies you control";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AgadeemOccultistEffect(final AgadeemOccultistEffect effect) {
|
public AgadeemOccultistEffect(final AgadeemOccultistEffect effect) {
|
||||||
|
|
@ -86,7 +86,7 @@ class AgadeemOccultistEffect extends OneShotEffect {
|
||||||
if (!target.getTargets().isEmpty()) {
|
if (!target.getTargets().isEmpty()) {
|
||||||
Card card = game.getCard(target.getFirstTarget());
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
if (card.getConvertedManaCost() <= allycount) {
|
if (card.getManaValue() <= allycount) {
|
||||||
return controller.moveCards(card, Zone.BATTLEFIELD, source, game);
|
return controller.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public final class AgadeemsAwakening extends ModalDoubleFacesCard {
|
||||||
// Return from your graveyard to the battlefield any number of target creature cards that each have a different converted mana cost X or less.
|
// Return from your graveyard to the battlefield any number of target creature cards that each have a different converted mana cost X or less.
|
||||||
this.getLeftHalfCard().getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect().setText(
|
this.getLeftHalfCard().getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect().setText(
|
||||||
"return from your graveyard to the battlefield any number of target creature cards " +
|
"return from your graveyard to the battlefield any number of target creature cards " +
|
||||||
"that each have a different converted mana cost X or less"
|
"that each have a different mana value X or less"
|
||||||
));
|
));
|
||||||
this.getLeftHalfCard().getSpellAbility().setTargetAdjuster(AgadeemsAwakeningAdjuster.instance);
|
this.getLeftHalfCard().getSpellAbility().setTargetAdjuster(AgadeemsAwakeningAdjuster.instance);
|
||||||
|
|
||||||
|
|
@ -81,7 +81,7 @@ enum AgadeemsAwakeningAdjuster implements TargetAdjuster {
|
||||||
class AgadeemsAwakeningTarget extends TargetCardInYourGraveyard {
|
class AgadeemsAwakeningTarget extends TargetCardInYourGraveyard {
|
||||||
|
|
||||||
private static final FilterCard filter
|
private static final FilterCard filter
|
||||||
= new FilterCreatureCard("creature cards that each have a different converted mana cost X or less");
|
= new FilterCreatureCard("creature cards that each have a different mana value X or less");
|
||||||
private final int xValue;
|
private final int xValue;
|
||||||
|
|
||||||
AgadeemsAwakeningTarget(int xValue) {
|
AgadeemsAwakeningTarget(int xValue) {
|
||||||
|
|
@ -105,11 +105,11 @@ class AgadeemsAwakeningTarget extends TargetCardInYourGraveyard {
|
||||||
Set<Integer> cmcs = this.getTargets()
|
Set<Integer> cmcs = this.getTargets()
|
||||||
.stream()
|
.stream()
|
||||||
.map(game::getCard)
|
.map(game::getCard)
|
||||||
.map(MageObject::getConvertedManaCost)
|
.map(MageObject::getManaValue)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
possibleTargets.removeIf(uuid -> {
|
possibleTargets.removeIf(uuid -> {
|
||||||
Card card = game.getCard(uuid);
|
Card card = game.getCard(uuid);
|
||||||
return card != null && (cmcs.contains(card.getConvertedManaCost()) || card.getConvertedManaCost() > xValue);
|
return card != null && (cmcs.contains(card.getManaValue()) || card.getManaValue() > xValue);
|
||||||
});
|
});
|
||||||
return possibleTargets;
|
return possibleTargets;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.ComparisonType;
|
import mage.constants.ComparisonType;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.game.command.emblems.AjaniAdversaryOfTyrantsEmblem;
|
import mage.game.command.emblems.AjaniAdversaryOfTyrantsEmblem;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
@ -27,10 +27,10 @@ import mage.target.common.TargetCreaturePermanent;
|
||||||
public final class AjaniAdversaryOfTyrants extends CardImpl {
|
public final class AjaniAdversaryOfTyrants extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreatureCard filter
|
private static final FilterCreatureCard filter
|
||||||
= new FilterCreatureCard("creature card with converted mana cost 2 or less from your graveyard");
|
= new FilterCreatureCard("creature card with mana value 2 or less from your graveyard");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
public AjaniAdversaryOfTyrants(UUID ownerId, CardSetInfo setInfo) {
|
public AjaniAdversaryOfTyrants(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
|
|
@ -32,10 +32,10 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class Aluren extends CardImpl {
|
public final class Aluren extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreatureCard filter = new FilterCreatureCard("creature cards with converted mana cost 3 or less");
|
private static final FilterCreatureCard filter = new FilterCreatureCard("creature cards with mana value 3 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Aluren(UUID ownerId, CardSetInfo setInfo) {
|
public Aluren(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
@ -64,17 +64,17 @@ public final class Aluren extends CardImpl {
|
||||||
|
|
||||||
class AlurenRuleEffect extends ContinuousEffectImpl {
|
class AlurenRuleEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
private static final FilterCreatureCard filter = new FilterCreatureCard("creature cards with converted mana cost 3 or less");
|
private static final FilterCreatureCard filter = new FilterCreatureCard("creature cards with mana value 3 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
private final AlternativeCostSourceAbility alternativeCastingCostAbility = new AlternativeCostSourceAbility(null, SourceIsSpellCondition.instance, null, filter, true);
|
private final AlternativeCostSourceAbility alternativeCastingCostAbility = new AlternativeCostSourceAbility(null, SourceIsSpellCondition.instance, null, filter, true);
|
||||||
|
|
||||||
public AlurenRuleEffect() {
|
public AlurenRuleEffect() {
|
||||||
super(Duration.WhileOnBattlefield, Outcome.Detriment);
|
super(Duration.WhileOnBattlefield, Outcome.Detriment);
|
||||||
staticText = "Any player may cast creature cards with converted mana cost 3 or less without paying their mana cost";
|
staticText = "Any player may cast creature cards with mana value 3 or less without paying their mana cost";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AlurenRuleEffect(final AlurenRuleEffect effect) {
|
public AlurenRuleEffect(final AlurenRuleEffect effect) {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import mage.constants.ComparisonType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterPermanentCard;
|
import mage.filter.common.FilterPermanentCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -23,10 +23,10 @@ import mage.target.common.TargetCardInLibrary;
|
||||||
*/
|
*/
|
||||||
public final class AmrouScout extends CardImpl {
|
public final class AmrouScout extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanentCard filter = new FilterPermanentCard("Rebel permanent card with converted mana cost 3 or less");
|
private static final FilterPermanentCard filter = new FilterPermanentCard("Rebel permanent card with mana value 3 or less");
|
||||||
static {
|
static {
|
||||||
filter.add(SubType.REBEL.getPredicate());
|
filter.add(SubType.REBEL.getPredicate());
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
public AmrouScout(UUID ownerId, CardSetInfo setInfo) {
|
public AmrouScout(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ public final class AncientOoze extends CardImpl {
|
||||||
|
|
||||||
// Ancient Ooze's power and toughness are each equal to the total converted mana cost of other creatures you control.
|
// Ancient Ooze's power and toughness are each equal to the total converted mana cost of other creatures you control.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new AncientOozePowerToughnessValue(), Duration.EndOfGame)
|
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new AncientOozePowerToughnessValue(), Duration.EndOfGame)
|
||||||
.setText("{this}'s power and toughness are each equal to the total converted mana cost of other creatures you control.")
|
.setText("{this}'s power and toughness are each equal to the total mana value of other creatures you control.")
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -54,7 +54,7 @@ class AncientOozePowerToughnessValue implements DynamicValue {
|
||||||
int value = 0;
|
int value = 0;
|
||||||
for (Permanent creature : game.getBattlefield().getActivePermanents(new FilterControlledCreaturePermanent(), sourceAbility.getControllerId(), game)) {
|
for (Permanent creature : game.getBattlefield().getActivePermanents(new FilterControlledCreaturePermanent(), sourceAbility.getControllerId(), game)) {
|
||||||
if (creature != null && !sourceAbility.getSourceId().equals(creature.getId())) {
|
if (creature != null && !sourceAbility.getSourceId().equals(creature.getId())) {
|
||||||
value += creature.getConvertedManaCost();
|
value += creature.getManaValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
|
|
@ -72,6 +72,6 @@ class AncientOozePowerToughnessValue implements DynamicValue {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getMessage() {
|
public String getMessage() {
|
||||||
return "total converted mana cost of other creatures you control";
|
return "total mana value of other creatures you control";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ class AngrathTheFlameCreateDelayedTriggerEffect extends OneShotEffect {
|
||||||
|
|
||||||
public AngrathTheFlameCreateDelayedTriggerEffect() {
|
public AngrathTheFlameCreateDelayedTriggerEffect() {
|
||||||
super(Outcome.Sacrifice);
|
super(Outcome.Sacrifice);
|
||||||
staticText = "Sacrifice it at the beginning of the next end step if it has converted mana cost 3 or less";
|
staticText = "Sacrifice it at the beginning of the next end step if it has mana value 3 or less";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AngrathTheFlameCreateDelayedTriggerEffect(final AngrathTheFlameCreateDelayedTriggerEffect effect) {
|
public AngrathTheFlameCreateDelayedTriggerEffect(final AngrathTheFlameCreateDelayedTriggerEffect effect) {
|
||||||
|
|
@ -149,7 +149,7 @@ class AngrathTheFlameChainedDelayedTriggeredAbility extends DelayedTriggeredAbil
|
||||||
Permanent permanent = game.getPermanent(((FixedTarget) getEffects().get(0).getTargetPointer()).getTarget());
|
Permanent permanent = game.getPermanent(((FixedTarget) getEffects().get(0).getTargetPointer()).getTarget());
|
||||||
return permanent != null
|
return permanent != null
|
||||||
&& permanent.getZoneChangeCounter(game) == ((FixedTarget) getEffects().get(0).getTargetPointer()).getZoneChangeCounter()
|
&& permanent.getZoneChangeCounter(game) == ((FixedTarget) getEffects().get(0).getTargetPointer()).getZoneChangeCounter()
|
||||||
&& permanent.getConvertedManaCost() <= 3;
|
&& permanent.getManaValue() <= 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -159,6 +159,6 @@ class AngrathTheFlameChainedDelayedTriggeredAbility extends DelayedTriggeredAbil
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
public String getRule() {
|
||||||
return "Sacrifice it at the beginning of the next end step if it has converted mana cost 3 or less.";
|
return "Sacrifice it at the beginning of the next end step if it has mana value 3 or less.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ class AnimateArtifactContinuousEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
public AnimateArtifactContinuousEffect(Duration duration) {
|
public AnimateArtifactContinuousEffect(Duration duration) {
|
||||||
super(duration, Outcome.Benefit);
|
super(duration, Outcome.Benefit);
|
||||||
staticText = "As long as enchanted artifact isn't a creature, it's an artifact creature with power and toughness each equal to its converted mana cost";
|
staticText = "As long as enchanted artifact isn't a creature, it's an artifact creature with power and toughness each equal to its mana value";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AnimateArtifactContinuousEffect(final AnimateArtifactContinuousEffect effect) {
|
public AnimateArtifactContinuousEffect(final AnimateArtifactContinuousEffect effect) {
|
||||||
|
|
@ -80,8 +80,8 @@ class AnimateArtifactContinuousEffect extends ContinuousEffectImpl {
|
||||||
if (permanent != null && !permanent.isCreature()) {
|
if (permanent != null && !permanent.isCreature()) {
|
||||||
if (sublayer == SubLayer.NA) {
|
if (sublayer == SubLayer.NA) {
|
||||||
permanent.addCardType(CardType.CREATURE);
|
permanent.addCardType(CardType.CREATURE);
|
||||||
permanent.getPower().setValue(permanent.getConvertedManaCost());
|
permanent.getPower().setValue(permanent.getManaValue());
|
||||||
permanent.getToughness().setValue(permanent.getConvertedManaCost());
|
permanent.getToughness().setValue(permanent.getManaValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.ComparisonType;
|
import mage.constants.ComparisonType;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.target.common.TargetOpponent;
|
import mage.target.common.TargetOpponent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -17,10 +17,10 @@ import mage.target.common.TargetOpponent;
|
||||||
*/
|
*/
|
||||||
public final class AppetiteForBrains extends CardImpl {
|
public final class AppetiteForBrains extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCard filter = new FilterCard("a card from it with converted mana cost 4 or greater");
|
private static final FilterCard filter = new FilterCard("a card from it with mana value 4 or greater");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.MORE_THAN, 3));
|
filter.add(new ManaValuePredicate(ComparisonType.MORE_THAN, 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
public AppetiteForBrains(UUID ownerId, CardSetInfo setInfo) {
|
public AppetiteForBrains(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import mage.constants.ComparisonType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterNonlandPermanent;
|
import mage.filter.common.FilterNonlandPermanent;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
|
|
@ -24,10 +24,10 @@ import java.util.UUID;
|
||||||
public final class ArchmagesCharm extends CardImpl {
|
public final class ArchmagesCharm extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter
|
private static final FilterPermanent filter
|
||||||
= new FilterNonlandPermanent("nonland permanent with converted mana cost 1 or less");
|
= new FilterNonlandPermanent("nonland permanent with mana value 1 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 2));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArchmagesCharm(UUID ownerId, CardSetInfo setInfo) {
|
public ArchmagesCharm(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.abilities.dynamicvalue.common.TargetConvertedManaCost;
|
import mage.abilities.dynamicvalue.common.TargetManaValue;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -24,7 +24,7 @@ public final class ArtifactMutation extends CardImpl {
|
||||||
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
|
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
|
||||||
|
|
||||||
// create X 1/1 green Saproling creature tokens, where X is that artifact's converted mana cost.
|
// create X 1/1 green Saproling creature tokens, where X is that artifact's converted mana cost.
|
||||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), TargetConvertedManaCost.instance).setText("create X 1/1 green Saproling creature tokens, where X is that artifact's converted mana cost"));
|
this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), TargetManaValue.instance).setText("create X 1/1 green Saproling creature tokens, where X is that artifact's mana value"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private ArtifactMutation(final ArtifactMutation card) {
|
private ArtifactMutation(final ArtifactMutation card) {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.ComparisonType;
|
import mage.constants.ComparisonType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterArtifactCard;
|
import mage.filter.common.FilterArtifactCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -22,9 +22,9 @@ import mage.target.common.TargetCardInLibrary;
|
||||||
*/
|
*/
|
||||||
public final class ArtificersIntuition extends CardImpl {
|
public final class ArtificersIntuition extends CardImpl {
|
||||||
|
|
||||||
private static final FilterArtifactCard filter = new FilterArtifactCard("artifact card with converted mana cost 1 or less");
|
private static final FilterArtifactCard filter = new FilterArtifactCard("artifact card with mana value 1 or less");
|
||||||
static {
|
static {
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 2));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 2));
|
||||||
}
|
}
|
||||||
public ArtificersIntuition(UUID ownerId, CardSetInfo setInfo) {
|
public ArtificersIntuition(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}");
|
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}");
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ class SpellWithManaCostLessThanOrEqualToCondition implements Condition {
|
||||||
MageObject object = game.getObject(source.getSourceId());
|
MageObject object = game.getObject(source.getSourceId());
|
||||||
return object != null
|
return object != null
|
||||||
&& !object.isLand()
|
&& !object.isLand()
|
||||||
&& object.getConvertedManaCost() <= counters;
|
&& object.getManaValue() <= counters;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -128,7 +128,7 @@ class AsForetoldAddAltCostEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
public AsForetoldAddAltCostEffect() {
|
public AsForetoldAddAltCostEffect() {
|
||||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||||
staticText = "Once each turn, you may pay {0} rather than pay the mana cost for a spell you cast with converted mana cost X or less, where X is the number of time counters on {this}.";
|
staticText = "Once each turn, you may pay {0} rather than pay the mana cost for a spell you cast with mana value X or less, where X is the number of time counters on {this}.";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AsForetoldAddAltCostEffect(final AsForetoldAddAltCostEffect effect) {
|
public AsForetoldAddAltCostEffect(final AsForetoldAddAltCostEffect effect) {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import mage.cards.*;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
@ -96,7 +96,7 @@ class AshiokNightmareWeaverPutIntoPlayEffect extends OneShotEffect {
|
||||||
|
|
||||||
public AshiokNightmareWeaverPutIntoPlayEffect() {
|
public AshiokNightmareWeaverPutIntoPlayEffect() {
|
||||||
super(Outcome.PutCreatureInPlay);
|
super(Outcome.PutCreatureInPlay);
|
||||||
this.staticText = "Put a creature card with converted mana cost X exiled with {this} onto the battlefield under your control. That creature is a Nightmare in addition to its other types";
|
this.staticText = "Put a creature card with mana value X exiled with {this} onto the battlefield under your control. That creature is a Nightmare in addition to its other types";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AshiokNightmareWeaverPutIntoPlayEffect(final AshiokNightmareWeaverPutIntoPlayEffect effect) {
|
public AshiokNightmareWeaverPutIntoPlayEffect(final AshiokNightmareWeaverPutIntoPlayEffect effect) {
|
||||||
|
|
@ -123,8 +123,8 @@ class AshiokNightmareWeaverPutIntoPlayEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FilterCard filter = new FilterCreatureCard("creature card with converted mana cost {" + cmc + "} exiled with " + sourceObject.getIdName());
|
FilterCard filter = new FilterCreatureCard("creature card with mana value {" + cmc + "} exiled with " + sourceObject.getIdName());
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, cmc));
|
filter.add(new ManaValuePredicate(ComparisonType.EQUAL_TO, cmc));
|
||||||
|
|
||||||
Target target = new TargetCardInExile(filter, CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()));
|
Target target = new TargetCardInExile(filter, CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,12 +53,12 @@ public final class AshlingsPrerogative extends CardImpl {
|
||||||
|
|
||||||
class AshlingsPrerogativeIncorrectOddityEffect extends PermanentsEnterBattlefieldTappedEffect {
|
class AshlingsPrerogativeIncorrectOddityEffect extends PermanentsEnterBattlefieldTappedEffect {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent creaturefilter = new FilterCreaturePermanent("Each creature without converted mana cost of the chosen value");
|
private static final FilterCreaturePermanent creaturefilter = new FilterCreaturePermanent("Each creature without mana value of the chosen value");
|
||||||
private static final ModeChoiceSourceCondition oddCondition = new ModeChoiceSourceCondition("Odd");
|
private static final ModeChoiceSourceCondition oddCondition = new ModeChoiceSourceCondition("Odd");
|
||||||
|
|
||||||
public AshlingsPrerogativeIncorrectOddityEffect() {
|
public AshlingsPrerogativeIncorrectOddityEffect() {
|
||||||
super(creaturefilter);
|
super(creaturefilter);
|
||||||
staticText = "Each creature without converted mana cost of the chosen value enters the battlefield tapped.";
|
staticText = "Each creature without mana value of the chosen value enters the battlefield tapped.";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AshlingsPrerogativeIncorrectOddityEffect(final AshlingsPrerogativeIncorrectOddityEffect effect) {
|
public AshlingsPrerogativeIncorrectOddityEffect(final AshlingsPrerogativeIncorrectOddityEffect effect) {
|
||||||
|
|
@ -77,7 +77,7 @@ class AshlingsPrerogativeIncorrectOddityEffect extends PermanentsEnterBattlefiel
|
||||||
|
|
||||||
Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget();
|
Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||||
|
|
||||||
return permanent != null && creaturefilter.match(permanent, game) && permanent.getConvertedManaCost() % 2 == incorrectModResult;
|
return permanent != null && creaturefilter.match(permanent, game) && permanent.getManaValue() % 2 == incorrectModResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -88,12 +88,12 @@ class AshlingsPrerogativeIncorrectOddityEffect extends PermanentsEnterBattlefiel
|
||||||
|
|
||||||
class AshlingsPrerogativeCorrectOddityEffect extends GainAbilityAllEffect {
|
class AshlingsPrerogativeCorrectOddityEffect extends GainAbilityAllEffect {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent creaturefilter = new FilterCreaturePermanent("Each creature with converted mana cost of the chosen value");
|
private static final FilterCreaturePermanent creaturefilter = new FilterCreaturePermanent("Each creature with mana value of the chosen value");
|
||||||
private static final ModeChoiceSourceCondition oddCondition = new ModeChoiceSourceCondition("Odd");
|
private static final ModeChoiceSourceCondition oddCondition = new ModeChoiceSourceCondition("Odd");
|
||||||
|
|
||||||
public AshlingsPrerogativeCorrectOddityEffect() {
|
public AshlingsPrerogativeCorrectOddityEffect() {
|
||||||
super(HasteAbility.getInstance(), Duration.WhileOnBattlefield, creaturefilter);
|
super(HasteAbility.getInstance(), Duration.WhileOnBattlefield, creaturefilter);
|
||||||
staticText = "Each creature with converted mana cost of the chosen value has haste.";
|
staticText = "Each creature with mana value of the chosen value has haste.";
|
||||||
}
|
}
|
||||||
public AshlingsPrerogativeCorrectOddityEffect(final AshlingsPrerogativeCorrectOddityEffect effect) {
|
public AshlingsPrerogativeCorrectOddityEffect(final AshlingsPrerogativeCorrectOddityEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
|
|
@ -107,7 +107,7 @@ class AshlingsPrerogativeCorrectOddityEffect extends GainAbilityAllEffect {
|
||||||
} else {
|
} else {
|
||||||
correctModResult = 0;
|
correctModResult = 0;
|
||||||
}
|
}
|
||||||
return permanent != null && creaturefilter.match(permanent, game) && permanent.getConvertedManaCost() % 2 == correctModResult;
|
return permanent != null && creaturefilter.match(permanent, game) && permanent.getManaValue() % 2 == correctModResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ class AtemsisAllSeeingEffect extends OneShotEffect {
|
||||||
|
|
||||||
AtemsisAllSeeingEffect() {
|
AtemsisAllSeeingEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
staticText = "reveal your hand. If cards with at least six different converted mana costs " +
|
staticText = "reveal your hand. If cards with at least six different mana values " +
|
||||||
"are revealed this way, that player loses the game.";
|
"are revealed this way, that player loses the game.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -88,7 +88,7 @@ class AtemsisAllSeeingEffect extends OneShotEffect {
|
||||||
.getHand()
|
.getHand()
|
||||||
.getCards(game)
|
.getCards(game)
|
||||||
.stream()
|
.stream()
|
||||||
.map(card -> card.getConvertedManaCost())
|
.map(card -> card.getManaValue())
|
||||||
.distinct()
|
.distinct()
|
||||||
.count() > 5) {
|
.count() > 5) {
|
||||||
opponent.lost(game);
|
opponent.lost(game);
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ class AuguryAdeptEffect extends OneShotEffect {
|
||||||
AuguryAdeptEffect() {
|
AuguryAdeptEffect() {
|
||||||
super(Outcome.GainLife);
|
super(Outcome.GainLife);
|
||||||
this.staticText = "reveal the top card of your library and put that card into your hand. " +
|
this.staticText = "reveal the top card of your library and put that card into your hand. " +
|
||||||
"You gain life equal to its converted mana cost";
|
"You gain life equal to its mana value";
|
||||||
}
|
}
|
||||||
|
|
||||||
private AuguryAdeptEffect(final AuguryAdeptEffect effect) {
|
private AuguryAdeptEffect(final AuguryAdeptEffect effect) {
|
||||||
|
|
@ -73,7 +73,7 @@ class AuguryAdeptEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
controller.revealCards(source, new CardsImpl(card), game);
|
controller.revealCards(source, new CardsImpl(card), game);
|
||||||
controller.moveCards(card, Zone.HAND, source, game);
|
controller.moveCards(card, Zone.HAND, source, game);
|
||||||
int cmc = card.getConvertedManaCost();
|
int cmc = card.getManaValue();
|
||||||
if (cmc > 0) {
|
if (cmc > 0) {
|
||||||
controller.gainLife(cmc, game, source);
|
controller.gainLife(cmc, game, source);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.dynamicvalue.common.TargetConvertedManaCost;
|
import mage.abilities.dynamicvalue.common.TargetManaValue;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -25,7 +25,7 @@ public final class AuraMutation extends CardImpl {
|
||||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||||
this.getSpellAbility().addTarget(new TargetEnchantmentPermanent());
|
this.getSpellAbility().addTarget(new TargetEnchantmentPermanent());
|
||||||
// create X 1/1 green Saproling creature tokens, where X is that enchantment's converted mana cost.
|
// create X 1/1 green Saproling creature tokens, where X is that enchantment's converted mana cost.
|
||||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), TargetConvertedManaCost.instance));
|
this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), TargetManaValue.instance));
|
||||||
}
|
}
|
||||||
|
|
||||||
private AuraMutation(final AuraMutation card) {
|
private AuraMutation(final AuraMutation card) {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import mage.constants.ComparisonType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterArtifactCard;
|
import mage.filter.common.FilterArtifactCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -23,9 +23,9 @@ import mage.target.common.TargetCardInYourGraveyard;
|
||||||
*/
|
*/
|
||||||
public final class AuriokSalvagers extends CardImpl {
|
public final class AuriokSalvagers extends CardImpl {
|
||||||
|
|
||||||
private static final FilterArtifactCard filter = new FilterArtifactCard("artifact card with converted mana cost 1 or less from your graveyard");
|
private static final FilterArtifactCard filter = new FilterArtifactCard("artifact card with mana value 1 or less from your graveyard");
|
||||||
static {
|
static {
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 2));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
public AuriokSalvagers(UUID ownerId, CardSetInfo setInfo) {
|
public AuriokSalvagers(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import mage.constants.ComparisonType;
|
||||||
import mage.filter.common.FilterArtifactPermanent;
|
import mage.filter.common.FilterArtifactPermanent;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.common.FilterEnchantmentPermanent;
|
import mage.filter.common.FilterEnchantmentPermanent;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -19,11 +19,11 @@ import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||||
*/
|
*/
|
||||||
public final class AustereCommand extends CardImpl {
|
public final class AustereCommand extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter3orLess = new FilterCreaturePermanent("creatures with converted mana cost 3 or less");
|
private static final FilterCreaturePermanent filter3orLess = new FilterCreaturePermanent("creatures with mana value 3 or less");
|
||||||
private static final FilterCreaturePermanent filter4orMore = new FilterCreaturePermanent("creatures with converted mana cost 4 or greater");
|
private static final FilterCreaturePermanent filter4orMore = new FilterCreaturePermanent("creatures with mana value 4 or greater");
|
||||||
static {
|
static {
|
||||||
filter3orLess.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
filter3orLess.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||||
filter4orMore.add(new ConvertedManaCostPredicate(ComparisonType.MORE_THAN, 3));
|
filter4orMore.add(new ManaValuePredicate(ComparisonType.MORE_THAN, 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
public AustereCommand(UUID ownerId, CardSetInfo setInfo) {
|
public AustereCommand(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ class AzorsGatewayEffect extends OneShotEffect {
|
||||||
|
|
||||||
public AzorsGatewayEffect() {
|
public AzorsGatewayEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
this.staticText = "Draw a card, then exile a card from your hand. If cards with five or more different converted mana costs are exiled with {this}, you gain 5 life, untap Azor's Gateway, and transform it";
|
this.staticText = "Draw a card, then exile a card from your hand. If cards with five or more different mana values are exiled with {this}, you gain 5 life, untap Azor's Gateway, and transform it";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AzorsGatewayEffect(final AzorsGatewayEffect effect) {
|
public AzorsGatewayEffect(final AzorsGatewayEffect effect) {
|
||||||
|
|
@ -89,7 +89,7 @@ class AzorsGatewayEffect extends OneShotEffect {
|
||||||
ExileZone exileZone = game.getExile().getExileZone(exileId);
|
ExileZone exileZone = game.getExile().getExileZone(exileId);
|
||||||
if (exileZone != null) {
|
if (exileZone != null) {
|
||||||
for (Card card : exileZone.getCards(game)) {
|
for (Card card : exileZone.getCards(game)) {
|
||||||
usedCMC.add(card.getConvertedManaCost());
|
usedCMC.add(card.getManaValue());
|
||||||
}
|
}
|
||||||
if (usedCMC.size() > 4) {
|
if (usedCMC.size() > 4) {
|
||||||
controller.gainLife(4, game, source);
|
controller.gainLife(4, game, source);
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ class BingoEffect extends OneShotEffect {
|
||||||
|
|
||||||
public BingoEffect() {
|
public BingoEffect() {
|
||||||
super(Outcome.Neutral);
|
super(Outcome.Neutral);
|
||||||
staticText = "put a chip counter on its converted mana cost";
|
staticText = "put a chip counter on its mana value";
|
||||||
}
|
}
|
||||||
|
|
||||||
public BingoEffect(final BingoEffect effect) {
|
public BingoEffect(final BingoEffect effect) {
|
||||||
|
|
@ -79,7 +79,7 @@ class BingoEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Spell spell = game.getStack().getSpell(this.getTargetPointer().getFirst(game, source));
|
Spell spell = game.getStack().getSpell(this.getTargetPointer().getFirst(game, source));
|
||||||
if (spell != null) {
|
if (spell != null) {
|
||||||
if (spell.getConvertedManaCost() > 9) {
|
if (spell.getManaValue() > 9) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
MageObject mageObject = game.getObject(source.getSourceId());
|
MageObject mageObject = game.getObject(source.getSourceId());
|
||||||
|
|
@ -88,8 +88,8 @@ class BingoEffect extends OneShotEffect {
|
||||||
if (game.getState().getValue(mageObject.getId() + "_chip") != null) {
|
if (game.getState().getValue(mageObject.getId() + "_chip") != null) {
|
||||||
chipCounters.putAll((Map<Integer, Integer>) game.getState().getValue(mageObject.getId() + "_chip"));
|
chipCounters.putAll((Map<Integer, Integer>) game.getState().getValue(mageObject.getId() + "_chip"));
|
||||||
}
|
}
|
||||||
chipCounters.putIfAbsent(spell.getConvertedManaCost(), 0);
|
chipCounters.putIfAbsent(spell.getManaValue(), 0);
|
||||||
chipCounters.put(spell.getConvertedManaCost(), chipCounters.get(spell.getConvertedManaCost()) + 1);
|
chipCounters.put(spell.getManaValue(), chipCounters.get(spell.getManaValue()) + 1);
|
||||||
game.getState().setValue(mageObject.getId() + "_chip", chipCounters);
|
game.getState().setValue(mageObject.getId() + "_chip", chipCounters);
|
||||||
if (mageObject instanceof Permanent) {
|
if (mageObject instanceof Permanent) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.ComparisonType;
|
import mage.constants.ComparisonType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.game.permanent.token.DinosaurToken;
|
import mage.game.permanent.token.DinosaurToken;
|
||||||
import mage.target.Target;
|
import mage.target.Target;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
@ -25,10 +25,10 @@ import mage.target.common.TargetOpponent;
|
||||||
*/
|
*/
|
||||||
public final class BafflingEnd extends CardImpl {
|
public final class BafflingEnd extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost 3 or less an opponent controls");
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with mana value 3 or less an opponent controls");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
@ -64,7 +63,7 @@ public final class BanefulOmen extends CardImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
public String getRule() {
|
||||||
return "At the beginning of your end step, you may reveal the top card of your library. If you do, each opponent loses life equal to that card's converted mana cost.";
|
return "At the beginning of your end step, you may reveal the top card of your library. If you do, each opponent loses life equal to that card's mana value.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -95,7 +94,7 @@ public final class BanefulOmen extends CardImpl {
|
||||||
player.revealCards("Baneful Omen", cards, game);
|
player.revealCards("Baneful Omen", cards, game);
|
||||||
|
|
||||||
|
|
||||||
int loseLife = card.getConvertedManaCost();
|
int loseLife = card.getManaValue();
|
||||||
Set<UUID> opponents = game.getOpponents(source.getControllerId());
|
Set<UUID> opponents = game.getOpponents(source.getControllerId());
|
||||||
for (UUID opponentUuid : opponents) {
|
for (UUID opponentUuid : opponents) {
|
||||||
Player opponent = game.getPlayer(opponentUuid);
|
Player opponent = game.getPlayer(opponentUuid);
|
||||||
|
|
|
||||||
|
|
@ -91,13 +91,13 @@ class BattleOfFrostAndFireTriggeredAbility extends DelayedTriggeredAbility {
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (event.getPlayerId().equals(this.getControllerId())) {
|
if (event.getPlayerId().equals(this.getControllerId())) {
|
||||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||||
return spell != null && spell.getConvertedManaCost() >= 5;
|
return spell != null && spell.getManaValue() >= 5;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
public String getRule() {
|
||||||
return "Whenever you cast a spell with converted mana cost 5 or greater this turn, " + super.getRule();
|
return "Whenever you cast a spell with mana value 5 or greater this turn, " + super.getRule();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ class BellBorcaSpectralSergeantAbility extends StaticAbility implements MageSing
|
||||||
}
|
}
|
||||||
|
|
||||||
private BellBorcaSpectralSergeantAbility() {
|
private BellBorcaSpectralSergeantAbility() {
|
||||||
super(Zone.BATTLEFIELD, new InfoEffect("note the converted mana cost of each card as it's put into exile"));
|
super(Zone.BATTLEFIELD, new InfoEffect("note the mana value of each card as it's put into exile"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -132,7 +132,7 @@ class BellBorcaSpectralSergeantWatcher extends Watcher {
|
||||||
if (card == null || card.isFaceDown(game)) {
|
if (card == null || card.isFaceDown(game)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int cmc = card.getConvertedManaCost();
|
int cmc = card.getManaValue();
|
||||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, game.getActivePlayerId(), game)) {
|
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, game.getActivePlayerId(), game)) {
|
||||||
if (permanent == null) {
|
if (permanent == null) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ import mage.target.common.TargetCardInLibrary;
|
||||||
*/
|
*/
|
||||||
public final class BeseechTheQueen extends CardImpl {
|
public final class BeseechTheQueen extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCard filter = new FilterCard("card with converted mana cost less than or equal to the number of lands you control");
|
private static final FilterCard filter = new FilterCard("card with mana value less than or equal to the number of lands you control");
|
||||||
static{
|
static{
|
||||||
filter.add(new BeseechTheQueenPredicate());
|
filter.add(new BeseechTheQueenPredicate());
|
||||||
}
|
}
|
||||||
|
|
@ -48,7 +48,7 @@ class BeseechTheQueenPredicate implements Predicate<Card> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean apply(Card input, Game game) {
|
public final boolean apply(Card input, Game game) {
|
||||||
if(input.getConvertedManaCost() <= game.getBattlefield().getAllActivePermanents(new FilterControlledLandPermanent(), input.getOwnerId(), game).size()){
|
if(input.getManaValue() <= game.getBattlefield().getAllActivePermanents(new FilterControlledLandPermanent(), input.getOwnerId(), game).size()){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -56,6 +56,6 @@ class BeseechTheQueenPredicate implements Predicate<Card> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "card with converted mana cost less than or equal to the number of lands you control";
|
return "card with mana value less than or equal to the number of lands you control";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -17,7 +17,7 @@ import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
@ -60,8 +60,8 @@ class BirthingPodEffect extends OneShotEffect {
|
||||||
|
|
||||||
BirthingPodEffect() {
|
BirthingPodEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
staticText = "Search your library for a creature card with converted mana cost equal to 1 " +
|
staticText = "Search your library for a creature card with mana value equal to 1 " +
|
||||||
"plus the sacrificed creature's converted mana cost, put that card " +
|
"plus the sacrificed creature's mana value, put that card " +
|
||||||
"onto the battlefield, then shuffle your library";
|
"onto the battlefield, then shuffle your library";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -85,9 +85,9 @@ class BirthingPodEffect extends OneShotEffect {
|
||||||
if (sacrificedPermanent == null || controller == null) {
|
if (sacrificedPermanent == null || controller == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
int newConvertedCost = sacrificedPermanent.getConvertedManaCost() + 1;
|
int newConvertedCost = sacrificedPermanent.getManaValue() + 1;
|
||||||
FilterCard filter = new FilterCard("creature card with converted mana cost " + newConvertedCost);
|
FilterCard filter = new FilterCard("creature card with mana value " + newConvertedCost);
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, newConvertedCost));
|
filter.add(new ManaValuePredicate(ComparisonType.EQUAL_TO, newConvertedCost));
|
||||||
filter.add(CardType.CREATURE.getPredicate());
|
filter.add(CardType.CREATURE.getPredicate());
|
||||||
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
||||||
if (controller.searchLibrary(target, source, game)) {
|
if (controller.searchLibrary(target, source, game)) {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import mage.constants.ComparisonType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -23,10 +23,10 @@ import mage.target.common.TargetCardInYourGraveyard;
|
||||||
*/
|
*/
|
||||||
public final class BishopOfRebirth extends CardImpl {
|
public final class BishopOfRebirth extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCard filter = new FilterCreatureCard("creature card with converted mana cost 3 or less from your graveyard");
|
private static final FilterCard filter = new FilterCreatureCard("creature card with mana value 3 or less from your graveyard");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||||
filter.add(CardType.CREATURE.getPredicate());
|
filter.add(CardType.CREATURE.getPredicate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -43,7 +43,7 @@ public final class BishopOfRebirth extends CardImpl {
|
||||||
|
|
||||||
// Whenever Bishop of Rebirth attacks, you may return target creature card with converted mana cost 3 or less from your graveyard to the battlefield.
|
// Whenever Bishop of Rebirth attacks, you may return target creature card with converted mana cost 3 or less from your graveyard to the battlefield.
|
||||||
Ability ability = new AttacksTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()
|
Ability ability = new AttacksTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()
|
||||||
.setText("you may return target creature card with converted mana cost 3 or less from your graveyard to the battlefield"), true);
|
.setText("you may return target creature card with mana value 3 or less from your graveyard to the battlefield"), true);
|
||||||
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ class BlastOfGeniusEffect extends OneShotEffect {
|
||||||
|
|
||||||
public BlastOfGeniusEffect() {
|
public BlastOfGeniusEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
this.staticText = "Choose any target. Draw three cards and discard a card. {this} deals damage equal to the converted mana cost of the discard card to that permanent or player";
|
this.staticText = "Choose any target. Draw three cards and discard a card. {this} deals damage equal to the mana value of the discard card to that permanent or player";
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlastOfGeniusEffect(final BlastOfGeniusEffect effect) {
|
public BlastOfGeniusEffect(final BlastOfGeniusEffect effect) {
|
||||||
|
|
@ -65,7 +65,7 @@ class BlastOfGeniusEffect extends OneShotEffect {
|
||||||
Card card = player.getHand().get(target.getFirstTarget(), game);
|
Card card = player.getHand().get(target.getFirstTarget(), game);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
player.discard(card, false, source, game);
|
player.discard(card, false, source, game);
|
||||||
int damage = card.getConvertedManaCost();
|
int damage = card.getManaValue();
|
||||||
Permanent creature = game.getPermanent(this.getTargetPointer().getFirst(game, source));
|
Permanent creature = game.getPermanent(this.getTargetPointer().getFirst(game, source));
|
||||||
if (creature != null) {
|
if (creature != null) {
|
||||||
creature.damage(damage, source.getSourceId(), source, game, false, true);
|
creature.damage(damage, source.getSourceId(), source, game, false, true);
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import mage.constants.Outcome;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterNonlandPermanent;
|
import mage.filter.common.FilterNonlandPermanent;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
|
@ -72,7 +72,7 @@ class BlastZoneEffect extends OneShotEffect {
|
||||||
|
|
||||||
BlastZoneEffect() {
|
BlastZoneEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
staticText = "Destroy each nonland permanent with converted mana cost " +
|
staticText = "Destroy each nonland permanent with mana value " +
|
||||||
"equal to the number of charge counters on {this}";
|
"equal to the number of charge counters on {this}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -90,7 +90,7 @@ class BlastZoneEffect extends OneShotEffect {
|
||||||
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||||
int xValue = permanent.getCounters(game).getCount(CounterType.CHARGE);
|
int xValue = permanent.getCounters(game).getCount(CounterType.CHARGE);
|
||||||
FilterPermanent filter = new FilterNonlandPermanent();
|
FilterPermanent filter = new FilterNonlandPermanent();
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, xValue));
|
filter.add(new ManaValuePredicate(ComparisonType.EQUAL_TO, xValue));
|
||||||
return new DestroyAllEffect(filter).apply(game, source);
|
return new DestroyAllEffect(filter).apply(game, source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -32,7 +32,7 @@ public final class BlazingShoal extends CardImpl {
|
||||||
|
|
||||||
|
|
||||||
// You may exile a red card with converted mana cost X from your hand rather than pay Blazing Shoal's mana cost.
|
// You may exile a red card with converted mana cost X from your hand rather than pay Blazing Shoal's mana cost.
|
||||||
FilterOwnedCard filter = new FilterOwnedCard("a red card with converted mana cost X from your hand");
|
FilterOwnedCard filter = new FilterOwnedCard("a red card with mana value X from your hand");
|
||||||
filter.add(new ColorPredicate(ObjectColor.RED));
|
filter.add(new ColorPredicate(ObjectColor.RED));
|
||||||
filter.add(Predicates.not(new CardIdPredicate(this.getId()))); // the exile cost can never be paid with the card itself
|
filter.add(Predicates.not(new CardIdPredicate(this.getId()))); // the exile cost can never be paid with the card itself
|
||||||
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter),true)));
|
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter),true)));
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import mage.constants.ComparisonType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterPermanentCard;
|
import mage.filter.common.FilterPermanentCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
|
|
@ -26,11 +26,11 @@ import mage.target.common.TargetCardInLibrary;
|
||||||
*/
|
*/
|
||||||
public final class Blightspeaker extends CardImpl {
|
public final class Blightspeaker extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanentCard filter = new FilterPermanentCard("Rebel permanent card with converted mana cost 3 or less");
|
private static final FilterPermanentCard filter = new FilterPermanentCard("Rebel permanent card with mana value 3 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(SubType.REBEL.getPredicate());
|
filter.add(SubType.REBEL.getPredicate());
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Blightspeaker(UUID ownerId, CardSetInfo setInfo) {
|
public Blightspeaker(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
|
@ -42,7 +42,7 @@ public final class BloodOnTheSnow extends CardImpl {
|
||||||
mode.addEffect(new BloodOnTheSnowEffect());
|
mode.addEffect(new BloodOnTheSnowEffect());
|
||||||
this.getSpellAbility().addMode(mode);
|
this.getSpellAbility().addMode(mode);
|
||||||
this.getSpellAbility().appendToRule(
|
this.getSpellAbility().appendToRule(
|
||||||
"Then return a creature or planeswalker card with converted mana cost X or less"
|
"Then return a creature or planeswalker card with mana value X or less"
|
||||||
+ " from your graveyard to the battlefield, where X is the amount of {S} spent to cast this spell."
|
+ " from your graveyard to the battlefield, where X is the amount of {S} spent to cast this spell."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -77,9 +77,9 @@ class BloodOnTheSnowEffect extends OneShotEffect {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
int snow = source.getManaCostsToPay().getUsedManaToPay().getSnow();
|
int snow = source.getManaCostsToPay().getUsedManaToPay().getSnow();
|
||||||
FilterCard filter = new FilterCard("a creature or planeswalker card with CMC " + snow + " or less from your graveyard");
|
FilterCard filter = new FilterCard("a creature or planeswalker card with mana value " + snow + " or less from your graveyard");
|
||||||
filter.add(Predicates.or(CardType.CREATURE.getPredicate(), CardType.PLANESWALKER.getPredicate()));
|
filter.add(Predicates.or(CardType.CREATURE.getPredicate(), CardType.PLANESWALKER.getPredicate()));
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, snow + 1));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, snow + 1));
|
||||||
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(1, 1, filter, true);
|
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(1, 1, filter, true);
|
||||||
controller.chooseTarget(outcome, target, source, game);
|
controller.chooseTarget(outcome, target, source, game);
|
||||||
Card card = game.getCard(target.getFirstTarget());
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.ComparisonType;
|
import mage.constants.ComparisonType;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent;
|
import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetCreatureOrPlaneswalker;
|
import mage.target.common.TargetCreatureOrPlaneswalker;
|
||||||
|
|
@ -31,7 +31,7 @@ public final class BloodchiefsThirst extends CardImpl {
|
||||||
|
|
||||||
// Destroy target creature or planeswalker with converted mana cost 2 or less. If this spell was kicked, instead destroy target creature or planeswalker.
|
// Destroy target creature or planeswalker with converted mana cost 2 or less. If this spell was kicked, instead destroy target creature or planeswalker.
|
||||||
this.getSpellAbility().addEffect(new DestroyTargetEffect(
|
this.getSpellAbility().addEffect(new DestroyTargetEffect(
|
||||||
"Destroy target creature or planeswalker with converted mana cost 2 or less. " +
|
"Destroy target creature or planeswalker with mana value 2 or less. " +
|
||||||
"If this spell was kicked, instead destroy target creature or planeswalker."
|
"If this spell was kicked, instead destroy target creature or planeswalker."
|
||||||
));
|
));
|
||||||
this.getSpellAbility().setTargetAdjuster(BloodchiefsThirstAdjuster.instance);
|
this.getSpellAbility().setTargetAdjuster(BloodchiefsThirstAdjuster.instance);
|
||||||
|
|
@ -51,11 +51,11 @@ enum BloodchiefsThirstAdjuster implements TargetAdjuster {
|
||||||
instance;
|
instance;
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterCreatureOrPlaneswalkerPermanent(
|
private static final FilterPermanent filter = new FilterCreatureOrPlaneswalkerPermanent(
|
||||||
"creature or planeswalker with converted mana cost 2 or less"
|
"creature or planeswalker with mana value 2 or less"
|
||||||
);
|
);
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ class BludgeonBrawlAbility extends StaticAbility {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
public String getRule() {
|
||||||
return "Each noncreature, non-Equipment artifact is an Equipment with equip {X} and \"Equipped creature gets +X/+0,\" where X is that artifact's converted mana cost.";
|
return "Each noncreature, non-Equipment artifact is an Equipment with equip {X} and \"Equipped creature gets +X/+0,\" where X is that artifact's mana value.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -121,9 +121,9 @@ class BludgeonBrawlGainAbilityEffect extends ContinuousEffectImpl {
|
||||||
for (UUID permanentId : permanents) {
|
for (UUID permanentId : permanents) {
|
||||||
Permanent permanent = game.getPermanent(permanentId);
|
Permanent permanent = game.getPermanent(permanentId);
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
int convertedManaCost = permanent.getConvertedManaCost();
|
int manaValue = permanent.getManaValue();
|
||||||
permanent.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(convertedManaCost)), source.getSourceId(), game);
|
permanent.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(manaValue)), source.getSourceId(), game);
|
||||||
permanent.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(convertedManaCost, 0)), source.getSourceId(), game);
|
permanent.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(manaValue, 0)), source.getSourceId(), game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterControlledLandPermanent;
|
import mage.filter.common.FilterControlledLandPermanent;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
import mage.filter.common.FilterPermanentCard;
|
import mage.filter.common.FilterPermanentCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
|
@ -29,11 +29,11 @@ import mage.target.common.TargetControlledPermanent;
|
||||||
public final class BogGlider extends CardImpl {
|
public final class BogGlider extends CardImpl {
|
||||||
|
|
||||||
static final FilterControlledPermanent landFilter = new FilterControlledLandPermanent("a land");
|
static final FilterControlledPermanent landFilter = new FilterControlledLandPermanent("a land");
|
||||||
private static final FilterPermanentCard filter = new FilterPermanentCard("Mercenary permanent card with converted mana cost 2 or less");
|
private static final FilterPermanentCard filter = new FilterPermanentCard("Mercenary permanent card with mana value 2 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(SubType.MERCENARY.getPredicate());
|
filter.add(SubType.MERCENARY.getPredicate());
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
public BogGlider(UUID ownerId, CardSetInfo setInfo) {
|
public BogGlider(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ class BolassCitadelPlayTheTopCardEffect extends AsThoughEffectImpl {
|
||||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE,
|
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE,
|
||||||
Duration.WhileOnBattlefield, Outcome.AIDontUseIt); // AI will need help with this
|
Duration.WhileOnBattlefield, Outcome.AIDontUseIt); // AI will need help with this
|
||||||
staticText = "You may play lands and cast spells from the top of your library. If you cast a spell this way, "
|
staticText = "You may play lands and cast spells from the top of your library. If you cast a spell this way, "
|
||||||
+ "pay life equal to its converted mana cost rather than pay its mana cost.";
|
+ "pay life equal to its mana value rather than pay its mana cost.";
|
||||||
}
|
}
|
||||||
|
|
||||||
private BolassCitadelPlayTheTopCardEffect(final BolassCitadelPlayTheTopCardEffect effect) {
|
private BolassCitadelPlayTheTopCardEffect(final BolassCitadelPlayTheTopCardEffect effect) {
|
||||||
|
|
@ -114,7 +114,7 @@ class BolassCitadelPlayTheTopCardEffect extends AsThoughEffectImpl {
|
||||||
|
|
||||||
// allows to play/cast with alternative life cost
|
// allows to play/cast with alternative life cost
|
||||||
if (!cardToCheck.isLand()) {
|
if (!cardToCheck.isLand()) {
|
||||||
PayLifeCost lifeCost = new PayLifeCost(cardToCheck.getSpellAbility().getManaCosts().convertedManaCost());
|
PayLifeCost lifeCost = new PayLifeCost(cardToCheck.getSpellAbility().getManaCosts().manaValue());
|
||||||
Costs newCosts = new CostsImpl();
|
Costs newCosts = new CostsImpl();
|
||||||
newCosts.add(lifeCost);
|
newCosts.add(lifeCost);
|
||||||
newCosts.addAll(cardToCheck.getSpellAbility().getCosts());
|
newCosts.addAll(cardToCheck.getSpellAbility().getCosts());
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public final class BoshIronGolem extends CardImpl {
|
||||||
|
|
||||||
// {3}{R}, Sacrifice an artifact: Bosh, Iron Golem deals damage equal to the sacrificed artifact's converted mana cost to any target.
|
// {3}{R}, Sacrifice an artifact: Bosh, Iron Golem deals damage equal to the sacrificed artifact's converted mana cost to any target.
|
||||||
Effect effect = new DamageTargetEffect(new SacrificeCostConvertedMana("artifact"));
|
Effect effect = new DamageTargetEffect(new SacrificeCostConvertedMana("artifact"));
|
||||||
effect.setText("{this} deals damage equal to the sacrificed artifact's converted mana cost to any target");
|
effect.setText("{this} deals damage equal to the sacrificed artifact's mana value to any target");
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{3}{R}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{3}{R}"));
|
||||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact"))));
|
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact"))));
|
||||||
ability.addTarget(new TargetAnyTarget());
|
ability.addTarget(new TargetAnyTarget());
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ class BounteousKirinEffect extends OneShotEffect {
|
||||||
|
|
||||||
public BounteousKirinEffect() {
|
public BounteousKirinEffect() {
|
||||||
super(Outcome.GainLife);
|
super(Outcome.GainLife);
|
||||||
this.staticText = "you may gain life equal to that spell's converted mana cost";
|
this.staticText = "you may gain life equal to that spell's mana value";
|
||||||
}
|
}
|
||||||
|
|
||||||
public BounteousKirinEffect(final BounteousKirinEffect effect) {
|
public BounteousKirinEffect(final BounteousKirinEffect effect) {
|
||||||
|
|
@ -67,7 +67,7 @@ class BounteousKirinEffect extends OneShotEffect {
|
||||||
if (spell != null) {
|
if (spell != null) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
int life = spell.getConvertedManaCost();
|
int life = spell.getManaValue();
|
||||||
controller.gainLife(life, game, source);
|
controller.gainLife(life, game, source);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.common.FilterInstantOrSorceryCard;
|
import mage.filter.common.FilterInstantOrSorceryCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
@ -71,7 +71,7 @@ class BrainInAJarCastEffect extends OneShotEffect {
|
||||||
public BrainInAJarCastEffect() {
|
public BrainInAJarCastEffect() {
|
||||||
super(Outcome.PlayForFree);
|
super(Outcome.PlayForFree);
|
||||||
this.staticText = ", then you may cast an instant or sorcery card "
|
this.staticText = ", then you may cast an instant or sorcery card "
|
||||||
+ "with converted mana costs equal to the number of charge "
|
+ "with mana values equal to the number of charge "
|
||||||
+ "counters on {this} from your hand without paying its mana cost";
|
+ "counters on {this} from your hand without paying its mana cost";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -92,12 +92,12 @@ class BrainInAJarCastEffect extends OneShotEffect {
|
||||||
&& sourceObject != null) {
|
&& sourceObject != null) {
|
||||||
int counters = sourceObject.getCounters(game).getCount(CounterType.CHARGE);
|
int counters = sourceObject.getCounters(game).getCount(CounterType.CHARGE);
|
||||||
FilterCard filter = new FilterInstantOrSorceryCard();
|
FilterCard filter = new FilterInstantOrSorceryCard();
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, counters));
|
filter.add(new ManaValuePredicate(ComparisonType.EQUAL_TO, counters));
|
||||||
int cardsToCast = controller.getHand().count(filter, source.getControllerId(),
|
int cardsToCast = controller.getHand().count(filter, source.getControllerId(),
|
||||||
source.getSourceId(), game);
|
source.getSourceId(), game);
|
||||||
if (cardsToCast > 0
|
if (cardsToCast > 0
|
||||||
&& controller.chooseUse(Outcome.PlayForFree,
|
&& controller.chooseUse(Outcome.PlayForFree,
|
||||||
"Cast an instant or sorcery card with converted mana costs of "
|
"Cast an instant or sorcery card with mana values of "
|
||||||
+ counters + " from your hand without paying its mana cost?",
|
+ counters + " from your hand without paying its mana cost?",
|
||||||
source, game)) {
|
source, game)) {
|
||||||
TargetCardInHand target = new TargetCardInHand(filter);
|
TargetCardInHand target = new TargetCardInHand(filter);
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ class BrinelinTheMoonKrakenTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Spell spell = game.getSpellOrLKIStack(event.getTargetId());
|
Spell spell = game.getSpellOrLKIStack(event.getTargetId());
|
||||||
return spell != null && spell.getConvertedManaCost() >= 6;
|
return spell != null && spell.getManaValue() >= 6;
|
||||||
case ENTERS_THE_BATTLEFIELD:
|
case ENTERS_THE_BATTLEFIELD:
|
||||||
return event.getTargetId().equals(getSourceId());
|
return event.getTargetId().equals(getSourceId());
|
||||||
default:
|
default:
|
||||||
|
|
@ -83,7 +83,7 @@ class BrinelinTheMoonKrakenTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
public String getRule() {
|
||||||
return "When {this} enters the battlefield or whenever you cast a spell with converted mana cost " +
|
return "When {this} enters the battlefield or whenever you cast a spell with mana value " +
|
||||||
"6 or greater, you may return target nonland permanent to its owner's hand.";
|
"6 or greater, you may return target nonland permanent to its owner's hand.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
@ -70,7 +70,7 @@ class BringToLightEffect extends OneShotEffect {
|
||||||
+ "cost less than or equal to " + numberColors);
|
+ "cost less than or equal to " + numberColors);
|
||||||
filter.add(Predicates.or(CardType.CREATURE.getPredicate(),
|
filter.add(Predicates.or(CardType.CREATURE.getPredicate(),
|
||||||
CardType.INSTANT.getPredicate(), CardType.SORCERY.getPredicate()));
|
CardType.INSTANT.getPredicate(), CardType.SORCERY.getPredicate()));
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, numberColors + 1));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, numberColors + 1));
|
||||||
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
||||||
controller.searchLibrary(target, source, game);
|
controller.searchLibrary(target, source, game);
|
||||||
Card card = controller.getLibrary().getCard(target.getFirstTarget(), game);
|
Card card = controller.getLibrary().getCard(target.getFirstTarget(), game);
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ import mage.cards.MeldCard;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -64,7 +63,7 @@ class BriselaVoiceOfNightmaresCantCastEffect extends ContinuousRuleModifyingEffe
|
||||||
|
|
||||||
public BriselaVoiceOfNightmaresCantCastEffect() {
|
public BriselaVoiceOfNightmaresCantCastEffect() {
|
||||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||||
staticText = "Your opponents can't cast spells with converted mana cost 3 or less";
|
staticText = "Your opponents can't cast spells with mana value 3 or less";
|
||||||
}
|
}
|
||||||
|
|
||||||
public BriselaVoiceOfNightmaresCantCastEffect(final BriselaVoiceOfNightmaresCantCastEffect effect) {
|
public BriselaVoiceOfNightmaresCantCastEffect(final BriselaVoiceOfNightmaresCantCastEffect effect) {
|
||||||
|
|
@ -85,7 +84,7 @@ class BriselaVoiceOfNightmaresCantCastEffect extends ContinuousRuleModifyingEffe
|
||||||
public String getInfoMessage(Ability source, GameEvent event, Game game) {
|
public String getInfoMessage(Ability source, GameEvent event, Game game) {
|
||||||
MageObject mageObject = game.getObject(source.getSourceId());
|
MageObject mageObject = game.getObject(source.getSourceId());
|
||||||
if (mageObject != null) {
|
if (mageObject != null) {
|
||||||
return "You can't cast spells with converted mana cost 3 or less (" + mageObject.getIdName() + ").";
|
return "You can't cast spells with mana value 3 or less (" + mageObject.getIdName() + ").";
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
@ -100,7 +99,7 @@ class BriselaVoiceOfNightmaresCantCastEffect extends ContinuousRuleModifyingEffe
|
||||||
if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) {
|
if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) {
|
||||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||||
if (spell != null) {
|
if (spell != null) {
|
||||||
return spell.getConvertedManaCost() < 4;
|
return spell.getManaValue() < 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.ComparisonType;
|
import mage.constants.ComparisonType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -20,11 +20,11 @@ import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||||
*/
|
*/
|
||||||
public final class BygoneBishop extends CardImpl {
|
public final class BygoneBishop extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filterSpell = new FilterSpell("a creature spell with converted mana cost 3 or less");
|
private static final FilterSpell filterSpell = new FilterSpell("a creature spell with mana value 3 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filterSpell.add(CardType.CREATURE.getPredicate());
|
filterSpell.add(CardType.CREATURE.getPredicate());
|
||||||
filterSpell.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
filterSpell.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
public BygoneBishop(UUID ownerId, CardSetInfo setInfo) {
|
public BygoneBishop(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.dynamicvalue.common.HighestConvertedManaCostValue;
|
import mage.abilities.dynamicvalue.common.HighestManaValueCount;
|
||||||
import mage.abilities.effects.common.discard.DiscardTargetEffect;
|
import mage.abilities.effects.common.discard.DiscardTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
|
@ -19,8 +19,8 @@ public final class CabalConditioning extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{6}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{6}{B}");
|
||||||
|
|
||||||
// Any number of target players each discard a number of cards equal to the highest converted mana cost among permanents you control.
|
// Any number of target players each discard a number of cards equal to the highest converted mana cost among permanents you control.
|
||||||
this.getSpellAbility().addEffect(new DiscardTargetEffect(new HighestConvertedManaCostValue())
|
this.getSpellAbility().addEffect(new DiscardTargetEffect(new HighestManaValueCount())
|
||||||
.setText("Any number of target players each discard a number of cards equal to the highest converted mana cost among permanents you control.")
|
.setText("Any number of target players each discard a number of cards equal to the highest mana value among permanents you control.")
|
||||||
);
|
);
|
||||||
this.getSpellAbility().addTarget(new TargetPlayer(0, Integer.MAX_VALUE, false));
|
this.getSpellAbility().addTarget(new TargetPlayer(0, Integer.MAX_VALUE, false));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import mage.filter.FilterCard;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.filter.predicate.permanent.PermanentIdPredicate;
|
import mage.filter.predicate.permanent.PermanentIdPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
@ -55,7 +55,7 @@ class CallOfTheDeathDwellerEffect extends OneShotEffect {
|
||||||
|
|
||||||
CallOfTheDeathDwellerEffect() {
|
CallOfTheDeathDwellerEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
staticText = "Return up to two target creature cards with total converted mana cost 3 or less " +
|
staticText = "Return up to two target creature cards with total mana value 3 or less " +
|
||||||
"from your graveyard to the battlefield. Put a deathtouch counter on either of them. " +
|
"from your graveyard to the battlefield. Put a deathtouch counter on either of them. " +
|
||||||
"Then put a menace counter on either of them.";
|
"Then put a menace counter on either of them.";
|
||||||
}
|
}
|
||||||
|
|
@ -117,10 +117,10 @@ class CallOfTheDeathDwellerEffect extends OneShotEffect {
|
||||||
class CallOfTheDeathDwellerTarget extends TargetCardInYourGraveyard {
|
class CallOfTheDeathDwellerTarget extends TargetCardInYourGraveyard {
|
||||||
|
|
||||||
private static final FilterCard filter
|
private static final FilterCard filter
|
||||||
= new FilterCreatureCard("creature cards with total converted mana cost 3 or less from your graveyard");
|
= new FilterCreatureCard("creature cards with total mana value 3 or less from your graveyard");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
CallOfTheDeathDwellerTarget() {
|
CallOfTheDeathDwellerTarget() {
|
||||||
|
|
@ -146,7 +146,7 @@ class CallOfTheDeathDwellerTarget extends TargetCardInYourGraveyard {
|
||||||
this.getTargets()
|
this.getTargets()
|
||||||
.stream()
|
.stream()
|
||||||
.map(game::getCard)
|
.map(game::getCard)
|
||||||
.mapToInt(Card::getConvertedManaCost)
|
.mapToInt(Card::getManaValue)
|
||||||
.sum() + card.getConvertedManaCost() <= 3;
|
.sum() + card.getManaValue() <= 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import mage.constants.ComparisonType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterPermanentCard;
|
import mage.filter.common.FilterPermanentCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -25,11 +25,11 @@ import mage.target.common.TargetCardInLibrary;
|
||||||
*/
|
*/
|
||||||
public final class CateranBrute extends CardImpl {
|
public final class CateranBrute extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanentCard filter = new FilterPermanentCard("Mercenary permanent card with converted mana cost 2 or less");
|
private static final FilterPermanentCard filter = new FilterPermanentCard("Mercenary permanent card with mana value 2 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(SubType.MERCENARY.getPredicate());
|
filter.add(SubType.MERCENARY.getPredicate());
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CateranBrute(UUID ownerId, CardSetInfo setInfo) {
|
public CateranBrute(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import mage.constants.ComparisonType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterPermanentCard;
|
import mage.filter.common.FilterPermanentCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -26,11 +26,11 @@ import mage.target.common.TargetCardInLibrary;
|
||||||
*/
|
*/
|
||||||
public final class CateranEnforcer extends CardImpl {
|
public final class CateranEnforcer extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanentCard filter = new FilterPermanentCard("Mercenary permanent card with converted mana cost 4 or less");
|
private static final FilterPermanentCard filter = new FilterPermanentCard("Mercenary permanent card with mana value 4 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(SubType.MERCENARY.getPredicate());
|
filter.add(SubType.MERCENARY.getPredicate());
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 5));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 5));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CateranEnforcer(UUID ownerId, CardSetInfo setInfo) {
|
public CateranEnforcer(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import mage.constants.ComparisonType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterPermanentCard;
|
import mage.filter.common.FilterPermanentCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -24,11 +24,11 @@ import mage.target.common.TargetCardInLibrary;
|
||||||
*/
|
*/
|
||||||
public final class CateranKidnappers extends CardImpl {
|
public final class CateranKidnappers extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanentCard filter = new FilterPermanentCard("Mercenary permanent card with converted mana cost 3 or less");
|
private static final FilterPermanentCard filter = new FilterPermanentCard("Mercenary permanent card with mana value 3 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(SubType.MERCENARY.getPredicate());
|
filter.add(SubType.MERCENARY.getPredicate());
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CateranKidnappers(UUID ownerId, CardSetInfo setInfo) {
|
public CateranKidnappers(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
|
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
|
||||||
import mage.filter.common.FilterPermanentCard;
|
import mage.filter.common.FilterPermanentCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
|
||||||
|
|
@ -28,11 +28,11 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
*/
|
*/
|
||||||
public final class CateranOverlord extends CardImpl {
|
public final class CateranOverlord extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanentCard filter = new FilterPermanentCard("Mercenary permanent card with converted mana cost 6 or less");
|
private static final FilterPermanentCard filter = new FilterPermanentCard("Mercenary permanent card with mana value 6 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(SubType.MERCENARY.getPredicate());
|
filter.add(SubType.MERCENARY.getPredicate());
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 7));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 7));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CateranOverlord(UUID ownerId, CardSetInfo setInfo) {
|
public CateranOverlord(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import mage.constants.ComparisonType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterPermanentCard;
|
import mage.filter.common.FilterPermanentCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -25,11 +25,11 @@ import mage.target.common.TargetCardInLibrary;
|
||||||
*/
|
*/
|
||||||
public final class CateranPersuader extends CardImpl {
|
public final class CateranPersuader extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanentCard filter = new FilterPermanentCard("Mercenary permanent card with converted mana cost 1 or less");
|
private static final FilterPermanentCard filter = new FilterPermanentCard("Mercenary permanent card with mana value 1 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(SubType.MERCENARY.getPredicate());
|
filter.add(SubType.MERCENARY.getPredicate());
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 2));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CateranPersuader(UUID ownerId, CardSetInfo setInfo) {
|
public CateranPersuader(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import mage.constants.ComparisonType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterPermanentCard;
|
import mage.filter.common.FilterPermanentCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -26,11 +26,11 @@ import mage.target.common.TargetCardInLibrary;
|
||||||
*/
|
*/
|
||||||
public final class CateranSlaver extends CardImpl {
|
public final class CateranSlaver extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanentCard filter = new FilterPermanentCard("Mercenary permanent card with converted mana cost 5 or less");
|
private static final FilterPermanentCard filter = new FilterPermanentCard("Mercenary permanent card with mana value 5 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(SubType.MERCENARY.getPredicate());
|
filter.add(SubType.MERCENARY.getPredicate());
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 6));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 6));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CateranSlaver(UUID ownerId, CardSetInfo setInfo) {
|
public CateranSlaver(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ import mage.filter.FilterCard;
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
@ -35,11 +35,11 @@ public final class CavalierOfNight extends CardImpl {
|
||||||
private static final FilterControlledPermanent filter
|
private static final FilterControlledPermanent filter
|
||||||
= new FilterControlledCreaturePermanent("another creature");
|
= new FilterControlledCreaturePermanent("another creature");
|
||||||
private static final FilterCard filter2
|
private static final FilterCard filter2
|
||||||
= new FilterCreatureCard("creature card with converted mana cost 3 or less from your graveyard");
|
= new FilterCreatureCard("creature card with mana value 3 or less from your graveyard");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(AnotherPredicate.instance);
|
filter.add(AnotherPredicate.instance);
|
||||||
filter2.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
filter2.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CavalierOfNight(UUID ownerId, CardSetInfo setInfo) {
|
public CavalierOfNight(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
|
|
||||||
|
|
@ -52,7 +52,7 @@ class CelestialKirinEffect extends OneShotEffect {
|
||||||
|
|
||||||
public CelestialKirinEffect() {
|
public CelestialKirinEffect() {
|
||||||
super(Outcome.GainLife);
|
super(Outcome.GainLife);
|
||||||
this.staticText = "destroy all permanents with that spell's converted mana cost";
|
this.staticText = "destroy all permanents with that spell's mana value";
|
||||||
}
|
}
|
||||||
|
|
||||||
public CelestialKirinEffect(final CelestialKirinEffect effect) {
|
public CelestialKirinEffect(final CelestialKirinEffect effect) {
|
||||||
|
|
@ -68,9 +68,9 @@ class CelestialKirinEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source));
|
Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source));
|
||||||
if (spell != null) {
|
if (spell != null) {
|
||||||
int cmc = spell.getConvertedManaCost();
|
int cmc = spell.getManaValue();
|
||||||
FilterPermanent filter = new FilterPermanent();
|
FilterPermanent filter = new FilterPermanent();
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, cmc));
|
filter.add(new ManaValuePredicate(ComparisonType.EQUAL_TO, cmc));
|
||||||
return new DestroyAllEffect(filter).apply(game, source);
|
return new DestroyAllEffect(filter).apply(game, source);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ class CerebralEruptionEffect extends OneShotEffect {
|
||||||
|
|
||||||
CerebralEruptionEffect() {
|
CerebralEruptionEffect() {
|
||||||
super(Outcome.Damage);
|
super(Outcome.Damage);
|
||||||
staticText = "Target opponent reveals the top card of their library. {this} deals damage equal to the revealed card's converted mana cost to that player and each creature they control. If a land card is revealed this way, return {this} to its owner's hand";
|
staticText = "Target opponent reveals the top card of their library. {this} deals damage equal to the revealed card's mana value to that player and each creature they control. If a land card is revealed this way, return {this} to its owner's hand";
|
||||||
}
|
}
|
||||||
|
|
||||||
CerebralEruptionEffect(final CerebralEruptionEffect effect) {
|
CerebralEruptionEffect(final CerebralEruptionEffect effect) {
|
||||||
|
|
@ -59,7 +59,7 @@ class CerebralEruptionEffect extends OneShotEffect {
|
||||||
Cards cards = new CardsImpl(card);
|
Cards cards = new CardsImpl(card);
|
||||||
player.revealCards(sourceObject.getIdName(), cards, game);
|
player.revealCards(sourceObject.getIdName(), cards, game);
|
||||||
game.getState().setValue(source.getSourceId().toString(), card);
|
game.getState().setValue(source.getSourceId().toString(), card);
|
||||||
int damage = card.getConvertedManaCost();
|
int damage = card.getManaValue();
|
||||||
player.damage(damage, source.getSourceId(), source, game);
|
player.damage(damage, source.getSourceId(), source, game);
|
||||||
for (Permanent perm : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURES, player.getId(), game)) {
|
for (Permanent perm : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURES, player.getId(), game)) {
|
||||||
perm.damage(damage, source.getSourceId(), source, game, false, true);
|
perm.damage(damage, source.getSourceId(), source, game, false, true);
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ class ChaliceOfTheVoidTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
Permanent chalice = game.getPermanent(getSourceId());
|
Permanent chalice = game.getPermanent(getSourceId());
|
||||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||||
if (spell != null && chalice != null && spell.getConvertedManaCost() == chalice.getCounters(game).getCount(CounterType.CHARGE)) {
|
if (spell != null && chalice != null && spell.getManaValue() == chalice.getCounters(game).getCount(CounterType.CHARGE)) {
|
||||||
for (Effect effect : this.getEffects()) {
|
for (Effect effect : this.getEffects()) {
|
||||||
effect.setTargetPointer(new FixedTarget(event.getTargetId()));
|
effect.setTargetPointer(new FixedTarget(event.getTargetId()));
|
||||||
}
|
}
|
||||||
|
|
@ -79,6 +79,6 @@ class ChaliceOfTheVoidTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
public String getRule() {
|
||||||
return "Whenever a player casts a spell with converted mana cost equal to the number of charge counters on {this}, counter that spell.";
|
return "Whenever a player casts a spell with mana value equal to the number of charge counters on {this}, counter that spell.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,14 +21,13 @@ import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterControlledPlaneswalkerPermanent;
|
import mage.filter.common.FilterControlledPlaneswalkerPermanent;
|
||||||
import mage.filter.common.FilterInstantOrSorceryCard;
|
import mage.filter.common.FilterInstantOrSorceryCard;
|
||||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.ZoneChangeEvent;
|
import mage.game.events.ZoneChangeEvent;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.game.permanent.token.RedElementalToken;
|
import mage.game.permanent.token.RedElementalToken;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
import mage.players.Player;
|
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
|
@ -44,11 +43,11 @@ public final class ChandraAcolyteOfFlame extends CardImpl {
|
||||||
private static final FilterPermanent filter
|
private static final FilterPermanent filter
|
||||||
= new FilterControlledPlaneswalkerPermanent("red planeswalker you control");
|
= new FilterControlledPlaneswalkerPermanent("red planeswalker you control");
|
||||||
private static final FilterCard filter2
|
private static final FilterCard filter2
|
||||||
= new FilterInstantOrSorceryCard("instant or sorcery card with converted mana cost 3 or less");
|
= new FilterInstantOrSorceryCard("instant or sorcery card with mana value 3 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new ColorPredicate(ObjectColor.RED));
|
filter.add(new ColorPredicate(ObjectColor.RED));
|
||||||
filter2.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
filter2.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChandraAcolyteOfFlame(UUID ownerId, CardSetInfo setInfo) {
|
public ChandraAcolyteOfFlame(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
@ -129,7 +128,7 @@ class ChandraAcolyteOfFlameGraveyardEffect extends OneShotEffect {
|
||||||
ChandraAcolyteOfFlameGraveyardEffect() {
|
ChandraAcolyteOfFlameGraveyardEffect() {
|
||||||
super(Benefit);
|
super(Benefit);
|
||||||
this.staticText = "You may cast target instant or sorcery card " +
|
this.staticText = "You may cast target instant or sorcery card " +
|
||||||
"with converted mana cost 3 or less from your graveyard this turn. " +
|
"with mana value 3 or less from your graveyard this turn. " +
|
||||||
"If that card would be put into your graveyard this turn, exile it instead";
|
"If that card would be put into your graveyard this turn, exile it instead";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
@ -51,7 +51,7 @@ class CitanulFluteSearchEffect extends OneShotEffect {
|
||||||
|
|
||||||
CitanulFluteSearchEffect() {
|
CitanulFluteSearchEffect() {
|
||||||
super(Outcome.DrawCard);
|
super(Outcome.DrawCard);
|
||||||
staticText = "Search your library for a creature card with converted mana cost X or less, " +
|
staticText = "Search your library for a creature card with mana value X or less, " +
|
||||||
"reveal it, and put it into your hand. Then shuffle your library";
|
"reveal it, and put it into your hand. Then shuffle your library";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -71,9 +71,9 @@ class CitanulFluteSearchEffect extends OneShotEffect {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
FilterCard filter = new FilterCreatureCard("creature card with converted mana cost X or less");
|
FilterCard filter = new FilterCreatureCard("creature card with mana value X or less");
|
||||||
//Set the mana cost one higher to 'emulate' a less than or equal to comparison.
|
//Set the mana cost one higher to 'emulate' a less than or equal to comparison.
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, source.getManaCostsToPay().getX() + 1));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, source.getManaCostsToPay().getX() + 1));
|
||||||
|
|
||||||
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
||||||
player.searchLibrary(target, source, game);
|
player.searchLibrary(target, source, game);
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import mage.constants.Duration;
|
||||||
import mage.constants.SpellAbilityType;
|
import mage.constants.SpellAbilityType;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
|
@ -25,10 +25,10 @@ import mage.target.common.TargetCreaturePermanent;
|
||||||
*/
|
*/
|
||||||
public final class ClaimFame extends SplitCard {
|
public final class ClaimFame extends SplitCard {
|
||||||
|
|
||||||
private static final FilterCard filter = new FilterCreatureCard("creature card with converted mana cost 2 or less from your graveyard");
|
private static final FilterCard filter = new FilterCreatureCard("creature card with mana value 2 or less from your graveyard");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ClaimFame(UUID ownerId, CardSetInfo setInfo) {
|
public ClaimFame(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import mage.constants.ComparisonType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -22,10 +22,10 @@ import java.util.UUID;
|
||||||
public final class ClaimTheFirstborn extends CardImpl {
|
public final class ClaimTheFirstborn extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter
|
private static final FilterPermanent filter
|
||||||
= new FilterCreaturePermanent("creature with converted mana cost 3 or less");
|
= new FilterCreaturePermanent("creature with mana value 3 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ClaimTheFirstborn(UUID ownerId, CardSetInfo setInfo) {
|
public ClaimTheFirstborn(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class CloudhoofKirinEffect extends OneShotEffect {
|
||||||
|
|
||||||
CloudhoofKirinEffect() {
|
CloudhoofKirinEffect() {
|
||||||
super(Outcome.Detriment);
|
super(Outcome.Detriment);
|
||||||
this.staticText = "have target player mill X cards, where X is that spell's converted mana cost";
|
this.staticText = "have target player mill X cards, where X is that spell's mana value";
|
||||||
}
|
}
|
||||||
|
|
||||||
private CloudhoofKirinEffect(final CloudhoofKirinEffect effect) {
|
private CloudhoofKirinEffect(final CloudhoofKirinEffect effect) {
|
||||||
|
|
@ -76,7 +76,7 @@ class CloudhoofKirinEffect extends OneShotEffect {
|
||||||
targetPlayer = game.getPlayer(target.getFirstTarget());
|
targetPlayer = game.getPlayer(target.getFirstTarget());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int cmc = spell.getConvertedManaCost();
|
int cmc = spell.getManaValue();
|
||||||
if (targetPlayer != null && cmc > 0) {
|
if (targetPlayer != null && cmc > 0) {
|
||||||
targetPlayer.millCards(cmc, source, game);
|
targetPlayer.millCards(cmc, source, game);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,7 @@ class CodieVociferousCodexEffect extends OneShotEffect {
|
||||||
Card toCast = null;
|
Card toCast = null;
|
||||||
for (Card card : player.getLibrary().getCards(game)) {
|
for (Card card : player.getLibrary().getCards(game)) {
|
||||||
toExile.add(card);
|
toExile.add(card);
|
||||||
if (card.isInstantOrSorcery() && card.getConvertedManaCost() < spell.getConvertedManaCost()) {
|
if (card.isInstantOrSorcery() && card.getManaValue() < spell.getManaValue()) {
|
||||||
toCast = card;
|
toCast = card;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.ComparisonType;
|
import mage.constants.ComparisonType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -17,11 +17,11 @@ import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||||
*/
|
*/
|
||||||
public final class CollectedCompany extends CardImpl {
|
public final class CollectedCompany extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCard filter = new FilterCard("up to two creature cards with converted mana cost 3 or less");
|
private static final FilterCard filter = new FilterCard("up to two creature cards with mana value 3 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(CardType.CREATURE.getPredicate());
|
filter.add(CardType.CREATURE.getPredicate());
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CollectedCompany(UUID ownerId, CardSetInfo setInfo) {
|
public CollectedCompany(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import mage.constants.ComparisonType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetCard;
|
import mage.target.TargetCard;
|
||||||
|
|
@ -45,23 +45,23 @@ public final class CollectedConjuring extends CardImpl {
|
||||||
class CollectedConjuringEffect extends OneShotEffect {
|
class CollectedConjuringEffect extends OneShotEffect {
|
||||||
|
|
||||||
private static final FilterCard filter = new FilterCard(
|
private static final FilterCard filter = new FilterCard(
|
||||||
"sorcery cards with converted mana cost 3 or less");
|
"sorcery cards with mana value 3 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(CardType.SORCERY.getPredicate());
|
filter.add(CardType.SORCERY.getPredicate());
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final FilterCard filter2 = filter.copy();
|
private static final FilterCard filter2 = filter.copy();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter2.setMessage("sorcery card with converted mana cost 3 or less");
|
filter2.setMessage("sorcery card with mana value 3 or less");
|
||||||
}
|
}
|
||||||
|
|
||||||
CollectedConjuringEffect() {
|
CollectedConjuringEffect() {
|
||||||
super(Outcome.PlayForFree);
|
super(Outcome.PlayForFree);
|
||||||
this.staticText = "Exile the top six cards of your library. "
|
this.staticText = "Exile the top six cards of your library. "
|
||||||
+ "You may cast up to two sorcery cards with converted mana costs 3 or less from among them "
|
+ "You may cast up to two sorcery cards with mana values 3 or less from among them "
|
||||||
+ "without paying their mana cost. Put the exiled cards not cast this way "
|
+ "without paying their mana cost. Put the exiled cards not cast this way "
|
||||||
+ "on the bottom of your library in a random order.";
|
+ "on the bottom of your library in a random order.";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class CombustibleGearhulkEffect extends OneShotEffect {
|
||||||
|
|
||||||
public CombustibleGearhulkEffect() {
|
public CombustibleGearhulkEffect() {
|
||||||
super(Outcome.AIDontUseIt);
|
super(Outcome.AIDontUseIt);
|
||||||
staticText = "target opponent may have you draw three cards. If the player doesn't, put the top three cards of your library into your graveyard, then {this} deals damage to that player equal to the total converted mana cost of those cards";
|
staticText = "target opponent may have you draw three cards. If the player doesn't, put the top three cards of your library into your graveyard, then {this} deals damage to that player equal to the total mana value of those cards";
|
||||||
}
|
}
|
||||||
|
|
||||||
public CombustibleGearhulkEffect(final CombustibleGearhulkEffect effect) {
|
public CombustibleGearhulkEffect(final CombustibleGearhulkEffect effect) {
|
||||||
|
|
@ -95,7 +95,7 @@ class CombustibleGearhulkMillAndDamageEffect extends OneShotEffect {
|
||||||
|
|
||||||
public CombustibleGearhulkMillAndDamageEffect() {
|
public CombustibleGearhulkMillAndDamageEffect() {
|
||||||
super(Outcome.Damage);
|
super(Outcome.Damage);
|
||||||
staticText = "mill three cards, then {this} deals damage to that player equal to the total converted mana cost of those cards.";
|
staticText = "mill three cards, then {this} deals damage to that player equal to the total mana value of those cards.";
|
||||||
}
|
}
|
||||||
|
|
||||||
public CombustibleGearhulkMillAndDamageEffect(final CombustibleGearhulkMillAndDamageEffect effect) {
|
public CombustibleGearhulkMillAndDamageEffect(final CombustibleGearhulkMillAndDamageEffect effect) {
|
||||||
|
|
@ -110,7 +110,7 @@ class CombustibleGearhulkMillAndDamageEffect extends OneShotEffect {
|
||||||
.millCards(3, source, game)
|
.millCards(3, source, game)
|
||||||
.getCards(game)
|
.getCards(game)
|
||||||
.stream()
|
.stream()
|
||||||
.mapToInt(MageObject::getConvertedManaCost)
|
.mapToInt(MageObject::getManaValue)
|
||||||
.sum();
|
.sum();
|
||||||
Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));
|
Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));
|
||||||
if (targetPlayer != null) {
|
if (targetPlayer != null) {
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ class CommandTheDreadhordeEffect extends OneShotEffect {
|
||||||
CommandTheDreadhordeEffect() {
|
CommandTheDreadhordeEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
staticText = "Choose any number of target creature and/or planeswalker cards in graveyards. " +
|
staticText = "Choose any number of target creature and/or planeswalker cards in graveyards. " +
|
||||||
"{this} deals damage to you equal to the total converted mana cost of those cards. " +
|
"{this} deals damage to you equal to the total mana value of those cards. " +
|
||||||
"Put them onto the battlefield under your control.";
|
"Put them onto the battlefield under your control.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -71,7 +71,7 @@ class CommandTheDreadhordeEffect extends OneShotEffect {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Cards cards = new CardsImpl(source.getTargets().get(0).getTargets());
|
Cards cards = new CardsImpl(source.getTargets().get(0).getTargets());
|
||||||
int damage = cards.getCards(game).stream().mapToInt(Card::getConvertedManaCost).sum();
|
int damage = cards.getCards(game).stream().mapToInt(Card::getManaValue).sum();
|
||||||
player.damage(damage, source.getSourceId(), source, game);
|
player.damage(damage, source.getSourceId(), source, game);
|
||||||
return player.moveCards(cards, Zone.BATTLEFIELD, source, game);
|
return player.moveCards(cards, Zone.BATTLEFIELD, source, game);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.filter.predicate.ObjectPlayer;
|
import mage.filter.predicate.ObjectPlayer;
|
||||||
import mage.filter.predicate.ObjectPlayerPredicate;
|
import mage.filter.predicate.ObjectPlayerPredicate;
|
||||||
import mage.filter.predicate.mageobject.ColorlessPredicate;
|
import mage.filter.predicate.mageobject.ColorlessPredicate;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.game.Controllable;
|
import mage.game.Controllable;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
|
|
@ -35,12 +35,12 @@ import mage.watchers.Watcher;
|
||||||
*/
|
*/
|
||||||
public final class ConduitOfRuin extends CardImpl {
|
public final class ConduitOfRuin extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreatureCard filter = new FilterCreatureCard("a colorless creature card with converted mana cost 7 or greater");
|
private static final FilterCreatureCard filter = new FilterCreatureCard("a colorless creature card with mana value 7 or greater");
|
||||||
private static final FilterCreatureCard filterCost = new FilterCreatureCard("The first creature spell");
|
private static final FilterCreatureCard filterCost = new FilterCreatureCard("The first creature spell");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(ColorlessPredicate.instance);
|
filter.add(ColorlessPredicate.instance);
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.MORE_THAN, 6));
|
filter.add(new ManaValuePredicate(ComparisonType.MORE_THAN, 6));
|
||||||
filterCost.add(new FirstCastCreatureSpellPredicate());
|
filterCost.add(new FirstCastCreatureSpellPredicate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ class ConfiscationCoupEffect extends OneShotEffect {
|
||||||
|
|
||||||
public ConfiscationCoupEffect() {
|
public ConfiscationCoupEffect() {
|
||||||
super(Outcome.GainControl);
|
super(Outcome.GainControl);
|
||||||
this.staticText = "Choose target creature or artifact. You get {E}{E}{E}{E}, then you may pay an amount of {E} equal to that permanent's converted mana cost. If you do, gain control of it";
|
this.staticText = "Choose target creature or artifact. You get {E}{E}{E}{E}, then you may pay an amount of {E} equal to that permanent's mana value. If you do, gain control of it";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConfiscationCoupEffect(final ConfiscationCoupEffect effect) {
|
public ConfiscationCoupEffect(final ConfiscationCoupEffect effect) {
|
||||||
|
|
@ -75,11 +75,11 @@ class ConfiscationCoupEffect extends OneShotEffect {
|
||||||
new GetEnergyCountersControllerEffect(4).apply(game, source);
|
new GetEnergyCountersControllerEffect(4).apply(game, source);
|
||||||
Permanent targetPermanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
Permanent targetPermanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||||
if (targetPermanent != null) {
|
if (targetPermanent != null) {
|
||||||
Cost cost = new PayEnergyCost(targetPermanent.getManaCost().convertedManaCost());
|
Cost cost = new PayEnergyCost(targetPermanent.getManaCost().manaValue());
|
||||||
if (cost.canPay(source, source, source.getControllerId(), game)) {
|
if (cost.canPay(source, source, source.getControllerId(), game)) {
|
||||||
int convertedManaCost = targetPermanent.getManaCost().convertedManaCost();
|
int manaValue = targetPermanent.getManaCost().manaValue();
|
||||||
StringBuilder energy = new StringBuilder(convertedManaCost);
|
StringBuilder energy = new StringBuilder(manaValue);
|
||||||
for (int i = 0; i < convertedManaCost; i++) {
|
for (int i = 0; i < manaValue; i++) {
|
||||||
energy.append("{E}");
|
energy.append("{E}");
|
||||||
}
|
}
|
||||||
if (controller.chooseUse(outcome, "Pay " + energy + " to get control of " + targetPermanent.getLogName() + '?', source, game)) {
|
if (controller.chooseUse(outcome, "Pay " + energy + " to get control of " + targetPermanent.getLogName() + '?', source, game)) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import mage.constants.*;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterPermanentCard;
|
import mage.filter.common.FilterPermanentCard;
|
||||||
import mage.filter.common.FilterPlaneswalkerPermanent;
|
import mage.filter.common.FilterPlaneswalkerPermanent;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
|
@ -70,7 +70,7 @@ enum ConfrontThePastAdjuster implements TargetAdjuster {
|
||||||
ability.getTargets().clear();
|
ability.getTargets().clear();
|
||||||
FilterPermanentCard filter = new FilterPermanentCard("planeswalker card with mana value X or less");
|
FilterPermanentCard filter = new FilterPermanentCard("planeswalker card with mana value X or less");
|
||||||
filter.add(CardType.PLANESWALKER.getPredicate());
|
filter.add(CardType.PLANESWALKER.getPredicate());
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, xValue + 1));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, xValue + 1));
|
||||||
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.ComparisonType;
|
import mage.constants.ComparisonType;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -16,10 +16,10 @@ import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||||
*/
|
*/
|
||||||
public final class ConsumeTheMeek extends CardImpl {
|
public final class ConsumeTheMeek extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with converted mana cost 3 or less");
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with mana value 3 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConsumeTheMeek(UUID ownerId, CardSetInfo setInfo) {
|
public ConsumeTheMeek(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ class ContainmentBreachEffect extends OneShotEffect {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
permanent.destroy(source, game, false);
|
permanent.destroy(source, game, false);
|
||||||
if (permanent.getConvertedManaCost() <= 2) {
|
if (permanent.getManaValue() <= 2) {
|
||||||
new WitherbloomToken().putOntoBattlefield(1, game, source, source.getControllerId());
|
new WitherbloomToken().putOntoBattlefield(1, game, source, source.getControllerId());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ class CorrosionUpkeepEffect extends OneShotEffect {
|
||||||
|
|
||||||
CorrosionUpkeepEffect() {
|
CorrosionUpkeepEffect() {
|
||||||
super(Outcome.DestroyPermanent);
|
super(Outcome.DestroyPermanent);
|
||||||
this.staticText = "put a rust counter on each artifact target opponent controls. Then destroy each artifact with converted mana cost less than or equal to the number of rust counters on it. Artifacts destroyed this way can't be regenerated";
|
this.staticText = "put a rust counter on each artifact target opponent controls. Then destroy each artifact with mana value less than or equal to the number of rust counters on it. Artifacts destroyed this way can't be regenerated";
|
||||||
}
|
}
|
||||||
|
|
||||||
CorrosionUpkeepEffect(final CorrosionUpkeepEffect effect) {
|
CorrosionUpkeepEffect(final CorrosionUpkeepEffect effect) {
|
||||||
|
|
@ -83,7 +83,7 @@ class CorrosionUpkeepEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
// destroy each artifact with converted mana cost less than or equal to the number of rust counters on it
|
// destroy each artifact with converted mana cost less than or equal to the number of rust counters on it
|
||||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||||
if (permanent.getConvertedManaCost() <= permanent.getCounters(game).getCount(CounterType.RUST)) {
|
if (permanent.getManaValue() <= permanent.getCounters(game).getCount(CounterType.RUST)) {
|
||||||
permanent.destroy(source, game, true);
|
permanent.destroy(source, game, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ class CounterbalanceEffect extends OneShotEffect {
|
||||||
|
|
||||||
public CounterbalanceEffect() {
|
public CounterbalanceEffect() {
|
||||||
super(Outcome.Neutral);
|
super(Outcome.Neutral);
|
||||||
this.staticText = "you may reveal the top card of your library. If you do, counter that spell if it has the same converted mana cost as the revealed card";
|
this.staticText = "you may reveal the top card of your library. If you do, counter that spell if it has the same mana value as the revealed card";
|
||||||
}
|
}
|
||||||
|
|
||||||
public CounterbalanceEffect(final CounterbalanceEffect effect) {
|
public CounterbalanceEffect(final CounterbalanceEffect effect) {
|
||||||
|
|
@ -71,7 +71,7 @@ class CounterbalanceEffect extends OneShotEffect {
|
||||||
CardsImpl cards = new CardsImpl();
|
CardsImpl cards = new CardsImpl();
|
||||||
cards.add(topcard);
|
cards.add(topcard);
|
||||||
controller.revealCards(sourcePermanent.getName(), cards, game);
|
controller.revealCards(sourcePermanent.getName(), cards, game);
|
||||||
if (topcard.getConvertedManaCost() == spell.getConvertedManaCost()) {
|
if (topcard.getManaValue() == spell.getManaValue()) {
|
||||||
return game.getStack().counter(spell.getId(), source, game);
|
return game.getStack().counter(spell.getId(), source, game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ public final class CovetedPrize extends CardImpl {
|
||||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||||
new CastWithoutPayingManaCostEffect(4),
|
new CastWithoutPayingManaCostEffect(4),
|
||||||
FullPartyCondition.instance, "If you have a full party, " +
|
FullPartyCondition.instance, "If you have a full party, " +
|
||||||
"you may cast a spell with converted mana cost 4 or less from your hand without paying its mana cost."
|
"you may cast a spell with mana value 4 or less from your hand without paying its mana cost."
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class PunishmentEffect extends OneShotEffect {
|
||||||
|
|
||||||
PunishmentEffect() {
|
PunishmentEffect() {
|
||||||
super(Outcome.DestroyPermanent);
|
super(Outcome.DestroyPermanent);
|
||||||
this.staticText = "Destroy each artifact, creature, and enchantment with converted mana cost X";
|
this.staticText = "Destroy each artifact, creature, and enchantment with mana value X";
|
||||||
}
|
}
|
||||||
|
|
||||||
PunishmentEffect(final PunishmentEffect effect) {
|
PunishmentEffect(final PunishmentEffect effect) {
|
||||||
|
|
@ -69,7 +69,7 @@ class PunishmentEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) {
|
for (Permanent permanent : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) {
|
||||||
if (permanent != null
|
if (permanent != null
|
||||||
&& permanent.getConvertedManaCost() == source.getManaCostsToPay().getX()
|
&& permanent.getManaValue() == source.getManaCostsToPay().getX()
|
||||||
&& (permanent.isArtifact()
|
&& (permanent.isArtifact()
|
||||||
|| permanent.isCreature()
|
|| permanent.isCreature()
|
||||||
|| permanent.isEnchantment())) {
|
|| permanent.isEnchantment())) {
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ class CrumbleEffect extends OneShotEffect {
|
||||||
|
|
||||||
public CrumbleEffect() {
|
public CrumbleEffect() {
|
||||||
super(Outcome.GainLife);
|
super(Outcome.GainLife);
|
||||||
staticText = "That artifact's controller gains life equal to its converted mana cost";
|
staticText = "That artifact's controller gains life equal to its mana value";
|
||||||
}
|
}
|
||||||
|
|
||||||
public CrumbleEffect(final CrumbleEffect effect) {
|
public CrumbleEffect(final CrumbleEffect effect) {
|
||||||
|
|
@ -59,7 +59,7 @@ class CrumbleEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = getTargetPointer().getFirstTargetPermanentOrLKI(game, source); // must use LKI
|
Permanent permanent = getTargetPointer().getFirstTargetPermanentOrLKI(game, source); // must use LKI
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
int cost = permanent.getConvertedManaCost();
|
int cost = permanent.getManaValue();
|
||||||
Player player = game.getPlayer(permanent.getControllerId());
|
Player player = game.getPlayer(permanent.getControllerId());
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
player.gainLife(cost, game, source);
|
player.gainLife(cost, game, source);
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue