roam/20220209144915-tutor.org
2024-05-07 13:55:44 -04:00

894 lines
72 KiB
Org Mode

:PROPERTIES:
:ID: e79ad4ee-17d0-44f9-8270-2f19b65bc949
:header-args:sql: :engine postgresql :dbhost reason.local :dbuser tutor :dbpassword tutor :database tutor :exports both
:header-args: :eval no-export
:END:
#+title: Tutor
A [[id:cda9c620-fec5-4549-b979-22fc06819d77][Python]] application backed by a SQLite database for tracking my [[id:d5efa5bd-dac9-4ef5-b352-a2b794a37bd0][Magic: The
Gathering]] card collection.
https://git.phoenixinquis.net/correlr/tutor
* Finding cards for a deck
Decklist -- Alive -- Shared via TopDecked MTG
Main (100)
1 Serra Ascendant
1 Soul's Attendant
1 Ajani's Pridemate
1 Alabaster Mage
1 Grateful Apparition
1 Suture Priest
1 Trelasarra, Moon Dancer
1 Angel of Vitality
1 Celestial Unicorn
1 Evolution Sage
1 Lurking Roper
1 Spike Feeder
1 Splendor Mare
1 Armorcraft Judge
1 Bloom Hulk
1 Core Prowler
1 Lathiel, the Bounteous Dawn
1 Lightkeeper of Emeria
1 Hamza, Guardian of Arashin
1 Ajani Goldmane
1 The Wanderer
1 Blossoming Wreath
1 Condemn
1 Fortifying Draught
1 Healing Salve
1 Light of Hope
1 Divine Offering
1 Revitalize
1 Abuna's Chant
1 Angel's Mercy
1 Blunt the Assault
1 Congregate
1 Refreshing Rain
1 War Report
1 Corrosive Gale
1 Bond of Flourishing
1 Courage in Crisis
1 Survival Cache
1 Hunters' Feast
1 Primal Command
1 Wanderer's Strike
1 Planewide Celebration
1 Fountain of Youth
1 Elixir of Immortality
1 Golden Urn
1 Sol Ring
1 Soul Net
1 The Ozolith
1 Contagion Clasp
1 Throne of Geth
1 Marble Chalice
1 Staff of Domination
1 Soul Conduit
1 Lifelink
1 Spirit Link
1 Ajani's Mantra
1 Inner Sanctum
1 Luminous Wake
1 Faith's Fetters
1 First Response
1 Vigil for the Lost
1 Noble Purpose
1 Noble Stand
1 Celestial Mantle
1 Blossoming Sands
1 Command Tower
14 Forest
1 Karn's Bastion
16 Plains
1 Razorverge Thicket
1 Sunpetal Grove
1 Yavimaya Hollow
Shared via TopDecked MTG
https://www.topdecked.com/decks/alive/833c308f-219f-4624-8b32-1adedcb477f0
#+caption: Adding the deck list to the database
#+begin_src sql :exports code :eval never
INSERT INTO decks (deck_id, name) VALUES (2, 'Alive');
INSERT INTO deck_cards (deck_id, oracle_id)
SELECT DISTINCT 2, oracle_id FROM cards WHERE name IN
(
'Serra Ascendant',
'Soul''s Attendant',
'Ajani''s Pridemate',
'Alabaster Mage',
'Grateful Apparition',
'Suture Priest',
'Trelasarra, Moon Dancer',
'Angel of Vitality',
'Celestial Unicorn',
'Evolution Sage',
'Lurking Roper',
'Spike Feeder',
'Splendor Mare',
'Armorcraft Judge',
'Bloom Hulk',
'Core Prowler',
'Lathiel, the Bounteous Dawn',
'Lightkeeper of Emeria',
'Hamza, Guardian of Arashin',
'Ajani Goldmane',
'The Wanderer',
'Blossoming Wreath',
'Condemn',
'Fortifying Draught',
'Healing Salve',
'Light of Hope',
'Divine Offering',
'Revitalize',
'Abuna''s Chant',
'Angel''s Mercy',
'Blunt the Assault',
'Congregate',
'Refreshing Rain',
'War Report',
'Corrosive Gale',
'Bond of Flourishing',
'Courage in Crisis',
'Survival Cache',
'Hunters'' Feast',
'Primal Command',
'Wanderer''s Strike',
'Planewide Celebration',
'Fountain of Youth',
'Elixir of Immortality',
'Golden Urn',
'Sol Ring',
'Soul Net',
'The Ozolith',
'Contagion Clasp',
'Throne of Geth',
'Marble Chalice',
'Staff of Domination',
'Soul Conduit',
'Lifelink',
'Spirit Link',
'Ajani''s Mantra',
'Inner Sanctum',
'Luminous Wake',
'Faith''s Fetters',
'First Response',
'Vigil for the Lost',
'Noble Purpose',
'Noble Stand',
'Celestial Mantle',
'Blossoming Sands',
'Command Tower',
'Forest',
'Karn''s Bastion',
'Plains',
'Razorverge Thicket',
'Sunpetal Grove',
'Yavimaya Hollow'
);
#+end_src
#+caption: Finding cards in the collection
#+begin_src sql :exports code
SELECT set_code
, release_date
, color_identity
, cards.name
, type_line
, sets.name
, rarity
, collection
FROM deck_list
JOIN cards USING(oracle_id)
JOIN copies USING (scryfall_id)
JOIN sets USING(set_code)
WHERE deck_id = 28 AND type_line not like 'Basic Land%'
GROUP BY set_code
, release_date
, color_identity
, cards.name
, type_line
, sets.name
, rarity
, collection
ORDER BY CASE WHEN rarity >= 'rare'::rarity THEN 0 ELSE 1 END -- Is it in a binder?
, CASE WHEN LENGTH(color_identity) > 1 THEN 0 ELSE 1 END -- Sort gold cards before mono-colored
, color_identity
, CASE WHEN rarity > 'rare'::rarity THEN 0 ELSE 1 END -- Mythics are separated from rares in binders
, release_date ASC, set_code -- Older cards are better organized in boxes
, cards.name
#+end_src
#+RESULTS:
| set_code | release_date | color_identity | name | type_line | name | rarity | collection |
|----------+--------------+----------------+---------------------------+-------------------------------------------------+----------------------------------------------+----------+-----------------------------------|
| BRO | 2022-11-18 | BR | Mishra, Claimed by Gix | Legendary Creature — Phyrexian Human Artificer | The Brothers' War | mythic | Festival in a box: Barcelona 2023 |
| BRO | 2022-11-18 | BR | Mishra, Claimed by Gix | Legendary Creature — Phyrexian Human Artificer | The Brothers' War | mythic | Boxes |
| MID | 2021-09-24 | BR | Haunted Ridge | Land | Innistrad: Midnight Hunt | rare | Boxes |
| DMU | 2022-09-09 | BR | Sulfurous Springs | Land | Dominaria United | rare | Boxes |
| ONE | 2023-02-03 | BR | Kethek, Crucible Goliath | Legendary Creature — Phyrexian Beast | Phyrexia: All Will Be One | rare | Boxes |
| LTC | 2023-06-23 | BR | Sulfurous Springs | Land | Tales of Middle-earth Commander | rare | LTC The Hosts of Mordor |
| RVR | 2024-01-12 | BR | Blood Crypt | Land — Swamp Mountain | Ravnica Remastered | rare | Boxes |
| UMA | 2018-12-07 | | Cavern of Souls | Land | Ultimate Masters | mythic | Boxes |
| 2XM | 2020-08-07 | | Sword of War and Peace | Artifact — Equipment | Double Masters | mythic | Boxes |
| CMR | 2020-11-20 | | Phyrexian Triniform | Artifact Creature — Phyrexian Golem | Commander Legends | mythic | Boxes |
| BRO | 2022-11-18 | | Portal to Phyrexia | Artifact | The Brothers' War | mythic | Festival in a box: Barcelona 2023 |
| BRR | 2022-11-18 | | Wurmcoil Engine | Artifact Creature — Phyrexian Wurm | The Brothers' War Retro Artifacts | mythic | Boxes |
| DMR | 2023-01-13 | | Urza's Incubator | Artifact | Dominaria Remastered | mythic | Boxes |
| LTR | 2023-06-23 | | The One Ring | Legendary Artifact | The Lord of the Rings: Tales of Middle-earth | mythic | Boxes |
| LCI | 2023-11-17 | | Cavern of Souls | Land | Lost Caverns of Ixalan | mythic | Boxes |
| SOM | 2010-10-01 | | Venser's Journal | Artifact | Scars of Mirrodin | rare | Boxes |
| PF19 | 2019-01-01 | | Sol Ring | Artifact | MagicFest 2019 | rare | LTC The Hosts of Mordor |
| PLG20 | 2020-05-18 | | Reliquary Tower | Land | Love Your LGS 2020 | rare | Boxes |
| SLD | 2022-05-04 | | Sol Ring | Artifact | Secret Lair Drop | rare | Pride Across the Multiverse |
| BRR | 2022-11-18 | | Howling Mine | Artifact | The Brothers' War Retro Artifacts | rare | Boxes |
| BRR | 2022-11-18 | | Howling Mine | Artifact | The Brothers' War Retro Artifacts | rare | Festival in a box: Barcelona 2023 |
| BRR | 2022-11-18 | | Phyrexian Revoker | Artifact Creature — Phyrexian Horror | The Brothers' War Retro Artifacts | rare | Festival in a box: Barcelona 2023 |
| BRR | 2022-11-18 | | Psychosis Crawler | Artifact Creature — Phyrexian Horror | The Brothers' War Retro Artifacts | rare | Festival in a box: Barcelona 2023 |
| ONE | 2023-02-03 | | Zenith Chronicler | Artifact Creature — Phyrexian Construct | Phyrexia: All Will Be One | rare | Boxes |
| MOC | 2023-04-21 | | Vanquisher's Banner | Artifact | March of the Machine Commander | rare | MOC Calvary Charge |
| P30M | 2023-06-15 | | Arcane Signet | Artifact | 30th Anniversary Misc Promos | rare | Festival in a box: Barcelona 2023 |
| LTC | 2023-06-23 | | Vanquisher's Banner | Artifact | Tales of Middle-earth Commander | rare | LTC Riders of Rohan |
| LCI | 2023-11-17 | | Roaming Throne | Artifact Creature — Golem | Lost Caverns of Ixalan | rare | Boxes |
| NPH | 2011-05-13 | B | Sheoldred, Whispering One | Legendary Creature — Phyrexian Praetor | New Phyrexia | mythic | Boxes |
| MH2 | 2021-06-18 | B | Archon of Cruelty | Creature — Archon | Modern Horizons 2 | mythic | Boxes |
| MH2 | 2021-06-18 | B | Cabal Coffers | Land | Modern Horizons 2 | mythic | Boxes |
| MID | 2021-09-24 | B | The Meathook Massacre | Legendary Enchantment | Innistrad: Midnight Hunt | mythic | Boxes |
| BRC | 2022-11-18 | B | Geth, Lord of the Vault | Legendary Creature — Phyrexian Zombie | The Brothers' War Commander | mythic | Boxes |
| BRO | 2022-11-18 | B | Gix, Yawgmoth Praetor | Legendary Creature — Phyrexian Praetor | The Brothers' War | mythic | Boxes |
| BRO | 2022-11-18 | B | Phyrexian Fleshgorger | Artifact Creature — Phyrexian Wurm | The Brothers' War | mythic | Festival in a box: Barcelona 2023 |
| ONE | 2023-02-03 | B | Vraska, Betrayal's Sting | Legendary Planeswalker — Vraska | Phyrexia: All Will Be One | mythic | Boxes |
| MUL | 2023-04-21 | B | Sheoldred, Whispering One | Legendary Creature — Phyrexian Praetor | Multiverse Legends | mythic | Boxes |
| 6ED | 1999-04-21 | B | Greed | Enchantment | Classic Sixth Edition | rare | Red binder |
| NEM | 2000-02-14 | B | Volrath the Fallen | Legendary Creature — Phyrexian Shapeshifter | Nemesis | rare | Ancient Deck Box |
| THS | 2013-09-27 | B | Whip of Erebos | Legendary Enchantment Artifact | Theros | rare | Boxes |
| 2X2 | 2022-07-08 | B | Damnation | Sorcery | Double Masters 2022 | rare | Boxes |
| DMC | 2022-09-09 | B | Activated Sleeper | Creature — Phyrexian Shapeshifter | Dominaria United Commander | rare | Boxes |
| BRO | 2022-11-18 | B | Gixian Puppeteer | Creature — Phyrexian Warlock | The Brothers' War | rare | Boxes |
| BRO | 2022-11-18 | B | Gixian Puppeteer | Creature — Phyrexian Warlock | The Brothers' War | rare | Festival in a box: Barcelona 2023 |
| ONE | 2023-02-03 | B | Phyrexian Arena | Enchantment | Phyrexia: All Will Be One | rare | Boxes |
| ONE | 2023-02-03 | B | Vraan, Executioner Thane | Legendary Creature — Phyrexian Vampire | Phyrexia: All Will Be One | rare | Boxes |
| CMM | 2023-08-04 | B | Deadly Rollick | Instant | Commander Masters | rare | Boxes |
| M20 | 2019-07-12 | R | Cavalier of Flame | Creature — Elemental Knight | Core Set 2020 | mythic | Boxes |
| DMR | 2023-01-13 | R | Sneak Attack | Enchantment | Dominaria Remastered | mythic | Festival in a box: Barcelona 2023 |
| DMR | 2023-01-13 | R | Sneak Attack | Enchantment | Dominaria Remastered | mythic | Boxes |
| MUL | 2023-04-21 | R | Urabrask the Hidden | Legendary Creature — Phyrexian Praetor | Multiverse Legends | mythic | Boxes |
| 3ED | 1994-04-01 | R | Wheel of Fortune | Sorcery | Revised Edition | rare | Ancient Deck Box |
| HOP | 2009-09-04 | R | Insurrection | Sorcery | Planechase | rare | Red binder |
| NPH | 2011-05-13 | R | Chancellor of the Forge | Creature — Phyrexian Giant | New Phyrexia | rare | Boxes |
| NPH | 2011-05-13 | R | Invader Parasite | Creature — Phyrexian Insect | New Phyrexia | rare | Boxes |
| 2X2 | 2022-07-08 | R | Chaos Warp | Instant | Double Masters 2022 | rare | Boxes |
| BRC | 2022-11-18 | R | Chaos Warp | Instant | The Brothers' War Commander | rare | Boxes |
| BRO | 2022-11-18 | R | Phyrexian Dragon Engine | Artifact Creature — Phyrexian Dragon | The Brothers' War | rare | Boxes |
| BRO | 2022-11-18 | R | Phyrexian Dragon Engine | Artifact Creature — Phyrexian Dragon | The Brothers' War | rare | Festival in a box: Barcelona 2023 |
| TOR | 2002-02-04 | BR | Tainted Peak | Land | Torment | uncommon | Red binder |
| 2X2 | 2022-07-08 | BR | Rakdos Carnarium | Land | Double Masters 2022 | uncommon | Boxes |
| 2X2 | 2022-07-08 | BR | Rakdos Carnarium | Land | Double Masters 2022 | uncommon | Double Masters Collector Display |
| BRC | 2022-11-18 | BR | Rakdos Carnarium | Land | The Brothers' War Commander | uncommon | Boxes |
| BRC | 2022-11-18 | BR | Rakdos Signet | Artifact | The Brothers' War Commander | common | Boxes |
| RVR | 2024-01-12 | BR | Rakdos Signet | Artifact | Ravnica Remastered | uncommon | Boxes |
| 3ED | 1994-04-01 | | Sol Ring | Artifact | Revised Edition | uncommon | Ancient Deck Box |
| VIS | 1997-02-03 | | Phyrexian Walker | Artifact Creature — Phyrexian Construct | Visions | common | Boxes |
| SOM | 2010-10-01 | | Ichorclaw Myr | Artifact Creature — Phyrexian Myr | Scars of Mirrodin | common | Boxes |
| SOM | 2010-10-01 | | Necropede | Artifact Creature — Phyrexian Insect | Scars of Mirrodin | uncommon | Boxes |
| MBS | 2011-02-04 | | Plague Myr | Artifact Creature — Phyrexian Myr | Mirrodin Besieged | uncommon | Boxes |
| C19 | 2019-08-23 | | Reliquary Tower | Land | Commander 2019 | uncommon | Boxes |
| C19 | 2019-08-23 | | Sol Ring | Artifact | Commander 2019 | uncommon | Boxes |
| MB1 | 2019-11-07 | | Herald's Horn | Artifact | Mystery Booster | uncommon | Festival in a box: Barcelona 2023 |
| PLST | 2019-11-07 | | Reliquary Tower | Land | The List | uncommon | Festival in a box: Barcelona 2023 |
| ZNC | 2020-09-25 | | Arcane Signet | Artifact | Zendikar Rising Commander | common | Deckbox |
| ZNC | 2020-09-25 | | Sol Ring | Artifact | Zendikar Rising Commander | uncommon | Deckbox |
| CMR | 2020-11-20 | | Arcane Signet | Artifact | Commander Legends | uncommon | Boxes |
| CMR | 2020-11-20 | | Thought Vessel | Artifact | Commander Legends | uncommon | Boxes |
| KHC | 2021-02-05 | | Arcane Signet | Artifact | Kaldheim Commander | common | KHM Elven Empire Precon |
| KHC | 2021-02-05 | | Sol Ring | Artifact | Kaldheim Commander | uncommon | KHM Elven Empire Precon |
| C21 | 2021-04-23 | | Arcane Signet | Artifact | Commander 2021 | common | STX Quantum Quandrix Precon |
| C21 | 2021-04-23 | | Sol Ring | Artifact | Commander 2021 | uncommon | STX Quantum Quandrix Precon |
| AFC | 2021-07-23 | | Arcane Signet | Artifact | Forgotten Realms Commander | common | AFR Vrondiss Precon |
| AFC | 2021-07-23 | | Sol Ring | Artifact | Forgotten Realms Commander | uncommon | AFR Vrondiss Precon |
| CLB | 2022-06-10 | | Arcane Signet | Artifact | Commander Legends: Battle for Baldur's Gate | uncommon | Boxes |
| BRC | 2022-11-18 | | Arcane Signet | Artifact | The Brothers' War Commander | common | Boxes |
| BRC | 2022-11-18 | | Reliquary Tower | Land | The Brothers' War Commander | uncommon | Boxes |
| BRC | 2022-11-18 | | Sol Ring | Artifact | The Brothers' War Commander | uncommon | Boxes |
| BRC | 2022-11-18 | | Thought Vessel | Artifact | The Brothers' War Commander | uncommon | Boxes |
| BRR | 2022-11-18 | | Mishra's Bauble | Artifact | The Brothers' War Retro Artifacts | uncommon | Boxes |
| BRR | 2022-11-18 | | Mishra's Bauble | Artifact | The Brothers' War Retro Artifacts | uncommon | Festival in a box: Barcelona 2023 |
| MOC | 2023-04-21 | | Arcane Signet | Artifact | March of the Machine Commander | common | MOC Calvary Charge |
| MOC | 2023-04-21 | | Herald's Horn | Artifact | March of the Machine Commander | uncommon | MOC Calvary Charge |
| MOC | 2023-04-21 | | Sol Ring | Artifact | March of the Machine Commander | uncommon | MOC Calvary Charge |
| LTC | 2023-06-23 | | Arcane Signet | Artifact | Tales of Middle-earth Commander | common | LTC Riders of Rohan |
| LTC | 2023-06-23 | | Arcane Signet | Artifact | Tales of Middle-earth Commander | common | LTC Food and Fellowship |
| LTC | 2023-06-23 | | Arcane Signet | Artifact | Tales of Middle-earth Commander | common | LTC Elven Council |
| LTC | 2023-06-23 | | Arcane Signet | Artifact | Tales of Middle-earth Commander | common | LTC The Hosts of Mordor |
| LTC | 2023-06-23 | | Herald's Horn | Artifact | Tales of Middle-earth Commander | uncommon | LTC Riders of Rohan |
| LTC | 2023-06-23 | | Sol Ring | Artifact | Tales of Middle-earth Commander | uncommon | LTC Riders of Rohan |
| LTC | 2023-06-23 | | Sol Ring | Artifact | Tales of Middle-earth Commander | uncommon | LTC Food and Fellowship |
| LTC | 2023-06-23 | | Sol Ring | Artifact | Tales of Middle-earth Commander | uncommon | LTC Elven Council |
| LTC | 2023-06-23 | | Thought Vessel | Artifact | Tales of Middle-earth Commander | common | LTC Riders of Rohan |
| CMM | 2023-08-04 | | Reliquary Tower | Land | Commander Masters | uncommon | Boxes |
| LCC | 2023-11-17 | | Arcane Signet | Artifact | Lost Caverns of Ixalan Commander | uncommon | Boxes |
| ICE | 1995-06-03 | B | Dark Ritual | Instant | Ice Age | common | Boxes |
| MMQ | 1999-10-04 | B | Dark Ritual | Instant | Mercadian Masques | common | Boxes |
| MMQ | 1999-10-04 | B | Dark Ritual | Instant | Mercadian Masques | common | Ancient Deck Box |
| INV | 2000-10-02 | B | Plague Spitter | Creature — Phyrexian Horror | Invasion | uncommon | Red binder |
| SOM | 2010-10-01 | B | Exsanguinate | Sorcery | Scars of Mirrodin | uncommon | Boxes |
| MBS | 2011-02-04 | B | Phyresis | Enchantment — Aura | Mirrodin Besieged | common | Red binder |
| MBS | 2011-02-04 | B | Phyresis | Enchantment — Aura | Mirrodin Besieged | common | Boxes |
| M13 | 2012-07-13 | B | Murder | Instant | Magic 2013 | common | Boxes |
| M20 | 2019-07-12 | B | Murder | Instant | Core Set 2020 | common | Boxes |
| PLST | 2019-11-07 | B | Murder | Instant | The List | common | Festival in a box: Barcelona 2023 |
| IKO | 2020-04-24 | B | Bastion of Remembrance | Enchantment | Ikoria: Lair of Behemoths | uncommon | Boxes |
| CMR | 2020-11-20 | B | Murder | Instant | Commander Legends | common | Boxes |
| CMR | 2020-11-20 | B | Victimize | Sorcery | Commander Legends | uncommon | Boxes |
| STX | 2021-04-23 | B | Plumb the Forbidden | Instant | Strixhaven: School of Mages | uncommon | Boxes |
| NEO | 2022-02-18 | B | Reckoner's Bargain | Instant | Kamigawa: Neon Dynasty | common | Boxes |
| SNC | 2022-04-29 | B | Murder | Instant | Streets of New Capenna | common | Boxes |
| CLB | 2022-06-10 | B | Murder | Instant | Commander Legends: Battle for Baldur's Gate | common | Boxes |
| 2X2 | 2022-07-08 | B | Blood Artist | Creature — Vampire | Double Masters 2022 | uncommon | Double Masters Collector Display |
| 2X2 | 2022-07-08 | B | Blood Artist | Creature — Vampire | Double Masters 2022 | uncommon | Boxes |
| PLST | 2022-09-09 | B | Dark Ritual | Instant | The List | common | Boxes |
| BRC | 2022-11-18 | R | Faithless Looting | Sorcery | The Brothers' War Commander | common | Boxes |
| LTC | 2023-06-23 | R | Faithless Looting | Sorcery | Tales of Middle-earth Commander | common | LTC The Hosts of Mordor |
** Questions
- Where are the cards in my collection I need to build a deck?
- Which cards do I want in one deck that are currently in another?
- Which cards do I need more copies of?
- Which cards do I need that would improve specific decks?
** Types
: import Text -> (ValidCardNames, InvalidCardNames)
: import Text -> (ValidCards, InvalidCards)
: PreferredCard = PreferredCard { name: ValidCardName, card: Maybe ValidCard }
: import Text -> ([PreferredCard], [InvalidCardNames])
: decklist DeckName -> ValidCardNames -> DeckList
: commanderDeckList -> DeckList -> Either InvalidCommanderDeck CommanderDecklist
: Deck = Deck [PreferredCard]
* Collection stats
#+begin_src sql
SELECT COUNT("copies"."id") AS cards
, SUM(
CASE WHEN "copies"."isFoil"
THEN "card_prices"."usd_foil"
ELSE "card_prices"."usd"
END
) AS value
, COUNT(DISTINCT cards.set_code) AS sets
FROM "copies"
JOIN "cards" USING ("scryfall_id")
LEFT JOIN "card_prices" USING ("scryfall_id")
WHERE "card_prices"."date" = (SELECT "value" FROM "vars" where "key" = 'last_update')
#+end_src
#+RESULTS:
| cards | value | sets |
|-------+---------+------|
| 12871 | 7289.44 | 161 |
#+begin_src sql
SELECT COUNT("copies"."id") AS cards
FROM "copies"
JOIN "cards" USING ("scryfall_id")
LEFT JOIN "card_prices" USING ("scryfall_id")
WHERE "card_prices"."date" = (SELECT "value" FROM "vars" where "key" = 'last_update')
#+end_src
#+RESULTS:
| cards |
|-------|
| 12871 |
#+begin_src sql
select count(*) from copies
#+end_src
#+RESULTS:
| count |
|-------|
| 12871 |
* Identifying and ordering sets
#+name: sets
#+begin_src sql
SELECT s.set_code
, s.name
, COUNT(co.id) AS cards
, MIN(c.release_date) AS release_date
FROM sets AS s
JOIN cards AS c USING (set_code)
JOIN copies AS co USING (scryfall_id)
GROUP BY s.set_code, s.name
ORDER BY min(c.release_date) DESC
#+end_src
#+RESULTS: sets
| set_code | name | cards | release_date |
|----------+-----------------------------------------------+-------+--------------|
| ONC | Phyrexia: All Will Be One Commander | 4 | 2023-02-03 |
| ONE | Phyrexia: All Will Be One | 387 | 2023-02-03 |
| DMR | Dominaria Remastered | 255 | 2023-01-13 |
| J22 | Jumpstart 2022 | 1 | 2022-12-02 |
| BOT | Transformers | 14 | 2022-11-18 |
| TBOT | Transformers Tokens | 1 | 2022-11-18 |
| BRR | The Brothers' War Retro Artifacts | 58 | 2022-11-18 |
| BRO | The Brothers' War | 203 | 2022-11-18 |
| BRC | The Brothers' War Commander | 210 | 2022-11-18 |
| UNF | Unfinity | 42 | 2022-10-07 |
| DMU | Dominaria United | 218 | 2022-09-09 |
| DMC | Dominaria United Commander | 35 | 2022-09-09 |
| P30A | 30th Anniversary Play Promos | 2 | 2022-09-02 |
| 2X2 | Double Masters 2022 | 459 | 2022-07-08 |
| CLB | Commander Legends: Battle for Baldur's Gate | 94 | 2022-06-10 |
| NCC | New Capenna Commander | 2 | 2022-04-29 |
| SNC | Streets of New Capenna | 203 | 2022-04-29 |
| SLX | Universes Within | 3 | 2022-03-03 |
| NEC | Neon Dynasty Commander | 14 | 2022-02-18 |
| NEO | Kamigawa: Neon Dynasty | 857 | 2022-02-18 |
| VOW | Innistrad: Crimson Vow | 105 | 2021-11-19 |
| VOC | Crimson Vow Commander | 1 | 2021-11-19 |
| MID | Innistrad: Midnight Hunt | 15 | 2021-09-24 |
| CMB2 | Mystery Booster Playtest Cards 2021 | 3 | 2021-08-20 |
| OAFC | Forgotten Realms Commander Display Commanders | 1 | 2021-07-23 |
| AAFR | Adventures in the Forgotten Realms Art Series | 3 | 2021-07-23 |
| AFC | Forgotten Realms Commander | 70 | 2021-07-23 |
| AFR | Adventures in the Forgotten Realms | 214 | 2021-07-23 |
| PLG21 | Love Your LGS 2021 | 1 | 2021-06-22 |
| MH2 | Modern Horizons 2 | 27 | 2021-06-18 |
| STX | Strixhaven: School of Mages | 383 | 2021-04-23 |
| TSTX | Strixhaven: School of Mages Tokens | 6 | 2021-04-23 |
| STA | Strixhaven Mystical Archive | 30 | 2021-04-23 |
| C21 | Commander 2021 | 75 | 2021-04-23 |
| OC21 | Commander 2021 Display Commanders | 1 | 2021-04-23 |
| TSR | Time Spiral Remastered | 3 | 2021-03-19 |
| TKHM | Kaldheim Tokens | 1 | 2021-02-05 |
| KHC | Kaldheim Commander | 59 | 2021-02-05 |
| KHM | Kaldheim | 174 | 2021-02-05 |
| CMR | Commander Legends | 481 | 2020-11-20 |
| PLIST | The List | 8 | 2020-09-26 |
| ZNC | Zendikar Rising Commander | 77 | 2020-09-25 |
| ZNR | Zendikar Rising | 54 | 2020-09-25 |
| 2XM | Double Masters | 2 | 2020-08-07 |
| JMP | Jumpstart | 2 | 2020-07-17 |
| M21 | Core Set 2021 | 5 | 2020-07-03 |
| PLG20 | Love Your LGS 2020 | 1 | 2020-05-18 |
| IKO | Ikoria: Lair of Behemoths | 560 | 2020-04-24 |
| C20 | Commander 2020 | 1 | 2020-04-17 |
| TTHB | Theros Beyond Death Tokens | 1 | 2020-01-24 |
| THB | Theros Beyond Death | 96 | 2020-01-24 |
| SLD | Secret Lair Drop | 10 | 2019-12-16 |
| MB1 | Mystery Booster | 42 | 2019-11-07 |
| ELD | Throne of Eldraine | 148 | 2019-10-04 |
| C19 | Commander 2019 | 101 | 2019-08-23 |
| PM20 | Core Set 2020 Promos | 1 | 2019-07-12 |
| M20 | Core Set 2020 | 600 | 2019-07-12 |
| SS2 | Signature Spellbook: Gideon | 2 | 2019-06-28 |
| WAR | War of the Spark | 544 | 2019-05-03 |
| TWAR | War of the Spark Tokens | 36 | 2019-05-03 |
| RNA | Ravnica Allegiance | 17 | 2019-01-25 |
| PRNA | Ravnica Allegiance Promos | 1 | 2019-01-25 |
| GRN | Guilds of Ravnica | 127 | 2018-10-05 |
| C18 | Commander 2018 | 3 | 2018-08-09 |
| M19 | Core Set 2019 | 2 | 2018-07-13 |
| BBD | Battlebond | 1 | 2018-06-08 |
| TDOM | Dominaria Tokens | 1 | 2018-04-27 |
| DOM | Dominaria | 18 | 2018-04-27 |
| TRIX | Rivals of Ixalan Tokens | 1 | 2018-01-19 |
| RIX | Rivals of Ixalan | 29 | 2018-01-19 |
| UST | Unstable | 119 | 2017-12-08 |
| E02 | Explorers of Ixalan | 1 | 2017-11-24 |
| IMA | Iconic Masters | 1 | 2017-11-17 |
| XLN | Ixalan | 2 | 2017-09-29 |
| C17 | Commander 2017 | 2 | 2017-08-25 |
| THOU | Hour of Devastation Tokens | 1 | 2017-07-14 |
| HOU | Hour of Devastation | 29 | 2017-07-14 |
| E01 | Archenemy: Nicol Bolas | 1 | 2017-06-16 |
| CMA | Commander Anthology | 1 | 2017-06-09 |
| MM3 | Modern Masters 2017 | 3 | 2017-03-17 |
| AER | Aether Revolt | 3 | 2017-01-20 |
| C16 | Commander 2016 | 2 | 2016-11-11 |
| PKLD | Kaladesh Promos | 1 | 2016-09-30 |
| KLD | Kaladesh | 68 | 2016-09-30 |
| EMN | Eldritch Moon | 1 | 2016-07-22 |
| SOI | Shadows over Innistrad | 1 | 2016-04-08 |
| C15 | Commander 2015 | 1 | 2015-11-13 |
| ORI | Magic Origins | 1 | 2015-07-17 |
| C14 | Commander 2014 | 1 | 2014-11-07 |
| M15 | Magic 2015 | 44 | 2014-07-18 |
| BNG | Born of the Gods | 1 | 2014-02-07 |
| C13 | Commander 2013 | 1 | 2013-11-01 |
| THS | Theros | 30 | 2013-09-27 |
| M14 | Magic 2014 | 2 | 2013-07-19 |
| GTC | Gatecrash | 1 | 2013-02-01 |
| RTR | Return to Ravnica | 30 | 2012-10-05 |
| M13 | Magic 2013 | 91 | 2012-07-13 |
| AVR | Avacyn Restored | 48 | 2012-05-04 |
| DKA | Dark Ascension | 52 | 2012-02-03 |
| ISD | Innistrad | 355 | 2011-09-30 |
| V11 | From the Vault: Legends | 1 | 2011-08-26 |
| M12 | Magic 2012 | 244 | 2011-07-15 |
| NPH | New Phyrexia | 245 | 2011-05-13 |
| MBS | Mirrodin Besieged | 371 | 2011-02-04 |
| PMBS | Mirrodin Besieged Promos | 1 | 2011-02-03 |
| SOM | Scars of Mirrodin | 325 | 2010-10-01 |
| PSOM | Scars of Mirrodin Promos | 1 | 2010-09-30 |
| M11 | Magic 2011 | 320 | 2010-07-16 |
| ROE | Rise of the Eldrazi | 329 | 2010-04-23 |
| PWWK | Worldwake Promos | 2 | 2010-02-05 |
| WWK | Worldwake | 149 | 2010-02-05 |
| F10 | Friday Night Magic 2010 | 1 | 2010-01-01 |
| ZEN | Zendikar | 76 | 2009-10-02 |
| HOP | Planechase | 17 | 2009-09-04 |
| M10 | Magic 2010 | 89 | 2009-07-17 |
| CON | Conflux | 14 | 2009-02-06 |
| PCON | Conflux Promos | 1 | 2009-01-31 |
| PW09 | Wizards Play Network 2009 | 1 | 2009-01-01 |
| DD2 | Duel Decks: Jace vs. Chandra | 120 | 2008-11-07 |
| ALA | Shards of Alara | 22 | 2008-10-03 |
| MOR | Morningtide | 1 | 2008-02-01 |
| LRW | Lorwyn | 1 | 2007-10-12 |
| 10E | Tenth Edition | 2 | 2007-07-13 |
| PLC | Planar Chaos | 2 | 2007-02-02 |
| CSP | Coldsnap | 2 | 2006-07-21 |
| RAV | Ravnica: City of Guilds | 2 | 2005-10-07 |
| 9ED | Ninth Edition | 1 | 2005-07-29 |
| BOK | Betrayers of Kamigawa | 1 | 2005-02-04 |
| CHK | Champions of Kamigawa | 5 | 2004-10-01 |
| 5DN | Fifth Dawn | 46 | 2004-06-04 |
| DST | Darksteel | 49 | 2004-02-06 |
| MRD | Mirrodin | 102 | 2003-10-02 |
| 8ED | Eighth Edition | 2 | 2003-07-28 |
| SCG | Scourge | 53 | 2003-05-26 |
| LGN | Legions | 37 | 2003-02-03 |
| ONS | Onslaught | 32 | 2002-10-07 |
| TOR | Torment | 29 | 2002-02-04 |
| ODY | Odyssey | 230 | 2001-10-01 |
| APC | Apocalypse | 672 | 2001-06-04 |
| PAPC | Apocalypse Promos | 1 | 2001-05-26 |
| 7ED | Seventh Edition | 196 | 2001-04-11 |
| PLS | Planeshift | 42 | 2001-02-05 |
| INV | Invasion | 141 | 2000-10-02 |
| PCY | Prophecy | 32 | 2000-06-05 |
| S00 | Starter 2000 | 6 | 2000-04-01 |
| NEM | Nemesis | 98 | 2000-02-14 |
| MMQ | Mercadian Masques | 165 | 1999-10-04 |
| S99 | Starter 1999 | 3 | 1999-07-01 |
| UDS | Urza's Destiny | 39 | 1999-06-07 |
| 6ED | Classic Sixth Edition | 118 | 1999-04-21 |
| ULG | Urza's Legacy | 38 | 1999-02-15 |
| USG | Urza's Saga | 155 | 1998-10-12 |
| EXO | Exodus | 21 | 1998-06-15 |
| STH | Stronghold | 37 | 1998-03-02 |
| TMP | Tempest | 35 | 1997-10-14 |
| WTH | Weatherlight | 81 | 1997-06-09 |
| 5ED | Fifth Edition | 73 | 1997-03-24 |
| VIS | Visions | 4 | 1997-02-03 |
| MIR | Mirage | 221 | 1996-10-08 |
| ALL | Alliances | 13 | 1996-06-10 |
| HML | Homelands | 45 | 1995-10-01 |
| CHR | Chronicles | 2 | 1995-07-01 |
| ICE | Ice Age | 116 | 1995-06-03 |
| 4ED | Fourth Edition | 128 | 1995-04-01 |
| FEM | Fallen Empires | 16 | 1994-11-01 |
| DRK | The Dark | 3 | 1994-08-01 |
| LEG | Legends | 2 | 1994-06-01 |
| 3ED | Revised Edition | 43 | 1994-04-01 |
| ATQ | Antiquities | 1 | 1994-03-04 |
#+begin_src python :var data=sets :var filename="tutor-sets.png" :results file :exports results
from datetime import datetime
import matplotlib
matplotlib.use('SVG')
import matplotlib.pyplot as plt
import pandas as pd
data = [{'code': code,
'name': name,
'cards': int(cards),
'date': datetime.strptime(date, '%Y-%m-%d'),
}
for code, name, cards, date in data]
data = pd.DataFrame(data).set_index('date').sort_index()
fig, ax = plt.subplots(figsize=(14,8))
data['cumcards'] = data['cards'].cumsum()
data.plot(y='cumcards', ax=ax)
for date, row in data[data['cards'] > 300].iterrows():
ax.text(date, row['cumcards'], row['code'])
plt.xlabel("Time")
plt.ylabel("Cards")
ax.get_legend().remove()
plt.savefig(filename, transparent=True)
return filename
#+end_src
#+RESULTS:
[[file:tutor-sets.png]]
* Identifying default cards for oracle entries
#+begin_src sql
SELECT oracle.oracle_id
, oracle.name
, scryfall.scryfall_id
, scryfall.set_code
, scryfall.collector_number
FROM oracle
JOIN (
SELECT DISTINCT ON (oracle_id) *
FROM scryfall
ORDER BY oracle_id, release_date DESC
) scryfall USING (oracle_id)
WHERE oracle.name IN ('Rampant Growth', 'Counterspell', 'Demonic Tutor', 'Jin-Gitaxias, Progress Tyrant')
#+end_src
#+RESULTS:
| oracle_id | name | scryfall_id | set_code | collector_number |
|--------------------------------------+-------------------------------+--------------------------------------+----------+------------------|
| 82004860-e589-4e38-8d61-8c0210e4ea39 | Demonic Tutor | 085ed548-a8c8-40b3-8183-51c060bc95cb | 30A | 398 |
| 8539f295-5d58-4436-a73a-b9277c4c7795 | Rampant Growth | ba3026d2-334d-41bd-8c6b-7de7d78e54e0 | 40K | 220 |
| cc187110-1148-4090-bbb8-e205694a39f5 | Counterspell | d14d5ff3-40c0-4f22-91ad-d6c8447cb9e0 | DMR | 281 |
| f5daadc1-98ff-480a-82bb-fe7bfaa7b60e | Jin-Gitaxias, Progress Tyrant | 9a5ffb0d-1fc3-40da-ac1f-19465aa8412b | NEO | 514 |
* Defining Decks
** Basic Deck List
The minimum card requirements for defining a deck are its unique name or
equivalent identifier, and a quantity.
** Quantity vs individual records
In order to refine card selection, it would be more straightforward to have one
record per card instance associated with a deck, leaving quantity bundling as an
exercise for the UI to streamline deck construction.
** Refining selected cards
Card selections may be narrowed by assigning the following qualities, the sum of
which should restrict the selection to a specific printing:
- Set
- Collector Number
- Language
- Foil or Non-Foil
| Property | Default |
|------------------+-----------------------|
| Set | Latest |
| Collector Number | Lowest |
| Language | English |
| Foil or Non-Foil | Non-Foil if available |
** Availability of cards in the collection
** Marking cards as proxied
Any card in a deck may be marked as proxied. Proxied cards will not reduce the
available number of matching cards in the collection for deckbuilding.
* Finding cards for a deck, part 2
:PROPERTIES:
:header-args: :var deckid=30
:END:
#+begin_src sql
\d
#+end_src
#+RESULTS:
| List of relations | | | |
|-------------------+-------------------+-------------------+-------|
| Schema | Name | Type | Owner |
| public | card_prices | table | tutor |
| public | cards | materialized view | tutor |
| public | collections | materialized view | tutor |
| public | copies | table | tutor |
| public | copies_id_seq | sequence | tutor |
| public | deck_cards | table | tutor |
| public | deck_list | table | tutor |
| public | decks | table | tutor |
| public | decks_deck_id_seq | sequence | tutor |
| public | games | table | tutor |
| public | legalities | table | tutor |
| public | oracle | table | tutor |
| public | oracle_latest | materialized view | tutor |
| public | rarities | table | tutor |
| public | scryfall | table | tutor |
| public | sets | table | tutor |
| public | tmp_cards | table | tutor |
| public | tmp_prices | table | tutor |
| public | vars | table | tutor |
#+begin_src sql
select * from decks
#+end_src
#+RESULTS:
| deck_id | name |
|---------+-------------------|
| 9 | Aura Gnarlids |
| 11 | Alive |
| 12 | Crafting Metal |
| 13 | Charmed, I'm Sure |
| 21 | Tempered Steel |
| 29 | Phyrexians |
| 30 | Massacre |
#+begin_src sql
WITH other_decklists AS (
SELECT deck_list.oracle_id
, SUM(deck_list.quantity) as quantity
FROM deck_list
WHERE deck_list.deck_id <> $deckid
GROUP BY deck_list.oracle_id
)
SELECT deck_list.quantity
, oracle.name
, ARRAY_AGG(DISTINCT collections.rarity) as rarities
, ARRAY_AGG(DISTINCT collections.set_code) as set_codes
, ARRAY_AGG(DISTINCT EXTRACT(YEAR FROM collections.release_date::date)) as release_date
, MAX(collections.rarity) as max_rarity
, COUNT(collections.id) AS in_collection
, COALESCE(other_decklists.quantity, 0) as in_other_decklists
FROM deck_list
JOIN oracle USING (oracle_id)
LEFT JOIN collections USING (oracle_id)
LEFT JOIN other_decklists USING (oracle_id)
WHERE deck_list.deck_id = $deckid
AND oracle.type_line NOT LIKE 'Basic Land %'
GROUP BY deck_list.quantity
, oracle.name
, in_other_decklists
ORDER BY CASE WHEN COUNT(collections.id) > 0 THEN 1 ELSE 0 END DESC
, CASE WHEN MAX(collections.rarity) >= 'rare' THEN MAX(collections.rarity) ELSE 'common' END DESC
, MAX(collections.release_date) DESC
#+end_src
#+RESULTS:
| quantity | name | rarities | set_codes | release_date | max_rarity | in_collection | in_other_decklists |
|----------+---------------------+------------+---------------+------------------+------------+---------------+--------------------|
| 2 | Temple of Epiphany | {rare} | {BRC,M20} | {2019,2022} | rare | 2 | 0 |
| 2 | Narset's Reversal | {rare} | {WAR} | {2019} | rare | 1 | 1 |
| 2 | Chart a Course | {uncommon} | {LCI} | {2023} | uncommon | 2 | 0 |
| 2 | Lonely Sandbar | {uncommon} | {C21,LTC} | {2021,2023} | uncommon | 2 | 0 |
| 2 | Remote Isle | {common} | {DMR} | {2023} | common | 5 | 0 |
| 2 | Izzet Boilerworks | {uncommon} | {2X2,BRC} | {2022} | uncommon | 2 | 0 |
| 2 | Halimar Depths | {common} | {WWK} | {2010} | common | 1 | 1 |
| 2 | Repulse | {common} | {DD2,INV} | {2000,2008} | common | 4 | 0 |
| 2 | Metamorphose | {uncommon} | {SCG} | {2003} | uncommon | 1 | 0 |
| 2 | Predict | {uncommon} | {ODY} | {2001} | uncommon | 1 | 0 |
| 8 | Memory Lapse | {common} | {7ED,HML,MIR} | {1995,1996,2001} | common | 3 | 0 |
| 10 | Dandân | {NULL} | {NULL} | {NULL} | | 0 | 0 |
| 2 | Diminishing Returns | {NULL} | {NULL} | {NULL} | | 0 | 0 |
| 2 | Flood Plain | {NULL} | {NULL} | {NULL} | | 0 | 0 |
| 2 | Gone Missing | {NULL} | {NULL} | {NULL} | | 0 | 0 |
| 2 | Magical Hack | {NULL} | {NULL} | {NULL} | | 0 | 0 |
| 2 | Mind Bend | {NULL} | {NULL} | {NULL} | | 0 | 0 |
| 2 | Mystic Retrieval | {NULL} | {NULL} | {NULL} | | 0 | 0 |
| 2 | Mystic Sanctuary | {NULL} | {NULL} | {NULL} | | 0 | 0 |
| 2 | Supplant Form | {NULL} | {NULL} | {NULL} | | 0 | 0 |
| 4 | Take Inventory | {NULL} | {NULL} | {NULL} | | 0 | 0 |
| 2 | Brainstorm | {NULL} | {NULL} | {NULL} | | 0 | 0 |
** Candidate list
#+begin_src sql
SELECT deck_list.oracle_id
, deck_list.quantity
, collections.id
, collections.scryfall_id
, collections.name
FROM deck_list
LEFT JOIN collections USING (oracle_id)
WHERE deck_list.deck_id = $deckid
AND collections.type_line NOT LIKE 'Basic Land %'
#+end_src
#+RESULTS:
| oracle_id | quantity | id | scryfall_id | name |
|--------------------------------------+----------+--------+--------------------------------------+------------------------------|
| c23e5b80-08d2-4e24-9908-fe2aa4f30f6f | 1 | 368243 | df2370ea-9bb8-496f-aaf5-f0bb3bb55f9b | Reliquary Tower |
| 7358e164-5704-4e78-9b21-6a9bf2a968ce | 1 | 369704 | e1efb0d3-2c72-46ff-bdc1-1069967365a0 | Cabal Coffers |
| c650a7bc-e350-44a0-a698-d4a233d66156 | 1 | 378810 | e1f7a9a7-3679-4a18-a52a-e3a8ab16ad32 | Child of Night |
| c650a7bc-e350-44a0-a698-d4a233d66156 | 1 | 378809 | e1f7a9a7-3679-4a18-a52a-e3a8ab16ad32 | Child of Night |
| af105cda-1f7c-4868-9407-a97c46bd762d | 1 | 371456 | e5bb4def-c67c-44c2-b3b2-8c53a077432d | Black Sun's Twilight |
| aa76cc50-5be0-4844-b3a4-fb33fca3cdd3 | 1 | 382117 | e62f3371-8aa6-4fbf-b642-5ba6af219703 | Bloodthrone Vampire |
| aa76cc50-5be0-4844-b3a4-fb33fca3cdd3 | 1 | 382105 | e62f3371-8aa6-4fbf-b642-5ba6af219703 | Bloodthrone Vampire |
| 63e6cb7d-cc27-4200-85fc-ff6472318c1a | 1 | 370915 | ebca1926-6809-4924-a80c-f322266ac38e | Massacre Girl |
| c650a7bc-e350-44a0-a698-d4a233d66156 | 1 | 382102 | ef351dcb-64c0-413a-81d3-38e7cd4a8f78 | Child of Night |
| c650a7bc-e350-44a0-a698-d4a233d66156 | 1 | 382101 | ef351dcb-64c0-413a-81d3-38e7cd4a8f78 | Child of Night |
| 9965d9c5-2ebf-4a6c-930e-55c5890979be | 1 | 381490 | f58ab310-cbee-4f0c-9819-a2e2121932ff | Thought Vessel |
| 457af74a-02b3-4659-846d-63e482667f34 | 1 | 374686 | f5172be3-4379-43fc-98bd-e77c579dea55 | Deadly Dispute |
| c23e5b80-08d2-4e24-9908-fe2aa4f30f6f | 1 | 372242 | fcc31eb5-d0aa-4b4d-8908-cad1bba7348a | Reliquary Tower |
| 93cf50cf-0ecc-4d3e-abea-778c1ebacec4 | 1 | 366549 | fce002dc-5fb5-465b-935e-042121f1119d | Massacre Wurm |
| d26b27db-a567-4631-b4b6-7294222fbdd1 | 1 | 368268 | feab8356-58dc-4e01-8c5f-4699e6feef52 | Howling Mine |
| ed4cd3a1-688b-4c05-948d-39d3336e00c0 | 1 | 369551 | 06b7312a-c775-4fa8-ba62-c84ff38459e8 | Oversold Cemetery |
| 8164b1e8-3350-465e-8a17-75f57d326344 | 1 | 380513 | 0878b541-a730-49db-b062-5a01656e269d | Exsanguinate |
| 127de52b-df75-4342-95a0-20d84c5bf916 | 1 | 366719 | 08950015-eee5-4327-888c-82dfd13bb9ad | The Meathook Massacre |
| 0fb9a8a2-4331-4259-9460-a37397554962 | 1 | 367298 | 09e732f7-85d7-4b2e-b332-9be30bfba3d5 | Bringer of the Last Gift |
| 0fb9a8a2-4331-4259-9460-a37397554962 | 1 | 367004 | 09e732f7-85d7-4b2e-b332-9be30bfba3d5 | Bringer of the Last Gift |
| 12be58f4-1c12-4bca-8069-1f049cd8a90c | 1 | 367310 | 0a281d2c-20b9-4887-a924-9be6c07b7629 | Terror Tide |
| 12be58f4-1c12-4bca-8069-1f049cd8a90c | 1 | 366920 | 0a281d2c-20b9-4887-a924-9be6c07b7629 | Terror Tide |
| 7336a541-3ae9-4ab2-acb8-f574c0a5b3a9 | 1 | 366548 | 0fe79ee4-c3f3-4a6b-a967-203ca3b70ee5 | Vito, Thorn of the Dusk Rose |
| 4d18bcba-a346-445e-a182-6cc30b7e066d | 1 | 372325 | 0f2d0ee5-3173-4a03-be45-2fe9ea49cdc3 | Ashnod's Altar |
| 11ad664e-36d3-4d5b-8a87-59ea715877e0 | 1 | 366772 | 10276bc4-9640-48e0-9a88-034eee288e9e | Vindictive Vampire |
| c23e5b80-08d2-4e24-9908-fe2aa4f30f6f | 1 | 375999 | 140bf4c1-750d-4e14-b73b-40b17939a49d | Reliquary Tower |
| c650a7bc-e350-44a0-a698-d4a233d66156 | 1 | 368884 | 1796088b-83b5-4151-8dcb-90df21e9a283 | Child of Night |
| c650a7bc-e350-44a0-a698-d4a233d66156 | 1 | 366641 | 1796088b-83b5-4151-8dcb-90df21e9a283 | Child of Night |
| d26b27db-a567-4631-b4b6-7294222fbdd1 | 1 | 372352 | 1a4dd6f8-1baa-4ad2-a377-5beeead6c319 | Howling Mine |
| 10c31317-71e8-42e0-85e0-3e64bd0c3dd3 | 1 | 371526 | 20a961ea-0639-4f5d-8cf4-f909c59a4ae1 | Vat of Rebirth |
| 73089a39-a2f6-4aa2-a058-e6551475153d | 1 | 366547 | 241a25c7-7205-46ee-8b08-845cdcc546bb | Sanguine Bond |
| f7907327-4df3-4bb2-a274-03d9e266af2f | 1 | 384748 | 2763643d-5b53-49d0-bc3d-5626bf00f3f4 | Venser's Journal |
| 82004860-e589-4e38-8d61-8c0210e4ea39 | 1 | 383393 | 3009ba46-c9f8-46dc-8ffc-2aa4cef7b17c | Demonic Tutor |
| 9218b56d-aaec-482f-99e9-d95d227bfe25 | 1 | 384062 | 3bb8347b-8663-40b8-bdfb-411236d2efc8 | Sheoldred, Whispering One |
| 11ad664e-36d3-4d5b-8a87-59ea715877e0 | 1 | 366728 | 3e1474c6-5963-4369-9d43-a978936d9b68 | Vindictive Vampire |
| 2b5c62af-af5f-4beb-9688-19604ca46918 | 1 | 372832 | 3d6e5eb3-25ab-4e9e-96e8-655e0ce74675 | The Cruelty of Gix |
| f916f689-a314-4952-8107-41c4c2f2e811 | 1 | 382624 | 4604a63c-ebe0-420f-968e-3ffc7641ce22 | Pulse Tracker |
| f916f689-a314-4952-8107-41c4c2f2e811 | 1 | 382623 | 4604a63c-ebe0-420f-968e-3ffc7641ce22 | Pulse Tracker |
| aa959340-c869-4caa-92c7-572bd8d23eef | 1 | 373028 | 470ca3f4-29aa-4c4c-8ff2-8cdd70c69943 | Field of the Dead |
| aa76cc50-5be0-4844-b3a4-fb33fca3cdd3 | 1 | 382401 | 48bf0233-1d2e-40cb-9a69-8eeeeb2959ca | Bloodthrone Vampire |
| aa76cc50-5be0-4844-b3a4-fb33fca3cdd3 | 1 | 382400 | 48bf0233-1d2e-40cb-9a69-8eeeeb2959ca | Bloodthrone Vampire |
| aa76cc50-5be0-4844-b3a4-fb33fca3cdd3 | 1 | 382399 | 48bf0233-1d2e-40cb-9a69-8eeeeb2959ca | Bloodthrone Vampire |
| bdb319a6-a1cd-44f5-999d-af1bb55b2fc4 | 1 | 381721 | 4b060bc4-2d0c-46f4-b2b4-21583c2428f2 | Epicure of Blood |
| bdb319a6-a1cd-44f5-999d-af1bb55b2fc4 | 1 | 381720 | 4b060bc4-2d0c-46f4-b2b4-21583c2428f2 | Epicure of Blood |
| bdb319a6-a1cd-44f5-999d-af1bb55b2fc4 | 1 | 381719 | 4b060bc4-2d0c-46f4-b2b4-21583c2428f2 | Epicure of Blood |
| bdb319a6-a1cd-44f5-999d-af1bb55b2fc4 | 1 | 373199 | 4b060bc4-2d0c-46f4-b2b4-21583c2428f2 | Epicure of Blood |
| 352b64d2-2ae5-44ee-a64f-94932ef545d3 | 1 | 372000 | 4eb7707b-e779-4429-b741-5d3b842a50cb | Dread Return |
| 352b64d2-2ae5-44ee-a64f-94932ef545d3 | 1 | 369687 | 4eb7707b-e779-4429-b741-5d3b842a50cb | Dread Return |
| 53f7c868-b03e-4fc2-8dcf-a75bbfa3272b | 1 | 383165 | 4ebcd681-1871-4914-bcd7-6bd95829f6e0 | Dark Ritual |
| 6385fd0d-256d-4400-9319-afa8170024db | 1 | 378614 | 50c33f18-0a5c-4e46-ab0d-6e450915594f | Culling the Weak |
| 6385fd0d-256d-4400-9319-afa8170024db | 1 | 378613 | 50c33f18-0a5c-4e46-ab0d-6e450915594f | Culling the Weak |
| 310f141c-7f37-4729-aed6-dd9c09db448d | 1 | 374217 | 5587191b-b56a-452d-8a18-1622df83c267 | Blood Artist |
| 73089a39-a2f6-4aa2-a058-e6551475153d | 1 | 369983 | 61248b5d-3f4b-4329-a1af-7252443883a0 | Sanguine Bond |
| 9965d9c5-2ebf-4a6c-930e-55c5890979be | 1 | 370052 | 62d4f5fe-d83d-4508-819b-57784ea44fa4 | Thought Vessel |
| e97f9c2b-b41e-4f36-9245-77c0ac125647 | 1 | 384056 | 63870c81-63bf-4a9a-aeb5-74c6eaded9f1 | Bloodghast |
| 14c3ff84-1e82-4606-a433-869fc52cc382 | 1 | 370210 | 685faa53-c0b3-4dbb-abd9-bf09067f6f91 | Syr Konrad, the Grim |
| 310f141c-7f37-4729-aed6-dd9c09db448d | 1 | 374608 | 693dd112-d04a-4404-8fce-74f7e5497312 | Blood Artist |
| c4d7a200-7401-4c9a-a7cf-6c98fa8eb61a | 1 | 372901 | 6f72da0d-f48d-438d-8bc8-23e509a47149 | Drag to the Bottom |
| 6781f8ae-2a86-4e3d-bc43-48809c9d6c26 | 1 | 382742 | 71db3698-a45c-4eaf-87e6-30502c0c10f4 | Gatekeeper of Malakir |
| 457af74a-02b3-4659-846d-63e482667f34 | 1 | 375898 | 7373fe95-ad1c-44b9-8c7f-464ce8cbffc6 | Deadly Dispute |
| 21338b71-37f5-4121-9b84-565025ebcd17 | 1 | 366546 | 779f87b6-b99c-4eb1-a43e-af275b9ef3b1 | Black Market |
| 05d09c55-f551-4cb4-a8d2-4811dccc848d | 1 | 371208 | 7bdbadc3-f93d-4ec8-aa56-3fe235b9a85e | Vraska, Betrayal's Sting |
| 41087db6-34c4-4e2b-9f54-5e4488ca9c0b | 1 | 379820 | 8033de8d-a396-4097-aedd-f9facb800b33 | Blood Seeker |
| 3113afec-d4ae-46b5-9952-89e2e2c9ae7b | 1 | 384701 | 85c60177-8b71-4e24-87e7-395d5e4f93ff | Finale of Eternity |
| 9bcaf141-1f1f-491f-aced-13dc093b9e2c | 1 | 382386 | 85f4d77d-e0de-48fe-899b-5718cee779e2 | Pawn of Ulamog |
| 82004860-e589-4e38-8d61-8c0210e4ea39 | 1 | 383570 | 881e5922-b464-4a1a-b074-664bd6c0a7f6 | Demonic Tutor |
| 82004860-e589-4e38-8d61-8c0210e4ea39 | 1 | 383513 | 881e5922-b464-4a1a-b074-664bd6c0a7f6 | Demonic Tutor |
| e886756a-298d-4f79-8699-8bfc9345352e | 1 | 382115 | 88583170-7b0e-4c02-b270-4859ba05d82b | Barony Vampire |
| e886756a-298d-4f79-8699-8bfc9345352e | 1 | 382114 | 88583170-7b0e-4c02-b270-4859ba05d82b | Barony Vampire |
| 78a48f4e-ba4c-4d8d-938a-9ddb342a885b | 1 | 372933 | 9033cf27-d9e6-49b8-8ee1-c1f38c9680b9 | Junji, the Midnight Sky |
| 9270eb03-4600-40cc-83a5-ea987d5d4978 | 1 | 372314 | 9606de75-c25f-411b-a271-258ac5a60987 | Gix's Command |
| 920445ab-0ac2-4de7-bc1c-f5e58eb4424c | 1 | 384057 | 9c374193-4ebb-4f33-a24d-e567aea57b01 | Sangromancer |
| c23e5b80-08d2-4e24-9908-fe2aa4f30f6f | 1 | 368906 | a02c44e9-fbcd-4924-a641-6dbc55076349 | Reliquary Tower |
| 53f7c868-b03e-4fc2-8dcf-a75bbfa3272b | 1 | 383461 | a6aacc3e-fe37-4a08-83e6-7ee8c0c0af74 | Dark Ritual |
| 53f7c868-b03e-4fc2-8dcf-a75bbfa3272b | 1 | 383458 | a6aacc3e-fe37-4a08-83e6-7ee8c0c0af74 | Dark Ritual |
| 53f7c868-b03e-4fc2-8dcf-a75bbfa3272b | 1 | 378380 | a6aacc3e-fe37-4a08-83e6-7ee8c0c0af74 | Dark Ritual |
| 53f7c868-b03e-4fc2-8dcf-a75bbfa3272b | 1 | 371280 | a6aacc3e-fe37-4a08-83e6-7ee8c0c0af74 | Dark Ritual |
| 63e6cb7d-cc27-4200-85fc-ff6472318c1a | 1 | 366735 | aca50272-f6e3-4e8f-b789-31968c554624 | Massacre Girl |
| 67391f99-739a-490a-ba16-7fa1d758ec34 | 1 | 384059 | aca8d295-e8e9-4213-bc9b-f1acf57fb520 | Drana, Kalastria Bloodchief |
| e886756a-298d-4f79-8699-8bfc9345352e | 1 | 381723 | b0130d04-05f2-44f5-bd6c-8b11f798b69e | Barony Vampire |
| e886756a-298d-4f79-8699-8bfc9345352e | 1 | 381722 | b0130d04-05f2-44f5-bd6c-8b11f798b69e | Barony Vampire |
| e886756a-298d-4f79-8699-8bfc9345352e | 1 | 373324 | b0130d04-05f2-44f5-bd6c-8b11f798b69e | Barony Vampire |
| e886756a-298d-4f79-8699-8bfc9345352e | 1 | 373198 | b0130d04-05f2-44f5-bd6c-8b11f798b69e | Barony Vampire |
| e886756a-298d-4f79-8699-8bfc9345352e | 1 | 373197 | b0130d04-05f2-44f5-bd6c-8b11f798b69e | Barony Vampire |
| fb868840-09fa-49b1-85cb-b08ad065e972 | 1 | 367791 | bdf9661d-b581-4496-9004-f292d9ac03ef | Bitterblossom |
| 63e6cb7d-cc27-4200-85fc-ff6472318c1a | 1 | 384388 | be8ec9e1-2c8e-496d-9111-4d453b75b578 | Massacre Girl |
| 9965d9c5-2ebf-4a6c-930e-55c5890979be | 1 | 372150 | c1968fb1-4c78-40b7-929c-271569ea0cc9 | Thought Vessel |
| c650a7bc-e350-44a0-a698-d4a233d66156 | 1 | 379817 | c4780079-7f4c-4a43-883f-4722423c4fec | Child of Night |
| ccb39f4a-2684-4eb7-9066-aad81ae08962 | 1 | 366564 | cb1c8800-9d33-485c-b776-042003b9ea92 | Massacre Girl, Known Killer |
| 53f7c868-b03e-4fc2-8dcf-a75bbfa3272b | 1 | 370541 | d0a9d3c2-2fa6-41d5-bec8-86c1714ebc1d | Dark Ritual |
| 0ba134d8-ee7d-48ec-8dc6-57942b8e9261 | 1 | 372907 | d12c8c97-6491-452c-811d-943441a7ef9f | Liliana of the Veil |
| 41087db6-34c4-4e2b-9f54-5e4488ca9c0b | 1 | 382753 | d1abc9e8-9ecf-4665-9ea5-ee18ab83c148 | Blood Seeker |
| 2bd111bb-ce02-414c-b5b7-e0e037d8d96b | 1 | 384490 | d2124603-d20e-40eb-97f0-a66323397ac2 | Bolas's Citadel |
| 41087db6-34c4-4e2b-9f54-5e4488ca9c0b | 1 | 382752 | d1abc9e8-9ecf-4665-9ea5-ee18ab83c148 | Blood Seeker |
| 41087db6-34c4-4e2b-9f54-5e4488ca9c0b | 1 | 382740 | d1abc9e8-9ecf-4665-9ea5-ee18ab83c148 | Blood Seeker |
| 41087db6-34c4-4e2b-9f54-5e4488ca9c0b | 1 | 382739 | d1abc9e8-9ecf-4665-9ea5-ee18ab83c148 | Blood Seeker |
| c23e5b80-08d2-4e24-9908-fe2aa4f30f6f | 1 | 381057 | d27b6a46-f9be-437a-a13c-ad8077ac0127 | Reliquary Tower |
| d57a8f0b-7989-4db5-8756-6f2690097252 | 1 | 374430 | d3c0aac5-b9f1-4446-bfea-3e1dd1cf1f2f | Damnation |
| 469956a2-7cd4-4695-b8f4-c841526f160d | 1 | 367323 | d4f6027a-003a-4f9d-929a-0b6da1fa42c9 | Bloodletter of Aclazotz |
| 3aa83ed2-f48b-4ce6-a614-2c54ddf50538 | 1 | 370606 | d5806e68-1054-458e-866d-1f2470f682b2 | The One Ring |
| 1d28ed9a-cc4e-48d9-a1a6-7504fc6cc56d | 1 | 382622 | d6f0220f-6120-433a-b37f-f655f25322c5 | Quag Vampires |
| 1d28ed9a-cc4e-48d9-a1a6-7504fc6cc56d | 1 | 382621 | d6f0220f-6120-433a-b37f-f655f25322c5 | Quag Vampires |
| 9218b56d-aaec-482f-99e9-d95d227bfe25 | 1 | 370940 | dc2234cd-0a1c-4dca-b94b-0dd927bb32e2 | Sheoldred, Whispering One |
| afaef788-34d1-460b-b884-9d7ae6ddeb18 | 1 | 369984 | dc988247-1072-4e47-a656-8c5b1391dfca | Toxic Deluge |