richardspirit / mtga_stats

Originated as way to manage Magic The Gathering decks on MGTA so that I knew which decks were performing the best and which decks should be deleted.
GNU Lesser General Public License v3.0
1 stars 0 forks source link

Double sided cards #37

Closed richardspirit closed 3 years ago

richardspirit commented 3 years ago

Need to update process for double-sided cards.

"{"artist": "Ron Spears", "availability": ["mtgo", "paper"], "borderColor": "black", "colorIdentity": ["B", "U", "W"], "colors": ["W", "U"], "convertedManaCost": 4.0, "faceConvertedManaCost": 2.0, "faceManaValue": 2.0, "faceName": "Trial", "finishes": ["nonfoil", "foil"], "foreignData": [{"faceName": "Trial", "language": "German", "multiverseId": 123108, "name": "Trial // Error", "text": "Bringe alle Kreaturen, die eine Kreatur deiner Wahl blocken oder von ihr geblockt werden, auf die Hand ihrer Besitzer zurück.", "type": "Spontanzauber"}, {"faceName": "Trial", "language": "Spanish", "multiverseId": 124008, "name": "Trial // Error", "text": "Regresa todas las criaturas bloqueando a o bloqueadas por la criatura objetivo a la mano de su propietario.", "type": "Instantáneo"}, {"faceName": "Trial", "language": "French", "multiverseId": 122928, "name": "Trial // Error", "text": "Renvoyez toutes les créatures bloquantes ou bloquées par la créature ciblée dans la main de leur propriétaire.", "type": "Éphémère"}, {"faceName": "Trial", "language": "Italian", "multiverseId": 123288, "name": "Trial // Error", "text": "I proprietari riprendono in mano tutte le creature che bloccano o che sono bloccate dalla creatura bersaglio.", "type": "Istantaneo"}, {"faceName": "Trial", "language": "Japanese", "multiverseId": 123468, "name": "Trial // Error", "text": "クリーチャー1体を対象とし、そのクリーチャーをブロックしているかそのクリーチャーにブロックされているすべてのクリーチャーをオーナーの手札に戻す。", "type": "インスタント"}, {"faceName": "Trial", "language": "Portuguese (Brazil)", "multiverseId": 123648, "name": "Trial // Error", "text": "Devolva todas as criaturas bloqueando ou sendo bloqueadas pela criatura alvo para a mão de seus donos.", "type": "Mágica Instantânea"}, {"faceName": "Trial", "language": "Russian", "multiverseId": 123828, "name": "Trial // Error", "text": "Верните все существа, блокирующие целевое существо или блокируемые им, в руку владельца.", "type": "Мгновенное заклинание"}, {"faceName": "Trial", "language": "Chinese Simplified", "multiverseId": 122748, "name": "Trial // Error", "text": "将阻挡目标生物,或被目标生物阻挡的所有生物移回其拥有者手上。", "type": "瞬间"}], "frameVersion": "2003", "hasFoil": true, "hasNonFoil": true, "identifiers": {"mcmId": "13108", "mcmMetaId": "7689", "mtgjsonV4Id": "33080169-8ad0-5389-a207-f1aea05cbff9", "mtgoId": "24353", "multiverseId": "107259", "scryfallId": "553028fc-eeab-42e2-9887-cf45ea3f01a6", "scryfallIllustrationId": "3e2d2afa-7fce-4850-8206-82c40a7adb3c", "scryfallOracleId": "a40bebe3-6f00-4754-9f70-351055e3b524", "tcgplayerProductId": "13972"}, "layout": "split", "legalities": {"commander": "Legal", "duel": "Legal", "legacy": "Legal", "modern": "Legal", "penny": "Legal", "vintage": "Legal"}, "manaCost": "{W}{U}", "manaValue": 4.0, "name": "Trial // Error", "number": "158", "originalText": "Return all creatures blocking or blocked by target creature to their owner's hand.", "originalType": "Instant", "otherFaceIds": ["b8ba11ab-65d5-5514-a707-6a3ea51ca980"], "printings": ["C16", "DIS"], "purchaseUrls": {"cardmarket": "https://mtgjson.com/links/2dfcd286593a4d4f", "tcgplayer": "https://mtgjson.com/links/d6ba98d7b42170f7"}, "rarity": "uncommon", "rulings": [], "setCode": "DIS", "side": "a", "subtypes": [], "supertypes": [], "text": "Return all creatures blocking or blocked by target creature to their owner's hand.", "type": "Instant", "types": ["Instant"], "uuid": "149ef71c-0de7-5f02-98d9-e129a24ac2fa", "watermark": "azorius"}, {"artist": "Wayne Reynolds", "availability": ["mtgo", "paper"], "borderColor": "black", "colorIdentity": ["B", "U", "W"], "colors": ["U", "B"], "convertedManaCost": 4.0, "faceConvertedManaCost": 2.0, "faceManaValue": 2.0, "faceName": "Error", "finishes": ["nonfoil", "foil"], "foreignData": [{"faceName": "Error", "language": "German", "multiverseId": 123108, "name": "Trial // Error", "text": "Neutralisiere einen mehrfarbigen Zauberspruch deiner Wahl.", "type": "Spontanzauber"}, {"faceName": "Error", "language": "Spanish", "multiverseId": 124008, "name": "Trial // Error", "text": "Contrarresta el hechizo multicolor objetivo.", "type": "Instantáneo"}, {"faceName": "Error", "language": "French", "multiverseId": 122928, "name": "Trial // Error", "text": "Contrecarrez le sort multicolore ciblé.", "type": "Éphémère"}, {"faceName": "Error", "language": "Italian", "multiverseId": 123288, "name": "Trial // Error", "text": "Neutralizza una magia multicolore bersaglio.", "type": "Istantaneo"}, {"faceName": "Error", "language": "Japanese", "multiverseId": 123468, "name": "Trial // Error", "text": "多色の呪文1つを対象とし、それを打ち消す。", "type": "インスタント"}, {"faceName": "Error", "language": "Portuguese (Brazil)", "multiverseId": 123648, "name": "Trial // Error", "text": "Anule a mágica alvo multicolorida.", "type": "Mágica Instantânea"}, {"faceName": "Error", "language": "Russian", "multiverseId": 123828, "name": "Trial // Error", "text": "Прервите целевое многоцветное заклинание.", "type": "Мгновенное заклинание"}, {"faceName": "Error", "language": "Chinese Simplified", "multiverseId": 122748, "name": "Trial // Error", "text": "反击目标多色咒语。", "type": "瞬间"}], "frameVersion": "2003", "hasFoil": true, "hasNonFoil": true, "identifiers": {"mcmId": "13108", "mcmMetaId": "7689", "mtgjsonV4Id": "72c9549f-61c1-5014-92bb-40503775bccb", "mtgoId": "24353", "multiverseId": "107259", "scryfallId": "553028fc-eeab-42e2-9887-cf45ea3f01a6", "scryfallIllustrationId": "3e2d2afa-7fce-4850-8206-82c40a7adb3c", "scryfallOracleId": "a40bebe3-6f00-4754-9f70-351055e3b524", "tcgplayerProductId": "13972"}, "layout": "split", "legalities": {"commander": "Legal", "duel": "Legal", "legacy": "Legal", "modern": "Legal", "penny": "Legal", "vintage": "Legal"}, "manaCost": "{U}{B}", "manaValue": 4.0, "name": "Trial // Error", "number": "158", "originalText": "Counter target multicolored spell.", "originalType": "Instant", "otherFaceIds": ["149ef71c-0de7-5f02-98d9-e129a24ac2fa"], "printings": ["C16", "DIS"], "purchaseUrls": {"cardmarket": "https://mtgjson.com/links/1f74b0cb497c64f9", "tcgplayer": "https://mtgjson.com/links/be45d81329f235dc"}, "rarity": "uncommon", "rulings": [], "setCode": "DIS", "side": "b", "subtypes": [], "supertypes": [], "text": "Counter target multicolored spell.", "type": "Instant", "types": ["Instant"], "uuid": "b8ba11ab-65d5-5514-a707-6a3ea51ca980", "watermark": "azorius"},"

richardspirit commented 3 years ago

select distinct card_name, types,set_code,set_name from mtga.sets s where card_name like ('Hengegate Pathway%') or card_name like ('Makindi Stampede%')

richardspirit commented 3 years ago

Add side column to sets table. Use side column when importing deck card data to get full name and types.