Core Functions for MTG Wizard
This is a wrapper around the JSON data returned from the Scryfall API with additional properties for geting various formatted information about the card.
Void
Creates an instance of Card.
Name | Type | Description | |
---|---|---|---|
data | Scryfall API card json |
Void
The current "face" of the card being viewed if it is a DFC (double-faced card). This will be 0 for all cards and the front card and 1 for the "back". Use @see flip to change.
Void
The printed name of the card. This is as the name is printed on the card so this will be the name in a foreign language etc
Void
The name of the card or the name of the currently displayed face of a DFC
Void
The mana cost of the card e.g. {2}{G} This will show the cost on the currently selected face if a DFC, and both if a split card e.g. "{1}{R} // {W}"
Void
The printed type of the card. This is as the type is printed on the card so this will be the name in a foreign language or different from the Oracle type if it has received errata
Void
Formats the mana cost and typeline into a string depending on card type. Uses the printed text
Void
Formats the mana cost and typeline into a string depending on card type. Uses the Oracle text
Void
The printed text of the card. This is as the text is printed on the card so this will be in foreign language or differ from the Oracle type if it has received errata. This will also format split/aftermath cards to display both halves of the card together
Void
The printed text of the card as it appears in the Oracle This will also format split/aftermath cards to display both halves of the card together
Void
The current average prices of the card from Scryfall
Name | Type | Description | |
---|---|---|---|
usd |
number
|
US Dollar price from TCGPlayer |
|
usd_foil |
number
|
Foil card US Dollar price from TCGPlayer |
|
euro |
number
|
Euro prince from MKM |
|
tix |
number
|
MTGO Tix price |
Void
Large image URI of the card This will show the currently selected face if a DFC
Void
Thumbnail image URI of the card This will show the currently selected face if a DFC
Void
Gets the current face of a card in the case of it being a DFC, Otherwise it will just give you the data.
Void
Gets whether the card is equivalent to a "split" card having two parts on the same card. For example, "Split", "Aftermath", "Adventure". This is not the same as a DFC.
Void
Searches Scryfall for cards. Uses searching syntax from https://scryfall.com/docs/syntax
Name | Type | Description | |
---|---|---|---|
query |
string
|
Search query |
Card
Array
Array of Card objects
Gets a single card with a given ID
Name | Type | Description | |
---|---|---|---|
cardId |
string
|
Card
Card object
Gets an array of reprints of a single card
Name | Type | Description | |
---|---|---|---|
Card |
Card
|
object |
Card
Array
Array of Card objects