package mage.cards; import mage.MageObject; import mage.Mana; import mage.abilities.Abilities; import mage.abilities.Ability; import mage.abilities.SpellAbility; import mage.constants.Rarity; import mage.constants.Zone; import mage.counters.Counter; import mage.counters.Counters; import mage.filter.FilterMana; import mage.game.Game; import mage.game.GameState; import mage.game.permanent.Permanent; import java.util.List; import java.util.UUID; public interface Card extends MageObject { UUID getOwnerId(); String getCardNumber(); Rarity getRarity(); // null for tokens void setOwnerId(UUID ownerId); Abilities getAbilities(Game game); void setSpellAbility(SpellAbility ability); SpellAbility getSpellAbility(); List getRules(); // gets base card rules List getRules(Game game); // gets card rules + in game modifications String getExpansionSetCode(); String getTokenSetCode(); String getTokenDescriptor(); void checkForCountersToAdd(Permanent permanent, Game game); void setFaceDown(boolean value, Game game); boolean isFaceDown(Game game); boolean turnFaceUp(Game game, UUID playerId); boolean turnFaceDown(Game game, UUID playerId); boolean isFlipCard(); String getFlipCardName(); boolean isSplitCard(); boolean isTransformable(); void setTransformable(boolean transformable); Card getSecondCardFace(); boolean isNightCard(); void assignNewId(); void addInfo(String key, String value, Game game); /** * Moves the card to the specified zone * * @param zone * @param sourceId * @param game * @param flag If zone *
    *
  • LIBRARY:
    • true - put on top
    • false - put on * bottom
  • *
  • BATTLEFIELD:
    • true - tapped
    • false - * untapped
  • *
  • GRAVEYARD:
    • true - not from Battlefield
    • false - from * Battlefield
  • *
* @return true if card was moved to zone */ boolean moveToZone(Zone zone, UUID sourceId, Game game, boolean flag); boolean moveToZone(Zone zone, UUID sourceId, Game game, boolean flag, List appliedEffects); /** * Moves the card to an exile zone * * @param exileId set to null for generic exile zone * @param name used for exile zone with the specified exileId * @param sourceId * @param game * @return true if card was moved to zone */ boolean moveToExile(UUID exileId, String name, UUID sourceId, Game game); boolean moveToExile(UUID exileId, String name, UUID sourceId, Game game, List appliedEffects); boolean cast(Game game, Zone fromZone, SpellAbility ability, UUID controllerId); boolean removeFromZone(Game game, Zone fromZone, UUID sourceId); boolean putOntoBattlefield(Game game, Zone fromZone, UUID sourceId, UUID controllerId); boolean putOntoBattlefield(Game game, Zone fromZone, UUID sourceId, UUID controllerId, boolean tapped); boolean putOntoBattlefield(Game game, Zone fromZone, UUID sourceId, UUID controllerId, boolean tapped, boolean facedown); boolean putOntoBattlefield(Game game, Zone fromZone, UUID sourceId, UUID controllerId, boolean tapped, boolean facedown, List appliedEffects); void setZone(Zone zone, Game game); List getMana(); /** * @return true if there exists various art images for this card */ boolean getUsesVariousArt(); Counters getCounters(Game game); Counters getCounters(GameState state); void addAbility(Ability ability); boolean addCounters(Counter counter, Ability source, Game game); boolean addCounters(Counter counter, Ability source, Game game, boolean isEffect); boolean addCounters(Counter counter, Ability source, Game game, List appliedEffects); boolean addCounters(Counter counter, Ability source, Game game, List appliedEffects, boolean isEffect); void removeCounters(String name, int amount, Game game); void removeCounters(Counter counter, Game game); @Override Card copy(); /** * @return The main card of a split half card or adventure spell card, otherwise the card itself is * returned */ Card getMainCard(); /** * Gets the colors that are in the casting cost but also in the rules text * as far as not included in reminder text. * * @return */ FilterMana getColorIdentity(); List getAttachments(); boolean addAttachment(UUID permanentId, Game game); boolean removeAttachment(UUID permanentId, Game game); default boolean isOwnedBy(UUID controllerId) { return getOwnerId().equals(controllerId); } }