private boolean cardThatCostsLess(int value, Card card, Game game) { return card.getConvertedManaCost() < value; } }
@Override public int getConvertedManaCost() { return sourceObject.getConvertedManaCost(); }
@Override public int getConvertedManaCost() { if (this.isCopy()) { return 0; } else { return (this.topHalfCard != null ? this.topHalfCard.getConvertedManaCost() : 0) + (this.bottomHalfCard != null ? this.bottomHalfCard.getConvertedManaCost() : 0); } }
@Override public int getConvertedManaCost() { if (this.isCopy()) { return 0; } else { return this.getCard().getConvertedManaCost(); } } }
@Override public int calculate(Game game, Ability source, Effect effect) { Card card = game.getCard(source.getFirstTarget()); if (card != null) { return card.getConvertedManaCost(); } return 0; }
@Override public void init(Ability source, Game game) { Card targeted = game.getCard(source.getFirstTarget()); if (targeted != null) { costValue = targeted.getConvertedManaCost(); } }
@Override public boolean canTarget(UUID playerId, UUID objectId, Ability source, Game game) { if (super.canTarget(playerId, objectId, source, game)) { int cmcLeft = 8; for (UUID targetId : this.getTargets()) { Card card = game.getCard(targetId); if (card != null) { cmcLeft -= card.getConvertedManaCost(); } } Card card = game.getCard(objectId); return card != null && card.getConvertedManaCost() <= cmcLeft; } return false; }
@Override public final boolean apply(Card input, Game game) { if(input.getConvertedManaCost() <= game.getBattlefield().getAllActivePermanents(new FilterControlledLandPermanent(), input.getOwnerId(), game).size()){ return true; } return false; }
@Override public boolean applies(GameEvent event, Ability source, Game game) { Card card = game.getCard(event.getSourceId()); if (card != null && !card.isCreature() && card.getConvertedManaCost() >= 4) { return true; } return false; }
@Override public int calculate(Game game, Ability sourceAbility, Effect effect) { for (Cost cost : sourceAbility.getCosts()) { if (cost.isPaid() && cost instanceof ExileFromGraveCost) { int xValue = 0; for (Card card : ((ExileFromGraveCost) cost).getExiledCards()) { xValue += card.getConvertedManaCost(); } return xValue; } } return 0; }
@Override public int calculate(Game game, Ability sourceAbility, Effect effect) { for (Cost cost : sourceAbility.getCosts()) { if (cost.isPaid() && cost instanceof ExileFromHandCost) { int xValue = 0; for (Card card : ((ExileFromHandCost) cost).getCards()) { xValue += card.getConvertedManaCost(); } return xValue; } } return sourceAbility.getManaCostsToPay().getX(); }
@Override public int getConvertedManaCost() { if (isTransformed()) { // 711.4b While a double-faced permanent's back face is up, it has only the characteristics of its back face. // However, its converted mana cost is calculated using the mana cost of its front face. This is a change from previous rules. // If a permanent is copying the back face of a double-faced card (even if the card representing that copy // is itself a double-faced card), the converted mana cost of that permanent is 0. return getCard().getConvertedManaCost(); } if (faceDown) { // game not neccessary return getManaCost().convertedManaCost(); } return super.getConvertedManaCost(); }
@Override public boolean apply(Game game, Ability source) { boolean result = false; Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { int cmc = card.getConvertedManaCost(); controller.moveCards(card, Zone.GRAVEYARD, source, game); controller.drawCards(cmc, game); } } return result; }
@Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { Card card = player.getGraveyard().get(source.getFirstTarget(), game); if (card == null) { card = (Card)game.getLastKnownInformation(source.getFirstTarget(), Zone.GRAVEYARD); } if (card != null) { player.gainLife(card.getConvertedManaCost(), game, source); } } return true; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { controller.revealCards(source, new CardsImpl(card), game); controller.moveCards(card, Zone.HAND, source, game); controller.gainLife(card.getConvertedManaCost(), game, source); } return true; } return false; }
@Override public boolean apply(Game game, Ability source) { Player you = game.getPlayer(source.getControllerId()); int count = source.getManaCostsToPay().getX(); Set<Card> cards = you.getGraveyard().getCards(new FilterCreatureCard(), game); for (Card card : cards) { if (card != null && card.getConvertedManaCost() == count) { card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, false); } } return true; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { controller.revealCards(source, new CardsImpl(card), game); card.moveToZone(Zone.HAND, source.getSourceId(), game, false); controller.loseLife(card.getConvertedManaCost(), game, false); return true; } } return false; }
@Override public boolean apply(Game game, Ability source) { Card creatureCard = game.getCard(this.getTargetPointer().getFirst(game, source)); Player controller = game.getPlayer(source.getControllerId()); if (creatureCard != null && controller != null) { boolean result = false; if (game.getState().getZone(creatureCard.getId()) == Zone.GRAVEYARD) { result = controller.moveCards(creatureCard, Zone.BATTLEFIELD, source, game); } controller.loseLife(creatureCard.getConvertedManaCost(), game, false); return result; } return false; } }
@Override public boolean apply(Game game, Ability source) { Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); if (spell != null) { HisokaMinamoSenseiDiscardTargetCost cost = (HisokaMinamoSenseiDiscardTargetCost) source.getCosts().get(0); if (cost != null && cost.getDiscardedCard().getConvertedManaCost() == spell.getConvertedManaCost()) { return game.getStack().counter(targetPointer.getFirst(game, source), source.getSourceId(), game); } } return false; }
@Override public boolean apply(Game game, Ability source) { Player opponent = game.getPlayer(targetPointer.getFirst(game, source)); if (opponent != null && !opponent.getHand().isEmpty()) { Cards revealed = new CardsImpl(); Card card = opponent.getHand().getRandom(game); if (card != null) { revealed.add(card); opponent.revealCards("Planeswalker's Fury", revealed, game); opponent.damage(card.getConvertedManaCost(), source.getSourceId(), game, false, true); } return true; } return false; }