Card

@Serializable
data class Card(val arenaId: Int? = null, val id: String, val language: String, val mtgoId: Int? = null, val mtgoFoilId: Int? = null, val multiverseIds: List<Int>? = null, val tcgplayerId: Int? = null, val tcgplayerEtchedId: Int? = null, val cardmarketId: Int? = null, val resourceId: String? = null, val objectType: String, val layout: String, val oracleId: String? = null, val printsSearchUri: String, val rulingsUri: String, val scryfallUri: String, val uri: String, val allParts: List<RelatedCard>? = null, val cardFaces: List<CardFace>? = null, val manaValue: Double = 0.0, val colorIdentity: List<String> = emptyList(), val colorIndicator: List<String>? = null, val colors: List<String>? = null, val defense: String? = null, val edhrecRank: Int? = null, val gameChanger: Boolean? = null, val handModifier: String? = null, val keywords: List<String> = emptyList(), val legalities: Legalities = Legalities(), val lifeModifier: String? = null, val loyalty: String? = null, val manaCost: String? = null, val name: String, val oracleText: String? = null, val oversized: Boolean = false, val pennyRank: Int? = null, val power: String? = null, val producedMana: List<String>? = null, val reserved: Boolean = false, val toughness: String? = null, val typeLine: String, val artist: String? = null, val artistIds: List<String>? = null, val attractionLights: List<Int>? = null, val booster: Boolean = false, val borderColor: String, val cardBackId: String? = null, val collectorNumber: String, val contentWarning: Boolean? = null, val digital: Boolean, val finishes: List<String> = emptyList(), val flavorName: String? = null, val flavorText: String? = null, val frameEffects: List<String>? = null, val frame: String, val fullArt: Boolean, val games: List<String> = emptyList(), val highresImage: Boolean, val illustrationId: String? = null, val imageStatus: String, val imageUris: ImageUris? = null, val prices: Prices? = Prices(), val printedName: String? = null, val printedText: String? = null, val printedTypeLine: String? = null, val promo: Boolean, val promoTypes: List<String>? = null, val purchaseUris: Map<String, String>? = null, val rarity: String, val relatedUris: Map<String, String>, val releasedAt: String, val reprint: Boolean, val scryfallSetUri: String, val setName: String, val setSearchUri: String, val setType: String, val setUri: String, val setCode: String, val setId: String, val storySpotlight: Boolean, val textless: Boolean, val variation: Boolean, val variationOf: String? = null, val securityStamp: String? = null, val watermark: String? = null, val preview: Preview? = null)

Constructors

Link copied to clipboard
constructor(arenaId: Int? = null, id: String, language: String, mtgoId: Int? = null, mtgoFoilId: Int? = null, multiverseIds: List<Int>? = null, tcgplayerId: Int? = null, tcgplayerEtchedId: Int? = null, cardmarketId: Int? = null, resourceId: String? = null, objectType: String, layout: String, oracleId: String? = null, printsSearchUri: String, rulingsUri: String, scryfallUri: String, uri: String, allParts: List<RelatedCard>? = null, cardFaces: List<CardFace>? = null, manaValue: Double = 0.0, colorIdentity: List<String> = emptyList(), colorIndicator: List<String>? = null, colors: List<String>? = null, defense: String? = null, edhrecRank: Int? = null, gameChanger: Boolean? = null, handModifier: String? = null, keywords: List<String> = emptyList(), legalities: Legalities = Legalities(), lifeModifier: String? = null, loyalty: String? = null, manaCost: String? = null, name: String, oracleText: String? = null, oversized: Boolean = false, pennyRank: Int? = null, power: String? = null, producedMana: List<String>? = null, reserved: Boolean = false, toughness: String? = null, typeLine: String, artist: String? = null, artistIds: List<String>? = null, attractionLights: List<Int>? = null, booster: Boolean = false, borderColor: String, cardBackId: String? = null, collectorNumber: String, contentWarning: Boolean? = null, digital: Boolean, finishes: List<String> = emptyList(), flavorName: String? = null, flavorText: String? = null, frameEffects: List<String>? = null, frame: String, fullArt: Boolean, games: List<String> = emptyList(), highresImage: Boolean, illustrationId: String? = null, imageStatus: String, imageUris: ImageUris? = null, prices: Prices? = Prices(), printedName: String? = null, printedText: String? = null, printedTypeLine: String? = null, promo: Boolean, promoTypes: List<String>? = null, purchaseUris: Map<String, String>? = null, rarity: String, relatedUris: Map<String, String>, releasedAt: String, reprint: Boolean, scryfallSetUri: String, setName: String, setSearchUri: String, setType: String, setUri: String, setCode: String, setId: String, storySpotlight: Boolean, textless: Boolean, variation: Boolean, variationOf: String? = null, securityStamp: String? = null, watermark: String? = null, preview: Preview? = null)

Properties

Link copied to clipboard
@SerialName(value = "all_parts")
val allParts: List<RelatedCard>?

Related card references, such as meld parts or combo pieces.

Link copied to clipboard
@SerialName(value = "arena_id")
val arenaId: Int?

This card's Arena ID, if any. Many cards are not supported on Arena and omit this value.

Link copied to clipboard
@SerialName(value = "artist")
val artist: String?

Illustrator name, when known.

Link copied to clipboard
@SerialName(value = "artist_ids")
val artistIds: List<String>?

IDs of the artists that illustrated this card.

Link copied to clipboard
@SerialName(value = "attraction_lights")
val attractionLights: List<Int>?

Lit Unfinity attraction lights on this card, if any.

Link copied to clipboard
@SerialName(value = "booster")
val booster: Boolean

True if this card is found in boosters.

Link copied to clipboard
@SerialName(value = "border_color")
val borderColor: String

Border color value (black, white, borderless, yellow, silver, or gold).

Link copied to clipboard
@SerialName(value = "card_back_id")
val cardBackId: String?

Scryfall ID for the card back design present on this card. May be null for some cards.

Link copied to clipboard
@SerialName(value = "card_faces")
val cardFaces: List<CardFace>?

Faces for multiface cards. Null for single-face cards.

Link copied to clipboard
@SerialName(value = "cardmarket_id")
val cardmarketId: Int?

This card's ID on Cardmarket's API (idProduct).

Link copied to clipboard
@SerialName(value = "collector_number")
val collectorNumber: String

Collector number for this printing. May include non-numeric characters.

Link copied to clipboard
@SerialName(value = "color_identity")
val colorIdentity: List<String>

Colors that appear in this card's color identity.

Link copied to clipboard
@SerialName(value = "color_indicator")
val colorIndicator: List<String>?

Colors in this card's color indicator, if any.

Link copied to clipboard
@SerialName(value = "colors")
val colors: List<String>?

This card's colors, if defined on the overall card.

Link copied to clipboard
@SerialName(value = "content_warning")
val contentWarning: Boolean?

True if downstream consumers should avoid using this print.

Link copied to clipboard
@SerialName(value = "defense")
val defense: String?

Battle defense value for this card, if any.

Link copied to clipboard
@SerialName(value = "digital")
val digital: Boolean

True if this card was released only digitally.

Link copied to clipboard
@SerialName(value = "edhrec_rank")
val edhrecRank: Int?

Overall rank/popularity on EDHREC, when available.

Link copied to clipboard
@SerialName(value = "finishes")
val finishes: List<String>

Available finishes for this print (foil, nonfoil, etched).

Link copied to clipboard
@SerialName(value = "flavor_name")
val flavorName: String?

Flavor name printed on this card, if any.

Link copied to clipboard
@SerialName(value = "flavor_text")
val flavorText: String?

Flavor text printed on this card, if any.

Link copied to clipboard
@SerialName(value = "frame")
val frame: String

Frame layout code for this card.

Link copied to clipboard
@SerialName(value = "frame_effects")
val frameEffects: List<String>?

Frame effects that apply to this card, if any.

Link copied to clipboard
@SerialName(value = "full_art")
val fullArt: Boolean

True if the artwork is larger than normal (full art).

Link copied to clipboard
@SerialName(value = "game_changer")
val gameChanger: Boolean?

True if this card appears on the Commander Game Changer list.

Link copied to clipboard
@SerialName(value = "games")
val games: List<String>

Games that this print is available in (paper, arena, mtgo).

Link copied to clipboard
@SerialName(value = "hand_modifier")
val handModifier: String?

Hand modifier for Vanguard cards (delta value), if any.

Link copied to clipboard
@SerialName(value = "highres_image")
val highresImage: Boolean

True if the card imagery is high resolution.

Link copied to clipboard
@SerialName(value = "id")
val id: String

A unique ID for this card in Scryfall's database.

Link copied to clipboard
@SerialName(value = "illustration_id")
val illustrationId: String?

Identifier for the artwork that stays consistent across reprints, when known.

Link copied to clipboard
@SerialName(value = "image_status")
val imageStatus: String

Computer-readable indicator for the state of this card's image (missing, placeholder, lowres, highres_scan).

Link copied to clipboard
@SerialName(value = "image_uris")
val imageUris: ImageUris?

Available imagery for this card. Present on single-faced cards.

Link copied to clipboard
@SerialName(value = "keywords")
val keywords: List<String>

Keywords this card uses, such as "Flying".

Link copied to clipboard
@SerialName(value = "lang")
val language: String

The language code for this printing.

Link copied to clipboard
@SerialName(value = "layout")
val layout: String

Code for this card's layout (normal, transform, split, etc.).

Link copied to clipboard
@SerialName(value = "legalities")
val legalities: Legalities

Legalities across supported play formats.

Link copied to clipboard
@SerialName(value = "life_modifier")
val lifeModifier: String?

Life modifier for Vanguard cards (delta value), if any.

Link copied to clipboard
@SerialName(value = "loyalty")
val loyalty: String?

Loyalty, if any. Some cards use non-numeric values like "X".

Link copied to clipboard
@SerialName(value = "mana_cost")
val manaCost: String?

Mana cost for this card. An empty string means no cost.

Link copied to clipboard
@SerialName(value = "cmc")
val manaValue: Double

This card's mana value.

Link copied to clipboard
@SerialName(value = "mtgo_foil_id")
val mtgoFoilId: Int?

This card's foil Magic Online ID (also called the Catalog ID), if any.

Link copied to clipboard
@SerialName(value = "mtgo_id")
val mtgoId: Int?

This card's Magic Online ID (also called the Catalog ID), if any.

Link copied to clipboard
@SerialName(value = "multiverse_ids")
val multiverseIds: List<Int>?

This card's multiverse IDs on Gatherer, if any.

Link copied to clipboard
@SerialName(value = "name")
val name: String

This card's name.

Link copied to clipboard
@SerialName(value = "object")
val objectType: String

Content type for this object, always "card".

Link copied to clipboard
@SerialName(value = "oracle_id")
val oracleId: String?

Oracle ID that stays consistent across reprints of the same card.

Link copied to clipboard
@SerialName(value = "oracle_text")
val oracleText: String?

Oracle text for this card, if any.

Link copied to clipboard
@SerialName(value = "oversized")
val oversized: Boolean

True if this card is oversized.

Link copied to clipboard
@SerialName(value = "penny_rank")
val pennyRank: Int?

Penny Dreadful rank, when provided.

Link copied to clipboard
@SerialName(value = "power")
val power: String?

This card's power, if any. Can contain non-numeric values such as "*".

Link copied to clipboard
@SerialName(value = "preview")
val preview: Preview?

Preview metadata for this printing.

Link copied to clipboard
@SerialName(value = "prices")
val prices: Prices?

Object containing daily price information in multiple currencies (strings).

Link copied to clipboard
@SerialName(value = "printed_name")
val printedName: String?

Localized name printed on this card, if any.

Link copied to clipboard
@SerialName(value = "printed_text")
val printedText: String?

Localized rules text printed on this card, if any.

Link copied to clipboard
@SerialName(value = "printed_type_line")
val printedTypeLine: String?

Localized type line printed on this card, if any.

Link copied to clipboard
@SerialName(value = "prints_search_uri")
val printsSearchUri: String

Link to start paginating all prints for this card.

Link copied to clipboard
@SerialName(value = "produced_mana")
val producedMana: List<String>?

Colors of mana that this card could produce.

Link copied to clipboard
@SerialName(value = "promo")
val promo: Boolean

True if this printing is promotional.

Link copied to clipboard
@SerialName(value = "promo_types")
val promoTypes: List<String>?

Categories of promo this card belongs to, if any.

Link copied to clipboard
@SerialName(value = "purchase_uris")
val purchaseUris: Map<String, String>?

URIs for this card on major marketplaces. Null if unpurchaseable.

Link copied to clipboard
@SerialName(value = "rarity")
val rarity: String

Card rarity (common, uncommon, rare, special, mythic, or bonus).

Link copied to clipboard
@SerialName(value = "related_uris")
val relatedUris: Map<String, String>

URIs to this card on other Magic resources.

Link copied to clipboard
@SerialName(value = "released_at")
val releasedAt: String

Date this card was first released (YYYY-MM-DD).

Link copied to clipboard
@SerialName(value = "reprint")
val reprint: Boolean

True if this card is a reprint.

Link copied to clipboard
@SerialName(value = "reserved")
val reserved: Boolean

True if this card is on the Reserved List.

Link copied to clipboard
@SerialName(value = "resource_id")
val resourceId: String?

This card's resource ID on Scryfall, if any.

Link copied to clipboard
@SerialName(value = "rulings_uri")
val rulingsUri: String

Link to this card's rulings list on the Scryfall API.

Link copied to clipboard
@SerialName(value = "scryfall_set_uri")
val scryfallSetUri: String

Link to this card's set on Scryfall's website.

Link copied to clipboard
@SerialName(value = "scryfall_uri")
val scryfallUri: String

Link to this card's permapage on Scryfall's website.

Link copied to clipboard
@SerialName(value = "security_stamp")
val securityStamp: String?

Security stamp on this card (oval, triangle, acorn, circle, arena, or heart).

Link copied to clipboard
@SerialName(value = "set")
val setCode: String

Abbreviated set code.

Link copied to clipboard
@SerialName(value = "set_id")
val setId: String

UUID of this card's set object.

Link copied to clipboard
@SerialName(value = "set_name")
val setName: String

Full set name for this printing.

Link copied to clipboard
@SerialName(value = "set_search_uri")
val setSearchUri: String

Link to paginate this card's set on the Scryfall API.

Link copied to clipboard
@SerialName(value = "set_type")
val setType: String

Type of set that contains this printing.

Link copied to clipboard
@SerialName(value = "set_uri")
val setUri: String

Link to this card's set object on the Scryfall API.

Link copied to clipboard
@SerialName(value = "story_spotlight")
val storySpotlight: Boolean

True if this card is a Story Spotlight.

Link copied to clipboard
@SerialName(value = "tcgplayer_etched_id")
val tcgplayerEtchedId: Int?

This card's ID on TCGplayer's API for its etched version, if applicable.

Link copied to clipboard
@SerialName(value = "tcgplayer_id")
val tcgplayerId: Int?

This card's ID on TCGplayer's API.

Link copied to clipboard
@SerialName(value = "textless")
val textless: Boolean

True if the card is printed without rules text.

Link copied to clipboard
@SerialName(value = "toughness")
val toughness: String?

This card's toughness, if any. Can contain non-numeric values such as "*".

Link copied to clipboard
@SerialName(value = "type_line")
val typeLine: String

The type line for this card.

Link copied to clipboard
@SerialName(value = "uri")
val uri: String

Link to this card object on the Scryfall API.

Link copied to clipboard
@SerialName(value = "variation")
val variation: Boolean

True if this printing is marked as a variation of another card.

Link copied to clipboard
@SerialName(value = "variation_of")
val variationOf: String?

Printing ID that this card is a variation of, if applicable.

Link copied to clipboard
@SerialName(value = "watermark")
val watermark: String?

Watermark printed on this card, if any.

Functions

Link copied to clipboard

Checks if this card has the specified color.

Link copied to clipboard
fun Card.hasKeyword(keyword: String): Boolean

Checks if this card has the specified keyword ability.

Link copied to clipboard

Checks if this card is an artifact.

Link copied to clipboard

Checks if this card is a battle.

Link copied to clipboard

Checks if this card is colorless.

Link copied to clipboard

Checks if this card is a creature.

Link copied to clipboard

Checks if this card is an enchantment.

Link copied to clipboard

Checks if this card is an instant.

Link copied to clipboard

Checks if this card is a land.

Link copied to clipboard

Checks if this card is legal in the specified format.

Link copied to clipboard

Checks if this card is multicolored (has more than one color).

Link copied to clipboard

Checks if this card is a planeswalker.

Link copied to clipboard

Checks if this card is a sorcery.