From cd4ce0d3ab2124604bc31b3fb513dead4e88ba63 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 13 Jun 2021 18:35:09 +0100 Subject: [PATCH 01/50] Draft Update Editions' Type and Date w/ Scryfall All Types and Release Date of Forge editions have been updated according to Scryfall oracle database. In more details, Scryfall categories have been remapped so to have the less impact on previous types, whilst allowing for a better and consistent editions grouping. This is still WIP and classes (names and matches) can still be subject to change. --- forge-gui/res/editions/15th Anniversary Cards.txt | 2 +- forge-gui/res/editions/2021 Lunar New Year.txt | 2 +- forge-gui/res/editions/Aether Revolt Promos.txt | 4 ++-- forge-gui/res/editions/Alara Reborn Promos.txt | 2 +- forge-gui/res/editions/Amonkhet Promos.txt | 2 +- forge-gui/res/editions/Anthologies.txt | 4 ++-- forge-gui/res/editions/Antiquities.txt | 2 +- forge-gui/res/editions/Apocalypse Promos.txt | 2 +- forge-gui/res/editions/Arabian Nights.txt | 2 +- forge-gui/res/editions/Archenemy Nicol Bolas.txt | 4 ++-- forge-gui/res/editions/Archenemy.txt | 2 +- forge-gui/res/editions/Arena League 1996.txt | 2 +- forge-gui/res/editions/Arena League 1999.txt | 2 +- forge-gui/res/editions/Arena League 2000.txt | 2 +- forge-gui/res/editions/Arena League 2001.txt | 2 +- forge-gui/res/editions/Arena League 2002.txt | 2 +- forge-gui/res/editions/Arena League 2003.txt | 2 +- forge-gui/res/editions/Arena League 2004.txt | 2 +- forge-gui/res/editions/Arena League 2005.txt | 2 +- forge-gui/res/editions/Arena League 2006.txt | 2 +- forge-gui/res/editions/Arena New Player Experience.txt | 2 +- forge-gui/res/editions/Arena.txt | 6 +++--- forge-gui/res/editions/Asia Pacific Land Program.txt | 2 +- forge-gui/res/editions/Avacyn Restored Promos.txt | 2 +- forge-gui/res/editions/BFZ Standard Series.txt | 2 +- forge-gui/res/editions/Battle Royale.txt | 2 +- forge-gui/res/editions/Battle for Zendikar Promos.txt | 4 ++-- forge-gui/res/editions/Battlebond.txt | 2 +- forge-gui/res/editions/Beatdown.txt | 2 +- forge-gui/res/editions/Betrayers of Kamigawa Promos.txt | 2 +- forge-gui/res/editions/Born of the Gods Promos.txt | 2 +- forge-gui/res/editions/Celebration Cards.txt | 2 +- forge-gui/res/editions/Champions of Kamigawa Promos.txt | 2 +- forge-gui/res/editions/Champs and States.txt | 2 +- forge-gui/res/editions/Chronicles.txt | 2 +- forge-gui/res/editions/Classic Sixth Edition.txt | 2 +- forge-gui/res/editions/Coldsnap Promos.txt | 2 +- forge-gui/res/editions/Coldsnap Theme Decks.txt | 2 +- forge-gui/res/editions/Commander 2013.txt | 2 +- forge-gui/res/editions/Commander 2014.txt | 2 +- forge-gui/res/editions/Commander 2015.txt | 2 +- forge-gui/res/editions/Commander 2016.txt | 2 +- forge-gui/res/editions/Commander 2017.txt | 2 +- forge-gui/res/editions/Commander 2018.txt | 2 +- forge-gui/res/editions/Commander 2019.txt | 2 +- forge-gui/res/editions/Commander 2020.txt | 2 +- forge-gui/res/editions/Commander 2021.txt | 2 +- forge-gui/res/editions/Commander Anthology Vol. II.txt | 2 +- forge-gui/res/editions/Commander Anthology.txt | 2 +- forge-gui/res/editions/Commander Collection Green.txt | 2 +- forge-gui/res/editions/Commander Legends.txt | 4 ++-- forge-gui/res/editions/Commander Theme Decks.txt | 2 +- forge-gui/res/editions/Commander's Arsenal.txt | 1 + forge-gui/res/editions/Commander.txt | 2 +- forge-gui/res/editions/Conflux Promos.txt | 2 +- forge-gui/res/editions/Conspiracy Promos.txt | 2 +- forge-gui/res/editions/Conspiracy Take the Crown.txt | 2 +- forge-gui/res/editions/Conspiracy.txt | 2 +- forge-gui/res/editions/Core Set 2019 Promos.txt | 2 +- forge-gui/res/editions/Core Set 2020 Promos.txt | 4 ++-- forge-gui/res/editions/DCI Legend Membership.txt | 2 +- forge-gui/res/editions/Dark Ascension Promos.txt | 2 +- forge-gui/res/editions/Darksteel Promos.txt | 2 +- forge-gui/res/editions/Deckmasters Garfield vs. Finkel.txt | 4 ++-- forge-gui/res/editions/Dissension Promos.txt | 2 +- forge-gui/res/editions/Dominaria Promos.txt | 2 +- forge-gui/res/editions/Dragon's Maze Promos.txt | 2 +- forge-gui/res/editions/DragonCon 1994.txt | 4 ++-- forge-gui/res/editions/Dragons of Tarkir Promos.txt | 4 ++-- forge-gui/res/editions/Duel Decks Ajani vs. Nicol Bolas.txt | 2 +- .../editions/Duel Decks Anthology Divine vs. Demonic.txt | 2 +- .../res/editions/Duel Decks Anthology Elves vs. Goblins.txt | 2 +- .../editions/Duel Decks Anthology Garruk vs. Liliana.txt | 2 +- .../res/editions/Duel Decks Anthology Jace vs. Chandra.txt | 2 +- forge-gui/res/editions/Duel Decks Blessed vs. Cursed.txt | 2 +- forge-gui/res/editions/Duel Decks Divine vs. Demonic.txt | 2 +- forge-gui/res/editions/Duel Decks Elspeth vs. Kiora.txt | 2 +- forge-gui/res/editions/Duel Decks Elspeth vs. Tezzeret.txt | 2 +- forge-gui/res/editions/Duel Decks Elves vs. Goblins.txt | 2 +- forge-gui/res/editions/Duel Decks Elves vs. Inventors.txt | 2 +- forge-gui/res/editions/Duel Decks Garruk vs. Liliana.txt | 2 +- forge-gui/res/editions/Duel Decks Heroes vs. Monsters.txt | 2 +- forge-gui/res/editions/Duel Decks Izzet vs. Golgari.txt | 2 +- forge-gui/res/editions/Duel Decks Jace vs. Chandra.txt | 2 +- forge-gui/res/editions/Duel Decks Jace vs. Vraska.txt | 2 +- forge-gui/res/editions/Duel Decks Knights vs. Dragons.txt | 2 +- forge-gui/res/editions/Duel Decks Merfolk vs. Goblins.txt | 4 ++-- forge-gui/res/editions/Duel Decks Mind vs. Might.txt | 2 +- .../editions/Duel Decks Mirrodin Pure vs. New Phyrexia.txt | 4 ++-- forge-gui/res/editions/Duel Decks Nissa vs. Ob Nixilis.txt | 2 +- .../res/editions/Duel Decks Phyrexia vs. the Coalition.txt | 2 +- forge-gui/res/editions/Duel Decks Sorin vs. Tibalt.txt | 2 +- forge-gui/res/editions/Duel Decks Speed vs. Cunning.txt | 2 +- forge-gui/res/editions/Duel Decks Venser vs. Koth.txt | 2 +- forge-gui/res/editions/Duel Decks Zendikar vs. Eldrazi.txt | 2 +- .../res/editions/Duels of the Planeswalkers 2009 Promos.txt | 2 +- .../res/editions/Duels of the Planeswalkers 2010 Promos.txt | 2 +- .../res/editions/Duels of the Planeswalkers 2012 Promos.txt | 2 +- .../res/editions/Duels of the Planeswalkers 2013 Promos.txt | 2 +- .../res/editions/Duels of the Planeswalkers 2014 Promos.txt | 2 +- .../res/editions/Duels of the Planeswalkers 2015 Promos.txt | 2 +- forge-gui/res/editions/Duels of the Planeswalkers.txt | 2 +- forge-gui/res/editions/Eighth Edition Promos.txt | 2 +- forge-gui/res/editions/Eldritch Moon Promos.txt | 2 +- forge-gui/res/editions/European Land Program.txt | 2 +- forge-gui/res/editions/Eventide Promos.txt | 2 +- forge-gui/res/editions/Exodus Promos.txt | 2 +- forge-gui/res/editions/Explorers of Ixalan.txt | 2 +- forge-gui/res/editions/Fate Reforged Clash Pack.txt | 2 +- forge-gui/res/editions/Fate Reforged Promos.txt | 4 ++-- forge-gui/res/editions/Fifth Dawn Promos.txt | 2 +- forge-gui/res/editions/Final Sacrifice.txt | 6 +++--- forge-gui/res/editions/Friday Night Magic 2000.txt | 2 +- forge-gui/res/editions/Friday Night Magic 2001.txt | 2 +- forge-gui/res/editions/Friday Night Magic 2002.txt | 2 +- forge-gui/res/editions/Friday Night Magic 2003.txt | 2 +- forge-gui/res/editions/Friday Night Magic 2004.txt | 2 +- forge-gui/res/editions/Friday Night Magic 2005.txt | 2 +- forge-gui/res/editions/Friday Night Magic 2006.txt | 2 +- forge-gui/res/editions/Friday Night Magic 2007.txt | 2 +- forge-gui/res/editions/Friday Night Magic 2008.txt | 2 +- forge-gui/res/editions/Friday Night Magic 2009.txt | 2 +- forge-gui/res/editions/Friday Night Magic 2010.txt | 2 +- forge-gui/res/editions/Friday Night Magic 2011.txt | 2 +- forge-gui/res/editions/Friday Night Magic 2012.txt | 2 +- forge-gui/res/editions/Friday Night Magic 2013.txt | 2 +- forge-gui/res/editions/Friday Night Magic 2014.txt | 2 +- forge-gui/res/editions/Friday Night Magic 2015.txt | 2 +- forge-gui/res/editions/Friday Night Magic 2016.txt | 2 +- forge-gui/res/editions/Friday Night Magic 2017.txt | 2 +- forge-gui/res/editions/From the Vault Angels.txt | 2 +- forge-gui/res/editions/From the Vault Annihilation.txt | 2 +- forge-gui/res/editions/From the Vault Dragons.txt | 2 +- forge-gui/res/editions/From the Vault Exiled.txt | 2 +- forge-gui/res/editions/From the Vault Legends.txt | 2 +- forge-gui/res/editions/From the Vault Lore.txt | 2 +- forge-gui/res/editions/From the Vault Realms.txt | 2 +- forge-gui/res/editions/From the Vault Relics.txt | 2 +- forge-gui/res/editions/From the Vault Transform.txt | 2 +- forge-gui/res/editions/From the Vault Twenty.txt | 2 +- forge-gui/res/editions/Future Sight Promos.txt | 2 +- forge-gui/res/editions/GRN Ravnica Weekend.txt | 2 +- forge-gui/res/editions/Game Night 2019.txt | 2 +- forge-gui/res/editions/Game Night.txt | 2 +- forge-gui/res/editions/Gatecrash Promos.txt | 2 +- forge-gui/res/editions/Gateway 2006.txt | 2 +- forge-gui/res/editions/Gateway 2007.txt | 2 +- forge-gui/res/editions/Gateway 2008.txt | 2 +- .../editions/Global Series Jiang Yanggu & Mu Yanling.txt | 2 +- forge-gui/res/editions/Grand Prix Promos.txt | 2 +- forge-gui/res/editions/Guildpact Promos.txt | 2 +- forge-gui/res/editions/Guilds of Ravnica Guild Kit.txt | 2 +- forge-gui/res/editions/Guilds of Ravnica Promos.txt | 2 +- forge-gui/res/editions/Guru.txt | 2 +- forge-gui/res/editions/Hobby Japan Promos.txt | 4 ++-- forge-gui/res/editions/Hour of Devastation Promos.txt | 2 +- forge-gui/res/editions/IDW Comics 2012.txt | 2 +- forge-gui/res/editions/IDW Comics 2013.txt | 2 +- forge-gui/res/editions/IDW Comics 2014.txt | 2 +- forge-gui/res/editions/Ice Age.txt | 2 +- forge-gui/res/editions/Innistrad Promos.txt | 4 ++-- forge-gui/res/editions/Invasion Promos.txt | 2 +- forge-gui/res/editions/Ixalan Promos.txt | 2 +- forge-gui/res/editions/Japan Junior Tournament.txt | 2 +- forge-gui/res/editions/Journey into Nyx Promos.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 1998.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 1999.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2000.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2001.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2002.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2004.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2005.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2006.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2007.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2008.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2009.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2010.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2011.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2012.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2013.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2014.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2015.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2016.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2017.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2018.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2019.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2020.txt | 2 +- forge-gui/res/editions/Judge Gift Cards 2021.txt | 2 +- forge-gui/res/editions/Judge_Gift_Cards_2003.txt | 2 +- forge-gui/res/editions/Judgment Promos.txt | 2 +- forge-gui/res/editions/Jumpstart.txt | 2 +- forge-gui/res/editions/Junior APAC Series.txt | 2 +- forge-gui/res/editions/Junior Series Europe.txt | 2 +- forge-gui/res/editions/Junior Super Series.txt | 2 +- forge-gui/res/editions/Kaladesh Promos.txt | 4 ++-- forge-gui/res/editions/Kaldheim Commander.txt | 2 +- forge-gui/res/editions/Khans of Tarkir Promos.txt | 4 ++-- forge-gui/res/editions/Legacy Championship.txt | 2 +- forge-gui/res/editions/Legions Promos.txt | 2 +- forge-gui/res/editions/Limited Edition Beta.txt | 2 +- forge-gui/res/editions/Lorwyn Promos.txt | 4 ++-- forge-gui/res/editions/Love Your LGS.txt | 2 +- forge-gui/res/editions/M15_Prerelease_Challenge.txt | 2 +- forge-gui/res/editions/M19 Gift Pack.txt | 2 +- forge-gui/res/editions/M19 Standard Showdown.txt | 2 +- forge-gui/res/editions/M20 Promo Packs.txt | 2 +- forge-gui/res/editions/Magazine Inserts.txt | 2 +- forge-gui/res/editions/Magic 2010 Promos.txt | 2 +- forge-gui/res/editions/Magic 2011 Promos.txt | 2 +- forge-gui/res/editions/Magic 2012 Promos.txt | 4 ++-- forge-gui/res/editions/Magic 2013 Promos.txt | 2 +- forge-gui/res/editions/Magic 2014 Promos.txt | 2 +- forge-gui/res/editions/Magic 2015 Clash Pack.txt | 2 +- forge-gui/res/editions/Magic 2015 Promos.txt | 2 +- forge-gui/res/editions/Magic 2021.txt | 2 +- forge-gui/res/editions/Magic Online Deck Series.txt | 2 +- forge-gui/res/editions/Magic Origins Clash Pack.txt | 2 +- forge-gui/res/editions/Magic Origins Promos.txt | 2 +- forge-gui/res/editions/Magic Player Rewards 2001.txt | 2 +- forge-gui/res/editions/Magic Player Rewards 2003.txt | 2 +- forge-gui/res/editions/Magic Player Rewards 2004.txt | 2 +- forge-gui/res/editions/Magic Player Rewards 2005.txt | 2 +- forge-gui/res/editions/Magic Player Rewards 2006.txt | 2 +- forge-gui/res/editions/Magic Player Rewards 2007.txt | 2 +- forge-gui/res/editions/Magic Player Rewards 2008.txt | 2 +- forge-gui/res/editions/Magic Player Rewards 2009.txt | 2 +- forge-gui/res/editions/Magic Player Rewards 2010.txt | 2 +- forge-gui/res/editions/Magic Player Rewards 2011.txt | 2 +- forge-gui/res/editions/Magic Premiere Shop 2005.txt | 2 +- forge-gui/res/editions/Magic Premiere Shop 2006.txt | 2 +- forge-gui/res/editions/Magic Premiere Shop 2007.txt | 2 +- forge-gui/res/editions/Magic Premiere Shop 2008.txt | 2 +- forge-gui/res/editions/Magic Premiere Shop 2009.txt | 2 +- forge-gui/res/editions/Magic Premiere Shop 2010.txt | 2 +- forge-gui/res/editions/Magic Premiere Shop 2011.txt | 2 +- forge-gui/res/editions/MagicFest 2019.txt | 2 +- forge-gui/res/editions/MagicFest 2020.txt | 2 +- forge-gui/res/editions/Masterpiece Series - Amonkhet.txt | 2 +- forge-gui/res/editions/Masterpiece Series - Kaladesh.txt | 2 +- forge-gui/res/editions/Masters Edition.txt | 2 +- forge-gui/res/editions/Mercadian Masques Promos.txt | 2 +- forge-gui/res/editions/Mirrodin Besieged Promos.txt | 2 +- forge-gui/res/editions/Mirrodin Promos.txt | 2 +- forge-gui/res/editions/Miscellaneous Book Promos.txt | 2 +- forge-gui/res/editions/Modern Event Deck.txt | 2 +- forge-gui/res/editions/Modern Horizons 1 Timeshifts.txt | 2 +- forge-gui/res/editions/Modern Horizons 2.txt | 2 +- forge-gui/res/editions/Modern Horizons Promos.txt | 2 +- forge-gui/res/editions/Modern Horizons.txt | 2 +- forge-gui/res/editions/Morningtide Promos.txt | 2 +- .../res/editions/Mystery Booster Retail Edition Foils.txt | 2 +- .../res/editions/Mythic Edition - Guilds of Ravnica.txt | 6 +++--- .../res/editions/Mythic Edition - Ravnica Allegiance.txt | 4 ++-- .../res/editions/Mythic Edition - War of the Spark.txt | 4 ++-- forge-gui/res/editions/Nationals Promos.txt | 2 +- forge-gui/res/editions/Nemesis Promos.txt | 2 +- forge-gui/res/editions/New Phyrexia Promos.txt | 2 +- forge-gui/res/editions/Ninth Edition Promos.txt | 2 +- forge-gui/res/editions/Oath of the Gatewatch Promos.txt | 4 ++-- forge-gui/res/editions/Odyssey Promos.txt | 2 +- forge-gui/res/editions/Online Promos.txt | 2 +- forge-gui/res/editions/Onslaught Promos.txt | 2 +- forge-gui/res/editions/Open the Helvault.txt | 2 +- forge-gui/res/editions/Planar Chaos Promos.txt | 2 +- forge-gui/res/editions/Planechase 2012.txt | 2 +- forge-gui/res/editions/Planechase Anthology.txt | 2 +- forge-gui/res/editions/Planechase.txt | 2 +- forge-gui/res/editions/Planeshift Promos.txt | 2 +- forge-gui/res/editions/Portal Second Age.txt | 2 +- forge-gui/res/editions/Portal Three Kingdoms Promos.txt | 2 +- forge-gui/res/editions/Portal Three Kingdoms.txt | 2 +- forge-gui/res/editions/Portal.txt | 2 +- .../res/editions/Premium Deck Series Fire and Lightning.txt | 2 +- forge-gui/res/editions/Premium Deck Series Graveborn.txt | 2 +- forge-gui/res/editions/Premium Deck Series Slivers.txt | 2 +- forge-gui/res/editions/Pro Tour Promos.txt | 2 +- forge-gui/res/editions/Promo set for Gatherer.txt | 4 ++-- forge-gui/res/editions/Prophecy Promos.txt | 2 +- forge-gui/res/editions/RNA Ravnica Weekend.txt | 2 +- forge-gui/res/editions/Ravnica Allegiance Guild Kit.txt | 2 +- forge-gui/res/editions/Ravnica_Allegiance_Promos.txt | 2 +- forge-gui/res/editions/Ravnica_City_of_Guilds_Promos.txt | 2 +- forge-gui/res/editions/Redemption_Program.txt | 2 +- forge-gui/res/editions/Resale Promos.txt | 2 +- forge-gui/res/editions/Return to Ravnica Promos.txt | 2 +- forge-gui/res/editions/Rise of the Eldrazi Promos.txt | 2 +- forge-gui/res/editions/Rivals_of_Ixalan_Promos.txt | 2 +- forge-gui/res/editions/San Diego Comic Con 2013.txt | 2 +- forge-gui/res/editions/San Diego Comic Con 2014.txt | 2 +- forge-gui/res/editions/San Diego Comic Con 2015.txt | 2 +- forge-gui/res/editions/San Diego Comic Con 2016.txt | 4 ++-- forge-gui/res/editions/San Diego Comic Con 2017.txt | 2 +- forge-gui/res/editions/San Diego Comic Con 2018.txt | 2 +- forge-gui/res/editions/San Diego Comic Con 2019.txt | 2 +- forge-gui/res/editions/Saviors of Kamigawa Promos.txt | 2 +- forge-gui/res/editions/Scars of Mirrodin Promos.txt | 2 +- forge-gui/res/editions/Scourge Promos.txt | 2 +- forge-gui/res/editions/Secret Lair Drop Series.txt | 2 +- forge-gui/res/editions/Shadowmoor Promos.txt | 2 +- forge-gui/res/editions/Shadows over Innistrad Promos.txt | 4 ++-- forge-gui/res/editions/Shards of Alara Promos.txt | 4 ++-- forge-gui/res/editions/Shattered Chains.txt | 6 +++--- forge-gui/res/editions/Signature Spellbook Chandra.txt | 2 +- forge-gui/res/editions/Signature Spellbook Gideon.txt | 2 +- forge-gui/res/editions/Signature Spellbook Jace.txt | 2 +- forge-gui/res/editions/Starter 1999.txt | 2 +- forge-gui/res/editions/Starter 2000.txt | 2 +- forge-gui/res/editions/Strixhaven Mystical Archive.txt | 2 +- forge-gui/res/editions/Stronghold Promos.txt | 2 +- forge-gui/res/editions/Summer of Magic.txt | 4 ++-- forge-gui/res/editions/Tarkir Dragonfury.txt | 2 +- forge-gui/res/editions/Tempest Promos.txt | 2 +- forge-gui/res/editions/Tenth Edition Promos.txt | 2 +- forge-gui/res/editions/Tenth Edition.txt | 2 +- forge-gui/res/editions/Theros Promos.txt | 2 +- forge-gui/res/editions/Time Spiral Promos.txt | 2 +- forge-gui/res/editions/Time Spiral Timeshifted.txt | 2 +- forge-gui/res/editions/Torment Promos.txt | 2 +- forge-gui/res/editions/Two-Headed Giant Tournament.txt | 2 +- forge-gui/res/editions/URL Convention Promos.txt | 2 +- forge-gui/res/editions/Ugin's Fate.txt | 4 ++-- forge-gui/res/editions/Ultimate Box Topper.txt | 2 +- forge-gui/res/editions/Unhinged.txt | 2 +- forge-gui/res/editions/Unstable Promos.txt | 4 ++-- forge-gui/res/editions/Urza's Destiny Promos.txt | 2 +- forge-gui/res/editions/Urza's Legacy Promos.txt | 2 +- forge-gui/res/editions/Urza's Saga Promos.txt | 4 ++-- forge-gui/res/editions/Vintage Championship.txt | 2 +- forge-gui/res/editions/War of the Spark Promos.txt | 4 ++-- forge-gui/res/editions/Welcome Deck 2016.txt | 4 ++-- forge-gui/res/editions/Welcome Deck 2017.txt | 2 +- forge-gui/res/editions/Whispering Woods.txt | 6 +++--- forge-gui/res/editions/Wizards Play Network 2008.txt | 2 +- forge-gui/res/editions/Wizards Play Network 2009.txt | 2 +- forge-gui/res/editions/Wizards Play Network 2010.txt | 2 +- forge-gui/res/editions/Wizards Play Network 2011.txt | 2 +- forge-gui/res/editions/Wizards Play Network 2012.txt | 2 +- forge-gui/res/editions/Wizards Play Network 2021.txt | 2 +- .../res/editions/Wizards of the Coast Online Store.txt | 2 +- forge-gui/res/editions/World Championship Promos.txt | 2 +- forge-gui/res/editions/World Magic Cup Qualifiers.txt | 2 +- forge-gui/res/editions/Worldwake Promos.txt | 4 ++-- forge-gui/res/editions/XLN Standard Showdown.txt | 2 +- forge-gui/res/editions/XLN Treasure Chest.txt | 2 +- forge-gui/res/editions/Zendikar Expeditions.txt | 2 +- forge-gui/res/editions/Zendikar Promos.txt | 2 +- forge-gui/res/editions/Zendikar Rising Commander.txt | 2 +- forge-gui/res/editions/Zendikar Rising Expeditions.txt | 2 +- 348 files changed, 390 insertions(+), 389 deletions(-) diff --git a/forge-gui/res/editions/15th Anniversary Cards.txt b/forge-gui/res/editions/15th Anniversary Cards.txt index ee172bfb76b..b420193fd95 100644 --- a/forge-gui/res/editions/15th Anniversary Cards.txt +++ b/forge-gui/res/editions/15th Anniversary Cards.txt @@ -2,7 +2,7 @@ Code=P15A Date=2008-04-01 Name=15th Anniversary Cards -Type=Promos +Type=Promo ScryfallCode=P15A [cards] diff --git a/forge-gui/res/editions/2021 Lunar New Year.txt b/forge-gui/res/editions/2021 Lunar New Year.txt index 5173d415190..2569019bc78 100644 --- a/forge-gui/res/editions/2021 Lunar New Year.txt +++ b/forge-gui/res/editions/2021 Lunar New Year.txt @@ -2,7 +2,7 @@ Code=PL21 Date=2021-01-25 Name=2021 Lunar New Year -Type=Reprint +Type=Promo ScryfallCode=PL21 [cards] diff --git a/forge-gui/res/editions/Aether Revolt Promos.txt b/forge-gui/res/editions/Aether Revolt Promos.txt index 7ae191c34be..718e24f0372 100644 --- a/forge-gui/res/editions/Aether Revolt Promos.txt +++ b/forge-gui/res/editions/Aether Revolt Promos.txt @@ -1,8 +1,8 @@ [metadata] Code=PAER -Date=2017-01-21 +Date=2017-01-20 Name=Aether Revolt Promos -Type=Promos +Type=Promo ScryfallCode=PAER [cards] diff --git a/forge-gui/res/editions/Alara Reborn Promos.txt b/forge-gui/res/editions/Alara Reborn Promos.txt index 94919f61ca2..6229586d082 100644 --- a/forge-gui/res/editions/Alara Reborn Promos.txt +++ b/forge-gui/res/editions/Alara Reborn Promos.txt @@ -2,7 +2,7 @@ Code=PARB Date=2009-04-30 Name=Alara Reborn Promos -Type=Promos +Type=Promo ScryfallCode=PARB [cards] diff --git a/forge-gui/res/editions/Amonkhet Promos.txt b/forge-gui/res/editions/Amonkhet Promos.txt index 851c3c21297..24d8d8115d4 100644 --- a/forge-gui/res/editions/Amonkhet Promos.txt +++ b/forge-gui/res/editions/Amonkhet Promos.txt @@ -2,7 +2,7 @@ Code=PAKH Date=2017-04-28 Name=Amonkhet Promos -Type=Promos +Type=Promo ScryfallCode=PAKH [cards] diff --git a/forge-gui/res/editions/Anthologies.txt b/forge-gui/res/editions/Anthologies.txt index 794d305d223..a15751e1696 100644 --- a/forge-gui/res/editions/Anthologies.txt +++ b/forge-gui/res/editions/Anthologies.txt @@ -1,9 +1,9 @@ [metadata] Code=ATH MciCode=at -Date=1998-11 +Date=1998-11-01 Name=Anthologies -Type=Other +Type=Reprint Border=White Foil=NotSupported ScryfallCode=ATH diff --git a/forge-gui/res/editions/Antiquities.txt b/forge-gui/res/editions/Antiquities.txt index 6b50ad5e391..fb25dd4c61d 100644 --- a/forge-gui/res/editions/Antiquities.txt +++ b/forge-gui/res/editions/Antiquities.txt @@ -1,6 +1,6 @@ [metadata] Code=ATQ -Date=1994-03-01 +Date=1994-03-04 Name=Antiquities Code2=AQ MciCode=aq diff --git a/forge-gui/res/editions/Apocalypse Promos.txt b/forge-gui/res/editions/Apocalypse Promos.txt index 582b172e36e..cb0963fbbe2 100644 --- a/forge-gui/res/editions/Apocalypse Promos.txt +++ b/forge-gui/res/editions/Apocalypse Promos.txt @@ -2,7 +2,7 @@ Code=PAPC Date=2001-06-04 Name=Apocalypse Promos -Type=Promos +Type=Promo CardLang=sa ScryfallCode=PAPC diff --git a/forge-gui/res/editions/Arabian Nights.txt b/forge-gui/res/editions/Arabian Nights.txt index 713c4729e02..f6c0cdad0f0 100644 --- a/forge-gui/res/editions/Arabian Nights.txt +++ b/forge-gui/res/editions/Arabian Nights.txt @@ -1,6 +1,6 @@ [metadata] Code=ARN -Date=1993-12-21 +Date=1993-12-17 Name=Arabian Nights Code2=AN MciCode=an diff --git a/forge-gui/res/editions/Archenemy Nicol Bolas.txt b/forge-gui/res/editions/Archenemy Nicol Bolas.txt index 57155c3a639..012491c5f8b 100644 --- a/forge-gui/res/editions/Archenemy Nicol Bolas.txt +++ b/forge-gui/res/editions/Archenemy Nicol Bolas.txt @@ -1,10 +1,10 @@ [metadata] Code=E01 -Date=2017-06-17 +Date=2017-06-16 Name=Archenemy: Nicol Bolas Code2=E01 MciCode=E01 -Type=Other +Type=Commander ScryfallCode=E01 [cards] diff --git a/forge-gui/res/editions/Archenemy.txt b/forge-gui/res/editions/Archenemy.txt index a193aa59f7e..c0ecdda69af 100644 --- a/forge-gui/res/editions/Archenemy.txt +++ b/forge-gui/res/editions/Archenemy.txt @@ -4,7 +4,7 @@ Date=2010-06-18 Name=Archenemy Code2=ARC MciCode=arc -Type=Other +Type=Commander ScryfallCode=ARC [cards] diff --git a/forge-gui/res/editions/Arena League 1996.txt b/forge-gui/res/editions/Arena League 1996.txt index fd8576e0a36..fe44fb988de 100644 --- a/forge-gui/res/editions/Arena League 1996.txt +++ b/forge-gui/res/editions/Arena League 1996.txt @@ -2,7 +2,7 @@ Code=PARL Date=1996-08-02 Name=Arena League 1996 -Type=Promos +Type=Promo ScryfallCode=PARL [cards] diff --git a/forge-gui/res/editions/Arena League 1999.txt b/forge-gui/res/editions/Arena League 1999.txt index 510f1a43078..d5b6fcafa76 100644 --- a/forge-gui/res/editions/Arena League 1999.txt +++ b/forge-gui/res/editions/Arena League 1999.txt @@ -2,7 +2,7 @@ Code=PAL99 Date=1999-01-01 Name=Arena League 1999 -Type=Promos +Type=Promo ScryfallCode=PAL99 [cards] diff --git a/forge-gui/res/editions/Arena League 2000.txt b/forge-gui/res/editions/Arena League 2000.txt index 387ba497255..9908da2bd30 100644 --- a/forge-gui/res/editions/Arena League 2000.txt +++ b/forge-gui/res/editions/Arena League 2000.txt @@ -2,7 +2,7 @@ Code=PAL00 Date=2000-01-01 Name=Arena League 2000 -Type=Promos +Type=Promo ScryfallCode=PAL00 [cards] diff --git a/forge-gui/res/editions/Arena League 2001.txt b/forge-gui/res/editions/Arena League 2001.txt index 6f18d818c7a..8f8eff1d5d8 100644 --- a/forge-gui/res/editions/Arena League 2001.txt +++ b/forge-gui/res/editions/Arena League 2001.txt @@ -2,7 +2,7 @@ Code=PAL01 Date=2001-01-01 Name=Arena League 2001 -Type=Promos +Type=Promo ScryfallCode=PAL01 [cards] diff --git a/forge-gui/res/editions/Arena League 2002.txt b/forge-gui/res/editions/Arena League 2002.txt index 3729b028918..581d4f6f5ad 100644 --- a/forge-gui/res/editions/Arena League 2002.txt +++ b/forge-gui/res/editions/Arena League 2002.txt @@ -2,7 +2,7 @@ Code=PAL02 Date=2002-01-01 Name=Arena League 2002 -Type=Promos +Type=Promo ScryfallCode=PAL02 [cards] diff --git a/forge-gui/res/editions/Arena League 2003.txt b/forge-gui/res/editions/Arena League 2003.txt index 6afd394f1ef..cc9419eff86 100644 --- a/forge-gui/res/editions/Arena League 2003.txt +++ b/forge-gui/res/editions/Arena League 2003.txt @@ -2,7 +2,7 @@ Code=PAL03 Date=2003-01-01 Name=Arena League 2003 -Type=Promos +Type=Promo ScryfallCode=PAL03 [cards] diff --git a/forge-gui/res/editions/Arena League 2004.txt b/forge-gui/res/editions/Arena League 2004.txt index 5d0640e278d..4bdafbd9cf4 100644 --- a/forge-gui/res/editions/Arena League 2004.txt +++ b/forge-gui/res/editions/Arena League 2004.txt @@ -2,7 +2,7 @@ Code=PAL04 Date=2004-01-01 Name=Arena League 2004 -Type=Promos +Type=Promo ScryfallCode=PAL04 [cards] diff --git a/forge-gui/res/editions/Arena League 2005.txt b/forge-gui/res/editions/Arena League 2005.txt index 4abd7c4e042..3f364de220d 100644 --- a/forge-gui/res/editions/Arena League 2005.txt +++ b/forge-gui/res/editions/Arena League 2005.txt @@ -2,7 +2,7 @@ Code=PAL05 Date=2005-01-01 Name=Arena League 2005 -Type=Promos +Type=Promo ScryfallCode=PAL05 [cards] diff --git a/forge-gui/res/editions/Arena League 2006.txt b/forge-gui/res/editions/Arena League 2006.txt index a9d4534950b..d50b39dc261 100644 --- a/forge-gui/res/editions/Arena League 2006.txt +++ b/forge-gui/res/editions/Arena League 2006.txt @@ -2,7 +2,7 @@ Code=PAL06 Date=2006-01-01 Name=Arena League 2006 -Type=Promos +Type=Promo ScryfallCode=PAL06 [cards] diff --git a/forge-gui/res/editions/Arena New Player Experience.txt b/forge-gui/res/editions/Arena New Player Experience.txt index 16108f6297e..83138f593af 100644 --- a/forge-gui/res/editions/Arena New Player Experience.txt +++ b/forge-gui/res/editions/Arena New Player Experience.txt @@ -1,6 +1,6 @@ [metadata] Code=ANA -Date=2018-07-12 +Date=2018-07-14 Name=Arena New Player Experience Type=Online ScryfallCode=ANA diff --git a/forge-gui/res/editions/Arena.txt b/forge-gui/res/editions/Arena.txt index f1c2e9eefa2..2dc6fa6e2d8 100644 --- a/forge-gui/res/editions/Arena.txt +++ b/forge-gui/res/editions/Arena.txt @@ -1,10 +1,10 @@ [metadata] Code=ARENA -Date=1994-09-26 +Date=1994-09-01 Name=Arena -Type=Other +Type=Promo ScryfallCode=PHPR [cards] 1 C Arena -2 C Sewers of Estark \ No newline at end of file +2 C Sewers of Estark diff --git a/forge-gui/res/editions/Asia Pacific Land Program.txt b/forge-gui/res/editions/Asia Pacific Land Program.txt index dafac8941c7..85652a2ea9c 100644 --- a/forge-gui/res/editions/Asia Pacific Land Program.txt +++ b/forge-gui/res/editions/Asia Pacific Land Program.txt @@ -2,7 +2,7 @@ Code=PALP Date=1998-09-01 Name=Asia Pacific Land Program -Type=Promos +Type=Promo ScryfallCode=PALP [cards] diff --git a/forge-gui/res/editions/Avacyn Restored Promos.txt b/forge-gui/res/editions/Avacyn Restored Promos.txt index 5f60215e8b8..e8bf8e427ee 100644 --- a/forge-gui/res/editions/Avacyn Restored Promos.txt +++ b/forge-gui/res/editions/Avacyn Restored Promos.txt @@ -2,7 +2,7 @@ Code=PAVR Date=2012-04-28 Name=Avacyn Restored Promos -Type=Promos +Type=Promo ScryfallCode=PAVR [cards] diff --git a/forge-gui/res/editions/BFZ Standard Series.txt b/forge-gui/res/editions/BFZ Standard Series.txt index 90fae7fed33..f69f0109e88 100644 --- a/forge-gui/res/editions/BFZ Standard Series.txt +++ b/forge-gui/res/editions/BFZ Standard Series.txt @@ -2,7 +2,7 @@ Code=PSS1 Date=2015-10-02 Name=BFZ Standard Series -Type=Reprint +Type=Promo ScryfallCode=PSS1 [cards] diff --git a/forge-gui/res/editions/Battle Royale.txt b/forge-gui/res/editions/Battle Royale.txt index 8e1e4e3333f..d1ccac44cc5 100644 --- a/forge-gui/res/editions/Battle Royale.txt +++ b/forge-gui/res/editions/Battle Royale.txt @@ -3,7 +3,7 @@ Code=BRB Date=1999-11-12 Name=Battle Royale MciCode=br -Type=Other +Type=Reprint Border=White Foil=NotSupported ScryfallCode=BRB diff --git a/forge-gui/res/editions/Battle for Zendikar Promos.txt b/forge-gui/res/editions/Battle for Zendikar Promos.txt index de589e9ddfb..6a1d1f7bb01 100644 --- a/forge-gui/res/editions/Battle for Zendikar Promos.txt +++ b/forge-gui/res/editions/Battle for Zendikar Promos.txt @@ -1,8 +1,8 @@ [metadata] Code=PBFZ -Date=2015-10-03 +Date=2015-10-02 Name=Battle for Zendikar Promos -Type=Promos +Type=Promo ScryfallCode=PBFZ [cards] diff --git a/forge-gui/res/editions/Battlebond.txt b/forge-gui/res/editions/Battlebond.txt index fa3c597c949..4c207507459 100644 --- a/forge-gui/res/editions/Battlebond.txt +++ b/forge-gui/res/editions/Battlebond.txt @@ -3,7 +3,7 @@ Code=BBD Date=2018-06-08 Name=Battlebond MciCode=bbd -Type=Other +Type=Draft_Innovation BoosterCovers=3 Booster=10 Common, 3 Uncommon, 1 fromSheet("BBD RareMythic"), 1 BasicLand ScryfallCode=BBD diff --git a/forge-gui/res/editions/Beatdown.txt b/forge-gui/res/editions/Beatdown.txt index 1bffcf2b214..ffb208efa2b 100644 --- a/forge-gui/res/editions/Beatdown.txt +++ b/forge-gui/res/editions/Beatdown.txt @@ -3,7 +3,7 @@ Code=BTD Date=2000-10-01 Name=Beatdown MciCode=bd -Type=Other +Type=Reprint Border=White Foil=NotSupported ScryfallCode=BTD diff --git a/forge-gui/res/editions/Betrayers of Kamigawa Promos.txt b/forge-gui/res/editions/Betrayers of Kamigawa Promos.txt index cd68deb59ed..60f83578eb2 100644 --- a/forge-gui/res/editions/Betrayers of Kamigawa Promos.txt +++ b/forge-gui/res/editions/Betrayers of Kamigawa Promos.txt @@ -2,7 +2,7 @@ Code=PBOK Date=2005-02-04 Name=Betrayers of Kamigawa Promos -Type=Promos +Type=Promo ScryfallCode=PBOK [cards] diff --git a/forge-gui/res/editions/Born of the Gods Promos.txt b/forge-gui/res/editions/Born of the Gods Promos.txt index 43dffec63e8..e82a90cf5d5 100644 --- a/forge-gui/res/editions/Born of the Gods Promos.txt +++ b/forge-gui/res/editions/Born of the Gods Promos.txt @@ -2,7 +2,7 @@ Code=PBNG Date=2014-02-01 Name=Born of the Gods Promos -Type=Promos +Type=Promo ScryfallCode=PBNG [cards] diff --git a/forge-gui/res/editions/Celebration Cards.txt b/forge-gui/res/editions/Celebration Cards.txt index 3bb5b3dab10..395b2ea9c59 100644 --- a/forge-gui/res/editions/Celebration Cards.txt +++ b/forge-gui/res/editions/Celebration Cards.txt @@ -2,7 +2,7 @@ Code=PCEL Date=1996-08-14 Name=Celebration Cards -Type=Funny +Type=Promo ScryfallCode=PCEL [cards] diff --git a/forge-gui/res/editions/Champions of Kamigawa Promos.txt b/forge-gui/res/editions/Champions of Kamigawa Promos.txt index 991f9eaeaf1..295feab86a9 100644 --- a/forge-gui/res/editions/Champions of Kamigawa Promos.txt +++ b/forge-gui/res/editions/Champions of Kamigawa Promos.txt @@ -2,7 +2,7 @@ Code=PCHK Date=2004-10-01 Name=Champions of Kamigawa Promos -Type=Promos +Type=Promo ScryfallCode=PCHK [cards] diff --git a/forge-gui/res/editions/Champs and States.txt b/forge-gui/res/editions/Champs and States.txt index 3a06b5846bc..761d4f716c9 100644 --- a/forge-gui/res/editions/Champs and States.txt +++ b/forge-gui/res/editions/Champs and States.txt @@ -2,7 +2,7 @@ Code=PCMP Date=2006-03-18 Name=Champs and States -Type=Promos +Type=Promo ScryfallCode=PCMP [cards] diff --git a/forge-gui/res/editions/Chronicles.txt b/forge-gui/res/editions/Chronicles.txt index 9e30fa50e0f..2ea3b362f0b 100644 --- a/forge-gui/res/editions/Chronicles.txt +++ b/forge-gui/res/editions/Chronicles.txt @@ -1,6 +1,6 @@ [metadata] Code=CHR -Date=1995-07 +Date=1995-07-01 Name=Chronicles Code2=CH MciCode=ch diff --git a/forge-gui/res/editions/Classic Sixth Edition.txt b/forge-gui/res/editions/Classic Sixth Edition.txt index fa323f78f58..ac0fe2d4689 100644 --- a/forge-gui/res/editions/Classic Sixth Edition.txt +++ b/forge-gui/res/editions/Classic Sixth Edition.txt @@ -1,6 +1,6 @@ [metadata] Code=6ED -Date=1999-04-28 +Date=1999-04-21 Name=Classic Sixth Edition Code2=6E MciCode=6e diff --git a/forge-gui/res/editions/Coldsnap Promos.txt b/forge-gui/res/editions/Coldsnap Promos.txt index b3f58c87a24..d8842caba7b 100644 --- a/forge-gui/res/editions/Coldsnap Promos.txt +++ b/forge-gui/res/editions/Coldsnap Promos.txt @@ -2,7 +2,7 @@ Code=PCSP Date=2006-07-21 Name=Coldsnap Promos -Type=Promos +Type=Promo ScryfallCode=PCSP [cards] diff --git a/forge-gui/res/editions/Coldsnap Theme Decks.txt b/forge-gui/res/editions/Coldsnap Theme Decks.txt index ea628c3e1ab..1bbe83a7439 100644 --- a/forge-gui/res/editions/Coldsnap Theme Decks.txt +++ b/forge-gui/res/editions/Coldsnap Theme Decks.txt @@ -3,7 +3,7 @@ Code=CST Date=2006-07-21 Name=Coldsnap Theme Decks MciCode=cst -Type=Other +Type=Reprint ScryfallCode=CST [cards] diff --git a/forge-gui/res/editions/Commander 2013.txt b/forge-gui/res/editions/Commander 2013.txt index f4b0f69f11b..48ec0ddfdfe 100644 --- a/forge-gui/res/editions/Commander 2013.txt +++ b/forge-gui/res/editions/Commander 2013.txt @@ -4,7 +4,7 @@ Date=2013-11-01 Name=Commander 2013 Code2=C13 MciCode=c13 -Type=Other +Type=Commander ScryfallCode=C13 [cards] diff --git a/forge-gui/res/editions/Commander 2014.txt b/forge-gui/res/editions/Commander 2014.txt index 806314b1ba3..088c42f0070 100644 --- a/forge-gui/res/editions/Commander 2014.txt +++ b/forge-gui/res/editions/Commander 2014.txt @@ -4,7 +4,7 @@ Date=2014-11-07 Name=Commander 2014 Code2=C14 MciCode=c14 -Type=Other +Type=Commander ScryfallCode=C14 [cards] diff --git a/forge-gui/res/editions/Commander 2015.txt b/forge-gui/res/editions/Commander 2015.txt index 92ab38e15c9..39f064a0d03 100644 --- a/forge-gui/res/editions/Commander 2015.txt +++ b/forge-gui/res/editions/Commander 2015.txt @@ -4,7 +4,7 @@ Date=2015-11-13 Name=Commander 2015 Code2=C15 MciCode=c15 -Type=Other +Type=Commander ScryfallCode=C15 [cards] diff --git a/forge-gui/res/editions/Commander 2016.txt b/forge-gui/res/editions/Commander 2016.txt index d1795d61480..88779f27213 100644 --- a/forge-gui/res/editions/Commander 2016.txt +++ b/forge-gui/res/editions/Commander 2016.txt @@ -4,7 +4,7 @@ Date=2016-11-11 Name=Commander 2016 Code2=C16 MciCode=c16 -Type=Other +Type=Commander ScryfallCode=C16 [cards] diff --git a/forge-gui/res/editions/Commander 2017.txt b/forge-gui/res/editions/Commander 2017.txt index dd0f3db986f..35a6c0ec872 100644 --- a/forge-gui/res/editions/Commander 2017.txt +++ b/forge-gui/res/editions/Commander 2017.txt @@ -4,7 +4,7 @@ Date=2017-08-25 Name=Commander 2017 Code2=C17 MciCode=c17 -Type=Other +Type=Commander ScryfallCode=C17 [cards] diff --git a/forge-gui/res/editions/Commander 2018.txt b/forge-gui/res/editions/Commander 2018.txt index 1ef35970126..ca661b9dc9c 100644 --- a/forge-gui/res/editions/Commander 2018.txt +++ b/forge-gui/res/editions/Commander 2018.txt @@ -4,7 +4,7 @@ Date=2018-08-09 Name=Commander 2018 Code2=C18 MciCode=c18 -Type=Other +Type=Commander ScryfallCode=C18 [cards] diff --git a/forge-gui/res/editions/Commander 2019.txt b/forge-gui/res/editions/Commander 2019.txt index ef987aa8bc0..9d36321e271 100644 --- a/forge-gui/res/editions/Commander 2019.txt +++ b/forge-gui/res/editions/Commander 2019.txt @@ -4,7 +4,7 @@ Date=2019-08-23 Name=Commander 2019 Code2=C19 MciCode=c19 -Type=Other +Type=Commander ScryfallCode=C19 [cards] diff --git a/forge-gui/res/editions/Commander 2020.txt b/forge-gui/res/editions/Commander 2020.txt index c811f8a7611..b616fb4b20a 100644 --- a/forge-gui/res/editions/Commander 2020.txt +++ b/forge-gui/res/editions/Commander 2020.txt @@ -2,7 +2,7 @@ Code=C20 Date=2020-04-17 Name=Commander 2020 -Type=Other +Type=Commander ScryfallCode=C20 [cards] diff --git a/forge-gui/res/editions/Commander 2021.txt b/forge-gui/res/editions/Commander 2021.txt index e0cd6ab1edf..faa5f07712e 100644 --- a/forge-gui/res/editions/Commander 2021.txt +++ b/forge-gui/res/editions/Commander 2021.txt @@ -2,7 +2,7 @@ Code=C21 Date=2021-04-23 Name=Commander 2021 -Type=Other +Type=Commander ScryfallCode=C21 [cards] diff --git a/forge-gui/res/editions/Commander Anthology Vol. II.txt b/forge-gui/res/editions/Commander Anthology Vol. II.txt index 2dd8d49b778..394f7382311 100644 --- a/forge-gui/res/editions/Commander Anthology Vol. II.txt +++ b/forge-gui/res/editions/Commander Anthology Vol. II.txt @@ -3,7 +3,7 @@ Code=CM2 Date=2018-06-08 Name=Commander Anthology Vol. II MciCode=CM2 -Type=Other +Type=Commander ScryfallCode=CM2 [cards] diff --git a/forge-gui/res/editions/Commander Anthology.txt b/forge-gui/res/editions/Commander Anthology.txt index c64de23c4b8..68f34a689b2 100644 --- a/forge-gui/res/editions/Commander Anthology.txt +++ b/forge-gui/res/editions/Commander Anthology.txt @@ -4,7 +4,7 @@ Date=2017-06-09 Name=Commander Anthology Code2=CMA MciCode=CMA -Type=Other +Type=Commander ScryfallCode=CMA [cards] diff --git a/forge-gui/res/editions/Commander Collection Green.txt b/forge-gui/res/editions/Commander Collection Green.txt index 8445a3558a4..4f70327d31a 100644 --- a/forge-gui/res/editions/Commander Collection Green.txt +++ b/forge-gui/res/editions/Commander Collection Green.txt @@ -2,7 +2,7 @@ Code=CC1 Date=2020-12-04 Name=Commander Collection Green -Type=Reprint +Type=Collector_Edition ScryfallCode=CC1 [cards] diff --git a/forge-gui/res/editions/Commander Legends.txt b/forge-gui/res/editions/Commander Legends.txt index aa2ac414f24..57912203384 100644 --- a/forge-gui/res/editions/Commander Legends.txt +++ b/forge-gui/res/editions/Commander Legends.txt @@ -1,8 +1,8 @@ [metadata] Code=CMR -Date=2020-11-11 +Date=2020-11-20 Name=Commander Legends -Type=Other +Type=Draft_Innovation Booster=13 Common:fromSheet("CMR cards"), 3 fromSheet("CMR Non-Legendary Uncommons"), 1 fromSheet("CMR Non-Legendary RareMythics"), 1 fromSheet("CMR Foils"), 2 fromSheet("CMR Legendaries") Foil=NotSupported DoublePick=Always diff --git a/forge-gui/res/editions/Commander Theme Decks.txt b/forge-gui/res/editions/Commander Theme Decks.txt index 8405135ab06..4c10480541b 100644 --- a/forge-gui/res/editions/Commander Theme Decks.txt +++ b/forge-gui/res/editions/Commander Theme Decks.txt @@ -1,6 +1,6 @@ [metadata] Code=TD0 -Date=2009-08-25 +Date=2010-11-08 Name=Commander Theme Decks MciCode=td0 Type=Online diff --git a/forge-gui/res/editions/Commander's Arsenal.txt b/forge-gui/res/editions/Commander's Arsenal.txt index d78c5ae2dcb..ce080b36bc2 100644 --- a/forge-gui/res/editions/Commander's Arsenal.txt +++ b/forge-gui/res/editions/Commander's Arsenal.txt @@ -5,6 +5,7 @@ Date=2012-11-02 Name=Commander's Arsenal ScryfallCode=CM1 +Type=Commander [cards] 1 R Chaos Warp 2 C Command Tower diff --git a/forge-gui/res/editions/Commander.txt b/forge-gui/res/editions/Commander.txt index 3d4cc921d9b..625c799468f 100644 --- a/forge-gui/res/editions/Commander.txt +++ b/forge-gui/res/editions/Commander.txt @@ -5,7 +5,7 @@ Name=Commander Code2=COM Alias=CMD MciCode=cmd -Type=Other +Type=Commander BoosterBox=0 ScryfallCode=cmd diff --git a/forge-gui/res/editions/Conflux Promos.txt b/forge-gui/res/editions/Conflux Promos.txt index c80ddda362a..54f19ae5283 100644 --- a/forge-gui/res/editions/Conflux Promos.txt +++ b/forge-gui/res/editions/Conflux Promos.txt @@ -2,7 +2,7 @@ Code=PCON Date=2009-02-06 Name=Conflux Promos -Type=Promos +Type=Promo ScryfallCode=PCON [cards] diff --git a/forge-gui/res/editions/Conspiracy Promos.txt b/forge-gui/res/editions/Conspiracy Promos.txt index 3f5fd1af103..8673d6e9824 100644 --- a/forge-gui/res/editions/Conspiracy Promos.txt +++ b/forge-gui/res/editions/Conspiracy Promos.txt @@ -2,7 +2,7 @@ Code=PCNS Date=2014-06-06 Name=Conspiracy Promos -Type=Promos +Type=Promo ScryfallCode=PCNS [cards] diff --git a/forge-gui/res/editions/Conspiracy Take the Crown.txt b/forge-gui/res/editions/Conspiracy Take the Crown.txt index d8f3d811143..8bbf07d4152 100644 --- a/forge-gui/res/editions/Conspiracy Take the Crown.txt +++ b/forge-gui/res/editions/Conspiracy Take the Crown.txt @@ -4,7 +4,7 @@ Date=2016-08-26 Name=Conspiracy: Take the Crown Code2=CN2 MciCode=cn2 -Type=Other +Type=Draft_Innovation BoosterCovers=3 Booster=10 Common:!fromSheet("CN2 Not In Normal Slots"), 3 Uncommon:!fromSheet("CN2 Not In Normal Slots"), 1 RareMythic:!fromSheet("CN2 Not In Normal Slots"), 1 fromSheet("CN2 Draft Matters") AdditionalSheetForFoils=fromSheet("CN2 Foil Kaya") diff --git a/forge-gui/res/editions/Conspiracy.txt b/forge-gui/res/editions/Conspiracy.txt index 7a249d883b7..9956591b16b 100644 --- a/forge-gui/res/editions/Conspiracy.txt +++ b/forge-gui/res/editions/Conspiracy.txt @@ -4,7 +4,7 @@ Date=2014-06-06 Name=Conspiracy Code2=CNS MciCode=cns -Type=Other +Type=Draft_Innovation BoosterCovers=3 Booster=10 Common:!fromSheet("CNS Draft Matters"), 3 Uncommon:!fromSheet("CNS Draft Matters"), 1 RareMythic:!fromSheet("CNS Draft Matters"), 1 fromSheet("CNS Draft Matters") ScryfallCode=CNS diff --git a/forge-gui/res/editions/Core Set 2019 Promos.txt b/forge-gui/res/editions/Core Set 2019 Promos.txt index ebb55699242..04dcf89237f 100644 --- a/forge-gui/res/editions/Core Set 2019 Promos.txt +++ b/forge-gui/res/editions/Core Set 2019 Promos.txt @@ -2,7 +2,7 @@ Code=PM19 Date=2018-07-13 Name=Core Set 2019 Promos -Type=Promos +Type=Promo ScryfallCode=PM19 [cards] diff --git a/forge-gui/res/editions/Core Set 2020 Promos.txt b/forge-gui/res/editions/Core Set 2020 Promos.txt index 201660af48f..aa591637f9c 100644 --- a/forge-gui/res/editions/Core Set 2020 Promos.txt +++ b/forge-gui/res/editions/Core Set 2020 Promos.txt @@ -1,8 +1,8 @@ [metadata] Code=PM20 -Date=2019-07-02 +Date=2019-07-12 Name=Core Set 2020 Promos -Type=Promos +Type=Promo ScryfallCode=PM20 [cards] diff --git a/forge-gui/res/editions/DCI Legend Membership.txt b/forge-gui/res/editions/DCI Legend Membership.txt index a8b98cddf4d..b16b30e1cfe 100644 --- a/forge-gui/res/editions/DCI Legend Membership.txt +++ b/forge-gui/res/editions/DCI Legend Membership.txt @@ -2,7 +2,7 @@ Code=PLGM Date=1995-01-01 Name=DCI Legend Membership -Type=Promos +Type=Promo ScryfallCode=PLGM [cards] diff --git a/forge-gui/res/editions/Dark Ascension Promos.txt b/forge-gui/res/editions/Dark Ascension Promos.txt index d2e17d5cb18..469a26c73c9 100644 --- a/forge-gui/res/editions/Dark Ascension Promos.txt +++ b/forge-gui/res/editions/Dark Ascension Promos.txt @@ -2,7 +2,7 @@ Code=PDKA Date=2012-01-28 Name=Dark Ascension Promos -Type=Promos +Type=Promo ScryfallCode=PDKA [cards] diff --git a/forge-gui/res/editions/Darksteel Promos.txt b/forge-gui/res/editions/Darksteel Promos.txt index 32dfd781f93..f7f27a1b7d4 100644 --- a/forge-gui/res/editions/Darksteel Promos.txt +++ b/forge-gui/res/editions/Darksteel Promos.txt @@ -2,7 +2,7 @@ Code=PDST Date=2004-06-04 Name=Darksteel Promos -Type=Promos +Type=Promo ScryfallCode=PDST [cards] diff --git a/forge-gui/res/editions/Deckmasters Garfield vs. Finkel.txt b/forge-gui/res/editions/Deckmasters Garfield vs. Finkel.txt index 64de503a970..044cc43c2be 100644 --- a/forge-gui/res/editions/Deckmasters Garfield vs. Finkel.txt +++ b/forge-gui/res/editions/Deckmasters Garfield vs. Finkel.txt @@ -1,9 +1,9 @@ [metadata] Code=DKM -Date=2001-12 +Date=2001-12-01 Name=Deckmasters: Garfield vs. Finkel MciCode=dm -Type=Other +Type=Reprint Border=White ScryfallCode=DKM diff --git a/forge-gui/res/editions/Dissension Promos.txt b/forge-gui/res/editions/Dissension Promos.txt index 5edfa63d22e..5da5f65af16 100644 --- a/forge-gui/res/editions/Dissension Promos.txt +++ b/forge-gui/res/editions/Dissension Promos.txt @@ -2,7 +2,7 @@ Code=PDIS Date=2006-05-05 Name=Dissension Promos -Type=Promos +Type=Promo ScryfallCode=PDIS [cards] diff --git a/forge-gui/res/editions/Dominaria Promos.txt b/forge-gui/res/editions/Dominaria Promos.txt index a01f9429ae2..d6e2cd7205d 100644 --- a/forge-gui/res/editions/Dominaria Promos.txt +++ b/forge-gui/res/editions/Dominaria Promos.txt @@ -2,7 +2,7 @@ Code=PDOM Date=2018-04-27 Name=Dominaria Promos -Type=Promos +Type=Promo ScryfallCode=PDOM [cards] diff --git a/forge-gui/res/editions/Dragon's Maze Promos.txt b/forge-gui/res/editions/Dragon's Maze Promos.txt index 4c2255ee18f..250ff5b7157 100644 --- a/forge-gui/res/editions/Dragon's Maze Promos.txt +++ b/forge-gui/res/editions/Dragon's Maze Promos.txt @@ -2,7 +2,7 @@ Code=PDGM Date=2013-04-27 Name=Dragon's Maze Promos -Type=Promos +Type=Promo ScryfallCode=PDGM [cards] diff --git a/forge-gui/res/editions/DragonCon 1994.txt b/forge-gui/res/editions/DragonCon 1994.txt index 90cb49c3125..0d825bb7dc9 100644 --- a/forge-gui/res/editions/DragonCon 1994.txt +++ b/forge-gui/res/editions/DragonCon 1994.txt @@ -3,8 +3,8 @@ Code=DRC94 Date=1994-07-15 Name=DragonCon 1994 Border=Black -Type=Other +Type=Promo ScryfallCode=PDRC [cards] -1 S Nalathni Dragon \ No newline at end of file +1 S Nalathni Dragon diff --git a/forge-gui/res/editions/Dragons of Tarkir Promos.txt b/forge-gui/res/editions/Dragons of Tarkir Promos.txt index aa6cf0f2bed..81690e0c363 100644 --- a/forge-gui/res/editions/Dragons of Tarkir Promos.txt +++ b/forge-gui/res/editions/Dragons of Tarkir Promos.txt @@ -1,8 +1,8 @@ [metadata] Code=PDTK -Date=2015-03-08 +Date=2015-03-27 Name=Dragons of Tarkir Promos -Type=Promos +Type=Promo ScryfallCode=PDTK [cards] diff --git a/forge-gui/res/editions/Duel Decks Ajani vs. Nicol Bolas.txt b/forge-gui/res/editions/Duel Decks Ajani vs. Nicol Bolas.txt index 13388ed6bf7..fda295c25be 100644 --- a/forge-gui/res/editions/Duel Decks Ajani vs. Nicol Bolas.txt +++ b/forge-gui/res/editions/Duel Decks Ajani vs. Nicol Bolas.txt @@ -3,7 +3,7 @@ Code=DDH Date=2011-09-02 Name=Duel Decks: Ajani vs. Nicol Bolas MciCode=ddh -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDH [cards] diff --git a/forge-gui/res/editions/Duel Decks Anthology Divine vs. Demonic.txt b/forge-gui/res/editions/Duel Decks Anthology Divine vs. Demonic.txt index 5769f158765..885216607e9 100644 --- a/forge-gui/res/editions/Duel Decks Anthology Divine vs. Demonic.txt +++ b/forge-gui/res/editions/Duel Decks Anthology Divine vs. Demonic.txt @@ -3,7 +3,7 @@ Code=DVD Date=2014-12-05 Name=Duel Decks Anthology: Divine vs. Demonic MciCode=dvd -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DVD [cards] diff --git a/forge-gui/res/editions/Duel Decks Anthology Elves vs. Goblins.txt b/forge-gui/res/editions/Duel Decks Anthology Elves vs. Goblins.txt index 8391d6a341f..d745e87760b 100644 --- a/forge-gui/res/editions/Duel Decks Anthology Elves vs. Goblins.txt +++ b/forge-gui/res/editions/Duel Decks Anthology Elves vs. Goblins.txt @@ -3,7 +3,7 @@ Code=EVG Date=2014-12-05 Name=Duel Decks Anthology: Elves vs. Goblins MciCode=evg -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=EVG [cards] diff --git a/forge-gui/res/editions/Duel Decks Anthology Garruk vs. Liliana.txt b/forge-gui/res/editions/Duel Decks Anthology Garruk vs. Liliana.txt index 2bb7fff6e6c..2c2ccfb2b3d 100644 --- a/forge-gui/res/editions/Duel Decks Anthology Garruk vs. Liliana.txt +++ b/forge-gui/res/editions/Duel Decks Anthology Garruk vs. Liliana.txt @@ -3,7 +3,7 @@ Code=GVL Date=2014-12-05 Name=Duel Decks Anthology: Garruk vs. Liliana MciCode=gvl -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=GVL [cards] diff --git a/forge-gui/res/editions/Duel Decks Anthology Jace vs. Chandra.txt b/forge-gui/res/editions/Duel Decks Anthology Jace vs. Chandra.txt index 29ca9ef633c..f7409d61ecd 100644 --- a/forge-gui/res/editions/Duel Decks Anthology Jace vs. Chandra.txt +++ b/forge-gui/res/editions/Duel Decks Anthology Jace vs. Chandra.txt @@ -3,7 +3,7 @@ Code=JVC Date=2014-12-05 Name=Duel Decks Anthology: Jace vs. Chandra MciCode=jvc -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=JVC [cards] diff --git a/forge-gui/res/editions/Duel Decks Blessed vs. Cursed.txt b/forge-gui/res/editions/Duel Decks Blessed vs. Cursed.txt index c941c574ead..52e2fe180c8 100644 --- a/forge-gui/res/editions/Duel Decks Blessed vs. Cursed.txt +++ b/forge-gui/res/editions/Duel Decks Blessed vs. Cursed.txt @@ -4,7 +4,7 @@ Date=2016-02-26 Name=Duel Decks: Blessed vs. Cursed Code2=DDQ MciCode=ddq -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDQ [cards] diff --git a/forge-gui/res/editions/Duel Decks Divine vs. Demonic.txt b/forge-gui/res/editions/Duel Decks Divine vs. Demonic.txt index a7b666693ab..31a0a21c426 100644 --- a/forge-gui/res/editions/Duel Decks Divine vs. Demonic.txt +++ b/forge-gui/res/editions/Duel Decks Divine vs. Demonic.txt @@ -4,7 +4,7 @@ Date=2009-04-10 Name=Duel Decks: Divine vs. Demonic Code2=DDC MciCode=dvd -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDC [cards] diff --git a/forge-gui/res/editions/Duel Decks Elspeth vs. Kiora.txt b/forge-gui/res/editions/Duel Decks Elspeth vs. Kiora.txt index 6b0270c3846..e92281faf62 100644 --- a/forge-gui/res/editions/Duel Decks Elspeth vs. Kiora.txt +++ b/forge-gui/res/editions/Duel Decks Elspeth vs. Kiora.txt @@ -3,7 +3,7 @@ Code=DDO Date=2015-02-27 Name=Duel Decks: Elspeth vs. Kiora MciCode=ddo -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDO [cards] diff --git a/forge-gui/res/editions/Duel Decks Elspeth vs. Tezzeret.txt b/forge-gui/res/editions/Duel Decks Elspeth vs. Tezzeret.txt index f28aed2e4bb..1a4119198ce 100644 --- a/forge-gui/res/editions/Duel Decks Elspeth vs. Tezzeret.txt +++ b/forge-gui/res/editions/Duel Decks Elspeth vs. Tezzeret.txt @@ -3,7 +3,7 @@ Code=DDF Date=2010-09-03 Name=Duel Decks: Elspeth vs. Tezzeret MciCode=ddf -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDF [cards] diff --git a/forge-gui/res/editions/Duel Decks Elves vs. Goblins.txt b/forge-gui/res/editions/Duel Decks Elves vs. Goblins.txt index 330932ac278..56d079baf1e 100644 --- a/forge-gui/res/editions/Duel Decks Elves vs. Goblins.txt +++ b/forge-gui/res/editions/Duel Decks Elves vs. Goblins.txt @@ -3,7 +3,7 @@ Code=DD1 Date=2007-11-16 Name=Duel Decks: Elves vs. Goblins MciCode=dd1 -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DD1 [cards] diff --git a/forge-gui/res/editions/Duel Decks Elves vs. Inventors.txt b/forge-gui/res/editions/Duel Decks Elves vs. Inventors.txt index 07c4233bb3c..48ece5d063b 100644 --- a/forge-gui/res/editions/Duel Decks Elves vs. Inventors.txt +++ b/forge-gui/res/editions/Duel Decks Elves vs. Inventors.txt @@ -3,7 +3,7 @@ Code=DDU Date=2018-04-06 Name=Duel Decks: Elves vs. Inventors MciCode=ddu -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDU [cards] diff --git a/forge-gui/res/editions/Duel Decks Garruk vs. Liliana.txt b/forge-gui/res/editions/Duel Decks Garruk vs. Liliana.txt index e42bc430f7c..cce2db84014 100644 --- a/forge-gui/res/editions/Duel Decks Garruk vs. Liliana.txt +++ b/forge-gui/res/editions/Duel Decks Garruk vs. Liliana.txt @@ -3,7 +3,7 @@ Code=DDD Date=2009-10-30 Name=Duel Decks: Garruk vs. Liliana MciCode=gvl -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDD [cards] diff --git a/forge-gui/res/editions/Duel Decks Heroes vs. Monsters.txt b/forge-gui/res/editions/Duel Decks Heroes vs. Monsters.txt index ebe2032924d..a1707a0529c 100644 --- a/forge-gui/res/editions/Duel Decks Heroes vs. Monsters.txt +++ b/forge-gui/res/editions/Duel Decks Heroes vs. Monsters.txt @@ -4,7 +4,7 @@ Alias=HVM Date=2013-09-06 Name=Duel Decks: Heroes vs. Monsters MciCode=ddl -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDL [cards] diff --git a/forge-gui/res/editions/Duel Decks Izzet vs. Golgari.txt b/forge-gui/res/editions/Duel Decks Izzet vs. Golgari.txt index c17bc283d69..48e4bfd1d01 100644 --- a/forge-gui/res/editions/Duel Decks Izzet vs. Golgari.txt +++ b/forge-gui/res/editions/Duel Decks Izzet vs. Golgari.txt @@ -3,7 +3,7 @@ Code=DDJ Date=2012-09-07 Name=Duel Decks: Izzet vs. Golgari MciCode=ddj -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDJ [cards] diff --git a/forge-gui/res/editions/Duel Decks Jace vs. Chandra.txt b/forge-gui/res/editions/Duel Decks Jace vs. Chandra.txt index 81eb9f288a2..a5c87874b6b 100644 --- a/forge-gui/res/editions/Duel Decks Jace vs. Chandra.txt +++ b/forge-gui/res/editions/Duel Decks Jace vs. Chandra.txt @@ -3,7 +3,7 @@ Code=DD2 Date=2008-11-07 Name=Duel Decks: Jace vs. Chandra MciCode=jvc -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DD2 [cards] diff --git a/forge-gui/res/editions/Duel Decks Jace vs. Vraska.txt b/forge-gui/res/editions/Duel Decks Jace vs. Vraska.txt index 9de8a916382..30c1028de77 100644 --- a/forge-gui/res/editions/Duel Decks Jace vs. Vraska.txt +++ b/forge-gui/res/editions/Duel Decks Jace vs. Vraska.txt @@ -3,7 +3,7 @@ Code=DDM Date=2014-03-14 Name=Duel Decks: Jace vs. Vraska MciCode=ddm -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDM [cards] diff --git a/forge-gui/res/editions/Duel Decks Knights vs. Dragons.txt b/forge-gui/res/editions/Duel Decks Knights vs. Dragons.txt index 03c2e6243b7..a7536f4a8cd 100644 --- a/forge-gui/res/editions/Duel Decks Knights vs. Dragons.txt +++ b/forge-gui/res/editions/Duel Decks Knights vs. Dragons.txt @@ -3,7 +3,7 @@ Code=DDG Date=2011-04-01 Name=Duel Decks: Knights vs. Dragons MciCode=ddg -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDG [cards] diff --git a/forge-gui/res/editions/Duel Decks Merfolk vs. Goblins.txt b/forge-gui/res/editions/Duel Decks Merfolk vs. Goblins.txt index 208a91e9d1f..9d5d9876b1f 100644 --- a/forge-gui/res/editions/Duel Decks Merfolk vs. Goblins.txt +++ b/forge-gui/res/editions/Duel Decks Merfolk vs. Goblins.txt @@ -1,10 +1,10 @@ [metadata] Code=DDT -Date=2017-11-10 +Date=2017-10-24 Name=Duel Decks: Merfolk vs. Goblins Code2=DDT MciCode=ddt -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDT [cards] diff --git a/forge-gui/res/editions/Duel Decks Mind vs. Might.txt b/forge-gui/res/editions/Duel Decks Mind vs. Might.txt index 8e5abab9cf7..9e4902dd343 100644 --- a/forge-gui/res/editions/Duel Decks Mind vs. Might.txt +++ b/forge-gui/res/editions/Duel Decks Mind vs. Might.txt @@ -4,7 +4,7 @@ Date=2017-03-31 Name=Duel Decks: Mind vs. Might Code2=DDS MciCode=dds -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDS [cards] diff --git a/forge-gui/res/editions/Duel Decks Mirrodin Pure vs. New Phyrexia.txt b/forge-gui/res/editions/Duel Decks Mirrodin Pure vs. New Phyrexia.txt index 9255e844a3c..322d60018b9 100644 --- a/forge-gui/res/editions/Duel Decks Mirrodin Pure vs. New Phyrexia.txt +++ b/forge-gui/res/editions/Duel Decks Mirrodin Pure vs. New Phyrexia.txt @@ -1,10 +1,10 @@ [metadata] Code=TD2 -Date=2013-01-11 +Date=2011-05-14 Name=Duel Decks: Mirrodin Pure vs. New Phyrexia MciCode=td2 Type=Online -Type=Duel_Decks +Type=Online ScryfallCode=TD2 [cards] diff --git a/forge-gui/res/editions/Duel Decks Nissa vs. Ob Nixilis.txt b/forge-gui/res/editions/Duel Decks Nissa vs. Ob Nixilis.txt index 3d5e7973aab..8408900a77b 100644 --- a/forge-gui/res/editions/Duel Decks Nissa vs. Ob Nixilis.txt +++ b/forge-gui/res/editions/Duel Decks Nissa vs. Ob Nixilis.txt @@ -4,7 +4,7 @@ Date=2016-09-02 Name=Duel Decks: Nissa vs. Ob Nixilis Code2=DDR MciCode=ddr -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDR [cards] diff --git a/forge-gui/res/editions/Duel Decks Phyrexia vs. the Coalition.txt b/forge-gui/res/editions/Duel Decks Phyrexia vs. the Coalition.txt index aa8c7c00879..0f6f1bc6dc0 100644 --- a/forge-gui/res/editions/Duel Decks Phyrexia vs. the Coalition.txt +++ b/forge-gui/res/editions/Duel Decks Phyrexia vs. the Coalition.txt @@ -3,7 +3,7 @@ Code=DDE Date=2010-03-19 Name=Duel Decks: Phyrexia vs. the Coalition MciCode=pvc -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDE [cards] diff --git a/forge-gui/res/editions/Duel Decks Sorin vs. Tibalt.txt b/forge-gui/res/editions/Duel Decks Sorin vs. Tibalt.txt index 99c816a236c..dda180ffeb2 100644 --- a/forge-gui/res/editions/Duel Decks Sorin vs. Tibalt.txt +++ b/forge-gui/res/editions/Duel Decks Sorin vs. Tibalt.txt @@ -3,7 +3,7 @@ Code=DDK Date=2013-03-15 Name=Duel Decks: Sorin vs. Tibalt MciCode=ddk -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDK [cards] diff --git a/forge-gui/res/editions/Duel Decks Speed vs. Cunning.txt b/forge-gui/res/editions/Duel Decks Speed vs. Cunning.txt index b2009b9352c..96797ef7c4d 100644 --- a/forge-gui/res/editions/Duel Decks Speed vs. Cunning.txt +++ b/forge-gui/res/editions/Duel Decks Speed vs. Cunning.txt @@ -3,7 +3,7 @@ Code=DDN Date=2014-09-05 Name=Duel Decks: Speed vs. Cunning MciCode=ddn -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDN [cards] diff --git a/forge-gui/res/editions/Duel Decks Venser vs. Koth.txt b/forge-gui/res/editions/Duel Decks Venser vs. Koth.txt index d667f69bd8b..7dbcafd307f 100644 --- a/forge-gui/res/editions/Duel Decks Venser vs. Koth.txt +++ b/forge-gui/res/editions/Duel Decks Venser vs. Koth.txt @@ -3,7 +3,7 @@ Code=DDI Date=2012-03-30 Name=Duel Decks: Venser vs. Koth MciCode=ddi -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDI [cards] diff --git a/forge-gui/res/editions/Duel Decks Zendikar vs. Eldrazi.txt b/forge-gui/res/editions/Duel Decks Zendikar vs. Eldrazi.txt index 4f6f846afb3..31d1f4aff7a 100644 --- a/forge-gui/res/editions/Duel Decks Zendikar vs. Eldrazi.txt +++ b/forge-gui/res/editions/Duel Decks Zendikar vs. Eldrazi.txt @@ -4,7 +4,7 @@ Date=2015-08-28 Name=Duel Decks: Zendikar vs. Eldrazi Code2=DDP MciCode=ddp -Type=Duel_Decks +Type=Duel_Deck ScryfallCode=DDP [cards] diff --git a/forge-gui/res/editions/Duels of the Planeswalkers 2009 Promos.txt b/forge-gui/res/editions/Duels of the Planeswalkers 2009 Promos.txt index 518b2f74db2..0d9b738d92c 100644 --- a/forge-gui/res/editions/Duels of the Planeswalkers 2009 Promos.txt +++ b/forge-gui/res/editions/Duels of the Planeswalkers 2009 Promos.txt @@ -2,7 +2,7 @@ Code=PDTP Date=2009-01-01 Name=Duels of the Planeswalkers 2009 Promos -Type=Promos +Type=Promo ScryfallCode=PDTP [cards] diff --git a/forge-gui/res/editions/Duels of the Planeswalkers 2010 Promos.txt b/forge-gui/res/editions/Duels of the Planeswalkers 2010 Promos.txt index 07f48a59590..0129919ad9c 100644 --- a/forge-gui/res/editions/Duels of the Planeswalkers 2010 Promos.txt +++ b/forge-gui/res/editions/Duels of the Planeswalkers 2010 Promos.txt @@ -2,7 +2,7 @@ Code=PDP10 Date=2010-01-01 Name=Duels of the Planeswalkers 2010 Promos -Type=Promos +Type=Promo ScryfallCode=PDP10 [cards] diff --git a/forge-gui/res/editions/Duels of the Planeswalkers 2012 Promos.txt b/forge-gui/res/editions/Duels of the Planeswalkers 2012 Promos.txt index e19edf05e94..04456636b4b 100644 --- a/forge-gui/res/editions/Duels of the Planeswalkers 2012 Promos.txt +++ b/forge-gui/res/editions/Duels of the Planeswalkers 2012 Promos.txt @@ -2,7 +2,7 @@ Code=PDP12 Date=2011-01-01 Name=Duels of the Planeswalkers 2012 Promos -Type=Promos +Type=Promo ScryfallCode=PDP12 [cards] diff --git a/forge-gui/res/editions/Duels of the Planeswalkers 2013 Promos.txt b/forge-gui/res/editions/Duels of the Planeswalkers 2013 Promos.txt index 69da07ed857..87fd8e4d40c 100644 --- a/forge-gui/res/editions/Duels of the Planeswalkers 2013 Promos.txt +++ b/forge-gui/res/editions/Duels of the Planeswalkers 2013 Promos.txt @@ -2,7 +2,7 @@ Code=PDP13 Date=2012-01-01 Name=Duels of the Planeswalkers 2013 Promos -Type=Promos +Type=Promo ScryfallCode=PDP13 [cards] diff --git a/forge-gui/res/editions/Duels of the Planeswalkers 2014 Promos.txt b/forge-gui/res/editions/Duels of the Planeswalkers 2014 Promos.txt index e02acb2f866..ddd6d2e4be9 100644 --- a/forge-gui/res/editions/Duels of the Planeswalkers 2014 Promos.txt +++ b/forge-gui/res/editions/Duels of the Planeswalkers 2014 Promos.txt @@ -2,7 +2,7 @@ Code=PDP14 Date=2013-01-01 Name=Duels of the Planeswalkers 2014 Promos -Type=Promos +Type=Promo ScryfallCode=PDP14 [cards] diff --git a/forge-gui/res/editions/Duels of the Planeswalkers 2015 Promos.txt b/forge-gui/res/editions/Duels of the Planeswalkers 2015 Promos.txt index 9dac04c660a..c465ea4fe8c 100644 --- a/forge-gui/res/editions/Duels of the Planeswalkers 2015 Promos.txt +++ b/forge-gui/res/editions/Duels of the Planeswalkers 2015 Promos.txt @@ -2,7 +2,7 @@ Code=PDP15 Date=2014-01-01 Name=Duels of the Planeswalkers 2015 Promos -Type=Promos +Type=Promo ScryfallCode=PDP15 [cards] diff --git a/forge-gui/res/editions/Duels of the Planeswalkers.txt b/forge-gui/res/editions/Duels of the Planeswalkers.txt index 35215186880..a360813d245 100644 --- a/forge-gui/res/editions/Duels of the Planeswalkers.txt +++ b/forge-gui/res/editions/Duels of the Planeswalkers.txt @@ -3,7 +3,7 @@ Code=DPA Date=2010-06-04 Name=Duels of the Planeswalkers MciCode=dpa -Type=Other +Type=Reprint ScryfallCode=DPA [cards] diff --git a/forge-gui/res/editions/Eighth Edition Promos.txt b/forge-gui/res/editions/Eighth Edition Promos.txt index c8e6be7a37c..0ff2dde108a 100644 --- a/forge-gui/res/editions/Eighth Edition Promos.txt +++ b/forge-gui/res/editions/Eighth Edition Promos.txt @@ -2,7 +2,7 @@ Code=P8ED Date=2003-07-28 Name=Eighth Edition Promos -Type=Promos +Type=Promo ScryfallCode=P8ED [cards] diff --git a/forge-gui/res/editions/Eldritch Moon Promos.txt b/forge-gui/res/editions/Eldritch Moon Promos.txt index 31c0a8f4705..9e690806835 100644 --- a/forge-gui/res/editions/Eldritch Moon Promos.txt +++ b/forge-gui/res/editions/Eldritch Moon Promos.txt @@ -2,7 +2,7 @@ Code=PEMN Date=2016-07-22 Name=Eldritch Moon Promos -Type=Promos +Type=Promo ScryfallCode=PEMN [cards] diff --git a/forge-gui/res/editions/European Land Program.txt b/forge-gui/res/editions/European Land Program.txt index b4b4352c1bc..323a5235810 100644 --- a/forge-gui/res/editions/European Land Program.txt +++ b/forge-gui/res/editions/European Land Program.txt @@ -2,7 +2,7 @@ Code=PELP Date=2000-02-05 Name=European Land Program -Type=Promos +Type=Promo ScryfallCode=PELP [cards] diff --git a/forge-gui/res/editions/Eventide Promos.txt b/forge-gui/res/editions/Eventide Promos.txt index 089668c756d..c3f75ab71e1 100644 --- a/forge-gui/res/editions/Eventide Promos.txt +++ b/forge-gui/res/editions/Eventide Promos.txt @@ -2,7 +2,7 @@ Code=PEVE Date=2008-07-25 Name=Eventide Promos -Type=Promos +Type=Promo ScryfallCode=PEVE [cards] diff --git a/forge-gui/res/editions/Exodus Promos.txt b/forge-gui/res/editions/Exodus Promos.txt index 9f4e2636287..813b81def32 100644 --- a/forge-gui/res/editions/Exodus Promos.txt +++ b/forge-gui/res/editions/Exodus Promos.txt @@ -2,7 +2,7 @@ Code=PEXO Date=1998-06-15 Name=Exodus Promos -Type=Promos +Type=Promo ScryfallCode=PEXO [cards] diff --git a/forge-gui/res/editions/Explorers of Ixalan.txt b/forge-gui/res/editions/Explorers of Ixalan.txt index ed7aacfc3ba..b8663d13cee 100644 --- a/forge-gui/res/editions/Explorers of Ixalan.txt +++ b/forge-gui/res/editions/Explorers of Ixalan.txt @@ -4,7 +4,7 @@ Date=2017-11-24 Name=Explorers of Ixalan Code2=E02 MciCode=E02 -Type=Other +Type=Reprint ScryfallCode=E02 [cards] diff --git a/forge-gui/res/editions/Fate Reforged Clash Pack.txt b/forge-gui/res/editions/Fate Reforged Clash Pack.txt index 7dbf7363d66..541fea685fe 100644 --- a/forge-gui/res/editions/Fate Reforged Clash Pack.txt +++ b/forge-gui/res/editions/Fate Reforged Clash Pack.txt @@ -2,7 +2,7 @@ Code=CP2 Date=2015-01-23 Name=Fate Reforged Clash Pack -Type=Promos +Type=Starter ScryfallCode=CP2 [cards] diff --git a/forge-gui/res/editions/Fate Reforged Promos.txt b/forge-gui/res/editions/Fate Reforged Promos.txt index accca9eafd0..774d6df5461 100644 --- a/forge-gui/res/editions/Fate Reforged Promos.txt +++ b/forge-gui/res/editions/Fate Reforged Promos.txt @@ -1,8 +1,8 @@ [metadata] Code=PFRF -Date=2015-01-24 +Date=2015-01-23 Name=Fate Reforged Promos -Type=Promos +Type=Promo ScryfallCode=PFRF [cards] diff --git a/forge-gui/res/editions/Fifth Dawn Promos.txt b/forge-gui/res/editions/Fifth Dawn Promos.txt index 6de6f8bd37a..1c965083d13 100644 --- a/forge-gui/res/editions/Fifth Dawn Promos.txt +++ b/forge-gui/res/editions/Fifth Dawn Promos.txt @@ -2,7 +2,7 @@ Code=P5DN Date=2004-06-04 Name=Fifth Dawn Promos -Type=Promos +Type=Promo ScryfallCode=P5DN [cards] diff --git a/forge-gui/res/editions/Final Sacrifice.txt b/forge-gui/res/editions/Final Sacrifice.txt index 116b27d6527..92d330f1bda 100644 --- a/forge-gui/res/editions/Final Sacrifice.txt +++ b/forge-gui/res/editions/Final Sacrifice.txt @@ -1,9 +1,9 @@ [metadata] Code=FS -Date=1995-03-23 +Date=1994-09-01 Name=Final Sacrifice -Type=Other +Type=Promo ScryfallCode=PHPR [cards] -5 C Mana Crypt \ No newline at end of file +5 C Mana Crypt diff --git a/forge-gui/res/editions/Friday Night Magic 2000.txt b/forge-gui/res/editions/Friday Night Magic 2000.txt index 8cfa018c69c..c0f0f26ce49 100644 --- a/forge-gui/res/editions/Friday Night Magic 2000.txt +++ b/forge-gui/res/editions/Friday Night Magic 2000.txt @@ -2,7 +2,7 @@ Code=FNM Date=2000-01-01 Name=Friday Night Magic 2000 -Type=Promos +Type=Promo ScryfallCode=FNM [cards] diff --git a/forge-gui/res/editions/Friday Night Magic 2001.txt b/forge-gui/res/editions/Friday Night Magic 2001.txt index 3fd24557d86..481cfa59162 100644 --- a/forge-gui/res/editions/Friday Night Magic 2001.txt +++ b/forge-gui/res/editions/Friday Night Magic 2001.txt @@ -2,7 +2,7 @@ Code=F01 Date=2001-01-01 Name=Friday Night Magic 2001 -Type=Promos +Type=Promo ScryfallCode=F01 [cards] diff --git a/forge-gui/res/editions/Friday Night Magic 2002.txt b/forge-gui/res/editions/Friday Night Magic 2002.txt index c1d7cbf2e29..48195232c9f 100644 --- a/forge-gui/res/editions/Friday Night Magic 2002.txt +++ b/forge-gui/res/editions/Friday Night Magic 2002.txt @@ -2,7 +2,7 @@ Code=F02 Date=2002-01-01 Name=Friday Night Magic 2002 -Type=Promos +Type=Promo ScryfallCode=F02 [cards] diff --git a/forge-gui/res/editions/Friday Night Magic 2003.txt b/forge-gui/res/editions/Friday Night Magic 2003.txt index dd0999ed8d8..51c5f3d803b 100644 --- a/forge-gui/res/editions/Friday Night Magic 2003.txt +++ b/forge-gui/res/editions/Friday Night Magic 2003.txt @@ -2,7 +2,7 @@ Code=F03 Date=2003-01-01 Name=Friday Night Magic 2003 -Type=Promos +Type=Promo ScryfallCode=F03 [cards] diff --git a/forge-gui/res/editions/Friday Night Magic 2004.txt b/forge-gui/res/editions/Friday Night Magic 2004.txt index fff399147d1..7c2c5bf5b9d 100644 --- a/forge-gui/res/editions/Friday Night Magic 2004.txt +++ b/forge-gui/res/editions/Friday Night Magic 2004.txt @@ -2,7 +2,7 @@ Code=F04 Date=2004-01-01 Name=Friday Night Magic 2004 -Type=Promos +Type=Promo ScryfallCode=F04 [cards] diff --git a/forge-gui/res/editions/Friday Night Magic 2005.txt b/forge-gui/res/editions/Friday Night Magic 2005.txt index d4e8ce50f12..54b90d32e9a 100644 --- a/forge-gui/res/editions/Friday Night Magic 2005.txt +++ b/forge-gui/res/editions/Friday Night Magic 2005.txt @@ -2,7 +2,7 @@ Code=F05 Date=2005-01-01 Name=Friday Night Magic 2005 -Type=Promos +Type=Promo ScryfallCode=F05 [cards] diff --git a/forge-gui/res/editions/Friday Night Magic 2006.txt b/forge-gui/res/editions/Friday Night Magic 2006.txt index 13fbc7e62e0..1129d7a56c2 100644 --- a/forge-gui/res/editions/Friday Night Magic 2006.txt +++ b/forge-gui/res/editions/Friday Night Magic 2006.txt @@ -2,7 +2,7 @@ Code=F06 Date=2006-01-01 Name=Friday Night Magic 2006 -Type=Promos +Type=Promo ScryfallCode=F06 [cards] diff --git a/forge-gui/res/editions/Friday Night Magic 2007.txt b/forge-gui/res/editions/Friday Night Magic 2007.txt index e41d686c7f8..9c09c43f95b 100644 --- a/forge-gui/res/editions/Friday Night Magic 2007.txt +++ b/forge-gui/res/editions/Friday Night Magic 2007.txt @@ -2,7 +2,7 @@ Code=F07 Date=2007-01-01 Name=Friday Night Magic 2007 -Type=Promos +Type=Promo ScryfallCode=F07 [cards] diff --git a/forge-gui/res/editions/Friday Night Magic 2008.txt b/forge-gui/res/editions/Friday Night Magic 2008.txt index 49495c874f2..d3534e9dd88 100644 --- a/forge-gui/res/editions/Friday Night Magic 2008.txt +++ b/forge-gui/res/editions/Friday Night Magic 2008.txt @@ -2,7 +2,7 @@ Code=F08 Date=2008-01-01 Name=Friday Night Magic 2008 -Type=Promos +Type=Promo ScryfallCode=F08 [cards] diff --git a/forge-gui/res/editions/Friday Night Magic 2009.txt b/forge-gui/res/editions/Friday Night Magic 2009.txt index 2ab8119e218..e0126f2287d 100644 --- a/forge-gui/res/editions/Friday Night Magic 2009.txt +++ b/forge-gui/res/editions/Friday Night Magic 2009.txt @@ -2,7 +2,7 @@ Code=F09 Date=2009-01-01 Name=Friday Night Magic 2009 -Type=Promos +Type=Promo ScryfallCode=F09 [cards] diff --git a/forge-gui/res/editions/Friday Night Magic 2010.txt b/forge-gui/res/editions/Friday Night Magic 2010.txt index 34269a37d75..780cdfe64d8 100644 --- a/forge-gui/res/editions/Friday Night Magic 2010.txt +++ b/forge-gui/res/editions/Friday Night Magic 2010.txt @@ -2,7 +2,7 @@ Code=F10 Date=2010-01-01 Name=Friday Night Magic 2010 -Type=Promos +Type=Promo ScryfallCode=F10 [cards] diff --git a/forge-gui/res/editions/Friday Night Magic 2011.txt b/forge-gui/res/editions/Friday Night Magic 2011.txt index 4ea5559bb1b..a30b5d2453f 100644 --- a/forge-gui/res/editions/Friday Night Magic 2011.txt +++ b/forge-gui/res/editions/Friday Night Magic 2011.txt @@ -2,7 +2,7 @@ Code=F11 Date=2011-01-01 Name=Friday Night Magic 2011 -Type=Promos +Type=Promo ScryfallCode=F11 [cards] diff --git a/forge-gui/res/editions/Friday Night Magic 2012.txt b/forge-gui/res/editions/Friday Night Magic 2012.txt index e5bb6c63088..fbd60e7bae7 100644 --- a/forge-gui/res/editions/Friday Night Magic 2012.txt +++ b/forge-gui/res/editions/Friday Night Magic 2012.txt @@ -2,7 +2,7 @@ Code=F12 Date=2012-01-01 Name=Friday Night Magic 2012 -Type=Promos +Type=Promo ScryfallCode=F12 [cards] diff --git a/forge-gui/res/editions/Friday Night Magic 2013.txt b/forge-gui/res/editions/Friday Night Magic 2013.txt index 95a020d2baf..61abbe0bdfc 100644 --- a/forge-gui/res/editions/Friday Night Magic 2013.txt +++ b/forge-gui/res/editions/Friday Night Magic 2013.txt @@ -2,7 +2,7 @@ Code=F13 Date=2013-01-01 Name=Friday Night Magic 2013 -Type=Promos +Type=Promo ScryfallCode=F13 [cards] diff --git a/forge-gui/res/editions/Friday Night Magic 2014.txt b/forge-gui/res/editions/Friday Night Magic 2014.txt index 161106eebec..0546cbe4a45 100644 --- a/forge-gui/res/editions/Friday Night Magic 2014.txt +++ b/forge-gui/res/editions/Friday Night Magic 2014.txt @@ -2,7 +2,7 @@ Code=F14 Date=2014-01-01 Name=Friday Night Magic 2014 -Type=Promos +Type=Promo ScryfallCode=F14 [cards] diff --git a/forge-gui/res/editions/Friday Night Magic 2015.txt b/forge-gui/res/editions/Friday Night Magic 2015.txt index 8f292d59f65..e9157a069a9 100644 --- a/forge-gui/res/editions/Friday Night Magic 2015.txt +++ b/forge-gui/res/editions/Friday Night Magic 2015.txt @@ -2,7 +2,7 @@ Code=F15 Date=2015-01-01 Name=Friday Night Magic 2015 -Type=Promos +Type=Promo ScryfallCode=F15 [cards] diff --git a/forge-gui/res/editions/Friday Night Magic 2016.txt b/forge-gui/res/editions/Friday Night Magic 2016.txt index 97f69000140..5f66563b243 100644 --- a/forge-gui/res/editions/Friday Night Magic 2016.txt +++ b/forge-gui/res/editions/Friday Night Magic 2016.txt @@ -2,7 +2,7 @@ Code=F16 Date=2016-01-01 Name=Friday Night Magic 2016 -Type=Promos +Type=Promo ScryfallCode=F16 [cards] diff --git a/forge-gui/res/editions/Friday Night Magic 2017.txt b/forge-gui/res/editions/Friday Night Magic 2017.txt index 8a6ff0daf4a..24759a5b3fd 100644 --- a/forge-gui/res/editions/Friday Night Magic 2017.txt +++ b/forge-gui/res/editions/Friday Night Magic 2017.txt @@ -2,7 +2,7 @@ Code=F17 Date=2017-01-01 Name=Friday Night Magic 2017 -Type=Promos +Type=Promo ScryfallCode=F17 [cards] diff --git a/forge-gui/res/editions/From the Vault Angels.txt b/forge-gui/res/editions/From the Vault Angels.txt index d7e52ab61c6..90439cfbde0 100644 --- a/forge-gui/res/editions/From the Vault Angels.txt +++ b/forge-gui/res/editions/From the Vault Angels.txt @@ -3,7 +3,7 @@ Code=V15 Date=2015-08-21 Name=From the Vault: Angels MciCode=v15 -Type=From_the_Vault +Type=Collector_Edition ScryfallCode=V15 [cards] diff --git a/forge-gui/res/editions/From the Vault Annihilation.txt b/forge-gui/res/editions/From the Vault Annihilation.txt index 9135d842dc6..70026976398 100644 --- a/forge-gui/res/editions/From the Vault Annihilation.txt +++ b/forge-gui/res/editions/From the Vault Annihilation.txt @@ -3,7 +3,7 @@ Code=V14 Date=2014-08-22 Name=From the Vault: Annihilation MciCode=v14 -Type=From_the_Vault +Type=Collector_Edition ScryfallCode=V14 [cards] diff --git a/forge-gui/res/editions/From the Vault Dragons.txt b/forge-gui/res/editions/From the Vault Dragons.txt index 36fd60f9d72..5c9b0073da6 100644 --- a/forge-gui/res/editions/From the Vault Dragons.txt +++ b/forge-gui/res/editions/From the Vault Dragons.txt @@ -3,7 +3,7 @@ Code=DRB Date=2008-08-29 Name=From the Vault: Dragons MciCode=fvd -Type=From_the_Vault +Type=Collector_Edition ScryfallCode=DRB [cards] diff --git a/forge-gui/res/editions/From the Vault Exiled.txt b/forge-gui/res/editions/From the Vault Exiled.txt index bee2d1cfac1..39ae2fd4e25 100644 --- a/forge-gui/res/editions/From the Vault Exiled.txt +++ b/forge-gui/res/editions/From the Vault Exiled.txt @@ -3,7 +3,7 @@ Code=FVE Date=2009-08-28 Name=From the Vault: Exiled MciCode=fve -Type=From_the_Vault +Type=Collector_Edition Alias=V09 ScryfallCode=V09 diff --git a/forge-gui/res/editions/From the Vault Legends.txt b/forge-gui/res/editions/From the Vault Legends.txt index 64751742d03..6bee4fe5452 100644 --- a/forge-gui/res/editions/From the Vault Legends.txt +++ b/forge-gui/res/editions/From the Vault Legends.txt @@ -3,7 +3,7 @@ Code=FVL Date=2011-08-26 Name=From the Vault: Legends MciCode=fvl -Type=From_the_Vault +Type=Collector_Edition Alias=V11 ScryfallCode=V11 diff --git a/forge-gui/res/editions/From the Vault Lore.txt b/forge-gui/res/editions/From the Vault Lore.txt index 00b0a0e6c94..62c6a6db3c5 100644 --- a/forge-gui/res/editions/From the Vault Lore.txt +++ b/forge-gui/res/editions/From the Vault Lore.txt @@ -3,7 +3,7 @@ Code=V16 Date=2016-08-19 Name=From the Vault: Lore MciCode=v16 -Type=From_the_Vault +Type=Collector_Edition ScryfallCode=V16 [cards] diff --git a/forge-gui/res/editions/From the Vault Realms.txt b/forge-gui/res/editions/From the Vault Realms.txt index 812da3b4447..6b6a894ffb6 100644 --- a/forge-gui/res/editions/From the Vault Realms.txt +++ b/forge-gui/res/editions/From the Vault Realms.txt @@ -3,7 +3,7 @@ Code=V12 Date=2012-08-31 Name=From the Vault: Realms MciCode=v12 -Type=From_the_Vault +Type=Collector_Edition ScryfallCode=V12 [cards] diff --git a/forge-gui/res/editions/From the Vault Relics.txt b/forge-gui/res/editions/From the Vault Relics.txt index 11e23f5b1c9..0082f6d75c7 100644 --- a/forge-gui/res/editions/From the Vault Relics.txt +++ b/forge-gui/res/editions/From the Vault Relics.txt @@ -3,7 +3,7 @@ Code=FVR Date=2010-08-27 Name=From the Vault: Relics MciCode=fvr -Type=From_the_Vault +Type=Collector_Edition Alias=V10 ScryfallCode=V10 diff --git a/forge-gui/res/editions/From the Vault Transform.txt b/forge-gui/res/editions/From the Vault Transform.txt index 03ceb567464..edaaa09cc06 100644 --- a/forge-gui/res/editions/From the Vault Transform.txt +++ b/forge-gui/res/editions/From the Vault Transform.txt @@ -3,7 +3,7 @@ Code=V17 Date=2017-11-24 Name=From the Vault: Transform MciCode=v17 -Type=From_the_Vault +Type=Collector_Edition ScryfallCode=V17 [cards] diff --git a/forge-gui/res/editions/From the Vault Twenty.txt b/forge-gui/res/editions/From the Vault Twenty.txt index 3630b6c34ee..de69584eb1e 100644 --- a/forge-gui/res/editions/From the Vault Twenty.txt +++ b/forge-gui/res/editions/From the Vault Twenty.txt @@ -4,7 +4,7 @@ Alias=V20 Date=2013-08-23 Name=From the Vault: Twenty MciCode=v13 -Type=From_the_Vault +Type=Collector_Edition ScryfallCode=V13 [cards] diff --git a/forge-gui/res/editions/Future Sight Promos.txt b/forge-gui/res/editions/Future Sight Promos.txt index fa73b297e87..0da1d53c450 100644 --- a/forge-gui/res/editions/Future Sight Promos.txt +++ b/forge-gui/res/editions/Future Sight Promos.txt @@ -2,7 +2,7 @@ Code=PFUT Date=2007-05-04 Name=Future Sight Promos -Type=Promos +Type=Promo ScryfallCode=PFUT [cards] diff --git a/forge-gui/res/editions/GRN Ravnica Weekend.txt b/forge-gui/res/editions/GRN Ravnica Weekend.txt index 1fd0987c306..23c91f15fea 100644 --- a/forge-gui/res/editions/GRN Ravnica Weekend.txt +++ b/forge-gui/res/editions/GRN Ravnica Weekend.txt @@ -2,7 +2,7 @@ Code=PRWK Date=2018-11-09 Name=GRN Ravnica Weekend -Type=Promos +Type=Promo ScryfallCode=PRWK [cards] diff --git a/forge-gui/res/editions/Game Night 2019.txt b/forge-gui/res/editions/Game Night 2019.txt index 3eb0fb50ed2..72ddbbedb94 100644 --- a/forge-gui/res/editions/Game Night 2019.txt +++ b/forge-gui/res/editions/Game Night 2019.txt @@ -4,7 +4,7 @@ Date=2019-11-15 Name=Game Night 2019 Code2=GN2 MciCode=gn2 -Type=Other +Type=Reprint ScryfallCode=GN2 [cards] diff --git a/forge-gui/res/editions/Game Night.txt b/forge-gui/res/editions/Game Night.txt index b54a3273a34..71ef941d6eb 100644 --- a/forge-gui/res/editions/Game Night.txt +++ b/forge-gui/res/editions/Game Night.txt @@ -4,7 +4,7 @@ Date=2018-11-16 Name=Game Night Code2=GNT MciCode=gnt -Type=Other +Type=Reprint ScryfallCode=GNT [cards] diff --git a/forge-gui/res/editions/Gatecrash Promos.txt b/forge-gui/res/editions/Gatecrash Promos.txt index a6f9c210078..1963b73815d 100644 --- a/forge-gui/res/editions/Gatecrash Promos.txt +++ b/forge-gui/res/editions/Gatecrash Promos.txt @@ -2,7 +2,7 @@ Code=PGTC Date=2013-01-26 Name=Gatecrash Promos -Type=Promos +Type=Promo ScryfallCode=PGTC [cards] diff --git a/forge-gui/res/editions/Gateway 2006.txt b/forge-gui/res/editions/Gateway 2006.txt index 3ca523d0fcd..e856a36367f 100644 --- a/forge-gui/res/editions/Gateway 2006.txt +++ b/forge-gui/res/editions/Gateway 2006.txt @@ -2,7 +2,7 @@ Code=PGTW Date=2006-01-01 Name=Gateway 2006 -Type=Reprint +Type=Promo ScryfallCode=PGTW [cards] diff --git a/forge-gui/res/editions/Gateway 2007.txt b/forge-gui/res/editions/Gateway 2007.txt index c0e906d6e3e..f33ce7ea2cf 100644 --- a/forge-gui/res/editions/Gateway 2007.txt +++ b/forge-gui/res/editions/Gateway 2007.txt @@ -2,7 +2,7 @@ Code=PG07 Date=2007-01-01 Name=Gateway 2007 -Type=Reprint +Type=Promo ScryfallCode=PG07 [cards] diff --git a/forge-gui/res/editions/Gateway 2008.txt b/forge-gui/res/editions/Gateway 2008.txt index b9533c6076e..025a41d6d87 100644 --- a/forge-gui/res/editions/Gateway 2008.txt +++ b/forge-gui/res/editions/Gateway 2008.txt @@ -2,7 +2,7 @@ Code=PG08 Date=2008-01-01 Name=Gateway 2008 -Type=Reprint +Type=Promo ScryfallCode=PG08 [cards] diff --git a/forge-gui/res/editions/Global Series Jiang Yanggu & Mu Yanling.txt b/forge-gui/res/editions/Global Series Jiang Yanggu & Mu Yanling.txt index f6649589df2..9cc36d85969 100644 --- a/forge-gui/res/editions/Global Series Jiang Yanggu & Mu Yanling.txt +++ b/forge-gui/res/editions/Global Series Jiang Yanggu & Mu Yanling.txt @@ -3,7 +3,7 @@ Code=GS1 Date=2018-06-22 Name=Global Series Jiang Yanggu & Mu Yanling MciCode=gs1 -Type=Other +Type=Duel_Deck ScryfallCode=GS1 [cards] diff --git a/forge-gui/res/editions/Grand Prix Promos.txt b/forge-gui/res/editions/Grand Prix Promos.txt index 4ac876b3b36..e5360233f4b 100644 --- a/forge-gui/res/editions/Grand Prix Promos.txt +++ b/forge-gui/res/editions/Grand Prix Promos.txt @@ -4,7 +4,7 @@ Code2=PGPX Date=2007-02-24 Name=Grand Prix Promos MciCode=pgpx -Type=Other +Type=Promo ScryfallCode=PGPX [cards] diff --git a/forge-gui/res/editions/Guildpact Promos.txt b/forge-gui/res/editions/Guildpact Promos.txt index ebb71e5ee2c..ed124b5324a 100644 --- a/forge-gui/res/editions/Guildpact Promos.txt +++ b/forge-gui/res/editions/Guildpact Promos.txt @@ -2,7 +2,7 @@ Code=PGPT Date=2006-02-03 Name=Guildpact Promos -Type=Promos +Type=Promo ScryfallCode=PGPT [cards] diff --git a/forge-gui/res/editions/Guilds of Ravnica Guild Kit.txt b/forge-gui/res/editions/Guilds of Ravnica Guild Kit.txt index 9ad95800784..eb52bd54ebb 100644 --- a/forge-gui/res/editions/Guilds of Ravnica Guild Kit.txt +++ b/forge-gui/res/editions/Guilds of Ravnica Guild Kit.txt @@ -4,7 +4,7 @@ Date=2018-11-02 Name=Guilds of Ravnica Guild Kit Code2=GK1 MciCode=gk1 -Type=Other +Type=Reprint ScryfallCode=GK1 [cards] diff --git a/forge-gui/res/editions/Guilds of Ravnica Promos.txt b/forge-gui/res/editions/Guilds of Ravnica Promos.txt index 75abfbde73a..b77faeb6ebd 100644 --- a/forge-gui/res/editions/Guilds of Ravnica Promos.txt +++ b/forge-gui/res/editions/Guilds of Ravnica Promos.txt @@ -2,7 +2,7 @@ Code=PGRN Date=2018-10-05 Name=Guilds of Ravnica Promos -Type=Promos +Type=Promo ScryfallCode=PGRN [cards] diff --git a/forge-gui/res/editions/Guru.txt b/forge-gui/res/editions/Guru.txt index af9cc237d72..06e30ea351f 100644 --- a/forge-gui/res/editions/Guru.txt +++ b/forge-gui/res/editions/Guru.txt @@ -2,7 +2,7 @@ Code=PGRU Date=1999-07-12 Name=Guru -Type=Promos +Type=Promo ScryfallCode=PGRU [cards] diff --git a/forge-gui/res/editions/Hobby Japan Promos.txt b/forge-gui/res/editions/Hobby Japan Promos.txt index 9984585a99d..14d200cbde6 100644 --- a/forge-gui/res/editions/Hobby Japan Promos.txt +++ b/forge-gui/res/editions/Hobby Japan Promos.txt @@ -1,8 +1,8 @@ [metadata] Code=PHJ -Date=2002-07-21 +Date=2002-07-01 Name=Hobby Japan Promos -Type=Promos +Type=Promo CardLang=ja ScryfallCode=PHJ diff --git a/forge-gui/res/editions/Hour of Devastation Promos.txt b/forge-gui/res/editions/Hour of Devastation Promos.txt index b2265375db4..c5a9dfd4f44 100644 --- a/forge-gui/res/editions/Hour of Devastation Promos.txt +++ b/forge-gui/res/editions/Hour of Devastation Promos.txt @@ -2,7 +2,7 @@ Code=PHOU Date=2017-07-14 Name=Hour of Devastation Promos -Type=Promos +Type=Promo ScryfallCode=PHOU [cards] diff --git a/forge-gui/res/editions/IDW Comics 2012.txt b/forge-gui/res/editions/IDW Comics 2012.txt index 032e414ec89..7a637425d3d 100644 --- a/forge-gui/res/editions/IDW Comics 2012.txt +++ b/forge-gui/res/editions/IDW Comics 2012.txt @@ -2,7 +2,7 @@ Code=PIDW Date=2012-01-01 Name=IDW Comics 2012 -Type=Promos +Type=Promo ScryfallCode=PIDW [cards] diff --git a/forge-gui/res/editions/IDW Comics 2013.txt b/forge-gui/res/editions/IDW Comics 2013.txt index 5441c723a0d..0cfd9ba5f0a 100644 --- a/forge-gui/res/editions/IDW Comics 2013.txt +++ b/forge-gui/res/editions/IDW Comics 2013.txt @@ -2,7 +2,7 @@ Code=PI13 Date=2013-01-01 Name=IDW Comics 2013 -Type=Promos +Type=Promo ScryfallCode=PI13 [cards] diff --git a/forge-gui/res/editions/IDW Comics 2014.txt b/forge-gui/res/editions/IDW Comics 2014.txt index cc748ac54f3..89856fa554b 100644 --- a/forge-gui/res/editions/IDW Comics 2014.txt +++ b/forge-gui/res/editions/IDW Comics 2014.txt @@ -2,7 +2,7 @@ Code=PI14 Date=2014-01-01 Name=IDW Comics 2014 -Type=Promos +Type=Promo ScryfallCode=PI14 [cards] diff --git a/forge-gui/res/editions/Ice Age.txt b/forge-gui/res/editions/Ice Age.txt index f8e58572eb6..1383dddec9e 100644 --- a/forge-gui/res/editions/Ice Age.txt +++ b/forge-gui/res/editions/Ice Age.txt @@ -1,6 +1,6 @@ [metadata] Code=ICE -Date=1995-06-01 +Date=1995-06-03 Name=Ice Age Code2=IA MciCode=ia diff --git a/forge-gui/res/editions/Innistrad Promos.txt b/forge-gui/res/editions/Innistrad Promos.txt index a16e1e18f52..1b2d1867666 100644 --- a/forge-gui/res/editions/Innistrad Promos.txt +++ b/forge-gui/res/editions/Innistrad Promos.txt @@ -1,8 +1,8 @@ [metadata] Code=PISD -Date=2011-01-01 +Date=2011-09-24 Name=Innistrad Promos -Type=Promos +Type=Promo ScryfallCode=PISD [cards] diff --git a/forge-gui/res/editions/Invasion Promos.txt b/forge-gui/res/editions/Invasion Promos.txt index 1e5f613c361..a975854ebb7 100644 --- a/forge-gui/res/editions/Invasion Promos.txt +++ b/forge-gui/res/editions/Invasion Promos.txt @@ -2,7 +2,7 @@ Code=PINV Date=2000-10-02 Name=Invasion Promos -Type=Promos +Type=Promo CardLang=la ScryfallCode=PINV diff --git a/forge-gui/res/editions/Ixalan Promos.txt b/forge-gui/res/editions/Ixalan Promos.txt index 3910a91a89b..179a1d53760 100644 --- a/forge-gui/res/editions/Ixalan Promos.txt +++ b/forge-gui/res/editions/Ixalan Promos.txt @@ -2,7 +2,7 @@ Code=PXLN Date=2017-09-29 Name=Ixalan Promos -Type=Promos +Type=Promo ScryfallCode=PXLN [cards] diff --git a/forge-gui/res/editions/Japan Junior Tournament.txt b/forge-gui/res/editions/Japan Junior Tournament.txt index 477c6ca4ff1..506f4f00815 100644 --- a/forge-gui/res/editions/Japan Junior Tournament.txt +++ b/forge-gui/res/editions/Japan Junior Tournament.txt @@ -2,7 +2,7 @@ Code=PJJT Date=2003-01-01 Name=Japan Junior Tournament -Type=Promos +Type=Promo CardLang=ja ScryfallCode=PJJT diff --git a/forge-gui/res/editions/Journey into Nyx Promos.txt b/forge-gui/res/editions/Journey into Nyx Promos.txt index 6acd98b7b7e..c77631e281f 100644 --- a/forge-gui/res/editions/Journey into Nyx Promos.txt +++ b/forge-gui/res/editions/Journey into Nyx Promos.txt @@ -2,7 +2,7 @@ Code=PJOU Date=2014-04-26 Name=Journey into Nyx Promos -Type=Promos +Type=Promo ScryfallCode=PJOU [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 1998.txt b/forge-gui/res/editions/Judge Gift Cards 1998.txt index 6e6debb4917..4d030b2b608 100644 --- a/forge-gui/res/editions/Judge Gift Cards 1998.txt +++ b/forge-gui/res/editions/Judge Gift Cards 1998.txt @@ -2,7 +2,7 @@ Code=JGP Date=1998-01-01 Name=Judge Gift Cards 1998 -Type=Promos +Type=Promo ScryfallCode=JGP [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 1999.txt b/forge-gui/res/editions/Judge Gift Cards 1999.txt index 7d46c88a102..0043c145eda 100644 --- a/forge-gui/res/editions/Judge Gift Cards 1999.txt +++ b/forge-gui/res/editions/Judge Gift Cards 1999.txt @@ -2,7 +2,7 @@ Code=G99 Date=1999-01-01 Name=Judge Gift Cards 1999 -Type=Promos +Type=Promo ScryfallCode=G99 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2000.txt b/forge-gui/res/editions/Judge Gift Cards 2000.txt index 2a5da82f419..ff7e5d7ca21 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2000.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2000.txt @@ -2,7 +2,7 @@ Code=G00 Date=2000-01-01 Name=Judge Gift Cards 2000 -Type=Promos +Type=Promo ScryfallCode=G00 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2001.txt b/forge-gui/res/editions/Judge Gift Cards 2001.txt index 9f4f0fefe8f..e86ddf2b95c 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2001.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2001.txt @@ -2,7 +2,7 @@ Code=G01 Date=2001-01-01 Name=Judge Gift Cards 2001 -Type=Promos +Type=Promo ScryfallCode=G01 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2002.txt b/forge-gui/res/editions/Judge Gift Cards 2002.txt index 92f8c00723e..88c99b714c8 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2002.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2002.txt @@ -2,7 +2,7 @@ Code=G02 Date=2002-01-01 Name=Judge Gift Cards 2002 -Type=Promos +Type=Promo ScryfallCode=G02 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2004.txt b/forge-gui/res/editions/Judge Gift Cards 2004.txt index 40137912188..8c3f21e20e7 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2004.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2004.txt @@ -2,7 +2,7 @@ Code=G04 Date=2004-01-01 Name=Judge Gift Cards 2004 -Type=Promos +Type=Promo ScryfallCode=G04 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2005.txt b/forge-gui/res/editions/Judge Gift Cards 2005.txt index 2f55f30ad83..650873e8d77 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2005.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2005.txt @@ -2,7 +2,7 @@ Code=G05 Date=2005-01-01 Name=Judge Gift Cards 2005 -Type=Promos +Type=Promo ScryfallCode=G05 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2006.txt b/forge-gui/res/editions/Judge Gift Cards 2006.txt index 6b56a61b7e8..90657090a5c 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2006.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2006.txt @@ -2,7 +2,7 @@ Code=G06 Date=2006-01-01 Name=Judge Gift Cards 2006 -Type=Promos +Type=Promo ScryfallCode=G06 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2007.txt b/forge-gui/res/editions/Judge Gift Cards 2007.txt index a30c136153d..06e1a88123e 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2007.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2007.txt @@ -2,7 +2,7 @@ Code=G07 Date=2007-01-01 Name=Judge Gift Cards 2007 -Type=Promos +Type=Promo ScryfallCode=G07 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2008.txt b/forge-gui/res/editions/Judge Gift Cards 2008.txt index 2785d0aa975..834318cf303 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2008.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2008.txt @@ -2,7 +2,7 @@ Code=G08 Date=2008-01-01 Name=Judge Gift Cards 2008 -Type=Promos +Type=Promo ScryfallCode=G08 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2009.txt b/forge-gui/res/editions/Judge Gift Cards 2009.txt index ceda86fc824..e52432e2901 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2009.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2009.txt @@ -2,7 +2,7 @@ Code=G09 Date=2009-01-01 Name=Judge Gift Cards 2009 -Type=Promos +Type=Promo ScryfallCode=G09 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2010.txt b/forge-gui/res/editions/Judge Gift Cards 2010.txt index b3039f58363..ebf52e04349 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2010.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2010.txt @@ -2,7 +2,7 @@ Code=G10 Date=2010-01-01 Name=Judge Gift Cards 2010 -Type=Promos +Type=Promo ScryfallCode=G10 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2011.txt b/forge-gui/res/editions/Judge Gift Cards 2011.txt index 424b6433f36..b9676cef11b 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2011.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2011.txt @@ -2,7 +2,7 @@ Code=G11 Date=2011-01-01 Name=Judge Gift Cards 2011 -Type=Promos +Type=Promo ScryfallCode=G11 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2012.txt b/forge-gui/res/editions/Judge Gift Cards 2012.txt index 77c3dce7e88..e690104c0b1 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2012.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2012.txt @@ -2,7 +2,7 @@ Code=J12 Date=2012-01-01 Name=Judge Gift Cards 2012 -Type=Promos +Type=Promo ScryfallCode=J12 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2013.txt b/forge-gui/res/editions/Judge Gift Cards 2013.txt index adf28001dae..a754471bdb9 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2013.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2013.txt @@ -2,7 +2,7 @@ Code=J13 Date=2013-01-01 Name=Judge Gift Cards 2013 -Type=Promos +Type=Promo ScryfallCode=J13 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2014.txt b/forge-gui/res/editions/Judge Gift Cards 2014.txt index 318df452358..9e7ffe8d0e3 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2014.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2014.txt @@ -2,7 +2,7 @@ Code=J14 Date=2014-01-01 Name=Judge Gift Cards 2014 -Type=Promos +Type=Promo ScryfallCode=J14 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2015.txt b/forge-gui/res/editions/Judge Gift Cards 2015.txt index 517bdc4d55e..83a2841a858 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2015.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2015.txt @@ -2,7 +2,7 @@ Code=J15 Date=2015-01-01 Name=Judge Gift Cards 2015 -Type=Promos +Type=Promo ScryfallCode=J15 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2016.txt b/forge-gui/res/editions/Judge Gift Cards 2016.txt index 0198ab68aa5..4ed1effe665 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2016.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2016.txt @@ -2,7 +2,7 @@ Code=J16 Date=2016-01-01 Name=Judge Gift Cards 2016 -Type=Promos +Type=Promo ScryfallCode=J16 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2017.txt b/forge-gui/res/editions/Judge Gift Cards 2017.txt index c7704dfffa5..5f99b06267d 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2017.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2017.txt @@ -2,7 +2,7 @@ Code=J17 Date=2017-01-01 Name=Judge Gift Cards 2017 -Type=Promos +Type=Promo ScryfallCode=J17 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2018.txt b/forge-gui/res/editions/Judge Gift Cards 2018.txt index 6276a29ac71..f931ee0d5cb 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2018.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2018.txt @@ -2,7 +2,7 @@ Code=J18 Date=2018-01-01 Name=Judge Gift Cards 2018 -Type=Promos +Type=Promo ScryfallCode=J18 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2019.txt b/forge-gui/res/editions/Judge Gift Cards 2019.txt index c3451906b9d..3f162920815 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2019.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2019.txt @@ -2,7 +2,7 @@ Code=J19 Date=2019-04-10 Name=Judge Gift Cards 2019 -Type=Promos +Type=Promo ScryfallCode=J19 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2020.txt b/forge-gui/res/editions/Judge Gift Cards 2020.txt index f4de7cee36d..9d8becd009c 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2020.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2020.txt @@ -2,7 +2,7 @@ Code=J20 Date=2020-01-01 Name=Judge Gift Cards 2020 -Type=Promos +Type=Promo ScryfallCode=J20 [cards] diff --git a/forge-gui/res/editions/Judge Gift Cards 2021.txt b/forge-gui/res/editions/Judge Gift Cards 2021.txt index d069b28d70f..0b788167238 100644 --- a/forge-gui/res/editions/Judge Gift Cards 2021.txt +++ b/forge-gui/res/editions/Judge Gift Cards 2021.txt @@ -2,7 +2,7 @@ Code=J21 Date=2021-01-01 Name=Judge Gift Cards 2021 -Type=Promos +Type=Promo ScryfallCode=J21 [cards] diff --git a/forge-gui/res/editions/Judge_Gift_Cards_2003.txt b/forge-gui/res/editions/Judge_Gift_Cards_2003.txt index e38c2e06710..6bcfd592cf7 100644 --- a/forge-gui/res/editions/Judge_Gift_Cards_2003.txt +++ b/forge-gui/res/editions/Judge_Gift_Cards_2003.txt @@ -2,7 +2,7 @@ Code=G03 Date=2003-01-01 Name=Judge Gift Cards 2003 -Type=Promos +Type=Promo ScryfallCode=G03 [cards] diff --git a/forge-gui/res/editions/Judgment Promos.txt b/forge-gui/res/editions/Judgment Promos.txt index 7ceda93337a..1fa454f9fb0 100644 --- a/forge-gui/res/editions/Judgment Promos.txt +++ b/forge-gui/res/editions/Judgment Promos.txt @@ -2,7 +2,7 @@ Code=PJUD Date=2002-05-27 Name=Judgment Promos -Type=Promos +Type=Promo CardLang=he ScryfallCode=PJUD diff --git a/forge-gui/res/editions/Jumpstart.txt b/forge-gui/res/editions/Jumpstart.txt index aac7a8e370e..f73f06affe3 100644 --- a/forge-gui/res/editions/Jumpstart.txt +++ b/forge-gui/res/editions/Jumpstart.txt @@ -2,7 +2,7 @@ Code=JMP Date=2020-07-17 Name=Jumpstart -Type=Other +Type=Draft_Innovation ScryfallCode=JMP [cards] diff --git a/forge-gui/res/editions/Junior APAC Series.txt b/forge-gui/res/editions/Junior APAC Series.txt index f85f719f840..68f9934e09b 100644 --- a/forge-gui/res/editions/Junior APAC Series.txt +++ b/forge-gui/res/editions/Junior APAC Series.txt @@ -2,7 +2,7 @@ Code=PJAS Date=2006-01-01 Name=Junior APAC Series -Type=Promos +Type=Promo ScryfallCode=PJAS [cards] diff --git a/forge-gui/res/editions/Junior Series Europe.txt b/forge-gui/res/editions/Junior Series Europe.txt index fe2942f7bdb..fe27f8eba3c 100644 --- a/forge-gui/res/editions/Junior Series Europe.txt +++ b/forge-gui/res/editions/Junior Series Europe.txt @@ -2,7 +2,7 @@ Code=PJSE Date=2005-01-01 Name=Junior Series Europe -Type=Promos +Type=Promo ScryfallCode=PJSE [cards] diff --git a/forge-gui/res/editions/Junior Super Series.txt b/forge-gui/res/editions/Junior Super Series.txt index c425af2ba64..0150658b0ba 100644 --- a/forge-gui/res/editions/Junior Super Series.txt +++ b/forge-gui/res/editions/Junior Super Series.txt @@ -2,7 +2,7 @@ Code=PSUS Date=1999-12-01 Name=Junior Super Series -Type=Promos +Type=Promo ScryfallCode=PSUS [cards] diff --git a/forge-gui/res/editions/Kaladesh Promos.txt b/forge-gui/res/editions/Kaladesh Promos.txt index 519a6e5a831..e63d611d2eb 100644 --- a/forge-gui/res/editions/Kaladesh Promos.txt +++ b/forge-gui/res/editions/Kaladesh Promos.txt @@ -1,8 +1,8 @@ [metadata] Code=PKLD -Date=2016-01-01 +Date=2016-09-30 Name=Kaladesh Promos -Type=Promos +Type=Promo ScryfallCode=PKLD [cards] diff --git a/forge-gui/res/editions/Kaldheim Commander.txt b/forge-gui/res/editions/Kaldheim Commander.txt index e34b0a27f1e..e9948a6c42f 100644 --- a/forge-gui/res/editions/Kaldheim Commander.txt +++ b/forge-gui/res/editions/Kaldheim Commander.txt @@ -2,7 +2,7 @@ Code=KHC Date=2021-02-05 Name=Kaldheim Commander -Type=Other +Type=Commander ScryfallCode=KHC [cards] diff --git a/forge-gui/res/editions/Khans of Tarkir Promos.txt b/forge-gui/res/editions/Khans of Tarkir Promos.txt index e3f4847bad8..6dd8fa2dc64 100644 --- a/forge-gui/res/editions/Khans of Tarkir Promos.txt +++ b/forge-gui/res/editions/Khans of Tarkir Promos.txt @@ -1,8 +1,8 @@ [metadata] Code=PKTK -Date=2014-09-27 +Date=2014-09-26 Name=Khans of Tarkir Promos -Type=Promos +Type=Promo ScryfallCode=PKTK [cards] diff --git a/forge-gui/res/editions/Legacy Championship.txt b/forge-gui/res/editions/Legacy Championship.txt index 7b56e4d63a0..2e98d82bce0 100644 --- a/forge-gui/res/editions/Legacy Championship.txt +++ b/forge-gui/res/editions/Legacy Championship.txt @@ -2,7 +2,7 @@ Code=OLGC Date=2011-01-01 Name=Legacy Championship -Type=Promos +Type=Promo ScryfallCode=OLGC [cards] diff --git a/forge-gui/res/editions/Legions Promos.txt b/forge-gui/res/editions/Legions Promos.txt index 6e072450aa7..1f73e620bac 100644 --- a/forge-gui/res/editions/Legions Promos.txt +++ b/forge-gui/res/editions/Legions Promos.txt @@ -2,7 +2,7 @@ Code=PLGN Date=2003-02-03 Name=Legions Promos -Type=Promos +Type=Promo ScryfallCode=PLGN [cards] diff --git a/forge-gui/res/editions/Limited Edition Beta.txt b/forge-gui/res/editions/Limited Edition Beta.txt index dc464d2b285..73f989bcc2c 100644 --- a/forge-gui/res/editions/Limited Edition Beta.txt +++ b/forge-gui/res/editions/Limited Edition Beta.txt @@ -1,6 +1,6 @@ [metadata] Code=LEB -Date=1993-10-01 +Date=1993-10-04 Name=Limited Edition Beta Code2=B MciCode=be diff --git a/forge-gui/res/editions/Lorwyn Promos.txt b/forge-gui/res/editions/Lorwyn Promos.txt index 25001e12c9d..e73af823402 100644 --- a/forge-gui/res/editions/Lorwyn Promos.txt +++ b/forge-gui/res/editions/Lorwyn Promos.txt @@ -1,8 +1,8 @@ [metadata] Code=PLRW -Date=2008-01-01 +Date=2007-10-12 Name=Lorwyn Promos -Type=Promos +Type=Promo ScryfallCode=PLRW [cards] diff --git a/forge-gui/res/editions/Love Your LGS.txt b/forge-gui/res/editions/Love Your LGS.txt index b6ac1c19b56..ee673af9eb4 100644 --- a/forge-gui/res/editions/Love Your LGS.txt +++ b/forge-gui/res/editions/Love Your LGS.txt @@ -2,7 +2,7 @@ Code=PLGS Date=2020-05-18 Name=Love Your LGS -Type=Promos +Type=Promo ScryfallCode=PLGS [cards] diff --git a/forge-gui/res/editions/M15_Prerelease_Challenge.txt b/forge-gui/res/editions/M15_Prerelease_Challenge.txt index fc5ac838463..d69125bdb0e 100644 --- a/forge-gui/res/editions/M15_Prerelease_Challenge.txt +++ b/forge-gui/res/editions/M15_Prerelease_Challenge.txt @@ -4,7 +4,7 @@ Date=2014-07-12 Name=M15 Prerelease Challenge Code2= PPC1 MciCode=ppc1 -Type=Promos +Type=Promo ScryfallCode=PPC1 [cards] diff --git a/forge-gui/res/editions/M19 Gift Pack.txt b/forge-gui/res/editions/M19 Gift Pack.txt index e3642b9de4b..921f3574e2c 100644 --- a/forge-gui/res/editions/M19 Gift Pack.txt +++ b/forge-gui/res/editions/M19 Gift Pack.txt @@ -4,7 +4,7 @@ Date=2018-11-16 Name=M19 Gift Pack Code2=G18 MciCode=g18 -Type=Other +Type=Reprint ScryfallCode=g18 [cards] diff --git a/forge-gui/res/editions/M19 Standard Showdown.txt b/forge-gui/res/editions/M19 Standard Showdown.txt index dda6e173182..6fe41577bd9 100644 --- a/forge-gui/res/editions/M19 Standard Showdown.txt +++ b/forge-gui/res/editions/M19 Standard Showdown.txt @@ -2,7 +2,7 @@ Code=PSS3 Date=2018-07-13 Name=M19 Standard Showdown -Type=Promos +Type=Promo ScryfallCode=PSS3 [cards] diff --git a/forge-gui/res/editions/M20 Promo Packs.txt b/forge-gui/res/editions/M20 Promo Packs.txt index daaa76c829c..6196bf7fd05 100644 --- a/forge-gui/res/editions/M20 Promo Packs.txt +++ b/forge-gui/res/editions/M20 Promo Packs.txt @@ -2,7 +2,7 @@ Code=PPP1 Date=2019-07-12 Name=M20 Promo Packs -Type=Promos +Type=Promo ScryfallCode=PPP1 [cards] diff --git a/forge-gui/res/editions/Magazine Inserts.txt b/forge-gui/res/editions/Magazine Inserts.txt index 83f1adf6472..67cd4b02c7d 100644 --- a/forge-gui/res/editions/Magazine Inserts.txt +++ b/forge-gui/res/editions/Magazine Inserts.txt @@ -2,7 +2,7 @@ Code=PMEI Date=1995-01-01 Name=Magazine Inserts -Type=Reprint +Type=Promo ScryfallCode=PMEI [cards] diff --git a/forge-gui/res/editions/Magic 2010 Promos.txt b/forge-gui/res/editions/Magic 2010 Promos.txt index a6e795f6565..dfe62743d2c 100644 --- a/forge-gui/res/editions/Magic 2010 Promos.txt +++ b/forge-gui/res/editions/Magic 2010 Promos.txt @@ -2,7 +2,7 @@ Code=PM10 Date=2009-07-16 Name=Magic 2010 Promos -Type=Promos +Type=Promo ScryfallCode=PM10 [cards] diff --git a/forge-gui/res/editions/Magic 2011 Promos.txt b/forge-gui/res/editions/Magic 2011 Promos.txt index be8aad9b260..9ff5d0b2961 100644 --- a/forge-gui/res/editions/Magic 2011 Promos.txt +++ b/forge-gui/res/editions/Magic 2011 Promos.txt @@ -2,7 +2,7 @@ Code=PM11 Date=2010-07-15 Name=Magic 2011 Promos -Type=Promos +Type=Promo ScryfallCode=PM11 [cards] diff --git a/forge-gui/res/editions/Magic 2012 Promos.txt b/forge-gui/res/editions/Magic 2012 Promos.txt index de76e9a0347..37a55ce4136 100644 --- a/forge-gui/res/editions/Magic 2012 Promos.txt +++ b/forge-gui/res/editions/Magic 2012 Promos.txt @@ -1,8 +1,8 @@ [metadata] Code=PM12 -Date=2012-01-01 +Date=2011-07-14 Name=Magic 2012 Promos -Type=Promos +Type=Promo ScryfallCode=PM12 [cards] diff --git a/forge-gui/res/editions/Magic 2013 Promos.txt b/forge-gui/res/editions/Magic 2013 Promos.txt index 3dadfa46665..067cb6c709a 100644 --- a/forge-gui/res/editions/Magic 2013 Promos.txt +++ b/forge-gui/res/editions/Magic 2013 Promos.txt @@ -2,7 +2,7 @@ Code=PM13 Date=2012-07-12 Name=Magic 2013 Promos -Type=Promos +Type=Promo ScryfallCode=PM13 [cards] diff --git a/forge-gui/res/editions/Magic 2014 Promos.txt b/forge-gui/res/editions/Magic 2014 Promos.txt index 1b6d466f676..449316e9041 100644 --- a/forge-gui/res/editions/Magic 2014 Promos.txt +++ b/forge-gui/res/editions/Magic 2014 Promos.txt @@ -2,7 +2,7 @@ Code=PM14 Date=2013-07-18 Name=Magic 2014 Promos -Type=Promos +Type=Promo ScryfallCode=PM14 [cards] diff --git a/forge-gui/res/editions/Magic 2015 Clash Pack.txt b/forge-gui/res/editions/Magic 2015 Clash Pack.txt index 2bccc6ec467..7405441792f 100644 --- a/forge-gui/res/editions/Magic 2015 Clash Pack.txt +++ b/forge-gui/res/editions/Magic 2015 Clash Pack.txt @@ -2,7 +2,7 @@ Code=CP1 Date=2014-07-18 Name=Magic 2015 Clash Pack -Type=Promos +Type=Starter ScryfallCode=CP1 [cards] diff --git a/forge-gui/res/editions/Magic 2015 Promos.txt b/forge-gui/res/editions/Magic 2015 Promos.txt index 1f4c646aa65..1104ea6719a 100644 --- a/forge-gui/res/editions/Magic 2015 Promos.txt +++ b/forge-gui/res/editions/Magic 2015 Promos.txt @@ -2,7 +2,7 @@ Code=PM15 Date=2014-07-17 Name=Magic 2015 Promos -Type=Promos +Type=Promo ScryfallCode=PM15 [cards] diff --git a/forge-gui/res/editions/Magic 2021.txt b/forge-gui/res/editions/Magic 2021.txt index af5e5a35ac0..c73e31f7f0a 100644 --- a/forge-gui/res/editions/Magic 2021.txt +++ b/forge-gui/res/editions/Magic 2021.txt @@ -1,6 +1,6 @@ [metadata] Code=M21 -Date=2020-06-04 +Date=2020-07-03 Name=Core Set 2021 Type=Core BoosterCovers=3 diff --git a/forge-gui/res/editions/Magic Online Deck Series.txt b/forge-gui/res/editions/Magic Online Deck Series.txt index 2f95251614f..786bf255f70 100644 --- a/forge-gui/res/editions/Magic Online Deck Series.txt +++ b/forge-gui/res/editions/Magic Online Deck Series.txt @@ -47,4 +47,4 @@ B37 L Plains B38 L Mountain B39 L Mountain B40 L Mountain -B41 L Mountain \ No newline at end of file +B41 L Mountain diff --git a/forge-gui/res/editions/Magic Origins Clash Pack.txt b/forge-gui/res/editions/Magic Origins Clash Pack.txt index 36f5f0e6c64..d124b72537c 100644 --- a/forge-gui/res/editions/Magic Origins Clash Pack.txt +++ b/forge-gui/res/editions/Magic Origins Clash Pack.txt @@ -2,7 +2,7 @@ Code=CP3 Date=2015-07-17 Name=Magic Origins Clash Pack -Type=Promos +Type=Starter ScryfallCode=CP3 [cards] diff --git a/forge-gui/res/editions/Magic Origins Promos.txt b/forge-gui/res/editions/Magic Origins Promos.txt index b8ba8a623b8..ad87c33e1f8 100644 --- a/forge-gui/res/editions/Magic Origins Promos.txt +++ b/forge-gui/res/editions/Magic Origins Promos.txt @@ -2,7 +2,7 @@ Code=PORI Date=2015-07-17 Name=Magic Origins Promos -Type=Promos +Type=Promo ScryfallCode=PORI [cards] diff --git a/forge-gui/res/editions/Magic Player Rewards 2001.txt b/forge-gui/res/editions/Magic Player Rewards 2001.txt index 1fc1e8997fe..57d5915cce9 100644 --- a/forge-gui/res/editions/Magic Player Rewards 2001.txt +++ b/forge-gui/res/editions/Magic Player Rewards 2001.txt @@ -2,7 +2,7 @@ Code=MPR Date=2001-01-01 Name=Magic Player Rewards 2001 -Type=Promos +Type=Promo ScryfallCode=MPR [cards] diff --git a/forge-gui/res/editions/Magic Player Rewards 2003.txt b/forge-gui/res/editions/Magic Player Rewards 2003.txt index e5b0c423cbb..59afe2992d3 100644 --- a/forge-gui/res/editions/Magic Player Rewards 2003.txt +++ b/forge-gui/res/editions/Magic Player Rewards 2003.txt @@ -2,7 +2,7 @@ Code=P03 Date=2003-01-01 Name=Magic Player Rewards 2003 -Type=Promos +Type=Promo ScryfallCode=P03 [cards] diff --git a/forge-gui/res/editions/Magic Player Rewards 2004.txt b/forge-gui/res/editions/Magic Player Rewards 2004.txt index 523979c208f..89bebd4f85e 100644 --- a/forge-gui/res/editions/Magic Player Rewards 2004.txt +++ b/forge-gui/res/editions/Magic Player Rewards 2004.txt @@ -2,7 +2,7 @@ Code=P04 Date=2004-01-01 Name=Magic Player Rewards 2004 -Type=Promos +Type=Promo ScryfallCode=P04 [cards] diff --git a/forge-gui/res/editions/Magic Player Rewards 2005.txt b/forge-gui/res/editions/Magic Player Rewards 2005.txt index 4632b6c7bcd..795e0ff6540 100644 --- a/forge-gui/res/editions/Magic Player Rewards 2005.txt +++ b/forge-gui/res/editions/Magic Player Rewards 2005.txt @@ -2,7 +2,7 @@ Code=P05 Date=2005-01-01 Name=Magic Player Rewards 2005 -Type=Promos +Type=Promo ScryfallCode=P05 [cards] diff --git a/forge-gui/res/editions/Magic Player Rewards 2006.txt b/forge-gui/res/editions/Magic Player Rewards 2006.txt index c6dba0dafd9..013cd393b46 100644 --- a/forge-gui/res/editions/Magic Player Rewards 2006.txt +++ b/forge-gui/res/editions/Magic Player Rewards 2006.txt @@ -2,7 +2,7 @@ Code=P06 Date=2006-01-01 Name=Magic Player Rewards 2006 -Type=Promos +Type=Promo ScryfallCode=P06 [cards] diff --git a/forge-gui/res/editions/Magic Player Rewards 2007.txt b/forge-gui/res/editions/Magic Player Rewards 2007.txt index a7902cf8707..61c86f67c1d 100644 --- a/forge-gui/res/editions/Magic Player Rewards 2007.txt +++ b/forge-gui/res/editions/Magic Player Rewards 2007.txt @@ -2,7 +2,7 @@ Code=P07 Date=2007-01-01 Name=Magic Player Rewards 2007 -Type=Promos +Type=Promo ScryfallCode=P07 [cards] diff --git a/forge-gui/res/editions/Magic Player Rewards 2008.txt b/forge-gui/res/editions/Magic Player Rewards 2008.txt index cfe7adb4010..c98780d88d1 100644 --- a/forge-gui/res/editions/Magic Player Rewards 2008.txt +++ b/forge-gui/res/editions/Magic Player Rewards 2008.txt @@ -2,7 +2,7 @@ Code=P08 Date=2008-01-01 Name=Magic Player Rewards 2008 -Type=Promos +Type=Promo ScryfallCode=P08 [cards] diff --git a/forge-gui/res/editions/Magic Player Rewards 2009.txt b/forge-gui/res/editions/Magic Player Rewards 2009.txt index cef2bdfe739..b5c986ff4de 100644 --- a/forge-gui/res/editions/Magic Player Rewards 2009.txt +++ b/forge-gui/res/editions/Magic Player Rewards 2009.txt @@ -2,7 +2,7 @@ Code=P09 Date=2009-01-01 Name=Magic Player Rewards 2009 -Type=Promos +Type=Promo ScryfallCode=P09 [cards] diff --git a/forge-gui/res/editions/Magic Player Rewards 2010.txt b/forge-gui/res/editions/Magic Player Rewards 2010.txt index c62ba8e2db3..aaed31c7e81 100644 --- a/forge-gui/res/editions/Magic Player Rewards 2010.txt +++ b/forge-gui/res/editions/Magic Player Rewards 2010.txt @@ -2,7 +2,7 @@ Code=P10 Date=2010-01-01 Name=Magic Player Rewards 2010 -Type=Promos +Type=Promo ScryfallCode=P10 [cards] diff --git a/forge-gui/res/editions/Magic Player Rewards 2011.txt b/forge-gui/res/editions/Magic Player Rewards 2011.txt index 0c54cc908e5..c6d034b48ca 100644 --- a/forge-gui/res/editions/Magic Player Rewards 2011.txt +++ b/forge-gui/res/editions/Magic Player Rewards 2011.txt @@ -2,7 +2,7 @@ Code=P11 Date=2011-01-01 Name=Magic Player Rewards 2011 -Type=Promos +Type=Promo ScryfallCode=P11 [cards] diff --git a/forge-gui/res/editions/Magic Premiere Shop 2005.txt b/forge-gui/res/editions/Magic Premiere Shop 2005.txt index 3e386519fcd..39593e4aa67 100644 --- a/forge-gui/res/editions/Magic Premiere Shop 2005.txt +++ b/forge-gui/res/editions/Magic Premiere Shop 2005.txt @@ -2,7 +2,7 @@ Code=PMPS Date=2005-01-01 Name=Magic Premiere Shop 2005 -Type=Promos +Type=Promo CardLang=ja ScryfallCode=PMPS diff --git a/forge-gui/res/editions/Magic Premiere Shop 2006.txt b/forge-gui/res/editions/Magic Premiere Shop 2006.txt index 76ff8b4699b..37ccca9417e 100644 --- a/forge-gui/res/editions/Magic Premiere Shop 2006.txt +++ b/forge-gui/res/editions/Magic Premiere Shop 2006.txt @@ -2,7 +2,7 @@ Code=PMPS06 Date=2006-01-01 Name=Magic Premiere Shop 2006 -Type=Promos +Type=Promo CardLang=ja ScryfallCode=PMPS06 diff --git a/forge-gui/res/editions/Magic Premiere Shop 2007.txt b/forge-gui/res/editions/Magic Premiere Shop 2007.txt index b14ae70e121..6335c56470e 100644 --- a/forge-gui/res/editions/Magic Premiere Shop 2007.txt +++ b/forge-gui/res/editions/Magic Premiere Shop 2007.txt @@ -2,7 +2,7 @@ Code=PMPS07 Date=2007-01-01 Name=Magic Premiere Shop 2007 -Type=Promos +Type=Promo CardLang=ja ScryfallCode=PMPS07 diff --git a/forge-gui/res/editions/Magic Premiere Shop 2008.txt b/forge-gui/res/editions/Magic Premiere Shop 2008.txt index 428f679aff3..d19af92356a 100644 --- a/forge-gui/res/editions/Magic Premiere Shop 2008.txt +++ b/forge-gui/res/editions/Magic Premiere Shop 2008.txt @@ -2,7 +2,7 @@ Code=PMPS08 Date=2008-01-01 Name=Magic Premiere Shop 2008 -Type=Promos +Type=Promo CardLang=ja ScryfallCode=PMPS08 diff --git a/forge-gui/res/editions/Magic Premiere Shop 2009.txt b/forge-gui/res/editions/Magic Premiere Shop 2009.txt index 6592da87cc9..d95f8c0b634 100644 --- a/forge-gui/res/editions/Magic Premiere Shop 2009.txt +++ b/forge-gui/res/editions/Magic Premiere Shop 2009.txt @@ -2,7 +2,7 @@ Code=PMPS09 Date=2009-01-01 Name=Magic Premiere Shop 2009 -Type=Promos +Type=Promo CardLang=ja ScryfallCode=PMPS09 diff --git a/forge-gui/res/editions/Magic Premiere Shop 2010.txt b/forge-gui/res/editions/Magic Premiere Shop 2010.txt index 0b660a92e5c..c1acb3efb9e 100644 --- a/forge-gui/res/editions/Magic Premiere Shop 2010.txt +++ b/forge-gui/res/editions/Magic Premiere Shop 2010.txt @@ -2,7 +2,7 @@ Code=PMPS10 Date=2010-01-01 Name=Magic Premiere Shop 2010 -Type=Promos +Type=Promo CardLang=ja ScryfallCode=PMPS10 diff --git a/forge-gui/res/editions/Magic Premiere Shop 2011.txt b/forge-gui/res/editions/Magic Premiere Shop 2011.txt index 37804251c6c..23c0bf87a7e 100644 --- a/forge-gui/res/editions/Magic Premiere Shop 2011.txt +++ b/forge-gui/res/editions/Magic Premiere Shop 2011.txt @@ -2,7 +2,7 @@ Code=PMPS11 Date=2011-01-01 Name=Magic Premiere Shop 2011 -Type=Promos +Type=Promo CardLang=ja ScryfallCode=PMPS11 diff --git a/forge-gui/res/editions/MagicFest 2019.txt b/forge-gui/res/editions/MagicFest 2019.txt index abc492ced0f..b008b0cf01f 100644 --- a/forge-gui/res/editions/MagicFest 2019.txt +++ b/forge-gui/res/editions/MagicFest 2019.txt @@ -2,7 +2,7 @@ Code=PF19 Date=2019-01-01 Name=MagicFest 2019 -Type=Promos +Type=Promo ScryfallCode=PF19 [cards] diff --git a/forge-gui/res/editions/MagicFest 2020.txt b/forge-gui/res/editions/MagicFest 2020.txt index ec2408797de..af9a5a3716b 100644 --- a/forge-gui/res/editions/MagicFest 2020.txt +++ b/forge-gui/res/editions/MagicFest 2020.txt @@ -2,7 +2,7 @@ Code=PF20 Date=2020-01-01 Name=MagicFest 2020 -Type=Promos +Type=Promo ScryfallCode=PF20 [cards] diff --git a/forge-gui/res/editions/Masterpiece Series - Amonkhet.txt b/forge-gui/res/editions/Masterpiece Series - Amonkhet.txt index 6c19ab84c87..33a9194d6fb 100644 --- a/forge-gui/res/editions/Masterpiece Series - Amonkhet.txt +++ b/forge-gui/res/editions/Masterpiece Series - Amonkhet.txt @@ -3,7 +3,7 @@ Code=MPS_AKH Date=2017-04-28 Name=Masterpiece Series - Amonkhet MciCode=mp2 -Type=Other +Type=Collector_Edition ScryfallCode=mp2 [cards] diff --git a/forge-gui/res/editions/Masterpiece Series - Kaladesh.txt b/forge-gui/res/editions/Masterpiece Series - Kaladesh.txt index 9db29423e83..addd05dfe12 100644 --- a/forge-gui/res/editions/Masterpiece Series - Kaladesh.txt +++ b/forge-gui/res/editions/Masterpiece Series - Kaladesh.txt @@ -4,7 +4,7 @@ Alias=MPS Date=2016-09-30 Name=Masterpiece Series - Kaladesh MciCode=mps -Type=Other +Type=Collector_Edition ScryfallCode=mps [cards] diff --git a/forge-gui/res/editions/Masters Edition.txt b/forge-gui/res/editions/Masters Edition.txt index c5888bfed72..53e43072f5b 100644 --- a/forge-gui/res/editions/Masters Edition.txt +++ b/forge-gui/res/editions/Masters Edition.txt @@ -212,4 +212,4 @@ b_0_1_thrull b_2_2_zombie r_1_1_survivor g_1_1_hippo -c_1_1_a_snake_poison \ No newline at end of file +c_1_1_a_snake_poison diff --git a/forge-gui/res/editions/Mercadian Masques Promos.txt b/forge-gui/res/editions/Mercadian Masques Promos.txt index f0af101cbd0..83e218aebd2 100644 --- a/forge-gui/res/editions/Mercadian Masques Promos.txt +++ b/forge-gui/res/editions/Mercadian Masques Promos.txt @@ -2,7 +2,7 @@ Code=PMMQ Date=1999-10-04 Name=Mercadian Masques Promos -Type=Promos +Type=Promo ScryfallCode=PMMQ [cards] diff --git a/forge-gui/res/editions/Mirrodin Besieged Promos.txt b/forge-gui/res/editions/Mirrodin Besieged Promos.txt index 68858b99026..2da64944622 100644 --- a/forge-gui/res/editions/Mirrodin Besieged Promos.txt +++ b/forge-gui/res/editions/Mirrodin Besieged Promos.txt @@ -2,7 +2,7 @@ Code=PMBS Date=2011-02-03 Name=Mirrodin Besieged Promos -Type=Promos +Type=Promo ScryfallCode=PMBS [cards] diff --git a/forge-gui/res/editions/Mirrodin Promos.txt b/forge-gui/res/editions/Mirrodin Promos.txt index b72720ec0fe..eb51b9fe8be 100644 --- a/forge-gui/res/editions/Mirrodin Promos.txt +++ b/forge-gui/res/editions/Mirrodin Promos.txt @@ -2,7 +2,7 @@ Code=PMRD Date=2004-06-04 Name=Mirrodin Promos -Type=Promos +Type=Promo ScryfallCode=PMRD [cards] diff --git a/forge-gui/res/editions/Miscellaneous Book Promos.txt b/forge-gui/res/editions/Miscellaneous Book Promos.txt index 78b608ac245..29af5fb3bdd 100644 --- a/forge-gui/res/editions/Miscellaneous Book Promos.txt +++ b/forge-gui/res/editions/Miscellaneous Book Promos.txt @@ -2,7 +2,7 @@ Code=PBOOK Date=2009-01-27 Name=Miscellaneous Book Promos -Type=Promos +Type=Promo ScryfallCode=PBOOK [cards] diff --git a/forge-gui/res/editions/Modern Event Deck.txt b/forge-gui/res/editions/Modern Event Deck.txt index cb8e2f715e6..35786cf4895 100644 --- a/forge-gui/res/editions/Modern Event Deck.txt +++ b/forge-gui/res/editions/Modern Event Deck.txt @@ -4,7 +4,7 @@ Date=2014-05-30 Name=Modern Event Deck Code2=MD1 MciCode=md1 -Type=other +Type=Reprint ScryfallCode=MD1 [cards] diff --git a/forge-gui/res/editions/Modern Horizons 1 Timeshifts.txt b/forge-gui/res/editions/Modern Horizons 1 Timeshifts.txt index 551de14eb7f..81d22d241ef 100644 --- a/forge-gui/res/editions/Modern Horizons 1 Timeshifts.txt +++ b/forge-gui/res/editions/Modern Horizons 1 Timeshifts.txt @@ -4,7 +4,7 @@ Date=2021-06-18 Name=Modern Horizons 1 Timeshifts Code2=RMH1 Alias=RMH1 -Type=Other +Type=Draft_Innovation ScryfallCode=H1R [cards] diff --git a/forge-gui/res/editions/Modern Horizons 2.txt b/forge-gui/res/editions/Modern Horizons 2.txt index 10d4685b891..3301f26d0fa 100644 --- a/forge-gui/res/editions/Modern Horizons 2.txt +++ b/forge-gui/res/editions/Modern Horizons 2.txt @@ -4,7 +4,7 @@ Date=2021-06-18 Name=Modern Horizons 2 Code2=MH2 MciCode=mh2 -Type=Other +Type=Draft_Innovation Booster=10 Common:fromSheet("MH2 cards"), 3 Uncommon:fromSheet("MH2 cards"), 1 RareMythic:fromSheet("MH2 cards"), 1 fromSheet("MH2 Lands") BoosterReplaceSlotFromPrintSheet=MH2 NewToModern BoosterBox=36 diff --git a/forge-gui/res/editions/Modern Horizons Promos.txt b/forge-gui/res/editions/Modern Horizons Promos.txt index ff4c1ab23de..2377daceb61 100644 --- a/forge-gui/res/editions/Modern Horizons Promos.txt +++ b/forge-gui/res/editions/Modern Horizons Promos.txt @@ -2,7 +2,7 @@ Code=PMH1 Date=2019-06-14 Name=Modern Horizons Promos -Type=Promos +Type=Promo ScryfallCode=PMH1 [cards] diff --git a/forge-gui/res/editions/Modern Horizons.txt b/forge-gui/res/editions/Modern Horizons.txt index 71365f523c9..c9bb9ce1030 100644 --- a/forge-gui/res/editions/Modern Horizons.txt +++ b/forge-gui/res/editions/Modern Horizons.txt @@ -4,7 +4,7 @@ Date=2019-06-14 Name=Modern Horizons Code2=MH1 MciCode=mh1 -Type=Other +Type=Draft_Innovation BoosterCovers=5 Booster=10 Common:!fromSheet("MH1 Secret Cards"), 3 Uncommon:!fromSheet("MH1 Secret Cards"), 1 RareMythic:!fromSheet("MH1 Secret Cards"), 1 fromSheet("MH1 Lands") BoosterBox=24 diff --git a/forge-gui/res/editions/Morningtide Promos.txt b/forge-gui/res/editions/Morningtide Promos.txt index 56650efcd3b..2daeb69bb57 100644 --- a/forge-gui/res/editions/Morningtide Promos.txt +++ b/forge-gui/res/editions/Morningtide Promos.txt @@ -2,7 +2,7 @@ Code=PMOR Date=2008-02-01 Name=Morningtide Promos -Type=Promos +Type=Promo ScryfallCode=PMOR [cards] diff --git a/forge-gui/res/editions/Mystery Booster Retail Edition Foils.txt b/forge-gui/res/editions/Mystery Booster Retail Edition Foils.txt index 0ec15408d45..da2a67bdf76 100644 --- a/forge-gui/res/editions/Mystery Booster Retail Edition Foils.txt +++ b/forge-gui/res/editions/Mystery Booster Retail Edition Foils.txt @@ -2,7 +2,7 @@ Code=FMB1 Date=2020-03-08 Name=Mystery Booster Retail Edition Foils -Type=Other +Type=Reprint ScryfallCode=FMB1 [cards] diff --git a/forge-gui/res/editions/Mythic Edition - Guilds of Ravnica.txt b/forge-gui/res/editions/Mythic Edition - Guilds of Ravnica.txt index 63b305634e8..4506c7a427e 100644 --- a/forge-gui/res/editions/Mythic Edition - Guilds of Ravnica.txt +++ b/forge-gui/res/editions/Mythic Edition - Guilds of Ravnica.txt @@ -1,9 +1,9 @@ [metadata] Code=MPS_GRN -Date=2018-10-03 +Date=2018-10-05 Name=Mythic Edition - Guilds of Ravnica MciCode=med -Type=Other +Type=Collector_Edition ScryfallCode=med [cards] @@ -19,4 +19,4 @@ GR8 M Vraska, Golgari Queen [tokens] w_1_1_soldier b_2_2_zombie -c_1_1_a_construct_defender \ No newline at end of file +c_1_1_a_construct_defender diff --git a/forge-gui/res/editions/Mythic Edition - Ravnica Allegiance.txt b/forge-gui/res/editions/Mythic Edition - Ravnica Allegiance.txt index d38f529af44..1e9009e9266 100644 --- a/forge-gui/res/editions/Mythic Edition - Ravnica Allegiance.txt +++ b/forge-gui/res/editions/Mythic Edition - Ravnica Allegiance.txt @@ -1,9 +1,9 @@ [metadata] Code=MPS_RNA -Date=2019-01-24 +Date=2018-10-05 Name=Mythic Edition - Ravnica Allegiance MciCode=med -Type=Other +Type=Collector_Edition ScryfallCode=med [cards] diff --git a/forge-gui/res/editions/Mythic Edition - War of the Spark.txt b/forge-gui/res/editions/Mythic Edition - War of the Spark.txt index 416426d3e00..b8206ff4e7d 100644 --- a/forge-gui/res/editions/Mythic Edition - War of the Spark.txt +++ b/forge-gui/res/editions/Mythic Edition - War of the Spark.txt @@ -1,9 +1,9 @@ [metadata] Code=MPS_WAR -Date=2019-05-03 +Date=2018-10-05 Name=Mythic Edition - War of the Spark MciCode=med -Type=Other +Type=Collector_Edition ScryfallCode=med [cards] diff --git a/forge-gui/res/editions/Nationals Promos.txt b/forge-gui/res/editions/Nationals Promos.txt index ce82cfe0f82..2979dc0bb8f 100644 --- a/forge-gui/res/editions/Nationals Promos.txt +++ b/forge-gui/res/editions/Nationals Promos.txt @@ -2,7 +2,7 @@ Code=PNAT Date=2018-01-25 Name=Nationals Promos -Type=Promos +Type=Promo ScryfallCode=PNAT [cards] diff --git a/forge-gui/res/editions/Nemesis Promos.txt b/forge-gui/res/editions/Nemesis Promos.txt index 59a9ef78f76..73b1a3fa17b 100644 --- a/forge-gui/res/editions/Nemesis Promos.txt +++ b/forge-gui/res/editions/Nemesis Promos.txt @@ -2,7 +2,7 @@ Code=PNEM Date=2000-02-14 Name=Nemesis Promos -Type=Promos +Type=Promo ScryfallCode=PNEM [cards] diff --git a/forge-gui/res/editions/New Phyrexia Promos.txt b/forge-gui/res/editions/New Phyrexia Promos.txt index 66465984cfc..860ca951157 100644 --- a/forge-gui/res/editions/New Phyrexia Promos.txt +++ b/forge-gui/res/editions/New Phyrexia Promos.txt @@ -2,7 +2,7 @@ Code=PNPH Date=2011-05-12 Name=New Phyrexia Promos -Type=Promos +Type=Promo ScryfallCode=PNPH [cards] diff --git a/forge-gui/res/editions/Ninth Edition Promos.txt b/forge-gui/res/editions/Ninth Edition Promos.txt index 9647d21372d..20d2b169400 100644 --- a/forge-gui/res/editions/Ninth Edition Promos.txt +++ b/forge-gui/res/editions/Ninth Edition Promos.txt @@ -2,7 +2,7 @@ Code=P9ED Date=2005-07-29 Name=Ninth Edition Promos -Type=Promos +Type=Promo ScryfallCode=P9ED [cards] diff --git a/forge-gui/res/editions/Oath of the Gatewatch Promos.txt b/forge-gui/res/editions/Oath of the Gatewatch Promos.txt index 558afd6c120..ea8d797f07b 100644 --- a/forge-gui/res/editions/Oath of the Gatewatch Promos.txt +++ b/forge-gui/res/editions/Oath of the Gatewatch Promos.txt @@ -1,8 +1,8 @@ [metadata] Code=POGW -Date=2016-01-23 +Date=2016-01-22 Name=Oath of the Gatewatch Promos -Type=Promos +Type=Promo ScryfallCode=POGW [cards] diff --git a/forge-gui/res/editions/Odyssey Promos.txt b/forge-gui/res/editions/Odyssey Promos.txt index 8a0b70b6805..e479222dfc1 100644 --- a/forge-gui/res/editions/Odyssey Promos.txt +++ b/forge-gui/res/editions/Odyssey Promos.txt @@ -2,7 +2,7 @@ Code=PODY Date=2001-10-01 Name=Odyssey Promos -Type=Promos +Type=Promo CardLang=ar ScryfallCode=PODY diff --git a/forge-gui/res/editions/Online Promos.txt b/forge-gui/res/editions/Online Promos.txt index a16cad8bfec..6f26ed794f8 100644 --- a/forge-gui/res/editions/Online Promos.txt +++ b/forge-gui/res/editions/Online Promos.txt @@ -2,7 +2,7 @@ Name=Online Promos Code=PRM Date=2002-06-24 -Type=Promos +Type=Online ScryfallCode=PRM [cards] diff --git a/forge-gui/res/editions/Onslaught Promos.txt b/forge-gui/res/editions/Onslaught Promos.txt index 5209dae3325..0fcb3b4d571 100644 --- a/forge-gui/res/editions/Onslaught Promos.txt +++ b/forge-gui/res/editions/Onslaught Promos.txt @@ -2,7 +2,7 @@ Code=PONS Date=2003-02-03 Name=Onslaught Promos -Type=Promos +Type=Promo ScryfallCode=PONS [cards] diff --git a/forge-gui/res/editions/Open the Helvault.txt b/forge-gui/res/editions/Open the Helvault.txt index 7a2c028ff91..04e3e48495a 100644 --- a/forge-gui/res/editions/Open the Helvault.txt +++ b/forge-gui/res/editions/Open the Helvault.txt @@ -2,7 +2,7 @@ Code=PHEL Date=2012-04-28 Name=Open the Helvault -Type=Promos +Type=Promo ScryfallCode=PHEL [cards] diff --git a/forge-gui/res/editions/Planar Chaos Promos.txt b/forge-gui/res/editions/Planar Chaos Promos.txt index e595986b0af..872ddb1423f 100644 --- a/forge-gui/res/editions/Planar Chaos Promos.txt +++ b/forge-gui/res/editions/Planar Chaos Promos.txt @@ -2,7 +2,7 @@ Code=PPLC Date=2007-02-02 Name=Planar Chaos Promos -Type=Promos +Type=Promo ScryfallCode=PPLC [cards] diff --git a/forge-gui/res/editions/Planechase 2012.txt b/forge-gui/res/editions/Planechase 2012.txt index 106ee4d882c..7a2d0cdbca3 100644 --- a/forge-gui/res/editions/Planechase 2012.txt +++ b/forge-gui/res/editions/Planechase 2012.txt @@ -4,7 +4,7 @@ Date=2012-06-01 Name=Planechase 2012 Code2=PC2 MciCode=pc2 -Type=Other +Type=Commander ScryfallCode=PC2 [cards] diff --git a/forge-gui/res/editions/Planechase Anthology.txt b/forge-gui/res/editions/Planechase Anthology.txt index e67d4279d0d..70afcf24049 100644 --- a/forge-gui/res/editions/Planechase Anthology.txt +++ b/forge-gui/res/editions/Planechase Anthology.txt @@ -4,7 +4,7 @@ Date=2016-11-25 Name=Planechase Anthology Code2=PCA MciCode=pca -Type=Other +Type=Commander ScryfallCode=PCA [cards] diff --git a/forge-gui/res/editions/Planechase.txt b/forge-gui/res/editions/Planechase.txt index 3fa5328971d..ca527147ce6 100644 --- a/forge-gui/res/editions/Planechase.txt +++ b/forge-gui/res/editions/Planechase.txt @@ -5,7 +5,7 @@ Name=Planechase Alias=PCH Code2=HOP MciCode=pch -Type=Other +Type=Commander ScryfallCode=HOP [cards] diff --git a/forge-gui/res/editions/Planeshift Promos.txt b/forge-gui/res/editions/Planeshift Promos.txt index ab45d710f88..36833833016 100644 --- a/forge-gui/res/editions/Planeshift Promos.txt +++ b/forge-gui/res/editions/Planeshift Promos.txt @@ -2,7 +2,7 @@ Code=PPLS Date=2001-02-05 Name=Planeshift Promos -Type=Promos +Type=Promo CardLang=grc ScryfallCode=PPLS diff --git a/forge-gui/res/editions/Portal Second Age.txt b/forge-gui/res/editions/Portal Second Age.txt index 598fe91e3ca..1db147f7b6a 100644 --- a/forge-gui/res/editions/Portal Second Age.txt +++ b/forge-gui/res/editions/Portal Second Age.txt @@ -1,6 +1,6 @@ [metadata] Code=PO2 -Date=1998-06 +Date=1998-06-24 Name=Portal: Second Age Code2=P2 Alias=P02 diff --git a/forge-gui/res/editions/Portal Three Kingdoms Promos.txt b/forge-gui/res/editions/Portal Three Kingdoms Promos.txt index 70a509a0c2d..7c08de4c3a7 100644 --- a/forge-gui/res/editions/Portal Three Kingdoms Promos.txt +++ b/forge-gui/res/editions/Portal Three Kingdoms Promos.txt @@ -2,7 +2,7 @@ Code=PPTK Date=1999-07-01 Name=Portal: Three Kingdoms Promos -Type=Promos +Type=Promo ScryfallCode=PPTK [cards] diff --git a/forge-gui/res/editions/Portal Three Kingdoms.txt b/forge-gui/res/editions/Portal Three Kingdoms.txt index 9de052a07a4..04c6dee2137 100644 --- a/forge-gui/res/editions/Portal Three Kingdoms.txt +++ b/forge-gui/res/editions/Portal Three Kingdoms.txt @@ -1,6 +1,6 @@ [metadata] Code=PTK -Date=1999-05 +Date=1999-07-06 Name=Portal: Three Kingdoms Code2=P3 MciCode=p3k diff --git a/forge-gui/res/editions/Portal.txt b/forge-gui/res/editions/Portal.txt index 013da1a30ab..b4fccb1a6a1 100644 --- a/forge-gui/res/editions/Portal.txt +++ b/forge-gui/res/editions/Portal.txt @@ -1,6 +1,6 @@ [metadata] Code=POR -Date=1997-06 +Date=1997-05-01 Name=Portal Code2=PT MciCode=po diff --git a/forge-gui/res/editions/Premium Deck Series Fire and Lightning.txt b/forge-gui/res/editions/Premium Deck Series Fire and Lightning.txt index ad636804611..6ddbdf4db11 100644 --- a/forge-gui/res/editions/Premium Deck Series Fire and Lightning.txt +++ b/forge-gui/res/editions/Premium Deck Series Fire and Lightning.txt @@ -4,7 +4,7 @@ Date=2010-11-19 Name=Premium Deck Series: Fire and Lightning Code2=PD2 MciCode=pd2 -Type=Premium_Deck_Series +Type=Collector_Edition ScryfallCode=PD2 [cards] diff --git a/forge-gui/res/editions/Premium Deck Series Graveborn.txt b/forge-gui/res/editions/Premium Deck Series Graveborn.txt index c9c6e787ff6..63a64b6dcef 100644 --- a/forge-gui/res/editions/Premium Deck Series Graveborn.txt +++ b/forge-gui/res/editions/Premium Deck Series Graveborn.txt @@ -3,7 +3,7 @@ Code=PD3 Date=2011-11-18 Name=Premium Deck Series: Graveborn MciCode=pd3 -Type=Premium_Deck_Series +Type=Collector_Edition ScryfallCode=PD3 [cards] diff --git a/forge-gui/res/editions/Premium Deck Series Slivers.txt b/forge-gui/res/editions/Premium Deck Series Slivers.txt index bb9b4d9c454..24cedbe406e 100644 --- a/forge-gui/res/editions/Premium Deck Series Slivers.txt +++ b/forge-gui/res/editions/Premium Deck Series Slivers.txt @@ -3,7 +3,7 @@ Code=PDS Date=2009-11-20 Name=Premium Deck Series: Slivers MciCode=pds -Type=Premium_Deck_Series +Type=Collector_Edition Alias=H09 ScryfallCode=H09 diff --git a/forge-gui/res/editions/Pro Tour Promos.txt b/forge-gui/res/editions/Pro Tour Promos.txt index d8ac2d1bb5a..8e0326dca16 100644 --- a/forge-gui/res/editions/Pro Tour Promos.txt +++ b/forge-gui/res/editions/Pro Tour Promos.txt @@ -2,7 +2,7 @@ Code=PPRO Date=2007-02-09 Name=Pro Tour Promos -Type=Promos +Type=Promo ScryfallCode=PPRO [cards] diff --git a/forge-gui/res/editions/Promo set for Gatherer.txt b/forge-gui/res/editions/Promo set for Gatherer.txt index 5e65e14ef81..0fcfc38bec4 100644 --- a/forge-gui/res/editions/Promo set for Gatherer.txt +++ b/forge-gui/res/editions/Promo set for Gatherer.txt @@ -1,11 +1,11 @@ [metadata] Code=MBP -Date=1996-02 +Date=2002-06-24 Name=Promo set for Gatherer Alias=PRO Code2=MBP MciCode=mbp -Type=Other +Type=Online ScryfallCode=PRM [cards] diff --git a/forge-gui/res/editions/Prophecy Promos.txt b/forge-gui/res/editions/Prophecy Promos.txt index dc7eedab70d..f7675b8ac97 100644 --- a/forge-gui/res/editions/Prophecy Promos.txt +++ b/forge-gui/res/editions/Prophecy Promos.txt @@ -2,7 +2,7 @@ Code=PPCY Date=2000-06-05 Name=Prophecy Promos -Type=Promos +Type=Promo ScryfallCode=PPCY [cards] diff --git a/forge-gui/res/editions/RNA Ravnica Weekend.txt b/forge-gui/res/editions/RNA Ravnica Weekend.txt index e0b0216fc36..8202246c6dd 100644 --- a/forge-gui/res/editions/RNA Ravnica Weekend.txt +++ b/forge-gui/res/editions/RNA Ravnica Weekend.txt @@ -2,7 +2,7 @@ Code=PRW2 Date=2019-02-16 Name=RNA Ravnica Weekend -Type=Promos +Type=Promo ScryfallCode=PRW2 [cards] diff --git a/forge-gui/res/editions/Ravnica Allegiance Guild Kit.txt b/forge-gui/res/editions/Ravnica Allegiance Guild Kit.txt index 4b40a810204..76de595fc8c 100644 --- a/forge-gui/res/editions/Ravnica Allegiance Guild Kit.txt +++ b/forge-gui/res/editions/Ravnica Allegiance Guild Kit.txt @@ -3,7 +3,7 @@ Code=GK2 Date=2019-02-15 Name=Ravnica Allegiance Guild Kit MciCode=gk2 -Type=Other +Type=Reprint ScryfallCode=GK2 [cards] diff --git a/forge-gui/res/editions/Ravnica_Allegiance_Promos.txt b/forge-gui/res/editions/Ravnica_Allegiance_Promos.txt index f99860a8ee5..35c6cfa6ed2 100644 --- a/forge-gui/res/editions/Ravnica_Allegiance_Promos.txt +++ b/forge-gui/res/editions/Ravnica_Allegiance_Promos.txt @@ -2,7 +2,7 @@ Code=PRNA Date=2019-01-25 Name=Ravnica Allegiance Promos -Type=Promos +Type=Promo ScryfallCode=PRNA [cards] diff --git a/forge-gui/res/editions/Ravnica_City_of_Guilds_Promos.txt b/forge-gui/res/editions/Ravnica_City_of_Guilds_Promos.txt index 4d1d34f460d..7fb2ae8bb2b 100644 --- a/forge-gui/res/editions/Ravnica_City_of_Guilds_Promos.txt +++ b/forge-gui/res/editions/Ravnica_City_of_Guilds_Promos.txt @@ -2,7 +2,7 @@ Code=PRAV Date=2005-10-07 Name=Ravnica: City of Guilds Promos -Type=Promos +Type=Promo ScryfallCode=PRAV [cards] diff --git a/forge-gui/res/editions/Redemption_Program.txt b/forge-gui/res/editions/Redemption_Program.txt index ae7986cf81e..63796c94154 100644 --- a/forge-gui/res/editions/Redemption_Program.txt +++ b/forge-gui/res/editions/Redemption_Program.txt @@ -2,7 +2,7 @@ Code=PRED Date=1996-10-01 Name=Redemption Program -Type=Promos +Type=Promo CardLang=ja ScryfallCode=PRED diff --git a/forge-gui/res/editions/Resale Promos.txt b/forge-gui/res/editions/Resale Promos.txt index 81951185537..e02ea3a6c9c 100644 --- a/forge-gui/res/editions/Resale Promos.txt +++ b/forge-gui/res/editions/Resale Promos.txt @@ -2,7 +2,7 @@ Code=PRES Date=2007-01-01 Name=Resale Promos -Type=Promos +Type=Promo ScryfallCode=PRES [cards] diff --git a/forge-gui/res/editions/Return to Ravnica Promos.txt b/forge-gui/res/editions/Return to Ravnica Promos.txt index edb85ae07a9..c23d59beff8 100644 --- a/forge-gui/res/editions/Return to Ravnica Promos.txt +++ b/forge-gui/res/editions/Return to Ravnica Promos.txt @@ -2,7 +2,7 @@ Code=PRTR Date=2012-10-05 Name=Return to Ravnica Promos -Type=Promos +Type=Promo ScryfallCode=PRTR [cards] diff --git a/forge-gui/res/editions/Rise of the Eldrazi Promos.txt b/forge-gui/res/editions/Rise of the Eldrazi Promos.txt index 0074651d63f..48a1b4a21d1 100644 --- a/forge-gui/res/editions/Rise of the Eldrazi Promos.txt +++ b/forge-gui/res/editions/Rise of the Eldrazi Promos.txt @@ -2,7 +2,7 @@ Code=PROE Date=2010-04-23 Name=Rise of the Eldrazi Promos -Type=Promos +Type=Promo ScryfallCode=PROE [cards] diff --git a/forge-gui/res/editions/Rivals_of_Ixalan_Promos.txt b/forge-gui/res/editions/Rivals_of_Ixalan_Promos.txt index b51ba159400..99a9f094784 100644 --- a/forge-gui/res/editions/Rivals_of_Ixalan_Promos.txt +++ b/forge-gui/res/editions/Rivals_of_Ixalan_Promos.txt @@ -2,7 +2,7 @@ Code=PRIX Date=2018-01-19 Name=Rivals of Ixalan Promos -Type=Promos +Type=Promo ScryfallCode=PRIX [cards] diff --git a/forge-gui/res/editions/San Diego Comic Con 2013.txt b/forge-gui/res/editions/San Diego Comic Con 2013.txt index f6f9536c123..6b13f0f5639 100644 --- a/forge-gui/res/editions/San Diego Comic Con 2013.txt +++ b/forge-gui/res/editions/San Diego Comic Con 2013.txt @@ -2,7 +2,7 @@ Code=PSDC Date=2013-07-18 Name=San Diego Comic-Con 2013 -Type=Promos +Type=Promo ScryfallCode=PSDC [cards] diff --git a/forge-gui/res/editions/San Diego Comic Con 2014.txt b/forge-gui/res/editions/San Diego Comic Con 2014.txt index c65276eb91d..84e4ae765cc 100644 --- a/forge-gui/res/editions/San Diego Comic Con 2014.txt +++ b/forge-gui/res/editions/San Diego Comic Con 2014.txt @@ -2,7 +2,7 @@ Code=PS14 Date=2014-07-08 Name=San Diego Comic-Con 2014 -Type=Promos +Type=Promo ScryfallCode=PS14 [cards] diff --git a/forge-gui/res/editions/San Diego Comic Con 2015.txt b/forge-gui/res/editions/San Diego Comic Con 2015.txt index 4faa743dcd8..f58516e4454 100644 --- a/forge-gui/res/editions/San Diego Comic Con 2015.txt +++ b/forge-gui/res/editions/San Diego Comic Con 2015.txt @@ -2,7 +2,7 @@ Code=PS15 Date=2015-07-09 Name=San Diego Comic-Con 2015 -Type=Promos +Type=Promo ScryfallCode=PS15 [cards] diff --git a/forge-gui/res/editions/San Diego Comic Con 2016.txt b/forge-gui/res/editions/San Diego Comic Con 2016.txt index 17470b559e3..36904800e0a 100644 --- a/forge-gui/res/editions/San Diego Comic Con 2016.txt +++ b/forge-gui/res/editions/San Diego Comic Con 2016.txt @@ -1,8 +1,8 @@ [metadata] Code=PS16 -Date=2016-01-01 +Date=2016-10-01 Name=San Diego Comic-Con 2016 -Type=Promos +Type=Promo ScryfallCode=PS16 [cards] diff --git a/forge-gui/res/editions/San Diego Comic Con 2017.txt b/forge-gui/res/editions/San Diego Comic Con 2017.txt index caa81062f07..9662cdaaaa5 100644 --- a/forge-gui/res/editions/San Diego Comic Con 2017.txt +++ b/forge-gui/res/editions/San Diego Comic Con 2017.txt @@ -2,7 +2,7 @@ Code=PS17 Date=2017-07-20 Name=San Diego Comic-Con 2017 -Type=Promos +Type=Promo ScryfallCode=PS17 [cards] diff --git a/forge-gui/res/editions/San Diego Comic Con 2018.txt b/forge-gui/res/editions/San Diego Comic Con 2018.txt index 3a121037aab..b0e493b2a0a 100644 --- a/forge-gui/res/editions/San Diego Comic Con 2018.txt +++ b/forge-gui/res/editions/San Diego Comic Con 2018.txt @@ -2,7 +2,7 @@ Code=PS18 Date=2018-07-19 Name=San Diego Comic-Con 2018 -Type=Promos +Type=Promo ScryfallCode=PS18 [cards] diff --git a/forge-gui/res/editions/San Diego Comic Con 2019.txt b/forge-gui/res/editions/San Diego Comic Con 2019.txt index a5292f5db39..a78b119e780 100644 --- a/forge-gui/res/editions/San Diego Comic Con 2019.txt +++ b/forge-gui/res/editions/San Diego Comic Con 2019.txt @@ -2,7 +2,7 @@ Code=PS19 Date=2019-07-18 Name=San Diego Comic-Con 2019 -Type=Promos +Type=Promo ScryfallCode=PS19 [cards] diff --git a/forge-gui/res/editions/Saviors of Kamigawa Promos.txt b/forge-gui/res/editions/Saviors of Kamigawa Promos.txt index f602eeb57d3..3bf403a672a 100644 --- a/forge-gui/res/editions/Saviors of Kamigawa Promos.txt +++ b/forge-gui/res/editions/Saviors of Kamigawa Promos.txt @@ -2,7 +2,7 @@ Code=PSOK Date=2005-06-03 Name=Saviors of Kamigawa Promos -Type=Promos +Type=Promo ScryfallCode=PSOK [cards] diff --git a/forge-gui/res/editions/Scars of Mirrodin Promos.txt b/forge-gui/res/editions/Scars of Mirrodin Promos.txt index f81ee2f4642..aa5500503e1 100644 --- a/forge-gui/res/editions/Scars of Mirrodin Promos.txt +++ b/forge-gui/res/editions/Scars of Mirrodin Promos.txt @@ -2,7 +2,7 @@ Code=PSOM Date=2010-09-30 Name=Scars of Mirrodin Promos -Type=Promos +Type=Promo ScryfallCode=PSOM [cards] diff --git a/forge-gui/res/editions/Scourge Promos.txt b/forge-gui/res/editions/Scourge Promos.txt index c0a586bda60..e0618d4da5a 100644 --- a/forge-gui/res/editions/Scourge Promos.txt +++ b/forge-gui/res/editions/Scourge Promos.txt @@ -2,7 +2,7 @@ Code=PSCG Date=2003-05-26 Name=Scourge Promos -Type=Promos +Type=Promo ScryfallCode=PSCG [cards] diff --git a/forge-gui/res/editions/Secret Lair Drop Series.txt b/forge-gui/res/editions/Secret Lair Drop Series.txt index 9fbfee984ac..ad631ea9238 100644 --- a/forge-gui/res/editions/Secret Lair Drop Series.txt +++ b/forge-gui/res/editions/Secret Lair Drop Series.txt @@ -4,7 +4,7 @@ Date=2019-12-02 Name=Secret Lair Drop Series Alias=PSLD MciCode=sld -Type=Other +Type=Reprint ScryfallCode=SLD [cards] diff --git a/forge-gui/res/editions/Shadowmoor Promos.txt b/forge-gui/res/editions/Shadowmoor Promos.txt index 270e5c5880d..0d65cdf1ce5 100644 --- a/forge-gui/res/editions/Shadowmoor Promos.txt +++ b/forge-gui/res/editions/Shadowmoor Promos.txt @@ -2,7 +2,7 @@ Code=PSHM Date=2008-05-02 Name=Shadowmoor Promos -Type=Promos +Type=Promo ScryfallCode=PSHM [cards] diff --git a/forge-gui/res/editions/Shadows over Innistrad Promos.txt b/forge-gui/res/editions/Shadows over Innistrad Promos.txt index 838d144d8b7..4169f3cc123 100644 --- a/forge-gui/res/editions/Shadows over Innistrad Promos.txt +++ b/forge-gui/res/editions/Shadows over Innistrad Promos.txt @@ -1,8 +1,8 @@ [metadata] Code=PSOI -Date=2016-04-09 +Date=2016-04-08 Name=Shadows over Innistrad Promos -Type=Promos +Type=Promo ScryfallCode=PSOI [cards] diff --git a/forge-gui/res/editions/Shards of Alara Promos.txt b/forge-gui/res/editions/Shards of Alara Promos.txt index ad08a2f354e..ca8e15d8e86 100644 --- a/forge-gui/res/editions/Shards of Alara Promos.txt +++ b/forge-gui/res/editions/Shards of Alara Promos.txt @@ -1,8 +1,8 @@ [metadata] Code=PALA -Date=2008-01-01 +Date=2008-10-03 Name=Shards of Alara Promos -Type=Promos +Type=Promo ScryfallCode=PALA [cards] diff --git a/forge-gui/res/editions/Shattered Chains.txt b/forge-gui/res/editions/Shattered Chains.txt index 2fac844dda2..679ff0b17c9 100644 --- a/forge-gui/res/editions/Shattered Chains.txt +++ b/forge-gui/res/editions/Shattered Chains.txt @@ -1,9 +1,9 @@ [metadata] Code=SHC -Date=1995-01-27 +Date=1994-09-01 Name=Shattered Chains -Type=Other +Type=Promo ScryfallCode=PHPR [cards] -4 C Giant Badger \ No newline at end of file +4 C Giant Badger diff --git a/forge-gui/res/editions/Signature Spellbook Chandra.txt b/forge-gui/res/editions/Signature Spellbook Chandra.txt index 85d72a26ebb..872cd270343 100644 --- a/forge-gui/res/editions/Signature Spellbook Chandra.txt +++ b/forge-gui/res/editions/Signature Spellbook Chandra.txt @@ -2,7 +2,7 @@ Code=SS3 Date=2020-06-26 Name=Signature Spellbook: Chandra -Type=Reprint +Type=Collector_Edition ScryfallCode=SS3 [cards] diff --git a/forge-gui/res/editions/Signature Spellbook Gideon.txt b/forge-gui/res/editions/Signature Spellbook Gideon.txt index d7a668355c5..6d6b858e6e8 100644 --- a/forge-gui/res/editions/Signature Spellbook Gideon.txt +++ b/forge-gui/res/editions/Signature Spellbook Gideon.txt @@ -3,7 +3,7 @@ Code=SS2 Date=2019-06-28 Name=Signature Spellbook: Gideon MciCode=ss2 -Type=Reprint +Type=Collector_Edition ScryfallCode=SS2 [cards] diff --git a/forge-gui/res/editions/Signature Spellbook Jace.txt b/forge-gui/res/editions/Signature Spellbook Jace.txt index fbf77f7976e..2716fde052f 100644 --- a/forge-gui/res/editions/Signature Spellbook Jace.txt +++ b/forge-gui/res/editions/Signature Spellbook Jace.txt @@ -3,7 +3,7 @@ Code=SS1 Date=2018-06-15 Name=Signature Spellbook: Jace MciCode=ss1 -Type=Reprint +Type=Collector_Edition ScryfallCode=SS1 [cards] diff --git a/forge-gui/res/editions/Starter 1999.txt b/forge-gui/res/editions/Starter 1999.txt index eb713ad95e9..528c934f7f6 100644 --- a/forge-gui/res/editions/Starter 1999.txt +++ b/forge-gui/res/editions/Starter 1999.txt @@ -1,6 +1,6 @@ [metadata] Code=S99 -Date=1999-07 +Date=1999-07-01 Name=Starter 1999 Border=White Code2=ST diff --git a/forge-gui/res/editions/Starter 2000.txt b/forge-gui/res/editions/Starter 2000.txt index 0a1beb20f89..2dc4c8bfd2f 100644 --- a/forge-gui/res/editions/Starter 2000.txt +++ b/forge-gui/res/editions/Starter 2000.txt @@ -1,6 +1,6 @@ [metadata] Code=S00 -Date=2000-07 +Date=2000-04-01 Name=Starter 2000 Border=White Code2=S2K diff --git a/forge-gui/res/editions/Strixhaven Mystical Archive.txt b/forge-gui/res/editions/Strixhaven Mystical Archive.txt index 04f834f8fa1..aa22456f615 100644 --- a/forge-gui/res/editions/Strixhaven Mystical Archive.txt +++ b/forge-gui/res/editions/Strixhaven Mystical Archive.txt @@ -2,7 +2,7 @@ Code=STA Date=2021-04-23 Name=Strixhaven Mystical Archive -Type=Other +Type=Collector_Edition ScryfallCode=STA [cards] diff --git a/forge-gui/res/editions/Stronghold Promos.txt b/forge-gui/res/editions/Stronghold Promos.txt index 6c3f57a2a3d..429d9d0050f 100644 --- a/forge-gui/res/editions/Stronghold Promos.txt +++ b/forge-gui/res/editions/Stronghold Promos.txt @@ -2,7 +2,7 @@ Code=PSTH Date=1998-03-02 Name=Stronghold Promos -Type=Promos +Type=Promo ScryfallCode=PSTH [cards] diff --git a/forge-gui/res/editions/Summer of Magic.txt b/forge-gui/res/editions/Summer of Magic.txt index 817c08c7009..68bf122bd3c 100644 --- a/forge-gui/res/editions/Summer of Magic.txt +++ b/forge-gui/res/editions/Summer of Magic.txt @@ -1,8 +1,8 @@ [metadata] Code=PSUM -Date=2008-01-01 +Date=2007-07-21 Name=Summer of Magic -Type=Promos +Type=Promo ScryfallCode=PSUM [cards] diff --git a/forge-gui/res/editions/Tarkir Dragonfury.txt b/forge-gui/res/editions/Tarkir Dragonfury.txt index a75ee184d5e..fe3a93fd60b 100644 --- a/forge-gui/res/editions/Tarkir Dragonfury.txt +++ b/forge-gui/res/editions/Tarkir Dragonfury.txt @@ -2,7 +2,7 @@ Code=PTKDF Date=2015-04-03 Name=Tarkir Dragonfury -Type=Promos +Type=Promo ScryfallCode=PTKDF [cards] diff --git a/forge-gui/res/editions/Tempest Promos.txt b/forge-gui/res/editions/Tempest Promos.txt index dcd793a8253..bebbbe88463 100644 --- a/forge-gui/res/editions/Tempest Promos.txt +++ b/forge-gui/res/editions/Tempest Promos.txt @@ -2,7 +2,7 @@ Code=PTMP Date=1997-10-14 Name=Tempest Promos -Type=Promos +Type=Promo ScryfallCode=PTMP [cards] diff --git a/forge-gui/res/editions/Tenth Edition Promos.txt b/forge-gui/res/editions/Tenth Edition Promos.txt index 4befa7ce6a0..e07d67deba3 100644 --- a/forge-gui/res/editions/Tenth Edition Promos.txt +++ b/forge-gui/res/editions/Tenth Edition Promos.txt @@ -2,7 +2,7 @@ Code=P10E Date=2007-07-13 Name=Tenth Edition Promos -Type=Promos +Type=Promo ScryfallCode=P10E [cards] diff --git a/forge-gui/res/editions/Tenth Edition.txt b/forge-gui/res/editions/Tenth Edition.txt index f1eb665459d..deda2df8d62 100644 --- a/forge-gui/res/editions/Tenth Edition.txt +++ b/forge-gui/res/editions/Tenth Edition.txt @@ -1,6 +1,6 @@ [metadata] Code=10E -Date=2007-07-14 +Date=2007-07-13 Name=Tenth Edition Code2=10E MciCode=10e diff --git a/forge-gui/res/editions/Theros Promos.txt b/forge-gui/res/editions/Theros Promos.txt index e1c94dfdc34..49745159e50 100644 --- a/forge-gui/res/editions/Theros Promos.txt +++ b/forge-gui/res/editions/Theros Promos.txt @@ -2,7 +2,7 @@ Code=PTHS Date=2013-09-21 Name=Theros Promos -Type=Promos +Type=Promo ScryfallCode=PTHS [cards] diff --git a/forge-gui/res/editions/Time Spiral Promos.txt b/forge-gui/res/editions/Time Spiral Promos.txt index ec68993caeb..d495fe43f4e 100644 --- a/forge-gui/res/editions/Time Spiral Promos.txt +++ b/forge-gui/res/editions/Time Spiral Promos.txt @@ -2,7 +2,7 @@ Code=PTSP Date=2006-10-06 Name=Time Spiral Promos -Type=Promos +Type=Promo ScryfallCode=PTSP [cards] diff --git a/forge-gui/res/editions/Time Spiral Timeshifted.txt b/forge-gui/res/editions/Time Spiral Timeshifted.txt index 9b511642aaf..75446758447 100644 --- a/forge-gui/res/editions/Time Spiral Timeshifted.txt +++ b/forge-gui/res/editions/Time Spiral Timeshifted.txt @@ -4,7 +4,7 @@ Date=2006-10-06 Name=Time Spiral "Timeshifted" Code2=TSB MciCode=tsts -Type=Other +Type=Expansion ScryfallCode=TSB [cards] diff --git a/forge-gui/res/editions/Torment Promos.txt b/forge-gui/res/editions/Torment Promos.txt index 20b1692edc6..31376a6e968 100644 --- a/forge-gui/res/editions/Torment Promos.txt +++ b/forge-gui/res/editions/Torment Promos.txt @@ -2,7 +2,7 @@ Code=PTOR Date=2002-02-04 Name=Torment Promos -Type=Promos +Type=Promo CardLang=ru ScryfallCode=PTOR diff --git a/forge-gui/res/editions/Two-Headed Giant Tournament.txt b/forge-gui/res/editions/Two-Headed Giant Tournament.txt index 5048313cb91..7da27aa68ea 100644 --- a/forge-gui/res/editions/Two-Headed Giant Tournament.txt +++ b/forge-gui/res/editions/Two-Headed Giant Tournament.txt @@ -2,7 +2,7 @@ Code=P2HG Date=2005-12-09 Name=Two-Headed Giant Tournament -Type=Promos +Type=Promo ScryfallCode=P2HG [cards] diff --git a/forge-gui/res/editions/URL Convention Promos.txt b/forge-gui/res/editions/URL Convention Promos.txt index 769829508d6..53bb2888a93 100644 --- a/forge-gui/res/editions/URL Convention Promos.txt +++ b/forge-gui/res/editions/URL Convention Promos.txt @@ -2,7 +2,7 @@ Code=PURL Date=2009-02-08 Name=URL Convention Promos -Type=Promos +Type=Promo ScryfallCode=PURL [cards] diff --git a/forge-gui/res/editions/Ugin's Fate.txt b/forge-gui/res/editions/Ugin's Fate.txt index 78abe623a85..cc4cb14561c 100644 --- a/forge-gui/res/editions/Ugin's Fate.txt +++ b/forge-gui/res/editions/Ugin's Fate.txt @@ -1,9 +1,9 @@ [metadata] Code=UGF -Date=2015-01-23 +Date=2015-01-17 Name=Ugin's Fate MciCode=ugin -Type=Other +Type=Promo ScryfallCode=ugin [cards] diff --git a/forge-gui/res/editions/Ultimate Box Topper.txt b/forge-gui/res/editions/Ultimate Box Topper.txt index e29a73ba53b..54d14e9bd5c 100644 --- a/forge-gui/res/editions/Ultimate Box Topper.txt +++ b/forge-gui/res/editions/Ultimate Box Topper.txt @@ -3,7 +3,7 @@ Code=PUMA Date=2018-12-07 Name=Ultimate Box Topper - Ultimate Masters MciCode=uma -Type=Other +Type=Reprint ScryfallCode=uma [cards] diff --git a/forge-gui/res/editions/Unhinged.txt b/forge-gui/res/editions/Unhinged.txt index 0e8ca09065b..dac429a003d 100644 --- a/forge-gui/res/editions/Unhinged.txt +++ b/forge-gui/res/editions/Unhinged.txt @@ -1,6 +1,6 @@ [metadata] Code=UNH -Date=2004-11-20 +Date=2004-11-19 Name=Unhinged MciCode=uh Type=Funny diff --git a/forge-gui/res/editions/Unstable Promos.txt b/forge-gui/res/editions/Unstable Promos.txt index c87f64ab0a8..82b8d12c9be 100644 --- a/forge-gui/res/editions/Unstable Promos.txt +++ b/forge-gui/res/editions/Unstable Promos.txt @@ -1,8 +1,8 @@ [metadata] Code=PUST -Date=2017-11-13 +Date=2017-12-08 Name=Unstable Promos -Type=Funny +Type=Promo Border=Silver ScryfallCode=PUST diff --git a/forge-gui/res/editions/Urza's Destiny Promos.txt b/forge-gui/res/editions/Urza's Destiny Promos.txt index 3d6569601fc..9684a041aa6 100644 --- a/forge-gui/res/editions/Urza's Destiny Promos.txt +++ b/forge-gui/res/editions/Urza's Destiny Promos.txt @@ -2,7 +2,7 @@ Code=PUDS Date=1999-06-07 Name=Urza's Destiny Promos -Type=Promos +Type=Promo ScryfallCode=PUDS [cards] diff --git a/forge-gui/res/editions/Urza's Legacy Promos.txt b/forge-gui/res/editions/Urza's Legacy Promos.txt index 55e3f123c6b..43d210c3f5b 100644 --- a/forge-gui/res/editions/Urza's Legacy Promos.txt +++ b/forge-gui/res/editions/Urza's Legacy Promos.txt @@ -2,7 +2,7 @@ Code=PULG Date=1999-02-15 Name=Urza's Legacy Promos -Type=Promos +Type=Promo ScryfallCode=PULG [cards] diff --git a/forge-gui/res/editions/Urza's Saga Promos.txt b/forge-gui/res/editions/Urza's Saga Promos.txt index 0b88108369f..35f0a473853 100644 --- a/forge-gui/res/editions/Urza's Saga Promos.txt +++ b/forge-gui/res/editions/Urza's Saga Promos.txt @@ -1,8 +1,8 @@ [metadata] Code=PUSG -Date=1998-10-13 +Date=1998-10-12 Name=Urza's Saga Promos -Type=Promos +Type=Promo ScryfallCode=PUSG [cards] diff --git a/forge-gui/res/editions/Vintage Championship.txt b/forge-gui/res/editions/Vintage Championship.txt index 36b53cb400b..a2919ad4b9b 100644 --- a/forge-gui/res/editions/Vintage Championship.txt +++ b/forge-gui/res/editions/Vintage Championship.txt @@ -2,7 +2,7 @@ Code=OVNT Date=2003-01-01 Name=Vintage Championship -Type=Promos +Type=Promo ScryfallCode=OVNT [cards] diff --git a/forge-gui/res/editions/War of the Spark Promos.txt b/forge-gui/res/editions/War of the Spark Promos.txt index b589ec1bf8b..e4a8a2402f9 100644 --- a/forge-gui/res/editions/War of the Spark Promos.txt +++ b/forge-gui/res/editions/War of the Spark Promos.txt @@ -1,8 +1,8 @@ [metadata] Code=PWAR -Date=2019-05-04 +Date=2019-05-03 Name=War of the Spark Promos -Type=Promos +Type=Promo ScryfallCode=PWAR [cards] diff --git a/forge-gui/res/editions/Welcome Deck 2016.txt b/forge-gui/res/editions/Welcome Deck 2016.txt index b96f851dcd8..879b1c59107 100644 --- a/forge-gui/res/editions/Welcome Deck 2016.txt +++ b/forge-gui/res/editions/Welcome Deck 2016.txt @@ -1,9 +1,9 @@ [metadata] Code=W16 -Date=2016-06-16 +Date=2016-04-08 Name=Welcome Deck 2016 MciCode=w16 -Type=Other +Type=Starter ScryfallCode=W16 [cards] diff --git a/forge-gui/res/editions/Welcome Deck 2017.txt b/forge-gui/res/editions/Welcome Deck 2017.txt index b7fdb0363f3..769c38d9f31 100644 --- a/forge-gui/res/editions/Welcome Deck 2017.txt +++ b/forge-gui/res/editions/Welcome Deck 2017.txt @@ -3,7 +3,7 @@ Code=W17 Date=2017-04-15 Name=Welcome Deck 2017 MciCode=w17 -Type=Other +Type=Starter ScryfallCode=W17 [cards] diff --git a/forge-gui/res/editions/Whispering Woods.txt b/forge-gui/res/editions/Whispering Woods.txt index 68200686308..15b2f267843 100644 --- a/forge-gui/res/editions/Whispering Woods.txt +++ b/forge-gui/res/editions/Whispering Woods.txt @@ -1,9 +1,9 @@ [metadata] Code=WW -Date=1994-11-23 +Date=1994-09-01 Name=Whispering Woods -Type=Other +Type=Promo ScryfallCode=PHPR [cards] -3 C Windseeker Centaur \ No newline at end of file +3 C Windseeker Centaur diff --git a/forge-gui/res/editions/Wizards Play Network 2008.txt b/forge-gui/res/editions/Wizards Play Network 2008.txt index d3d8875cf76..fd45bd3fd4d 100644 --- a/forge-gui/res/editions/Wizards Play Network 2008.txt +++ b/forge-gui/res/editions/Wizards Play Network 2008.txt @@ -2,7 +2,7 @@ Code=PWPN Date=2008-10-01 Name=Wizards Play Network 2008 -Type=Promos +Type=Promo ScryfallCode=PWPN [cards] diff --git a/forge-gui/res/editions/Wizards Play Network 2009.txt b/forge-gui/res/editions/Wizards Play Network 2009.txt index 7bd7d5c5914..cf331d18f1c 100644 --- a/forge-gui/res/editions/Wizards Play Network 2009.txt +++ b/forge-gui/res/editions/Wizards Play Network 2009.txt @@ -2,7 +2,7 @@ Code=PWP09 Date=2009-01-01 Name=Wizards Play Network 2009 -Type=Promos +Type=Promo ScryfallCode=PWP09 [cards] diff --git a/forge-gui/res/editions/Wizards Play Network 2010.txt b/forge-gui/res/editions/Wizards Play Network 2010.txt index 66739437105..d073d4c71be 100644 --- a/forge-gui/res/editions/Wizards Play Network 2010.txt +++ b/forge-gui/res/editions/Wizards Play Network 2010.txt @@ -2,7 +2,7 @@ Code=PWP10 Date=2010-01-01 Name=Wizards Play Network 2010 -Type=Promos +Type=Promo ScryfallCode=PWP10 [cards] diff --git a/forge-gui/res/editions/Wizards Play Network 2011.txt b/forge-gui/res/editions/Wizards Play Network 2011.txt index 518d159f0aa..ec155f2d1ee 100644 --- a/forge-gui/res/editions/Wizards Play Network 2011.txt +++ b/forge-gui/res/editions/Wizards Play Network 2011.txt @@ -2,7 +2,7 @@ Code=PWP11 Date=2011-01-01 Name=Wizards Play Network 2011 -Type=Promos +Type=Promo ScryfallCode=PWP11 [cards] diff --git a/forge-gui/res/editions/Wizards Play Network 2012.txt b/forge-gui/res/editions/Wizards Play Network 2012.txt index bbd898dbb44..8702cb59fa4 100644 --- a/forge-gui/res/editions/Wizards Play Network 2012.txt +++ b/forge-gui/res/editions/Wizards Play Network 2012.txt @@ -2,7 +2,7 @@ Code=PWP12 Date=2012-01-01 Name=Wizards Play Network 2012 -Type=Promos +Type=Promo ScryfallCode=PWP12 [cards] diff --git a/forge-gui/res/editions/Wizards Play Network 2021.txt b/forge-gui/res/editions/Wizards Play Network 2021.txt index 3bc9f29bbe0..2c9f2345082 100644 --- a/forge-gui/res/editions/Wizards Play Network 2021.txt +++ b/forge-gui/res/editions/Wizards Play Network 2021.txt @@ -2,7 +2,7 @@ Code=PWP21 Date=2021-06-18 Name=Wizards Play Network 2021 -Type=Promos +Type=Promo ScryfallCode=PWP21 [cards] diff --git a/forge-gui/res/editions/Wizards of the Coast Online Store.txt b/forge-gui/res/editions/Wizards of the Coast Online Store.txt index e5028a5ef39..86b4774de0e 100644 --- a/forge-gui/res/editions/Wizards of the Coast Online Store.txt +++ b/forge-gui/res/editions/Wizards of the Coast Online Store.txt @@ -2,7 +2,7 @@ Code=PWOS Date=1999-09-04 Name=Wizards of the Coast Online Store -Type=Promos +Type=Promo ScryfallCode=PWOS [cards] diff --git a/forge-gui/res/editions/World Championship Promos.txt b/forge-gui/res/editions/World Championship Promos.txt index 8a93bf0338c..cdf8fce7846 100644 --- a/forge-gui/res/editions/World Championship Promos.txt +++ b/forge-gui/res/editions/World Championship Promos.txt @@ -2,7 +2,7 @@ Code=PWOR Date=1999-08-04 Name=World Championship Promos -Type=Promos +Type=Promo ScryfallCode=PWOR [cards] diff --git a/forge-gui/res/editions/World Magic Cup Qualifiers.txt b/forge-gui/res/editions/World Magic Cup Qualifiers.txt index c61fc3b5fa7..0bae1c3ef14 100644 --- a/forge-gui/res/editions/World Magic Cup Qualifiers.txt +++ b/forge-gui/res/editions/World Magic Cup Qualifiers.txt @@ -2,7 +2,7 @@ Code=PWCQ Date=2013-04-06 Name=World Magic Cup Qualifiers -Type=Promos +Type=Promo ScryfallCode=PWCQ [cards] diff --git a/forge-gui/res/editions/Worldwake Promos.txt b/forge-gui/res/editions/Worldwake Promos.txt index 30b94d465c8..2c5900ed276 100644 --- a/forge-gui/res/editions/Worldwake Promos.txt +++ b/forge-gui/res/editions/Worldwake Promos.txt @@ -1,8 +1,8 @@ [metadata] Code=PWWK -Date=2010-04-05 +Date=2010-02-05 Name=Worldwake Promos -Type=Promos +Type=Promo ScryfallCode=PWWK [cards] diff --git a/forge-gui/res/editions/XLN Standard Showdown.txt b/forge-gui/res/editions/XLN Standard Showdown.txt index d48e87eac3d..02ec7244b38 100644 --- a/forge-gui/res/editions/XLN Standard Showdown.txt +++ b/forge-gui/res/editions/XLN Standard Showdown.txt @@ -2,7 +2,7 @@ Code=PSS2 Date=2017-09-29 Name=XLN Standard Showdown -Type=Promos +Type=Promo ScryfallCode=PSS2 [cards] diff --git a/forge-gui/res/editions/XLN Treasure Chest.txt b/forge-gui/res/editions/XLN Treasure Chest.txt index a6917c47088..81917370421 100644 --- a/forge-gui/res/editions/XLN Treasure Chest.txt +++ b/forge-gui/res/editions/XLN Treasure Chest.txt @@ -2,7 +2,7 @@ Code=PXTC Date=2017-11-24 Name=XLN Treasure Chest -Type=Promos +Type=Promo ScryfallCode=PXTC [cards] diff --git a/forge-gui/res/editions/Zendikar Expeditions.txt b/forge-gui/res/editions/Zendikar Expeditions.txt index 6cb59956fb2..3c8d2304e97 100644 --- a/forge-gui/res/editions/Zendikar Expeditions.txt +++ b/forge-gui/res/editions/Zendikar Expeditions.txt @@ -3,7 +3,7 @@ Code=EXP Date=2015-10-02 Name=Zendikar Expeditions MciCode=exp -Type=Other +Type=Collector_Edition ScryfallCode=EXP [cards] diff --git a/forge-gui/res/editions/Zendikar Promos.txt b/forge-gui/res/editions/Zendikar Promos.txt index c8bf008ed7a..54c98b8221e 100644 --- a/forge-gui/res/editions/Zendikar Promos.txt +++ b/forge-gui/res/editions/Zendikar Promos.txt @@ -2,7 +2,7 @@ Code=PZEN Date=2009-10-02 Name=Zendikar Promos -Type=Promos +Type=Promo ScryfallCode=PZEN [cards] diff --git a/forge-gui/res/editions/Zendikar Rising Commander.txt b/forge-gui/res/editions/Zendikar Rising Commander.txt index 66dfa94b6e5..3d52fc4a92f 100644 --- a/forge-gui/res/editions/Zendikar Rising Commander.txt +++ b/forge-gui/res/editions/Zendikar Rising Commander.txt @@ -2,7 +2,7 @@ Code=ZNC Date=2020-09-25 Name=Zendikar Rising Commander -Type=Other +Type=Commander ScryfallCode=ZNC [cards] diff --git a/forge-gui/res/editions/Zendikar Rising Expeditions.txt b/forge-gui/res/editions/Zendikar Rising Expeditions.txt index c3641613314..d7a93a719fe 100644 --- a/forge-gui/res/editions/Zendikar Rising Expeditions.txt +++ b/forge-gui/res/editions/Zendikar Rising Expeditions.txt @@ -2,7 +2,7 @@ Code=ZNE Date=2020-09-25 Name=Zendikar Rising Expeditions -Type=Reprint +Type=Collector_Edition ScryfallCode=ZNE [cards] From b8aaf8fb68fdccfb496430af405e122be37da1f1 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 13 Jun 2021 20:23:34 +0100 Subject: [PATCH 02/50] New Card Types categories also for custom editions Card Editions now includes updated Types, following the new remapping. Moreover, a new option to CardEdition.Reader has been added (in the constructor) in order to account for custom editions. So far this new "reading mode" accounts for type that is "forced" always to be "THIRDPARTY" so to guarantee consistent sets filtering (so far only on Mobile platform). This new option is integrated in StaticData when instantiating the collection for CustomEditions. --- .../src/main/java/forge/StaticData.java | 2 +- .../src/main/java/forge/card/CardEdition.java | 42 +++++++++++++------ 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/forge-core/src/main/java/forge/StaticData.java b/forge-core/src/main/java/forge/StaticData.java index ac7c162207b..c3a18a76739 100644 --- a/forge-core/src/main/java/forge/StaticData.java +++ b/forge-core/src/main/java/forge/StaticData.java @@ -75,7 +75,7 @@ public class StaticData { this.editions = new CardEdition.Collection(new CardEdition.Reader(new File(editionFolder))); this.blockDataFolder = blockDataFolder; this.customCardReader = customCardReader; - this.customEditions = new CardEdition.Collection(new CardEdition.Reader(new File(customEditionsFolder))); + this.customEditions = new CardEdition.Collection(new CardEdition.Reader(new File(customEditionsFolder), true)); this.prefferedArt = prefferedArt; lastInstance = this; List funnyCards = new ArrayList<>(); diff --git a/forge-core/src/main/java/forge/card/CardEdition.java b/forge-core/src/main/java/forge/card/CardEdition.java index 8c1164dfe53..b15db38af08 100644 --- a/forge-core/src/main/java/forge/card/CardEdition.java +++ b/forge-core/src/main/java/forge/card/CardEdition.java @@ -80,16 +80,19 @@ public final class CardEdition implements Comparable { EXPANSION, REPRINT, - ONLINE, STARTER, - DUEL_DECKS, - PREMIUM_DECK_SERIES, - FROM_THE_VAULT, + COMMANDER, + COLLECTOR_EDITION, + DUEL_DECK, - OTHER, - PROMOS, + DRAFT_INNOVATION, + PROMO, + + ONLINE, FUNNY, + + OTHER, // FALLBACK CATEGORY THIRDPARTY; // custom sets public String getBoosterBoxDefault() { @@ -457,8 +460,16 @@ public final class CardEdition implements Comparable { } public static class Reader extends StorageReaderFolder { + private boolean isCustomEditions; + public Reader(File path) { super(path, CardEdition.FN_GET_CODE); + this.isCustomEditions = false; + } + + public Reader(File path, boolean isCustomEditions) { + super(path, CardEdition.FN_GET_CODE); + this.isCustomEditions = isCustomEditions; } @Override @@ -563,15 +574,20 @@ public final class CardEdition implements Comparable { res.alias = section.get("alias"); res.borderColor = BorderColor.valueOf(section.get("border", "Black").toUpperCase(Locale.ENGLISH)); - String type = section.get("type"); Type enumType = Type.UNKNOWN; - if (null != type && !type.isEmpty()) { - try { - enumType = Type.valueOf(type.toUpperCase(Locale.ENGLISH)); - } catch (IllegalArgumentException ignored) { - // ignore; type will get UNKNOWN - System.err.println("Ignoring unknown type in set definitions: name: " + res.name + "; type: " + type); + if (this.isCustomEditions){ + enumType = Type.THIRDPARTY; // Forcing ThirdParty Edition Type to avoid inconsistencies + } else { + String type = section.get("type"); + if (null != type && !type.isEmpty()) { + try { + enumType = Type.valueOf(type.toUpperCase(Locale.ENGLISH)); + } catch (IllegalArgumentException ignored) { + // ignore; type will get UNKNOWN + System.err.println("Ignoring unknown type in set definitions: name: " + res.name + "; type: " + type); + } } + } res.type = enumType; res.prerelease = section.get("Prerelease", null); From 78bc621f3c1faa062c31456ddd53574cc5d6e7fe Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 13 Jun 2021 20:24:19 +0100 Subject: [PATCH 03/50] Sets filter on mobile now consider the new Edition Type groups --- .../itemmanager/filters/FormatFilter.java | 82 ++++++++++--------- 1 file changed, 43 insertions(+), 39 deletions(-) diff --git a/forge-gui-mobile/src/forge/itemmanager/filters/FormatFilter.java b/forge-gui-mobile/src/forge/itemmanager/filters/FormatFilter.java index 4e76e9ec807..35f94023f00 100644 --- a/forge-gui-mobile/src/forge/itemmanager/filters/FormatFilter.java +++ b/forge-gui-mobile/src/forge/itemmanager/filters/FormatFilter.java @@ -136,11 +136,12 @@ public abstract class FormatFilter extends ItemFilter extends ItemFilter sets = FModel.getMagicDb().getSortedEditions(); for (CardEdition set : sets) { switch (set.getType()) { - case CORE: - lstSets.addItem(set, 0); - break; - case EXPANSION: - lstSets.addItem(set, 1); - break; - case DUEL_DECKS: - lstSets.addItem(set, 2); - break; - case FROM_THE_VAULT: - lstSets.addItem(set, 3); - break; - case PREMIUM_DECK_SERIES: - lstSets.addItem(set, 4); - break; - case REPRINT: - lstSets.addItem(set, 5); - break; - case STARTER: - lstSets.addItem(set, 6); - break; - case PROMOS: - lstSets.addItem(set, 7); - break; - case ONLINE: - lstSets.addItem(set, 8); - break; - case FUNNY: - lstSets.addItem(set, 9); - break; - case THIRDPARTY: - lstSets.addItem(set, 10); - break; - default: - lstSets.addItem(set, 11); - break; + case CORE: + lstSets.addItem(set, 0); + break; + case EXPANSION: + lstSets.addItem(set, 1); + break; + case REPRINT: + lstSets.addItem(set, 2); + break; + case STARTER: + lstSets.addItem(set, 3); + break; + case COMMANDER: + lstSets.addItem(set, 4); + break; + case COLLECTOR_EDITION: + lstSets.addItem(set, 5); + break; + case DUEL_DECK: + lstSets.addItem(set, 6); + break; + case DRAFT_INNOVATION: + lstSets.addItem(set, 7); + break; + case PROMO: + lstSets.addItem(set, 8); + break; + case ONLINE: + lstSets.addItem(set, 9); + break; + case FUNNY: + lstSets.addItem(set, 10); + break; + case THIRDPARTY: + lstSets.addItem(set, 11); + break; + default: + lstSets.addItem(set, 12); + break; } } From b79fc195a17d208a80f94929436aa6abb66c5853 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 13 Jun 2021 20:39:42 +0100 Subject: [PATCH 04/50] Updaetd PROMO type from (old) PROMOS --- forge-core/src/main/java/forge/card/CardDb.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forge-core/src/main/java/forge/card/CardDb.java b/forge-core/src/main/java/forge/card/CardDb.java index 366be7e81f8..9d260c6eabe 100644 --- a/forge-core/src/main/java/forge/card/CardDb.java +++ b/forge-core/src/main/java/forge/card/CardDb.java @@ -629,7 +629,7 @@ public final class CardDb implements ICardDatabase, IDeckGenPool { } catch (Exception ex) { return false; } - return edition != null && edition.getType() != Type.PROMOS; + return edition != null && edition.getType() != Type.PROMO; } })); } @@ -641,7 +641,7 @@ public final class CardDb implements ICardDatabase, IDeckGenPool { CardEdition edition = null; try { edition = editions.getEditionByCodeOrThrow(paperCard.getEdition()); - if (edition.getType() == Type.PROMOS||edition.getType() == Type.REPRINT) + if (edition.getType() == Type.PROMO||edition.getType() == Type.REPRINT) return false; } catch (Exception ex) { return false; From 6f14d1d37aadef414d8c647f5b176e576f72960d Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Tue, 15 Jun 2021 08:47:25 +0100 Subject: [PATCH 05/50] Remapping as per Alumi suggestions in Discord chat In short, these are the new changes: - new Boxed set category separated from Reprint - Reprint now only includes masters editions - Commander now only includes commander sets - Multiplayer sets (new) now includes Game Night and Archenemy and Planechase - Game Night mapped to multiplayer - Myster Boost mapped to Draft innovation --- forge-gui/res/editions/Anthologies.txt | 2 +- forge-gui/res/editions/Archenemy Nicol Bolas.txt | 2 +- forge-gui/res/editions/Archenemy.txt | 2 +- forge-gui/res/editions/Battle Royale.txt | 2 +- forge-gui/res/editions/Beatdown.txt | 2 +- forge-gui/res/editions/Coldsnap Theme Decks.txt | 2 +- forge-gui/res/editions/Deckmasters Garfield vs. Finkel.txt | 2 +- forge-gui/res/editions/Duels of the Planeswalkers.txt | 2 +- forge-gui/res/editions/Explorers of Ixalan.txt | 2 +- forge-gui/res/editions/Game Night 2019.txt | 2 +- forge-gui/res/editions/Game Night.txt | 2 +- forge-gui/res/editions/Guilds of Ravnica Guild Kit.txt | 2 +- forge-gui/res/editions/M19 Gift Pack.txt | 2 +- forge-gui/res/editions/Modern Event Deck.txt | 2 +- forge-gui/res/editions/Mystery Booster Retail Edition Foils.txt | 2 +- forge-gui/res/editions/Mystery Booster.txt | 2 +- forge-gui/res/editions/Planechase 2012.txt | 2 +- forge-gui/res/editions/Planechase Anthology.txt | 2 +- forge-gui/res/editions/Planechase.txt | 2 +- forge-gui/res/editions/Ravnica Allegiance Guild Kit.txt | 2 +- forge-gui/res/editions/Secret Lair Drop Series.txt | 2 +- forge-gui/res/editions/Secret Lair Ultimate Edition.txt | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/forge-gui/res/editions/Anthologies.txt b/forge-gui/res/editions/Anthologies.txt index a15751e1696..d043a2cce1c 100644 --- a/forge-gui/res/editions/Anthologies.txt +++ b/forge-gui/res/editions/Anthologies.txt @@ -3,7 +3,7 @@ Code=ATH MciCode=at Date=1998-11-01 Name=Anthologies -Type=Reprint +Type=Boxed_Set Border=White Foil=NotSupported ScryfallCode=ATH diff --git a/forge-gui/res/editions/Archenemy Nicol Bolas.txt b/forge-gui/res/editions/Archenemy Nicol Bolas.txt index 012491c5f8b..3e8c449c2f1 100644 --- a/forge-gui/res/editions/Archenemy Nicol Bolas.txt +++ b/forge-gui/res/editions/Archenemy Nicol Bolas.txt @@ -4,7 +4,7 @@ Date=2017-06-16 Name=Archenemy: Nicol Bolas Code2=E01 MciCode=E01 -Type=Commander +Type=Multiplayer ScryfallCode=E01 [cards] diff --git a/forge-gui/res/editions/Archenemy.txt b/forge-gui/res/editions/Archenemy.txt index c0ecdda69af..e819b4faf07 100644 --- a/forge-gui/res/editions/Archenemy.txt +++ b/forge-gui/res/editions/Archenemy.txt @@ -4,7 +4,7 @@ Date=2010-06-18 Name=Archenemy Code2=ARC MciCode=arc -Type=Commander +Type=Multiplayer ScryfallCode=ARC [cards] diff --git a/forge-gui/res/editions/Battle Royale.txt b/forge-gui/res/editions/Battle Royale.txt index d1ccac44cc5..0d9ae723f1e 100644 --- a/forge-gui/res/editions/Battle Royale.txt +++ b/forge-gui/res/editions/Battle Royale.txt @@ -3,7 +3,7 @@ Code=BRB Date=1999-11-12 Name=Battle Royale MciCode=br -Type=Reprint +Type=Boxed_Set Border=White Foil=NotSupported ScryfallCode=BRB diff --git a/forge-gui/res/editions/Beatdown.txt b/forge-gui/res/editions/Beatdown.txt index ffb208efa2b..8d575223297 100644 --- a/forge-gui/res/editions/Beatdown.txt +++ b/forge-gui/res/editions/Beatdown.txt @@ -3,7 +3,7 @@ Code=BTD Date=2000-10-01 Name=Beatdown MciCode=bd -Type=Reprint +Type=Boxed_Set Border=White Foil=NotSupported ScryfallCode=BTD diff --git a/forge-gui/res/editions/Coldsnap Theme Decks.txt b/forge-gui/res/editions/Coldsnap Theme Decks.txt index 1bbe83a7439..9013dad3f1e 100644 --- a/forge-gui/res/editions/Coldsnap Theme Decks.txt +++ b/forge-gui/res/editions/Coldsnap Theme Decks.txt @@ -3,7 +3,7 @@ Code=CST Date=2006-07-21 Name=Coldsnap Theme Decks MciCode=cst -Type=Reprint +Type=Boxed_Set ScryfallCode=CST [cards] diff --git a/forge-gui/res/editions/Deckmasters Garfield vs. Finkel.txt b/forge-gui/res/editions/Deckmasters Garfield vs. Finkel.txt index 044cc43c2be..02bfeba6d74 100644 --- a/forge-gui/res/editions/Deckmasters Garfield vs. Finkel.txt +++ b/forge-gui/res/editions/Deckmasters Garfield vs. Finkel.txt @@ -3,7 +3,7 @@ Code=DKM Date=2001-12-01 Name=Deckmasters: Garfield vs. Finkel MciCode=dm -Type=Reprint +Type=Boxed_Set Border=White ScryfallCode=DKM diff --git a/forge-gui/res/editions/Duels of the Planeswalkers.txt b/forge-gui/res/editions/Duels of the Planeswalkers.txt index a360813d245..2476d375acf 100644 --- a/forge-gui/res/editions/Duels of the Planeswalkers.txt +++ b/forge-gui/res/editions/Duels of the Planeswalkers.txt @@ -3,7 +3,7 @@ Code=DPA Date=2010-06-04 Name=Duels of the Planeswalkers MciCode=dpa -Type=Reprint +Type=Boxed_Set ScryfallCode=DPA [cards] diff --git a/forge-gui/res/editions/Explorers of Ixalan.txt b/forge-gui/res/editions/Explorers of Ixalan.txt index b8663d13cee..8f08b268312 100644 --- a/forge-gui/res/editions/Explorers of Ixalan.txt +++ b/forge-gui/res/editions/Explorers of Ixalan.txt @@ -4,7 +4,7 @@ Date=2017-11-24 Name=Explorers of Ixalan Code2=E02 MciCode=E02 -Type=Reprint +Type=Boxed_Set ScryfallCode=E02 [cards] diff --git a/forge-gui/res/editions/Game Night 2019.txt b/forge-gui/res/editions/Game Night 2019.txt index 72ddbbedb94..f38cc7f5112 100644 --- a/forge-gui/res/editions/Game Night 2019.txt +++ b/forge-gui/res/editions/Game Night 2019.txt @@ -4,7 +4,7 @@ Date=2019-11-15 Name=Game Night 2019 Code2=GN2 MciCode=gn2 -Type=Reprint +Type=Multiplayer ScryfallCode=GN2 [cards] diff --git a/forge-gui/res/editions/Game Night.txt b/forge-gui/res/editions/Game Night.txt index 71ef941d6eb..a0fe53f4369 100644 --- a/forge-gui/res/editions/Game Night.txt +++ b/forge-gui/res/editions/Game Night.txt @@ -4,7 +4,7 @@ Date=2018-11-16 Name=Game Night Code2=GNT MciCode=gnt -Type=Reprint +Type=Multiplayer ScryfallCode=GNT [cards] diff --git a/forge-gui/res/editions/Guilds of Ravnica Guild Kit.txt b/forge-gui/res/editions/Guilds of Ravnica Guild Kit.txt index eb52bd54ebb..cbdbe83f4a3 100644 --- a/forge-gui/res/editions/Guilds of Ravnica Guild Kit.txt +++ b/forge-gui/res/editions/Guilds of Ravnica Guild Kit.txt @@ -4,7 +4,7 @@ Date=2018-11-02 Name=Guilds of Ravnica Guild Kit Code2=GK1 MciCode=gk1 -Type=Reprint +Type=Boxed_Set ScryfallCode=GK1 [cards] diff --git a/forge-gui/res/editions/M19 Gift Pack.txt b/forge-gui/res/editions/M19 Gift Pack.txt index 921f3574e2c..a0354d7d716 100644 --- a/forge-gui/res/editions/M19 Gift Pack.txt +++ b/forge-gui/res/editions/M19 Gift Pack.txt @@ -4,7 +4,7 @@ Date=2018-11-16 Name=M19 Gift Pack Code2=G18 MciCode=g18 -Type=Reprint +Type=Core ScryfallCode=g18 [cards] diff --git a/forge-gui/res/editions/Modern Event Deck.txt b/forge-gui/res/editions/Modern Event Deck.txt index 35786cf4895..78a4e55254f 100644 --- a/forge-gui/res/editions/Modern Event Deck.txt +++ b/forge-gui/res/editions/Modern Event Deck.txt @@ -4,7 +4,7 @@ Date=2014-05-30 Name=Modern Event Deck Code2=MD1 MciCode=md1 -Type=Reprint +Type=Boxed_Set ScryfallCode=MD1 [cards] diff --git a/forge-gui/res/editions/Mystery Booster Retail Edition Foils.txt b/forge-gui/res/editions/Mystery Booster Retail Edition Foils.txt index da2a67bdf76..4b711c4791f 100644 --- a/forge-gui/res/editions/Mystery Booster Retail Edition Foils.txt +++ b/forge-gui/res/editions/Mystery Booster Retail Edition Foils.txt @@ -2,7 +2,7 @@ Code=FMB1 Date=2020-03-08 Name=Mystery Booster Retail Edition Foils -Type=Reprint +Type=Draft_Innovation ScryfallCode=FMB1 [cards] diff --git a/forge-gui/res/editions/Mystery Booster.txt b/forge-gui/res/editions/Mystery Booster.txt index 3d670f08225..cb27d0f4c7d 100644 --- a/forge-gui/res/editions/Mystery Booster.txt +++ b/forge-gui/res/editions/Mystery Booster.txt @@ -2,7 +2,7 @@ Code=MB1 Date=2019-11-07 Name=Mystery Booster -Type=Reprint +Type=Draft_Innovation BoosterCovers=1 Booster=2 fromSheet("MB1 White CommonUncommon"), 2 fromSheet("MB1 Blue CommonUncommon"), 2 fromSheet("MB1 Black CommonUncommon"), 2 fromSheet("MB1 Green CommonUncommon"), 2 fromSheet("MB1 Red CommonUncommon"), 1 fromSheet("MB1 Multi CommonUncommon"), 1 fromSheet("MB1 Artifact Land CommonUncommon"), 1 fromSheet("MB1 Pre M15"), 1 fromSheet("MB1 Post M15 RareMythic"), 1 fromSheet("MB1 Foils") Foil=NotSupported diff --git a/forge-gui/res/editions/Planechase 2012.txt b/forge-gui/res/editions/Planechase 2012.txt index 7a2d0cdbca3..6ab694ceea8 100644 --- a/forge-gui/res/editions/Planechase 2012.txt +++ b/forge-gui/res/editions/Planechase 2012.txt @@ -4,7 +4,7 @@ Date=2012-06-01 Name=Planechase 2012 Code2=PC2 MciCode=pc2 -Type=Commander +Type=Multiplayer ScryfallCode=PC2 [cards] diff --git a/forge-gui/res/editions/Planechase Anthology.txt b/forge-gui/res/editions/Planechase Anthology.txt index 70afcf24049..e2ce92e0727 100644 --- a/forge-gui/res/editions/Planechase Anthology.txt +++ b/forge-gui/res/editions/Planechase Anthology.txt @@ -4,7 +4,7 @@ Date=2016-11-25 Name=Planechase Anthology Code2=PCA MciCode=pca -Type=Commander +Type=Multiplayer ScryfallCode=PCA [cards] diff --git a/forge-gui/res/editions/Planechase.txt b/forge-gui/res/editions/Planechase.txt index ca527147ce6..64317bbbfdf 100644 --- a/forge-gui/res/editions/Planechase.txt +++ b/forge-gui/res/editions/Planechase.txt @@ -5,7 +5,7 @@ Name=Planechase Alias=PCH Code2=HOP MciCode=pch -Type=Commander +Type=Multiplayer ScryfallCode=HOP [cards] diff --git a/forge-gui/res/editions/Ravnica Allegiance Guild Kit.txt b/forge-gui/res/editions/Ravnica Allegiance Guild Kit.txt index 76de595fc8c..4e4015c6206 100644 --- a/forge-gui/res/editions/Ravnica Allegiance Guild Kit.txt +++ b/forge-gui/res/editions/Ravnica Allegiance Guild Kit.txt @@ -3,7 +3,7 @@ Code=GK2 Date=2019-02-15 Name=Ravnica Allegiance Guild Kit MciCode=gk2 -Type=Reprint +Type=Boxed_Set ScryfallCode=GK2 [cards] diff --git a/forge-gui/res/editions/Secret Lair Drop Series.txt b/forge-gui/res/editions/Secret Lair Drop Series.txt index ad631ea9238..cf9d95b662d 100644 --- a/forge-gui/res/editions/Secret Lair Drop Series.txt +++ b/forge-gui/res/editions/Secret Lair Drop Series.txt @@ -4,7 +4,7 @@ Date=2019-12-02 Name=Secret Lair Drop Series Alias=PSLD MciCode=sld -Type=Reprint +Type=Collector_Edition ScryfallCode=SLD [cards] diff --git a/forge-gui/res/editions/Secret Lair Ultimate Edition.txt b/forge-gui/res/editions/Secret Lair Ultimate Edition.txt index 2e137c0337f..851227d557b 100644 --- a/forge-gui/res/editions/Secret Lair Ultimate Edition.txt +++ b/forge-gui/res/editions/Secret Lair Ultimate Edition.txt @@ -2,7 +2,7 @@ Code=SLU Date=2020-05-29 Name=Secret Lair: Ultimate Edition -Type=Reprint +Type=Collector_Edition ScryfallCode=SLU [cards] From e8b6e066e326b6c6c3b8f853cfad07980ef68802 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Wed, 16 Jun 2021 07:25:38 +0100 Subject: [PATCH 06/50] Updated types in CardEdition enum --- forge-core/src/main/java/forge/card/CardEdition.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/forge-core/src/main/java/forge/card/CardEdition.java b/forge-core/src/main/java/forge/card/CardEdition.java index b15db38af08..80ac4fac5a7 100644 --- a/forge-core/src/main/java/forge/card/CardEdition.java +++ b/forge-core/src/main/java/forge/card/CardEdition.java @@ -78,18 +78,19 @@ public final class CardEdition implements Comparable { CORE, EXPANSION, - - REPRINT, STARTER, + REPRINT, + BOXED_SET, - COMMANDER, COLLECTOR_EDITION, DUEL_DECK, + PROMO, + ONLINE, DRAFT_INNOVATION, - PROMO, - ONLINE, + COMMANDER, + MULTIPLAYER, FUNNY, OTHER, // FALLBACK CATEGORY From b1134ef07014c95006804724b1e358215b349f9f Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Wed, 16 Jun 2021 07:26:05 +0100 Subject: [PATCH 07/50] Updated menu for card filters on mobile with latest Edition Types --- .../itemmanager/filters/FormatFilter.java | 42 ++++++++++++------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/forge-gui-mobile/src/forge/itemmanager/filters/FormatFilter.java b/forge-gui-mobile/src/forge/itemmanager/filters/FormatFilter.java index 35f94023f00..9057bd14739 100644 --- a/forge-gui-mobile/src/forge/itemmanager/filters/FormatFilter.java +++ b/forge-gui-mobile/src/forge/itemmanager/filters/FormatFilter.java @@ -136,17 +136,25 @@ public abstract class FormatFilter extends ItemFilter sets = FModel.getMagicDb().getSortedEditions(); for (CardEdition set : sets) { @@ -157,14 +165,14 @@ public abstract class FormatFilter extends ItemFilter extends ItemFilter Date: Mon, 21 Jun 2021 11:43:01 +0100 Subject: [PATCH 08/50] CardEdition.Type now includes new methods for String representation (UI) --- .../src/main/java/forge/card/CardEdition.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/forge-core/src/main/java/forge/card/CardEdition.java b/forge-core/src/main/java/forge/card/CardEdition.java index 80ac4fac5a7..e06f6133d05 100644 --- a/forge-core/src/main/java/forge/card/CardEdition.java +++ b/forge-core/src/main/java/forge/card/CardEdition.java @@ -37,6 +37,7 @@ import java.util.TreeMap; import java.util.regex.Matcher; import java.util.regex.Pattern; +import forge.util.*; import org.apache.commons.lang3.StringUtils; import com.google.common.base.Function; @@ -52,11 +53,6 @@ import forge.card.CardDb.SetPreference; import forge.deck.CardPool; import forge.item.PaperCard; import forge.item.SealedProduct; -import forge.util.Aggregates; -import forge.util.FileSection; -import forge.util.FileUtil; -import forge.util.IItemReader; -import forge.util.MyRandom; import forge.util.storage.StorageBase; import forge.util.storage.StorageReaderBase; import forge.util.storage.StorageReaderFolder; @@ -105,6 +101,19 @@ public final class CardEdition implements Comparable { return "0"; } } + + public String toString(){ + String[] names = TextUtil.splitWithParenthesis(this.name().toLowerCase(), '_'); + for (int i = 0; i < names.length; i++) + names[i] = TextUtil.capitalize(names[i]); + return TextUtil.join(Arrays.asList(names), " "); + } + + public static Type fromString(String label){ + List names = Arrays.asList(TextUtil.splitWithParenthesis(label.toUpperCase(), ' ')); + String value = TextUtil.join(names, "_"); + return Type.valueOf(value); + } } public enum FoilType { From 3ba464665eec062f8ca114bb03a20ba51e3c69dc Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Mon, 21 Jun 2021 11:43:51 +0100 Subject: [PATCH 09/50] New methods returning a map of all editions per type. This method is used to populate the "Sets" advanced filters in UI (so far, desktop only) --- .../src/main/java/forge/StaticData.java | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/forge-core/src/main/java/forge/StaticData.java b/forge-core/src/main/java/forge/StaticData.java index c3a18a76739..6b7671cfb8f 100644 --- a/forge-core/src/main/java/forge/StaticData.java +++ b/forge-core/src/main/java/forge/StaticData.java @@ -1,20 +1,12 @@ package forge; import java.io.File; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; +import java.util.*; import com.google.common.base.Predicate; -import forge.card.CardDb; +import forge.card.*; import forge.card.CardDb.CardRequest; -import forge.card.CardEdition; -import forge.card.CardRules; -import forge.card.PrintSheet; import forge.item.BoosterBox; import forge.item.FatPack; import forge.item.PaperCard; @@ -174,6 +166,22 @@ public class StaticData { return sortedEditions; } + private TreeMap> editionsTypeMap; + public final Map> getEditionsTypeMap(){ + if (editionsTypeMap == null){ + editionsTypeMap = new TreeMap<>(); + for (CardEdition.Type editionType : CardEdition.Type.values()){ + editionsTypeMap.put(editionType, new ArrayList<>()); + } + for (CardEdition edition : this.getSortedEditions()){ + CardEdition.Type key = edition.getType(); + List editionsOfType = editionsTypeMap.get(key); + editionsOfType.add(edition); + } + } + return editionsTypeMap; + } + public CardEdition getCardEdition(String setCode){ CardEdition edition = this.editions.get(setCode); if (edition == null) // try custom editions From fe0441c6671ffa3318c6dc81a6a59df8a39dcee3 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Mon, 21 Jun 2021 11:44:20 +0100 Subject: [PATCH 10/50] TEMPORARY new Dialog for Sets filtering (still very WIP) --- .../screens/home/quest/DialogChooseSets.java | 584 ++++++++++-------- 1 file changed, 336 insertions(+), 248 deletions(-) diff --git a/forge-gui-desktop/src/main/java/forge/screens/home/quest/DialogChooseSets.java b/forge-gui-desktop/src/main/java/forge/screens/home/quest/DialogChooseSets.java index de6cb676fb8..6d21f5b6c8f 100644 --- a/forge-gui-desktop/src/main/java/forge/screens/home/quest/DialogChooseSets.java +++ b/forge-gui-desktop/src/main/java/forge/screens/home/quest/DialogChooseSets.java @@ -1,22 +1,14 @@ package forge.screens.home.quest; -import java.awt.Font; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Date; +import java.awt.*; +import java.awt.event.*; +import java.util.*; import java.util.List; -import java.util.function.Predicate; -import javax.swing.ButtonGroup; -import javax.swing.JPanel; -import javax.swing.JSeparator; -import javax.swing.SwingConstants; -import javax.swing.SwingUtilities; +import javax.swing.*; +import javax.swing.event.ListSelectionEvent; +import javax.swing.event.ListSelectionListener; -import com.google.common.collect.Lists; import forge.card.CardEdition; import forge.game.GameFormat; import forge.gui.SOverlayUtils; @@ -42,77 +34,95 @@ public class DialogChooseSets { private boolean wantReprints = true; private Runnable okCallback; - private final List choices = new ArrayList<>(); + private final Map> selectedCheckBoxes = new TreeMap<>(); private final FCheckBox cbWantReprints = new FCheckBox(Localizer.getInstance().getMessage("lblDisplayRecentSetReprints")); - // lists are of set codes (e.g. "2ED") public DialogChooseSets(Collection preselectedSets, Collection unselectableSets, boolean showWantReprintsCheckbox) { - // create a local copy of the editions list so we can sort it - List editions = Lists.newArrayList(FModel.getMagicDb().getEditions()); - Collections.sort(editions); - Collections.reverse(editions); + // get the map of each editions per type + Map> editionsTypeMap = FModel.getMagicDb().getEditionsTypeMap(); - List customEditions = Lists.newArrayList(FModel.getMagicDb().getCustomEditions()); - boolean customSetsExist = (customEditions.size() > 0); - if (customSetsExist){ - Collections.sort(customEditions); - Collections.reverse(customEditions); - } - List coreSets = new ArrayList<>(); - List expansionSets = new ArrayList<>(); - List otherSets = new ArrayList<>(); + /* Gather all the different types among preselected and unselectable sets (if any) + lists are of set codes (e.g. "2ED", edition.getCode()) - for (CardEdition ce : editions) { - String code = ce.getCode(); - FCheckBox box = new FCheckBox(TextUtil.concatWithSpace(ce.getName(), TextUtil.enclosedParen(code))); - box.setName(code); - box.setSelected(null != preselectedSets && preselectedSets.contains(code)); - box.setEnabled(null == unselectableSets || !unselectableSets.contains(code)); - switch (ce.getType()) { - case CORE: - coreSets.add(box); - break; - case EXPANSION: - expansionSets.add(box); - break; - default: - otherSets.add(box); - break; + NOTE: preselected SetTypes will be created as TreeSet as the ordering of Types will be used to + decide which type in the UI list of types should be selected, in case of multiple types + available in preselected types (e.g. expansion and core, core will be selected as it comes first) */ + Set preselectedTypes = null; + if (preselectedSets != null){ + preselectedTypes = new TreeSet<>(); + for (String code: preselectedSets){ + CardEdition edition = FModel.getMagicDb().getCardEdition(code); + preselectedTypes.add(edition.getType()); } } - // CustomSet - List customSets = new ArrayList<>(); - if (customSetsExist) { - for (CardEdition ce : customEditions){ + Set unSelectableTypes = null; + if (unselectableSets != null){ + unSelectableTypes = new HashSet<>(); + for (String code: unselectableSets){ + CardEdition edition = FModel.getMagicDb().getCardEdition(code); + unSelectableTypes.add(edition.getType()); + } + } + + // Create the map of Edition Checkboxes, organised per type (label) for immediate access. + /* NOTE: Here the (String) label representation of CardEdition.Type will be used as keys + (i.e. Title case and no underscore) instead of the actual enum instance. + This is to simplify the retrieval of checkboxes for each edition type, since the very same labels will + be also used in the UI for selection (see the `editionTypes` ArrayList definition below).*/ + Map> editionsCheckBoxes = new HashMap<>(); + // Store the list of all Edition Types available to be added in the UI panel + List editionTypes = new ArrayList<>(); // List of all EditionTypes + + for (CardEdition.Type editionType : editionsTypeMap.keySet()) { + if (null != unSelectableTypes && unSelectableTypes.contains(editionType)) // skip unselectable types + continue; + List editionsOfType = editionsTypeMap.get(editionType); + if (editionsOfType.size() == 0) // skip empty set types + continue; + String editionTypeLabel = editionType.toString(); + editionTypes.add(editionTypeLabel); + + // initialise map of selected checkboxes + selectedCheckBoxes.put(editionType, new ArrayList<>()); + List edTypeCheckBoxes = new ArrayList<>(); + for (CardEdition ce: editionsOfType){ String code = ce.getCode(); - FCheckBox box = new FCheckBox(TextUtil.concatWithSpace(ce.getName(), TextUtil.enclosedParen(code))); - box.setName(code); - box.setSelected(null != preselectedSets && preselectedSets.contains(code)); - box.setEnabled(null == unselectableSets || !unselectableSets.contains(code)); - customSets.add(box); + FCheckBox edBox = new FCheckBox(TextUtil.concatWithSpace(ce.getName(), TextUtil.enclosedParen(code))); + edBox.setName(code); + // set the status of UI components + boolean isSelected = null != preselectedSets && preselectedSets.contains(code); + edBox.setSelected(isSelected); + edBox.setEnabled(null == unselectableSets || !unselectableSets.contains(code)); + edTypeCheckBoxes.add(edBox); + if (isSelected) // also add to the list of selected boxes + selectedCheckBoxes.get(editionType).add(edBox); } - + editionsCheckBoxes.put(editionTypeLabel, edTypeCheckBoxes); } - int wrapCol = !customSetsExist ? 3 : 4; - FPanel panel = new FPanel(new MigLayout(String.format("insets 10, gap 5, center, wrap %d", wrapCol))); + // Initialise UI - MAIN PANEL WINDOW + FPanel panel = new FPanel(new MigLayout("insets 10, gap 5, center, wrap 3")); panel.setOpaque(false); panel.setBackgroundTexture(FSkin.getIcon(FSkinProp.BG_TEXTURE)); - FTextField coreField = new FTextField.Builder().text("0").maxLength(3).build(); - FTextField expansionField = new FTextField.Builder().text("0").maxLength(3).build(); - FTextField otherField = new FTextField.Builder().text("0").maxLength(3).build(); - FTextField customField = new FTextField.Builder().text("0").maxLength(3).build(); - - JPanel optionsPanel = new JPanel(new MigLayout("insets 10, gap 5, center, wrap 2")); + // === BOTTOM OPTIONS PANEL === + JPanel optionsPanel = new JPanel(new MigLayout("insets 10, gap 5, center, wrap 3")); optionsPanel.setVisible(false); optionsPanel.setOpaque(false); optionsPanel.add(new JSeparator(SwingConstants.HORIZONTAL), "w 100%, span 2, growx"); - optionsPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblSelectRandomSets")).fontSize(17).fontStyle(Font.BOLD).build(), "h 40!, span 2"); + optionsPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblSelectRandomSets")) + .fontSize(17).fontStyle(Font.BOLD).build(), "h 40!, span 2"); - JPanel leftOptionsPanel = new JPanel(new MigLayout("insets 10, gap 5, center, wrap 2")); + // a. Left Options + // TO BE DECIDED on these three + FTextField coreField = new FTextField.Builder().text("0").maxLength(3).build(); + FTextField expansionField = new FTextField.Builder().text("0").maxLength(3).build(); + FTextField otherField = new FTextField.Builder().text("0").maxLength(3).build(); + + JPanel leftOptionsPanel = new JPanel(new MigLayout("insets 10, gap 5, center, wrap 3")); leftOptionsPanel.setOpaque(false); - leftOptionsPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblSelectNumber") + ":").fontSize(14).fontStyle(Font.BOLD).build(), " span 2"); + leftOptionsPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblSelectNumber") + ":") + .fontSize(14).fontStyle(Font.BOLD).build(), " span 2"); leftOptionsPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblCore") + ":").build()); leftOptionsPanel.add(coreField, "w 40!"); @@ -123,19 +133,18 @@ public class DialogChooseSets { leftOptionsPanel.add(new FLabel.Builder().text("Other:").build()); leftOptionsPanel.add(otherField, "w 40!"); - if (customSetsExist){ - leftOptionsPanel.add(new FLabel.Builder().text("Custom Editions:").build()); - leftOptionsPanel.add(customField, "w 40!"); - } - - JPanel rightOptionsPanel = new JPanel(new MigLayout("insets 10, gap 25 5, center, wrap 2")); + // b. Right Options + JPanel rightOptionsPanel = new JPanel(new MigLayout("insets 10, gap 25 5, center, wrap 3")); rightOptionsPanel.setOpaque(false); - rightOptionsPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblFormatRestrictions") +":").fontSize(14).fontStyle(Font.BOLD).build(), "span 2"); + rightOptionsPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblFormatRestrictions") +":") + .fontSize(14).fontStyle(Font.BOLD).build(), "span 2"); + // Format Options ButtonGroup formatButtonGroup = new ButtonGroup(); List gameFormats = new ArrayList<>(); FModel.getFormats().getSanctionedList().forEach(gameFormats::add); + // TODO: Automate game formats using appropriate Enum? gameFormats.forEach(item -> { if (item.getName().equals("Legacy")) { FRadioButton button = new FRadioButton(Localizer.getInstance().getMessage("lblLegacyOrVintage")); @@ -150,6 +159,7 @@ public class DialogChooseSets { } }); + // TODO: Remember to cross check what's the effect of this button FRadioButton button = new FRadioButton(Localizer.getInstance().getMessage("lblModernCardFrame")); button.setActionCommand("Modern Card Frame"); formatButtonGroup.add(button); @@ -164,190 +174,193 @@ public class DialogChooseSets { optionsPanel.add(leftOptionsPanel, "w 33%:40%:78%"); optionsPanel.add(rightOptionsPanel, "w 33%:60%:78%"); + // FIXME: this button is so far ineffective FButton randomSelectionButton = new FButton(Localizer.getInstance().getMessage("lblRandomizeSets")); - randomSelectionButton.addActionListener(actionEvent -> { - - int numberOfCoreSets = Integer.parseInt(coreField.getText()); - int numberOfExpansionSets = Integer.parseInt(expansionField.getText()); - int numberOfOtherSets = Integer.parseInt(otherField.getText()); - int numberOfCustomeSets = 0; - if (customSetsExist) - numberOfCustomeSets = Integer.parseInt(customField.getText()); - - for (FCheckBox coreSet : coreSets) { - coreSet.setSelected(false); - } - for (FCheckBox expansionSet : expansionSets) { - expansionSet.setSelected(false); - } - for (FCheckBox otherSet : otherSets) { - otherSet.setSelected(false); - } - if (customSetsExist){ - for (FCheckBox customSet : customSets) { - customSet.setSelected(false); - } - } - - Predicate formatPredicate = null; - for (GameFormat gameFormat : gameFormats) { - if (gameFormat.getName().equals(formatButtonGroup.getSelection().getActionCommand())) { - formatPredicate = edition -> gameFormat.editionLegalPredicate.apply(edition) && (unselectableSets == null || !unselectableSets.contains(edition.getCode())); - } else if (formatButtonGroup.getSelection().getActionCommand().equals("Modern Card Frame")) { - formatPredicate = edition -> edition.getDate().after(new Date(1059350399L * 1000L)) && (unselectableSets == null || !unselectableSets.contains(edition.getCode())); - } else if (formatButtonGroup.getSelection().getActionCommand().equals("No Format Restriction")) { - formatPredicate = edition -> unselectableSets == null || !unselectableSets.contains(edition.getCode()); - } - } - - List filteredCoreSets = new ArrayList<>(); - for (CardEdition edition : editions) { - if (edition.getType() == CardEdition.Type.CORE) { - if (formatPredicate != null && formatPredicate.test(edition)) { - filteredCoreSets.add(edition); - } - } - } - - List filteredExpansionSets = new ArrayList<>(); - for (CardEdition edition : editions) { - if (edition.getType() == CardEdition.Type.EXPANSION) { - if (formatPredicate != null && formatPredicate.test(edition)) { - filteredExpansionSets.add(edition); - } - } - } - - List filteredOtherSets = new ArrayList<>(); - for (CardEdition edition : editions) { - if (edition.getType() != CardEdition.Type.CORE && edition.getType() != CardEdition.Type.EXPANSION) { - if (formatPredicate != null && formatPredicate.test(edition)) { - filteredOtherSets.add(edition); - } - } - } - - Collections.shuffle(filteredCoreSets); - Collections.shuffle(filteredExpansionSets); - Collections.shuffle(filteredOtherSets); - - List filteredCustomSets = new ArrayList<>(); - if (customSetsExist){ - for (CardEdition edition : customEditions) { - if (formatPredicate != null && formatPredicate.test(edition)) { - filteredCustomSets.add(edition); - } - } - Collections.shuffle(filteredCustomSets); - } - - for (int i = 0; i < numberOfCoreSets && i < filteredCoreSets.size(); i++) { - String name = TextUtil.concatWithSpace(filteredCoreSets.get(i).getName(), TextUtil.enclosedParen(filteredCoreSets.get(i).getCode())); - for (FCheckBox set : coreSets) { - if (set.getText().equals(name)) { - set.setSelected(true); - } - } - } - - for (int i = 0; i < numberOfExpansionSets && i < filteredExpansionSets.size(); i++) { - String name = TextUtil.concatWithSpace(filteredExpansionSets.get(i).getName(), TextUtil.enclosedParen(filteredExpansionSets.get(i).getCode())); - for (FCheckBox set : expansionSets) { - if (set.getText().equals(name)) { - set.setSelected(true); - } - } - } - - for (int i = 0; i < numberOfOtherSets && i < filteredOtherSets.size(); i++) { - String name = TextUtil.concatWithSpace(filteredOtherSets.get(i).getName(), TextUtil.enclosedParen(filteredOtherSets.get(i).getCode())); - for (FCheckBox set : otherSets) { - if (set.getText().equals(name)) { - set.setSelected(true); - } - } - } - - if (customSetsExist){ - for (int i = 0; i < numberOfCustomeSets && i < filteredCustomSets.size(); i++) { - String name = TextUtil.concatWithSpace(filteredCustomSets.get(i).getName(), - TextUtil.enclosedParen(filteredCustomSets.get(i).getCode())); - for (FCheckBox set : customSets) { - if (set.getText().equals(name)) { - set.setSelected(true); - } - } - } - } - - panel.repaintSelf(); - - }); +// randomSelectionButton.addActionListener(actionEvent -> { +// +// int numberOfCoreSets = Integer.parseInt(coreField.getText()); +// int numberOfExpansionSets = Integer.parseInt(expansionField.getText()); +// int numberOfOtherSets = Integer.parseInt(otherField.getText()); +// int numberOfCustomeSets = 0; +// +// for (FCheckBox coreSet : coreSets) { +// coreSet.setSelected(false); +// } +// for (FCheckBox expansionSet : expansionSets) { +// expansionSet.setSelected(false); +// } +// for (FCheckBox otherSet : otherSets) { +// otherSet.setSelected(false); +// } +// +// +// Predicate formatPredicate = null; +// for (GameFormat gameFormat : gameFormats) { +// if (gameFormat.getName().equals(formatButtonGroup.getSelection().getActionCommand())) { +// formatPredicate = edition -> gameFormat.editionLegalPredicate.apply(edition) && (unselectableSets == null || !unselectableSets.contains(edition.getCode())); +// } else if (formatButtonGroup.getSelection().getActionCommand().equals("Modern Card Frame")) { +// formatPredicate = edition -> edition.getDate().after(new Date(1059350399L * 1000L)) && (unselectableSets == null || !unselectableSets.contains(edition.getCode())); +// } else if (formatButtonGroup.getSelection().getActionCommand().equals("No Format Restriction")) { +// formatPredicate = edition -> unselectableSets == null || !unselectableSets.contains(edition.getCode()); +// } +// } +// +// List filteredCoreSets = new ArrayList<>(); +// for (CardEdition edition : editions) { +// if (edition.getType() == CardEdition.Type.CORE) { +// if (formatPredicate != null && formatPredicate.test(edition)) { +// filteredCoreSets.add(edition); +// } +// } +// } +// +// List filteredExpansionSets = new ArrayList<>(); +// for (CardEdition edition : editions) { +// if (edition.getType() == CardEdition.Type.EXPANSION) { +// if (formatPredicate != null && formatPredicate.test(edition)) { +// filteredExpansionSets.add(edition); +// } +// } +// } +// +// List filteredOtherSets = new ArrayList<>(); +// for (CardEdition edition : editions) { +// if (edition.getType() != CardEdition.Type.CORE && edition.getType() != CardEdition.Type.EXPANSION) { +// if (formatPredicate != null && formatPredicate.test(edition)) { +// filteredOtherSets.add(edition); +// } +// } +// } +// +// Collections.shuffle(filteredCoreSets); +// Collections.shuffle(filteredExpansionSets); +// Collections.shuffle(filteredOtherSets); +// +// List filteredCustomSets = new ArrayList<>(); +// if (customSetsExist){ +// for (CardEdition edition : customEditions) { +// if (formatPredicate != null && formatPredicate.test(edition)) { +// filteredCustomSets.add(edition); +// } +// } +// Collections.shuffle(filteredCustomSets); +// } +// +// for (int i = 0; i < numberOfCoreSets && i < filteredCoreSets.size(); i++) { +// String name = TextUtil.concatWithSpace(filteredCoreSets.get(i).getName(), TextUtil.enclosedParen(filteredCoreSets.get(i).getCode())); +// for (FCheckBox set : coreSets) { +// if (set.getText().equals(name)) { +// set.setSelected(true); +// } +// } +// } +// +// for (int i = 0; i < numberOfExpansionSets && i < filteredExpansionSets.size(); i++) { +// String name = TextUtil.concatWithSpace(filteredExpansionSets.get(i).getName(), TextUtil.enclosedParen(filteredExpansionSets.get(i).getCode())); +// for (FCheckBox set : expansionSets) { +// if (set.getText().equals(name)) { +// set.setSelected(true); +// } +// } +// } +// +// for (int i = 0; i < numberOfOtherSets && i < filteredOtherSets.size(); i++) { +// String name = TextUtil.concatWithSpace(filteredOtherSets.get(i).getName(), TextUtil.enclosedParen(filteredOtherSets.get(i).getCode())); +// for (FCheckBox set : otherSets) { +// if (set.getText().equals(name)) { +// set.setSelected(true); +// } +// } +// } +// +// if (customSetsExist){ +// for (int i = 0; i < numberOfCustomeSets && i < filteredCustomSets.size(); i++) { +// String name = TextUtil.concatWithSpace(filteredCustomSets.get(i).getName(), +// TextUtil.enclosedParen(filteredCustomSets.get(i).getCode())); +// for (FCheckBox set : customSets) { +// if (set.getText().equals(name)) { +// set.setSelected(true); +// } +// } +// } +// } +// +// panel.repaintSelf(); +// +// }); + // Clear Selection Button + // CLEAR Selection button FButton clearSelectionButton = new FButton(Localizer.getInstance().getMessage("lblClearSelection")); clearSelectionButton.addActionListener(actionEvent -> { - for (FCheckBox coreSet : coreSets) { - coreSet.setSelected(false); - } - for (FCheckBox expansionSet : expansionSets) { - expansionSet.setSelected(false); - } - for (FCheckBox otherSet : otherSets) { - otherSet.setSelected(false); - } - if (customSetsExist){ - for (FCheckBox cmSet : customSets) { - cmSet.setSelected(false); - } + for (List checkBoxes : editionsCheckBoxes.values()){ + for (FCheckBox cBox : checkBoxes) + cBox.setSelected(false); } + // Remove all the checkboxes from the selected sets + selectedCheckBoxes.replaceAll((t, v) -> new ArrayList<>()); panel.repaintSelf(); }); + // === MIDDLE: SHOW OPTIONS BUTTON === FButton showOptionsButton = new FButton(Localizer.getInstance().getMessage("lblShowOptions")); showOptionsButton.addActionListener(actionEvent -> { optionsPanel.setVisible(true); showOptionsButton.setVisible(false); }); + // Hide Option Button FButton hideOptionsButton = new FButton(Localizer.getInstance().getMessage("lblHideOptions")); hideOptionsButton.addActionListener(actionEvent -> { optionsPanel.setVisible(false); showOptionsButton.setVisible(true); }); + // Button Panel to enable the three button sets: "random selection; clear selection, hide options" JPanel buttonPanel = new JPanel(new MigLayout("h 50!, center, gap 10, insets 0, ay center")); buttonPanel.setOpaque(false); buttonPanel.add(randomSelectionButton, "w 175!, h 28!"); buttonPanel.add(clearSelectionButton, "w 175!, h 28!"); buttonPanel.add(hideOptionsButton, " w 175!, h 28!"); - optionsPanel.add(buttonPanel, "span 2, growx"); - if (showWantReprintsCheckbox) { optionsPanel.add(cbWantReprints, "center, span, wrap"); } + // === SEPARATOR === optionsPanel.add(new JSeparator(SwingConstants.HORIZONTAL), "w 100%, span 2, growx"); - panel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblChooseSets")).fontSize(20).build(), "center, span, wrap, gaptop 10"); + // === TOP PANEL === - String constraints = "aligny top"; - panel.add(makeCheckBoxList(coreSets, - Localizer.getInstance().getMessage("lblCoreSets"), true), - constraints); - panel.add(makeCheckBoxList(expansionSets, - Localizer.getInstance().getMessage("lblExpansions"), false), - constraints); - panel.add(makeCheckBoxList(otherSets, - Localizer.getInstance().getMessage("lblOtherSets"), false), - constraints); - if (customSetsExist){ - panel.add(makeCheckBoxList(customSets, - Localizer.getInstance().getMessage("lblCustomSets"), false), - constraints); - } - panel.add(showOptionsButton, "center, w 230!, h 30!, gap 10 0 20 0, span 3, hidemode 3"); - panel.add(optionsPanel, "center, w 100, span 3, growx, hidemode 3"); + panel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblChooseSets")) + .fontSize(20).build(), "center, span, wrap, gaptop 10"); + + // Selected Editions Panel + JPanel selectedEditionsPnl = new JPanel(new MigLayout("center, wrap")); + selectedEditionsPnl.setOpaque(false); + selectedEditionsPnl.add(new FLabel.Builder().text("Selected Editions").build()); + setupSelectedSetsList(selectedCheckBoxes, editionsCheckBoxes, selectedEditionsPnl); + + // Checkboxes Panel + JPanel setsCheckBoxesPanel = new JPanel(new MigLayout("center, wrap")); + setsCheckBoxesPanel.setOpaque(false); + setsCheckBoxesPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblSetEdition")).build()); + FCheckBoxList setsCheckboxesList = setupEditionCheckBoxList(selectedCheckBoxes, setsCheckBoxesPanel); + + + // Edition Type Panel + JPanel editionTypesPanel = new JPanel(new MigLayout("center, wrap")); + editionTypesPanel.setOpaque(false); + editionTypesPanel.add(new FLabel.Builder().text("Edition Types").build()); + setupEditionTypesPanel(editionTypes, editionsCheckBoxes, setsCheckboxesList, editionTypesPanel); + + // ADD all panels to the main UI Panel + panel.add(editionTypesPanel, "aligny top"); + panel.add(setsCheckBoxesPanel, "aligny top"); + panel.add(selectedEditionsPnl, "aligny top"); + +// panel.add(showOptionsButton, "center, w 260!, h 30!, gap 10 0 20 0, span 3, hidemode 3"); +// panel.add(optionsPanel, "center, w 100, span 3, growx, hidemode 3"); final JPanel overlay = FOverlay.SINGLETON_INSTANCE.getPanel(); overlay.setLayout(new MigLayout("insets 0, gap 0, wrap, ax center, ay center")); @@ -378,8 +391,8 @@ public class DialogChooseSets { JPanel southPanel = new JPanel(new MigLayout("insets 10, gap 30, ax center")); southPanel.setOpaque(false); - southPanel.add(btnOk, "center, w 200!, h 30!"); - southPanel.add(btnCancel, "center, w 200!, h 30!"); + southPanel.add(btnOk, "center, w 250!, h 30!"); + southPanel.add(btnCancel, "center, w 250!, h 30!"); panel.add(southPanel, "dock south, gapBottom 10"); @@ -405,42 +418,117 @@ public class DialogChooseSets { cbWantReprints.setSelected(isSet); } - private JPanel makeCheckBoxList(List sets, String title, boolean focused) { - choices.addAll(sets); - final FCheckBoxList cbl = new FCheckBoxList<>(false); - cbl.setListData(sets.toArray(new FCheckBox[sets.size()])); - cbl.setVisibleRowCount(20); + private String getSelectedSetLabel(String editionTypeLabel, String editionLabel){ + editionTypeLabel = TextUtil.enclosedParen(editionTypeLabel); + return editionTypeLabel + " " + editionLabel + "\n"; + } - if (focused) { - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - cbl.requestFocusInWindow(); - } - }); + private void refreshSelectedEditions(Map> selectedEditions, JTextArea textArea){ + textArea.setText(""); + String selectedEditionsLines = ""; + for (CardEdition.Type editionType : selectedEditions.keySet()){ + List selectedCheckBoxes = selectedEditions.get(editionType); + for (FCheckBox cbox : selectedCheckBoxes) + selectedEditionsLines += getSelectedSetLabel(editionType.toString(), cbox.getText()); } + textArea.setText(selectedEditionsLines); + } - JPanel pnl = new JPanel(new MigLayout("center, wrap")); - pnl.setOpaque(false); - pnl.add(new FLabel.Builder().text(title).build()); - pnl.add(new FScrollPane(cbl, true)); - return pnl; + private void setupSelectedSetsList(Map> selectedEditions, + Map> editionsCheckBoxes, JPanel txtAreaPanel){ + JTextArea selectedEditionsTxtArea = new JTextArea(26, 33); + selectedEditionsTxtArea.setEditable(false); + txtAreaPanel.add(new FScrollPane(selectedEditionsTxtArea, true, + ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS)); + refreshSelectedEditions(selectedEditions, selectedEditionsTxtArea); + // Program the event for checkboxes + for (String editionTypeLabel : editionsCheckBoxes.keySet()) { + List checkBoxes = editionsCheckBoxes.get(editionTypeLabel); + for (FCheckBox checkBox: checkBoxes){ + checkBox.addItemListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + CardEdition.Type edType = CardEdition.Type.fromString(editionTypeLabel); + if (checkBox.isSelected()){ + selectedEditions.get(edType).add(checkBox); + } else { + selectedEditions.get(edType).remove(checkBox); + } + refreshSelectedEditions(selectedEditions, selectedEditionsTxtArea); + }}); + } + } + } + + private FCheckBoxList setupEditionCheckBoxList(Map> selectedEditions, + JPanel checkBoxesPnl) { + // Setup Sets Checkboxes + List checkBoxesToAddToScrollPane = new ArrayList<>(); + for (CardEdition.Type editionType : selectedEditions.keySet()) { + List checkBoxes = selectedEditions.get(editionType); + checkBoxesToAddToScrollPane.addAll(checkBoxes); + } + FCheckBoxList setsCbl = new FCheckBoxList<>(false); + setsCbl.setListData(checkBoxesToAddToScrollPane.toArray(new FCheckBox[checkBoxesToAddToScrollPane.size()])); + setsCbl.setVisibleRowCount(25); + checkBoxesPnl.add(new FScrollPane(setsCbl, true, + ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS)); ; + return setsCbl; + } + + private void setupEditionTypesPanel(List editionTypes, Map> editionsCheckBoxes, + FCheckBoxList checkBoxList, JPanel editionTypesPanel) { + + JList editionTypesList = new JList(editionTypes.toArray()); + editionTypesList.setFixedCellHeight(20); + editionTypesList.setFixedCellWidth(120); + editionTypesList.setVisibleRowCount(20); + ListSelectionModel listSelectionModel = editionTypesList.getSelectionModel(); + listSelectionModel.addListSelectionListener(new ListSelectionListener() { + @Override + public void valueChanged(ListSelectionEvent e) { + ListSelectionModel lsm = (ListSelectionModel) e.getSource(); + boolean isAdjusting = lsm.getValueIsAdjusting(); + if (!lsm.isSelectionEmpty() && !isAdjusting) { + // Find out which indexes are selected. + int minIndex = lsm.getMinSelectionIndex(); + int maxIndex = lsm.getMaxSelectionIndex(); + for (int i = minIndex; i <= maxIndex; i++) { + if (lsm.isSelectedIndex(i)) { + String editionTypeLabel = editionTypes.get(i); + List editionCheckBoxes = editionsCheckBoxes.get(editionTypeLabel); + checkBoxList.setListData(editionCheckBoxes.toArray(new FCheckBox[editionCheckBoxes.size()])); + } + } + } + }}); + editionTypesPanel.add(new FScrollPane(editionTypesList, true, + ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER)); + + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + editionTypesList.requestFocusInWindow(); + } + }); } private void handleOk() { - for (FCheckBox box : choices) { - if (box.isSelected()) { - selectedSets.add(box.getName()); + for (CardEdition.Type editionType : selectedCheckBoxes.keySet()){ + List choices = selectedCheckBoxes.get(editionType); + for (FCheckBox box : choices) { + if (box.isSelected()) { + selectedSets.add(box.getName()); + } } - wantReprints = cbWantReprints.isSelected(); } + wantReprints = cbWantReprints.isSelected(); if (null != okCallback) { okCallback.run(); } - } } From 6712a25bfcc5e980988551a879cdfe4a1e280642 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Fri, 25 Jun 2021 17:09:20 +0100 Subject: [PATCH 11/50] Updated New Edition type (Promos => Promo) --- forge-gui/res/editions/Love Your LGS 2020.txt | 2 +- forge-gui/res/editions/Love Your LGS 2021.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/forge-gui/res/editions/Love Your LGS 2020.txt b/forge-gui/res/editions/Love Your LGS 2020.txt index 1cf34094f78..95731c2dc2a 100644 --- a/forge-gui/res/editions/Love Your LGS 2020.txt +++ b/forge-gui/res/editions/Love Your LGS 2020.txt @@ -4,7 +4,7 @@ Date=2020-05-18 Name=Love Your LGS 2020 Code2=PLGS Alias=PLGS -Type=Promos +Type=Promo ScryfallCode=PLG20 [cards] diff --git a/forge-gui/res/editions/Love Your LGS 2021.txt b/forge-gui/res/editions/Love Your LGS 2021.txt index 981ad2fcc09..7df61471eea 100644 --- a/forge-gui/res/editions/Love Your LGS 2021.txt +++ b/forge-gui/res/editions/Love Your LGS 2021.txt @@ -2,7 +2,7 @@ Code=PLG21 Date=2021-06-22 Name=Love Your LGS 2021 -Type=Promos +Type=Promo ScryfallCode=PLG21 [cards] From c3db51b5f8943dfb1c7a07c6af66abefbda66172 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sat, 3 Jul 2021 20:14:37 +0100 Subject: [PATCH 12/50] Updated Javadoc param --- forge-gui-desktop/src/main/java/forge/toolbox/FSkin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui-desktop/src/main/java/forge/toolbox/FSkin.java b/forge-gui-desktop/src/main/java/forge/toolbox/FSkin.java index 19ed7285010..e38fc09f2be 100644 --- a/forge-gui-desktop/src/main/java/forge/toolbox/FSkin.java +++ b/forge-gui-desktop/src/main/java/forge/toolbox/FSkin.java @@ -142,7 +142,7 @@ public class FSkin { * * @param clr0 {@link java.awt.Color} * @param step int - * @return {@link java.awt.CFaceolor} + * @return {@link java.awt.Color} */ public static Color stepColor(final Color clr0, final int step) { int r = clr0.getRed(); From 8e3644a0f61a379c9afb52cc9a0a1aa2178d80b4 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sat, 3 Jul 2021 20:30:31 +0100 Subject: [PATCH 13/50] Updated En-US translations for DialogChooseSets --- forge-gui/res/languages/en-US.properties | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/forge-gui/res/languages/en-US.properties b/forge-gui/res/languages/en-US.properties index da97ecec73a..dfe5f14c3e8 100644 --- a/forge-gui/res/languages/en-US.properties +++ b/forge-gui/res/languages/en-US.properties @@ -1447,7 +1447,6 @@ lblPlayerDidntAttackThisTurn=%s didn''t attack this turn. #FormatFilter.java lblAllSetsFormats=All Sets/Formats lblOtherFormats=Other Formats -lblChooseSets=Choose Sets #HistoricFormatSelect.java lblChooseFormat=Choose Format #Card.java @@ -2041,23 +2040,15 @@ lblNotFoundCustomSealedFiles=No custom sealed files found. lblChooseCustomSealedPool=Choose Custom Sealed Pool lblHowManyBoosterPacks=How many booster packs? #DialogChooseSets.java -lblDisplayRecentSetReprints=Display compatible reprints from more recent sets -lblSelectRandomSets=Select Random Sets -lblSelectNumber=Number to Select -lblCore=Core -lblExpansion=Expansion +lblChooseSets=Choose Card Sets +lblDisplayRecentSetReprints=Include Compatible Reprints from other Sets +lblSelectRandomSets=Random Selection Options +nlSelectRandomSets=Decide how many Card Set per type should be selected at random. lblFormatRestrictions=Format Restrictions -lblLegacyOrVintage=Legacy/Vintage -lblModernCardFrame=Modern Card Frame lblNoFormatRestriction=No Format Restriction -lblRandomizeSets=Randomize Sets +lblRandomizeSets=Select Random Card Sets lblClearSelection=Clear Selection -lblShowOptions=Show Options -lblHideOptions=Hide Options -lblCoreSets=Core sets -lblExpansions=Expansions -lblOtherSets=Promos, Online, and Other Sets -lblCustomSets=Custom Sets +lblCardEditionTypeList=Card Editions (per Type) #CMatchUI.java lblAbilities=Abilities #VAutoYields.java From 09e778daebb90d06efde0da7e31fa9a8475d662c Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sat, 3 Jul 2021 20:43:01 +0100 Subject: [PATCH 14/50] Updated de-DE (German) translations for DialogChooseSets --- forge-gui/res/languages/de-DE.properties | 21 ++++++--------------- forge-gui/res/languages/en-US.properties | 2 +- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/forge-gui/res/languages/de-DE.properties b/forge-gui/res/languages/de-DE.properties index c877f3190bf..80d87b2d6d2 100644 --- a/forge-gui/res/languages/de-DE.properties +++ b/forge-gui/res/languages/de-DE.properties @@ -1447,7 +1447,6 @@ lblPlayerDidntAttackThisTurn=%s griff diesen Zug nicht an. #FormatFilter.java lblAllSetsFormats=Alle Sets/Formate lblOtherFormats=Andere Formate... -lblChooseSets=Wähle Sets... #HistoricFormatSelect.java lblChooseFormat=Wähle Format #Card.java @@ -2041,23 +2040,15 @@ lblNotFoundCustomSealedFiles=Keine angepaßte Sealed-Datei gefunden. lblChooseCustomSealedPool=Wähle angepaßte Sealed-Auswahl lblHowManyBoosterPacks=Wie viele Booster-Packs? #DialogChooseSets.java -lblDisplayRecentSetReprints=Zeige passende Drucke von aktuelleren Sets -lblSelectRandomSets=Wähle zufällige Sets -lblSelectNumber=Wähle Anzahl -lblCore=Haupt -lblExpansion=Erweiterung +lblChooseSets=Kartensets Auswählen +lblDisplayRecentSetReprints=Kompatible Nachdrucke aus anderen Sets einschließen +lblSelectRandomSets=Zufällige Auswahloptionen +nlSelectRandomSets=Entscheiden Sie, wie viele Kartensätze pro Typ zufällig ausgewählt werden sollen. lblFormatRestrictions=Format-Beschränkungen -lblLegacyOrVintage=Legacy/Vintage -lblModernCardFrame=Modern-Kartenrahmen lblNoFormatRestriction=Keine Format-Beschränkung -lblRandomizeSets=Zufällige Sets +lblRandomizeSets=Zufällige Kartensets auswählen lblClearSelection=Lösche Auswahl -lblShowOptions=Zeige Optionen -lblHideOptions=Verstecke Optionen -lblCoreSets=Hauptsets -lblExpansions=Erweiterungen -lblOtherSets=Promos, Online, und Andere Sets -lblCustomSets=Benutzerdefinierte Ausgabe +lblCardEditionTypeList=Kartenausgaben (pro Typ) #CMatchUI.java lblAbilities=Fähigkeiten #VAutoYields.java diff --git a/forge-gui/res/languages/en-US.properties b/forge-gui/res/languages/en-US.properties index dfe5f14c3e8..8c7d529d0e8 100644 --- a/forge-gui/res/languages/en-US.properties +++ b/forge-gui/res/languages/en-US.properties @@ -2043,7 +2043,7 @@ lblHowManyBoosterPacks=How many booster packs? lblChooseSets=Choose Card Sets lblDisplayRecentSetReprints=Include Compatible Reprints from other Sets lblSelectRandomSets=Random Selection Options -nlSelectRandomSets=Decide how many Card Set per type should be selected at random. +nlSelectRandomSets=Decide how many card sets per type should be selected at random. lblFormatRestrictions=Format Restrictions lblNoFormatRestriction=No Format Restriction lblRandomizeSets=Select Random Card Sets From 4f0791aac0a64ee2b645c18868fc36c9abe7ae00 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sat, 3 Jul 2021 20:46:37 +0100 Subject: [PATCH 15/50] Updated es-ES (Spanish) translations for DialogChooseSets --- forge-gui/res/languages/es-ES.properties | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/forge-gui/res/languages/es-ES.properties b/forge-gui/res/languages/es-ES.properties index f9c855a66bb..af69cbb213f 100644 --- a/forge-gui/res/languages/es-ES.properties +++ b/forge-gui/res/languages/es-ES.properties @@ -1447,7 +1447,6 @@ lblPlayerDidntAttackThisTurn=%s no ataca este turno. #FormatFilter.java lblAllSetsFormats=Todas las ediciones/formatos lblOtherFormats=Otros formatos... -lblChooseSets=Selecciona ediciones... #HistoricFormatSelect.java lblChooseFormat=Selecciona formato #Card.java @@ -2041,23 +2040,15 @@ lblNotFoundCustomSealedFiles=No se encontraron archivos de sellado personalizado lblChooseCustomSealedPool=Elige Conjunto de Sellado Personalizado lblHowManyBoosterPacks=¿Cuántos paquetes de refuerzo? #DialogChooseSets.java -lblDisplayRecentSetReprints=Mostrar reimpresiones compatibles de ediciones más recientes -lblSelectRandomSets=Seleccionar ediciones aleatorias -lblSelectNumber=Número a seleccionar -lblCore=Core -lblExpansion=Expansión +lblChooseSets=Selecciona Ediciones +lblDisplayRecentSetReprints=Incluir reimpresiones compatibles de otras ediciones +lblSelectRandomSets=Opciones de selección aleatorias +nlSelectRandomSets=Decida cuántos ediciones de cartas por tipo deben seleccionarse al azar. lblFormatRestrictions=Restricciones de formato -lblLegacyOrVintage=Legacy/Vintage -lblModernCardFrame=Marco de carta moderno lblNoFormatRestriction=Sin restricción de formato -lblRandomizeSets=Aleatorizar ediciones +lblRandomizeSets=Seleccionar ediciones aleatorias lblClearSelection=Borrar selección -lblShowOptions=Mostrar opciones -lblHideOptions=Esconder opciones -lblCoreSets=Ediciones core -lblExpansions=Expansiones -lblOtherSets=Otras ediciones -lblCustomSets=Ediciones Personalizadas +lblCardEditionTypeList=Ediciones (por tipo) #CMatchUI.java lblAbilities=Habilidades #VAutoYields.java From a6d306cb36395a99822209c283defa383bb61c8a Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sat, 3 Jul 2021 20:54:55 +0100 Subject: [PATCH 16/50] Updated it-IT (Italian) translations for DialogChooseSets --- forge-gui/res/languages/it-IT.properties | 25 ++++++++---------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/forge-gui/res/languages/it-IT.properties b/forge-gui/res/languages/it-IT.properties index 73977e577d9..0d3c8d496e7 100644 --- a/forge-gui/res/languages/it-IT.properties +++ b/forge-gui/res/languages/it-IT.properties @@ -1447,7 +1447,6 @@ lblPlayerDidntAttackThisTurn=%s non ha attaccato questo turno. #FormatFilter.java lblAllSetsFormats=Tutti i set/formati lblOtherFormats=Altri formati -lblChooseSets=Scegli le espansioni #HistoricFormatSelect.java lblChooseFormat=Scegli il formato #Card.java @@ -2041,23 +2040,15 @@ lblNotFoundCustomSealedFiles=Nessun file di gioco sealed trovato. lblChooseCustomSealedPool=Scegli gruppo di carte Sealed lblHowManyBoosterPacks=Quanti pacchetti? #DialogChooseSets.java -lblDisplayRecentSetReprints=Mostra ristampe compatibili dalle espansioni più recenti -lblSelectRandomSets=Scegli espansioni casuali -lblSelectNumber=Numero -lblCore=Set base -lblExpansion=Espansione -lblFormatRestrictions=Restrizioni del formato -lblLegacyOrVintage=Legacy/Vintage -lblModernCardFrame=Frame delle carte Modern +lblChooseSets=Seleziona le Espansioni +lblDisplayRecentSetReprints=Mostra ristampe compatibili dalle altre Espansioni +lblSelectRandomSets=Opzioni per la selezione casuale +nlSelectRandomSets=Imposta il numero di espansioni per tipo da selezionare in modo casuale. +lblFormatRestrictions=Restrizioni di formato lblNoFormatRestriction=Nessuna restrizione di formato -lblRandomizeSets=Espansioni casuali -lblClearSelection=Cancella selezione -lblShowOptions=Mostra opzioni -lblHideOptions=Nascondi opzioni -lblCoreSets=Set base -lblExpansions=Espansioni -lblOtherSets=Promo, Online, e Altre Espansioni -lblCustomSets=Espansioni Personalizzate +lblRandomizeSets=Seleziona Espansioni in modo casuale +lblClearSelection=Cancella le selezioni +lblCardEditionTypeList=Espansioni (per Tipo) #CMatchUI.java lblAbilities=Abilità #VAutoYields.java From 8764a4d33da4e1a55e8a58ef246adbea3b2f117f Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sat, 3 Jul 2021 20:59:33 +0100 Subject: [PATCH 17/50] Updated ja-JP (Japanese) translations for DialogChooseSets --- forge-gui/res/languages/ja-JP.properties | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/forge-gui/res/languages/ja-JP.properties b/forge-gui/res/languages/ja-JP.properties index 4105e791924..9c61a5ae36c 100644 --- a/forge-gui/res/languages/ja-JP.properties +++ b/forge-gui/res/languages/ja-JP.properties @@ -1448,7 +1448,6 @@ lblPlayerDidntAttackThisTurn=%sはこのターン攻撃しませんでした。 #FormatFilter.java lblAllSetsFormats=全部のセット/フォーマット lblOtherFormats=他のフォーマット... -lblChooseSets=セットを選択 #HistoricFormatSelect.java lblChooseFormat=フォーマットを選択 #Card.java @@ -2042,23 +2041,15 @@ lblNotFoundCustomSealedFiles=カスタムシールファイルが見つかりま lblChooseCustomSealedPool=カスタムシールプールを選択 lblHowManyBoosterPacks=ブースターパックはいくつですか? #DialogChooseSets.java +lblChooseSets=セットを選択 lblDisplayRecentSetReprints=新しいセットからの同名の再録を表示する -lblSelectRandomSets=ランダムセットを選択 -lblSelectNumber=数を設定する -lblCore=基本セット -lblExpansion=エキスパンション +lblSelectRandomSets=ランダム選択オプション +nlSelectRandomSets=タイプごとにいくつのカードセットをランダムに選択するかを決定します。 lblFormatRestrictions=フォーマットの制限 -lblLegacyOrVintage=レガシー/ビンテージ -lblModernCardFrame=新枠 lblNoFormatRestriction=フォーマット制限なし -lblRandomizeSets=ランダム化セット +lblRandomizeSets=ランダムカードエディションを選択 lblClearSelection=全てクリア -lblShowOptions=オプションを表示 -lblHideOptions=オプションを非表示 -lblCoreSets=基本セット -lblExpansions=エキスパンション -lblOtherSets=その他のセット -lblCustomSets=カスタムエディション +lblCardEditionTypeList=カードエディション(タイプごと) #CMatchUI.java lblAbilities=能力 #VAutoYields.java From 88bba9e7c72ba003d38d522c44f1813a573636c0 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sat, 3 Jul 2021 21:03:47 +0100 Subject: [PATCH 18/50] Updated Chinese translations for DialogChooseSets --- forge-gui/res/languages/zh-CN.properties | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/forge-gui/res/languages/zh-CN.properties b/forge-gui/res/languages/zh-CN.properties index 83f6de3ac39..7a16ad478af 100644 --- a/forge-gui/res/languages/zh-CN.properties +++ b/forge-gui/res/languages/zh-CN.properties @@ -1448,7 +1448,6 @@ lblPlayerDidntAttackThisTurn=%s本回合没有进攻。 #FormatFilter.java lblAllSetsFormats=所有系列/赛制 lblOtherFormats=其他赛制 -lblChooseSets=选择系列 #HistoricFormatSelect.java lblChooseFormat=选择赛制 #Card.java @@ -2042,23 +2041,15 @@ lblNotFoundCustomSealedFiles=找不到自定义现开文件。 lblChooseCustomSealedPool=选择自定义现开池 lblHowManyBoosterPacks=多少个补充包? #DialogChooseSets.java -lblDisplayRecentSetReprints=显示来自最新系列的重印版本 -lblSelectRandomSets=选择随机系列 -lblSelectNumber=选择数量 -lblCore=核心 -lblExpansion=扩充 +lblChooseSets=选择系列 +lblDisplayRecentSetReprints=包括其他版本的兼容重印 +lblSelectRandomSets=隨機選擇選項 +nlSelectRandomSets=決定每種類型應該隨機選擇多少卡版本 lblFormatRestrictions=赛制限制 -lblLegacyOrVintage=薪传/特选 -lblModernCardFrame=摩登牌框 lblNoFormatRestriction=没有赛制限制 -lblRandomizeSets=随机系列 +lblRandomizeSets=選擇隨機卡片版本 lblClearSelection=清空选择 -lblShowOptions=显示选项 -lblHideOptions=隐藏选项 -lblCoreSets=核心系列 -lblExpansions=扩充 -lblOtherSets=闪卡系列、MO特有系列以及其他系列 -lblCustomSets=自定义系列 +lblCardEditionTypeList=卡片版本(每種類型) #CMatchUI.java lblAbilities=异能 #VAutoYields.java From c9f0d81d297039f61f93df44abf6da182204a7be Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sat, 3 Jul 2021 21:04:29 +0100 Subject: [PATCH 19/50] Type for Custom editions changed from THIRDPARTY to CUSTOM_SET --- forge-core/src/main/java/forge/card/CardEdition.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forge-core/src/main/java/forge/card/CardEdition.java b/forge-core/src/main/java/forge/card/CardEdition.java index 70de6b6c4f8..0e4ff082712 100644 --- a/forge-core/src/main/java/forge/card/CardEdition.java +++ b/forge-core/src/main/java/forge/card/CardEdition.java @@ -90,7 +90,7 @@ public final class CardEdition implements Comparable { FUNNY, OTHER, // FALLBACK CATEGORY - THIRDPARTY; // custom sets + CUSTOM_SET; // custom sets public String getBoosterBoxDefault() { switch (this) { @@ -619,7 +619,7 @@ public final class CardEdition implements Comparable { res.borderColor = BorderColor.valueOf(section.get("border", "Black").toUpperCase(Locale.ENGLISH)); Type enumType = Type.UNKNOWN; if (this.isCustomEditions){ - enumType = Type.THIRDPARTY; // Forcing ThirdParty Edition Type to avoid inconsistencies + enumType = Type.CUSTOM_SET; // Forcing ThirdParty Edition Type to avoid inconsistencies } else { String type = section.get("type"); if (null != type && !type.isEmpty()) { From 37d7ef3ee925377883ee1680e00841c4d584322a Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sat, 3 Jul 2021 21:29:46 +0100 Subject: [PATCH 20/50] Brand new desktop UI Component representing a JTree of FCheckboxes Differently from standard JTree, this component leverages on a custom TreeCellRenderer that renders each node with a checkbox, therefore rewriting completely the selection mechanism of the JTree. This component is currently used in the DialogChooseSets to represent card editions grouped per edition type. In general, this component can be used elsewhere, whenever nested objects for selection should be used. The class exposes a public API for easy interaction, as well as customised classes for nodes and nodes data, and specialised events and listeners. --- .../java/forge/toolbox/FCheckBoxTree.java | 634 ++++++++++++++++++ 1 file changed, 634 insertions(+) create mode 100644 forge-gui-desktop/src/main/java/forge/toolbox/FCheckBoxTree.java diff --git a/forge-gui-desktop/src/main/java/forge/toolbox/FCheckBoxTree.java b/forge-gui-desktop/src/main/java/forge/toolbox/FCheckBoxTree.java new file mode 100644 index 00000000000..b2bdb8ac2d9 --- /dev/null +++ b/forge-gui-desktop/src/main/java/forge/toolbox/FCheckBoxTree.java @@ -0,0 +1,634 @@ +package forge.toolbox; + +import net.miginfocom.swing.MigLayout; + +import java.awt.*; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.util.*; +import java.util.List; + +import javax.swing.*; +import javax.swing.event.EventListenerList; +import javax.swing.plaf.IconUIResource; +import javax.swing.plaf.basic.BasicTreeUI; +import javax.swing.tree.*; + +/** + * A custom JTree of FCheckBox items using Forge skin properties that allows Path selection. + * The implementation details: + * =========================== + * 1) Custom `TreeCellRenderer` that renders a Tree node as a FCheckbox. + * 1.1) When selected, the checkbox selection is changed instead of the label background and border. + * 2) Replaced the `Selection Model` by a `DefaultTreeSelectionModel` overridden inline, that has empty implementation + * to override default selection mechanism. + * + * 3) New (custom) event type for checking of the checkboxes, i.e. `CheckChangeEvent` + * 4) Inner HashSet of paths (i.e. TreePath) that helps retrieving the state of each node. + * 4.1) A custom Data Object (i.e. `TreeNodeState`) is defined to embed the current state of each tree node + * + *

+ * based on code at + * https://stackoverflow.com/questions/21847411/java-swing-need-a-good-quality-developed-jtree-with-checkboxes + */ +public class FCheckBoxTree extends JTree { + + // === FTreeNodeData === + /** Custom Data Class for each node in the Tree. + * The Data class is pretty straightforward, and embeds three main properties: + * --> label: that will be used by the TreeCellRenderer to label the checkbox rendering the node + * --> value: the actual value stored in the NodeInfo to be collected and used afterwards. This must + * be any Comparable object. + * --> key: a unique value identifying this node data entry (if not provided, the hashcode of value will + * be used by default). This property is mirrored by the FTreeNode instance encapsulating the data + * class to uniquely reference a node into the tree. Therefore, this key value should be + * passed in accordingly, with this in mind! + */ + public static class FTreeNodeData implements Comparable { + public Object key; + public String label; + public Comparable item; + public boolean isEnabled = true; + public boolean isSelected = false; + + public FTreeNodeData(Comparable value) { + this(value, value.toString(), value.hashCode()); + } + + public FTreeNodeData(Comparable value, String label) { + this(value, label, value.hashCode()); + } + + public FTreeNodeData(Comparable value, String name, Object key) { + this.item = value; + this.label = name; + this.key = key; + } + + public Object getKey(){ return this.key; } + + @Override + public int hashCode(){ + return this.item.hashCode(); + } + + @Override + public String toString() { return "FTreeNodeInfo["+this.label+", "+this.item.toString()+"]";} + + @Override + public int compareTo(FTreeNodeData o) { + return this.item.compareTo(o.item); + } + } + + // === FTreeNode === + /** + * Custom TreeNode instance used as a proxy to handle recursive data structures + * The custom class defines a bunch of helpers overloaded methods to ensure + * data encapsulation and data types in custom JTree Model. + */ + public static class FTreeNode extends DefaultMutableTreeNode { + + public FTreeNode(FTreeNodeData object){ + super(object, true); + } + + // Helper Method to quickly add child nodes from a list of FTreeNodeInfo instances + public void add(List nodesData){ + for (FTreeNodeData dataObject : nodesData) + this.add(new FTreeNode(dataObject)); + } + + public void add(FTreeNodeData dataObject){ + this.add(new FTreeNode(dataObject)); + } + + public FTreeNodeData getUserObject(){ + return (FTreeNodeData) super.getUserObject(); + } + + @Override + public String toString() { return "FTreeNode["+this.getUserObject().toString()+"]";} + public Object getKey() { return this.getUserObject().getKey(); } + } + + /** + * Defining data structure that will enable to fast check-indicate the state of each node. + * This class is central to properly handle the interaction with the component, and so + * to recursively traverse the tree and update||query the status of each nested component. + */ + private static class TreeNodeState { + boolean isSelected; + boolean isEnabled; + int numberOfChildren; + int selectedChildrenCount; + int enabledChildrenCount; + + public TreeNodeState(boolean isSelected, boolean isEnabled, int numberOfChildren, + int selectedChildrenCount, int enabledChildrenCount) { + this.isSelected = isSelected && isEnabled; + this.isEnabled = isEnabled; + this.numberOfChildren = numberOfChildren; + this.selectedChildrenCount = selectedChildrenCount; + this.enabledChildrenCount = enabledChildrenCount; + } + public boolean hasChildren() { return this.numberOfChildren > 0;} + public boolean allChildrenSelected(){ return this.numberOfChildren == this.selectedChildrenCount; }; + public boolean allChildrenEnabled(){ return this.enabledChildrenCount == this.numberOfChildren; }; + } + + // == Fields of the FCheckboxTree class == + // ======================================= + FCheckBoxTree selfPointer = this; + private static final String ROOTNODE_LABEL = "/"; // won't be displayed + private Map nodesSet = new HashMap<>(); // A map of all nodes in the tree (model) + + private HashMap treeNodesStates; + private HashSet checkedPaths = new HashSet<>(); + private TreePath lastSelectedPath; // the last path user interacted with (either checked, or unchecked) + private TreePath lastCheckedPath; // last path checked + + // == CONSTRUCTOR METHOD == + // ======================== + + public FCheckBoxTree() { + super(new FTreeNode(new FTreeNodeData(ROOTNODE_LABEL))); + // Disabling toggling by double-click + this.setToggleClickCount(0); + // Replacing default TreeUI class to customise the Icons and Look and feel + this.setUI(new FCheckBoxTreeUI()); + // Replacing default Cell Renderer + FCheckBoxTreeCellRenderer cellRenderer = new FCheckBoxTreeCellRenderer(); + this.setCellRenderer(cellRenderer); + + // Replacing default selection model with an empty one + DefaultTreeSelectionModel dtsm = new DefaultTreeSelectionModel() { + // Totally disabling the selection mechanism + public void setSelectionPath(TreePath path) {} + public void addSelectionPath(TreePath path) {} + public void removeSelectionPath(TreePath path) {} + public void setSelectionPaths(TreePath[] pPaths) {} + }; + + // Enabling Path Auto-selection Mechanism and Tree-Check on MouseClick + this.addMouseListener(new MouseListener() { + @Override + public void mouseClicked(MouseEvent e) { + TreePath tp = selfPointer.getPathForLocation(e.getX(), e.getY()); + if (tp == null) { + return; + } + boolean enabledStatus = treeNodesStates.get(tp).isEnabled; + // NOTE: this is PARAMOUNT IMPORTANT! + // Checkbox selection will be inhibited when nodes are disabled! + if (!enabledStatus) + return; + boolean checkStatus = !treeNodesStates.get(tp).isSelected; + setPathCheckStatus(tp, checkStatus); + } + @Override public void mousePressed(MouseEvent e) {} + @Override public void mouseReleased(MouseEvent e) {} + @Override public void mouseEntered(MouseEvent e) {} + @Override public void mouseExited(MouseEvent e) {} + }); + this.setSelectionModel(dtsm); + this.setRootVisible(false); + this.setShowsRootHandles(true); + } + + // == PUBLIC API METHODS == + // ======================== + + public TreePath getLastSelectedPath(){ return this.lastSelectedPath; } + public TreePath getLastCheckedBox(){ return this.lastCheckedPath; } + + @Override + public void setModel(TreeModel newModel) { + super.setModel(newModel); + initModelCheckState(); + } + + public TreePath[] getCheckedPaths() { + return checkedPaths.toArray(new TreePath[checkedPaths.size()]); + } + + /** + * Returns all the values stored in each checked node. + * Note: Values in FTreeNodeData are save as objects, therefore these array should + * be casted afterwards, accordingly. + * */ + public Object[] getCheckedValues(boolean leafNodesOnly) { + ArrayList checkedValues = new ArrayList<>(); + for (TreePath tp : this.getCheckedPaths()){ + FTreeNode node = (FTreeNode) tp.getLastPathComponent(); + boolean getValueFromNode = (!leafNodesOnly) || node.isLeaf(); + if (getValueFromNode) { + FTreeNodeData data = node.getUserObject(); + checkedValues.add(data.item); + } + } + return checkedValues.toArray(new Object[checkedValues.size()]); + } + + // Returns true in case that the node is selected, has children but not all of them are selected + public boolean isSelectedPartially(TreePath path) { + TreeNodeState cn = treeNodesStates.get(path); + return cn.isEnabled && cn.isSelected && cn.hasChildren() && !cn.allChildrenSelected(); + } + + public void resetCheckingState() { + treeNodesStates = new HashMap<>(); + checkedPaths = new HashSet<>(); + nodesSet = new HashMap<>(); + FTreeNode node = (FTreeNode) getModel().getRoot(); + if (node == null) + return; + addSubtreeToCheckingStateTracking(node, true); + } + + public FTreeNode getNodeByKey(Object key){ + FTreeNode node = nodesSet.getOrDefault(key, null); + if (node != null) + return node; + return nodesSet.getOrDefault(key.hashCode(), null); + } + + public int getNumberOfActiveChildNodes(FTreeNode node){ + TreeNodeState cn = getTreeNodeState(node); + if (cn != null) + return cn.enabledChildrenCount; + return -1; + } + + public List getActiveChildNodes(FTreeNode parent){ + List activeChildren = new ArrayList<>(); + for (int i = 0; i < parent.getChildCount(); i++) { + FTreeNode childNode = (FTreeNode) parent.getChildAt(i); + TreeNodeState cn = getTreeNodeState(childNode); + if ((cn != null) && (cn.isEnabled)) + activeChildren.add(childNode); + } + return activeChildren; + } + + public int getNumberOfSelectedChildNodes(FTreeNode node){ + TreeNodeState cn = getTreeNodeState(node); + if (cn != null) + return cn.selectedChildrenCount; + return -1; + } + + public void setNodeCheckStatus(FTreeNode node, boolean isChecked){ + TreeNode[] path = node.getPath(); + TreePath treePath = new TreePath(path); + setPathCheckStatus(treePath, isChecked); + } + + public void setNodeEnabledStatus(FTreeNode node, boolean isEnabled){ + TreeNode[] path = node.getPath(); + TreePath treePath = new TreePath(path); + setPathEnableStatus(treePath, isEnabled); + } + + /** Initialise a new TreeModel from the input Subtree represented as a Map of FTreeNodeInfo instances. + * In particular, each key will be interpreted as sibling nodes, and directly attached to the main ROOT + * (not displayed), whilst each FTreeNodeInfo in the corresponding lists will be treated as as child leaf nodes. + * + */ + public void setTreeData(TreeMap> nodesMap) { + FTreeNode rootNode = new FTreeNode(new FTreeNodeData(FCheckBoxTree.ROOTNODE_LABEL)); + for (FTreeNodeData keyNodeInfo : nodesMap.keySet()) { + FTreeNode keyNode = new FTreeNode(keyNodeInfo); + rootNode.add(keyNode); + for (FTreeNodeData childNodeInfo : nodesMap.get(keyNodeInfo)) + keyNode.add(childNodeInfo); + } + DefaultTreeModel defaultTreeModel = new DefaultTreeModel(rootNode); + this.setModel(defaultTreeModel); + } + + // Set an option in the cell rendered to enable or disable the visualisation of child nodes count + public void showNodesCount(){ + this.setCellRenderer(new FCheckBoxTreeCellRenderer(true)); + } + public void hideNodesCount(){ + this.setCellRenderer(new FCheckBoxTreeCellRenderer(false)); + } + + // == PRIVATE API METHODS == + // ======================== + + private void initModelCheckState(){ + treeNodesStates = new HashMap<>(); + checkedPaths = new HashSet<>(); + nodesSet = new HashMap<>(); + FTreeNode node = (FTreeNode) getModel().getRoot(); + if (node == null) + return; + addSubtreeToCheckingStateTracking(node, false); + } + + private void addSubtreeToCheckingStateTracking(FTreeNode node, boolean resetSelectState) { + FTreeNode prevNode = nodesSet.put(node.getKey(), node); + if (prevNode != null) + throw new RuntimeException("Node " + node + "already present in Nodes Set (key:"+node.getKey()+")"); + TreeNode[] path = node.getPath(); + FTreeNodeData nodeData = node.getUserObject(); + boolean selectStatus = !resetSelectState && nodeData.isSelected; + TreePath treePath = new TreePath(path); + TreeNodeState nodeState = new TreeNodeState(selectStatus, nodeData.isEnabled, node.getChildCount(), + 0, node.getChildCount()); + treeNodesStates.put(treePath, nodeState); + TreePath lastChildNodePath = null; + for (int i = 0; i < node.getChildCount(); i++) { + lastChildNodePath = treePath.pathByAddingChild(node.getChildAt(i)); + addSubtreeToCheckingStateTracking((FTreeNode) lastChildNodePath.getLastPathComponent(), resetSelectState); + } + if (lastChildNodePath != null) + updatePredecessors(lastChildNodePath); + } + + private void setPathCheckStatus(TreePath tp, boolean checkStatus) { + setCheckedStatusOnTree(tp, checkStatus); + updatePredecessors(tp); + // Firing the check change event + fireCheckChangeEvent(new TreeCheckChangeEvent(new Object())); + // Repainting tree after the data structures were updated + selfPointer.repaint(); + } + + private void setPathEnableStatus(TreePath tp, boolean enableStatus) { + percolateEnabledStatusOnSubtree(tp, enableStatus); + updatePredecessors(tp); + // Firing the enabled change event + fireEnabledChangeEvent(new TreeEnabledChangeEvent(new Object())); + // Repainting tree after the data structures were updated + selfPointer.repaint(); + } + + private TreeNodeState getTreeNodeState(FTreeNode node) { + TreeNode[] path = node.getPath(); + TreePath treePath = new TreePath(path); + return this.treeNodesStates.get(treePath); + } + + protected boolean isRoot(TreePath tp){ + return (tp.getParentPath() == null); + } + + // Whenever a node state changes, updates the inner state of ancestors accordingly + protected void updatePredecessors(TreePath tp) { + if (isRoot(tp)) + return; // STOP recursion + TreePath parentPath = tp.getParentPath(); + TreeNodeState parentTreeNodeState = treeNodesStates.get(parentPath); + FTreeNode parentTreeNode = (FTreeNode) parentPath.getLastPathComponent(); + + parentTreeNodeState.selectedChildrenCount = 0; + parentTreeNodeState.enabledChildrenCount = 0; + parentTreeNodeState.isSelected = false; + parentTreeNodeState.isEnabled = true; + for (int i = 0; i < parentTreeNode.getChildCount(); i++) { + TreePath childPath = parentPath.pathByAddingChild(parentTreeNode.getChildAt(i)); + TreeNodeState childTreeNodeState = treeNodesStates.get(childPath); + if (childTreeNodeState == null) + continue; + if (childTreeNodeState.isEnabled) { + parentTreeNodeState.enabledChildrenCount += 1; + if (childTreeNodeState.isSelected) { + parentTreeNodeState.selectedChildrenCount += 1; + parentTreeNodeState.isSelected = true; + } + } + } + + if (parentTreeNodeState.enabledChildrenCount == 0) + parentTreeNodeState.isEnabled = false; + + if (parentTreeNodeState.isSelected) + checkedPaths.add(parentPath); + else + checkedPaths.remove(parentPath); + + // Go Up onto the ancestors hierarchy + updatePredecessors(parentPath); + } + + // This method is the one that should be used whenever a new state change event happens + protected void setCheckedStatusOnTree(TreePath tp, boolean isChecked){ + this.lastSelectedPath = tp; + if (isChecked) + this.lastCheckedPath = tp; + percolateCheckedStatusOnSubTree(tp, isChecked); + } + + // Recursively checks/unchecks a subtree using DFS on the subtree induced by current node + private void percolateCheckedStatusOnSubTree(TreePath tp, boolean isChecked) { + TreeNodeState cn = treeNodesStates.get(tp); + cn.isSelected = cn.isEnabled && isChecked; + FTreeNode node = (FTreeNode) tp.getLastPathComponent(); + for (int i = 0; i < node.getChildCount(); i++) + percolateCheckedStatusOnSubTree(tp.pathByAddingChild(node.getChildAt(i)), isChecked); + cn.selectedChildrenCount = isChecked ? cn.enabledChildrenCount : 0; + if (cn.isEnabled) { + if (isChecked) + checkedPaths.add(tp); + else + checkedPaths.remove(tp); + } + } + + private void percolateEnabledStatusOnSubtree(TreePath tp, boolean isEnabled){ + TreeNodeState cn = treeNodesStates.get(tp); + cn.isEnabled = isEnabled; + cn.isSelected = isEnabled && cn.isSelected; + if (!cn.isSelected) { + cn.selectedChildrenCount = 0; // selection applies to all nodes in subtree, so we can safely set this. + checkedPaths.remove(tp); + } + FTreeNode node = (FTreeNode) tp.getLastPathComponent(); + for (int i = 0; i < node.getChildCount(); i++) + percolateEnabledStatusOnSubtree(tp.pathByAddingChild(node.getChildAt(i)), isEnabled); + } + + // === CUSTOM CELL RENDERED === + // ============================ + // NOTE: This class ignores the original "selection" mechanism and determines the status + // of a single (FCheckBox) node based on the "checked" property. + private class FCheckBoxTreeCellRenderer extends JPanel implements TreeCellRenderer { + FCheckBox checkBox; + private final FSkin.SkinFont CHECKBOX_LABEL_FONT = FSkin.getFont(14); + private final FSkin.SkinColor CHECKBOX_LABEL_COLOUR = FSkin.getColor(FSkin.Colors.CLR_TEXT); + private final Color CHECKBOX_SELECTED_LABEL_COLOUR = new Color(252, 226, 137); + private final boolean displayNodesCount; + + public FCheckBoxTreeCellRenderer(boolean displayNodesCount) { + super(); + this.setLayout(new MigLayout("insets 0, gap 0")); + this.setBorder(null); + this.setOpaque(false); + this.checkBox = new FCheckBox(); + this.displayNodesCount = displayNodesCount; + add(this.checkBox, "left, gap 0, w 250::450"); + + } + + public FCheckBoxTreeCellRenderer() { + this(true); + } + + @Override + public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, + boolean leaf, int row, boolean hasFocus) { + FTreeNode node = (FTreeNode) value; + FTreeNodeData nodeInfo = node.getUserObject(); + TreePath tp = new TreePath(node.getPath()); + TreeNodeState cn = treeNodesStates.get(tp); + if (cn == null) + return this; + this.checkBox.setEnabled(cn.isEnabled); + this.checkBox.setSelected(cn.isSelected); + String chkBoxTxt = nodeInfo.label; + int disabledNodes = cn.numberOfChildren - cn.enabledChildrenCount; + int totalActiveNodes = cn.numberOfChildren - disabledNodes; + if (this.displayNodesCount && !node.isLeaf() && cn.numberOfChildren > 0) { + chkBoxTxt += String.format(" (%d/%d)", cn.selectedChildrenCount, totalActiveNodes);; + } + this.checkBox.setText(chkBoxTxt); + this.checkBox.setName(nodeInfo.item.toString()); + if (cn.isSelected) { + this.checkBox.setForeground(CHECKBOX_SELECTED_LABEL_COLOUR); + } else { + this.checkBox.setForeground(CHECKBOX_LABEL_COLOUR); + } + this.checkBox.setFont(CHECKBOX_LABEL_FONT); + return this; + } + } + + // === CUSTOM TREE UI == + // ===================== + // Note: This class rewrites icons for collapsed and expanded nodes with the same polygon + // glyph used in ImageView. Also, no lines are drawn (neither vertical or horizontal) + private static class FCheckBoxTreeUI extends BasicTreeUI { + + private final IconUIResource nodeCollapsedIcon; + private final IconUIResource nodeExpandedIcon; + + public FCheckBoxTreeUI(){ + super(); + this.nodeCollapsedIcon = new IconUIResource(new NodeIcon(true)); + this.nodeExpandedIcon = new IconUIResource(new NodeIcon(false)); + } + + @Override + protected void paintHorizontalLine(Graphics g,JComponent c,int y,int left,int right){} + @Override + protected void paintVerticalLine(Graphics g,JComponent c,int x,int top,int bottom){} + @Override + public Icon getCollapsedIcon(){ return this.nodeCollapsedIcon;} + @Override + public Icon getExpandedIcon(){ return this.nodeExpandedIcon; } + + static class NodeIcon implements Icon { + + private static final int SIZE = 9; + private static final int HEADER_HEIGHT = 6; + private static final int HEADER_GLYPH_WIDTH = 8; + private final boolean isCollapsed; + + public NodeIcon(boolean isCollapsed) { + this.isCollapsed = isCollapsed; + } + + @Override + public void paintIcon(Component c, Graphics g, int x, int y) { + final Graphics2D g2d = (Graphics2D) g; + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + FSkin.setGraphicsFont(g2d, FSkin.getFont()); + Polygon glyph = new Polygon(); + int offset = HEADER_GLYPH_WIDTH / 2 + 1; + x += 4; + y += HEADER_HEIGHT / 2; + if (!this.isCollapsed) { + glyph.addPoint(x - offset + 2, y + offset - 1); + glyph.addPoint(x + offset, y + offset - 1); + glyph.addPoint(x + offset, y - offset + 1); + } else { + y++; + glyph.addPoint(x, y - offset); + glyph.addPoint(x + offset, y); + glyph.addPoint(x, y + offset); + } + g2d.fill(glyph); + } + @Override public int getIconWidth() { + return SIZE; + } + @Override public int getIconHeight() { + return SIZE; + } + } + + } + + // === CUSTOM EVENT TYPE AND EVENT HANDLER === + // =========================================== + + // NEW EVENT TYPE + protected EventListenerList listenerList = new EventListenerList(); + + public static class TreeCheckChangeEvent extends EventObject { + public TreeCheckChangeEvent(Object source) { super(source); } + } + + // NEW Custom Event Listener for the new `CheckChangeEvent`, which is fired every time a check state of a + // checkbox changes. + interface CheckChangeEventListener extends EventListener { + public void checkStateChanged(TreeCheckChangeEvent event); + } + + public void addCheckChangeEventListener(CheckChangeEventListener listener) { + listenerList.add(CheckChangeEventListener.class, listener); + } + + public void removeCheckChangeEventListener(CheckChangeEventListener listener) { + listenerList.remove(CheckChangeEventListener.class, listener); + } + + void fireCheckChangeEvent(TreeCheckChangeEvent evt) { + Object[] listeners = listenerList.getListenerList(); + for (int i = 0; i < listeners.length; i++) { + if (listeners[i] == CheckChangeEventListener.class) { + ((CheckChangeEventListener) listeners[i + 1]).checkStateChanged(evt); + } + } + } + + public static class TreeEnabledChangeEvent extends EventObject { + public TreeEnabledChangeEvent(Object source) { super(source); } + } + + // NEW Custom Event Listener for the new `CheckChangeEvent`, which is fired every time a check state of a + // checkbox changes. + interface EnableChangeEventListener extends EventListener { + public void enabledStateChanged(TreeEnabledChangeEvent event); + } + + public void addEnableChangeEventListener(EnableChangeEventListener listener) { + listenerList.add(EnableChangeEventListener.class, listener); + } + + public void removeEnableChangeEventListener(EnableChangeEventListener listener) { + listenerList.remove(EnableChangeEventListener.class, listener); + } + + void fireEnabledChangeEvent(TreeEnabledChangeEvent evt) { + Object[] listeners = listenerList.getListenerList(); + for (int i = 0; i < listeners.length; i++) { + if (listeners[i] == CheckChangeEventListener.class) { + ((EnableChangeEventListener) listeners[i + 1]).enabledStateChanged(evt); + } + } + } +} \ No newline at end of file From 0393c8d4d9a3fcca7fb830921f3602e818d0520b Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sat, 3 Jul 2021 21:30:25 +0100 Subject: [PATCH 21/50] Updated JDocs to workaround IDE errors --- .../src/main/java/forge/itemmanager/ItemManager.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/forge-gui-desktop/src/main/java/forge/itemmanager/ItemManager.java b/forge-gui-desktop/src/main/java/forge/itemmanager/ItemManager.java index 30febe0f9d0..dcd7287c6a2 100644 --- a/forge-gui-desktop/src/main/java/forge/itemmanager/ItemManager.java +++ b/forge-gui-desktop/src/main/java/forge/itemmanager/ItemManager.java @@ -138,11 +138,7 @@ public abstract class ItemManager extends JPanel implem protected boolean lockFiltering; /** - * ItemManager Constructor. - * - * @param genericType0 the class of item that this table will contain - * @param statLabels0 stat labels for this item manager - * @param wantUnique0 whether this table should display only one item with the same name + * ItemManager Constructor */ protected ItemManager(final Class genericType0, final CDetailPicture cDetailPicture, final boolean wantUnique0) { this.cDetailPicture = cDetailPicture; @@ -1043,9 +1039,7 @@ public abstract class ItemManager extends JPanel implem /** * - * updateView. - * - * @param bForceFilter + * updateView */ public void updateView(final boolean forceFilter, final Iterable itemsToSelect) { final boolean useFilter = (forceFilter && (this.filterPredicate != null)) || !isUnfiltered(); From a5b256f2fb5dc8103f54ed632e2be4248d697b8c Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sat, 3 Jul 2021 21:32:32 +0100 Subject: [PATCH 22/50] Completely redesigned DialogChooseSets to use FCheckboxTree component. This new version of the panel is completely interactive, and dynamically populated with card editions, types, and formats. The selection of formats leads to selections of subsets of editions (and so type), updating other components accordingly. --- .../screens/home/quest/DialogChooseSets.java | 748 +++++++++--------- 1 file changed, 367 insertions(+), 381 deletions(-) diff --git a/forge-gui-desktop/src/main/java/forge/screens/home/quest/DialogChooseSets.java b/forge-gui-desktop/src/main/java/forge/screens/home/quest/DialogChooseSets.java index 6d21f5b6c8f..1706e048103 100644 --- a/forge-gui-desktop/src/main/java/forge/screens/home/quest/DialogChooseSets.java +++ b/forge-gui-desktop/src/main/java/forge/screens/home/quest/DialogChooseSets.java @@ -6,27 +6,20 @@ import java.util.*; import java.util.List; import javax.swing.*; -import javax.swing.event.ListSelectionEvent; -import javax.swing.event.ListSelectionListener; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import forge.toolbox.*; import forge.card.CardEdition; import forge.game.GameFormat; import forge.gui.SOverlayUtils; import forge.localinstance.skin.FSkinProp; import forge.model.FModel; -import forge.toolbox.FButton; -import forge.toolbox.FCheckBox; -import forge.toolbox.FCheckBoxList; -import forge.toolbox.FLabel; -import forge.toolbox.FOverlay; -import forge.toolbox.FPanel; -import forge.toolbox.FRadioButton; -import forge.toolbox.FScrollPane; -import forge.toolbox.FSkin; -import forge.toolbox.FTextField; import forge.util.Localizer; import forge.util.TextUtil; import net.miginfocom.swing.MigLayout; +import forge.toolbox.FCheckBoxTree.FTreeNode; +import forge.toolbox.FCheckBoxTree.FTreeNodeData; public class DialogChooseSets { @@ -34,8 +27,8 @@ public class DialogChooseSets { private boolean wantReprints = true; private Runnable okCallback; - private final Map> selectedCheckBoxes = new TreeMap<>(); private final FCheckBox cbWantReprints = new FCheckBox(Localizer.getInstance().getMessage("lblDisplayRecentSetReprints")); + private final FCheckBoxTree checkBoxTree = new FCheckBoxTree(); public DialogChooseSets(Collection preselectedSets, Collection unselectableSets, boolean showWantReprintsCheckbox) { @@ -56,311 +49,389 @@ public class DialogChooseSets { preselectedTypes.add(edition.getType()); } } - Set unSelectableTypes = null; - if (unselectableSets != null){ - unSelectableTypes = new HashSet<>(); - for (String code: unselectableSets){ - CardEdition edition = FModel.getMagicDb().getCardEdition(code); - unSelectableTypes.add(edition.getType()); - } - } - - // Create the map of Edition Checkboxes, organised per type (label) for immediate access. - /* NOTE: Here the (String) label representation of CardEdition.Type will be used as keys - (i.e. Title case and no underscore) instead of the actual enum instance. - This is to simplify the retrieval of checkboxes for each edition type, since the very same labels will - be also used in the UI for selection (see the `editionTypes` ArrayList definition below).*/ - Map> editionsCheckBoxes = new HashMap<>(); - // Store the list of all Edition Types available to be added in the UI panel - List editionTypes = new ArrayList<>(); // List of all EditionTypes + TreeMap> editionTypeTreeData = new TreeMap<>(); + TreeMap allEditionTypes = new TreeMap<>(); + List allCardEditions = new ArrayList<>(); for (CardEdition.Type editionType : editionsTypeMap.keySet()) { - if (null != unSelectableTypes && unSelectableTypes.contains(editionType)) // skip unselectable types - continue; List editionsOfType = editionsTypeMap.get(editionType); if (editionsOfType.size() == 0) // skip empty set types continue; - String editionTypeLabel = editionType.toString(); - editionTypes.add(editionTypeLabel); - - // initialise map of selected checkboxes - selectedCheckBoxes.put(editionType, new ArrayList<>()); - List edTypeCheckBoxes = new ArrayList<>(); + List editionPerTypeNodes = new ArrayList<>(); + allCardEditions.addAll(editionsOfType); + int enabledEditionsOfTypeCounter = 0; for (CardEdition ce: editionsOfType){ String code = ce.getCode(); - FCheckBox edBox = new FCheckBox(TextUtil.concatWithSpace(ce.getName(), TextUtil.enclosedParen(code))); - edBox.setName(code); - // set the status of UI components boolean isSelected = null != preselectedSets && preselectedSets.contains(code); - edBox.setSelected(isSelected); - edBox.setEnabled(null == unselectableSets || !unselectableSets.contains(code)); - edTypeCheckBoxes.add(edBox); - if (isSelected) // also add to the list of selected boxes - selectedCheckBoxes.get(editionType).add(edBox); + boolean isEnabled = null == unselectableSets || !unselectableSets.contains(code); + FTreeNodeData editionNode = new FTreeNodeData(ce, ce.getName(), ce.getCode()); + editionNode.isEnabled = isEnabled; + editionNode.isSelected = isSelected; + if (isEnabled) + enabledEditionsOfTypeCounter += 1; + editionPerTypeNodes.add(editionNode); } - editionsCheckBoxes.put(editionTypeLabel, edTypeCheckBoxes); + editionTypeTreeData.put(new FTreeNodeData(editionType), editionPerTypeNodes); + allEditionTypes.put(editionType, enabledEditionsOfTypeCounter); } - // Initialise UI - MAIN PANEL WINDOW - FPanel panel = new FPanel(new MigLayout("insets 10, gap 5, center, wrap 3")); - panel.setOpaque(false); - panel.setBackgroundTexture(FSkin.getIcon(FSkinProp.BG_TEXTURE)); + this.checkBoxTree.setTreeData(editionTypeTreeData); - // === BOTTOM OPTIONS PANEL === - JPanel optionsPanel = new JPanel(new MigLayout("insets 10, gap 5, center, wrap 3")); - optionsPanel.setVisible(false); + // === 0. MAIN PANEL WINDOW === + // =================================================================== + // Initialise UI + FPanel mainDialogPanel = new FPanel(new MigLayout("insets 10, gap 5, center, wrap 2, w 800:1024:2048")); + mainDialogPanel.setOpaque(false); + mainDialogPanel.setBackgroundTexture(FSkin.getIcon(FSkinProp.BG_TEXTURE)); + + // === 1. RANDOM SELECTION PANEL === + // =================================================================== + JPanel randomSelectionPanel = new JPanel(new MigLayout("insets 10, gap 5, right, wrap 2")); + randomSelectionPanel.setOpaque(false); + + // === 2. RANDOM OPTIONS PANEL === + // Setup components for the random selection panel. + // NOTES: These components need to be defined first, as they will also be controlled by + // format selection buttons (enabled/disabled accordingly). + randomSelectionPanel.add(new FLabel.Builder().text( + Localizer.getInstance().getMessage("lblSelectRandomSets")).fontSize(14) + .fontStyle(Font.BOLD).build(), "h 40!, w 100%, center, span 2"); + FButton randomSelectionButton = new FButton(Localizer.getInstance().getMessage("lblRandomizeSets")); + randomSelectionButton.setFont(FSkin.getBoldFont(13)); + randomSelectionButton.setEnabled(false); // by default is not enabled + + // === SPINNER AND LABELS === + TreeMap spinnersEditionTypeMap = new TreeMap<>(); + TreeMap labelsEditionTypeMap = new TreeMap<>(); + List editionTypeSpinners = new ArrayList<>(); + for (CardEdition.Type editionType: allEditionTypes.keySet()) { + int enabledEditionCount = allEditionTypes.get(editionType); + + FSpinner spinner = new FSpinner.Builder().initialValue(0).minValue(0).maxValue(enabledEditionCount).build(); + String labTxt = "" + editionType.toString().replaceAll(" ", "
") + ": "; + FLabel label = new FLabel.Builder().text(labTxt).fontSize(13).build(); + + // Determine status of component + if (enabledEditionCount == 0) { + // No editions enabled meaning: + // the edition type HAS extensions but none of them is enabled! + spinner.setEnabled(false); + label.setEnabled(false); + } + editionTypeSpinners.add(spinner); + labelsEditionTypeMap.put(editionType, label); + spinnersEditionTypeMap.put(editionType, spinner); + } + // == SPINNERS ACTION PERFORMED == + editionTypeSpinners.forEach(spinner -> { + spinner.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + // As soon as the value of a spinner becomes different from zero, + // enabled the random selection button. + int spinValue = (int) spinner.getValue(); + if (spinValue > 0) { + if (!randomSelectionButton.isEnabled()) + randomSelectionButton.setEnabled(true); + } else { + // Similarly, when all spinners are set to zero, + // disable the random selection button + boolean allZeros = true; + for (FSpinner spin : editionTypeSpinners) { + int value = (int) spin.getValue(); + if (value != 0) { + allZeros = false; + break; + } + } + if (allZeros) + randomSelectionButton.setEnabled(false); + } + } + }); + }); + + // == ADD SPINNERS AND LABELS TO THE PANEL == + JPanel typeFieldsPanel = null; + randomSelectionPanel.add(new JSeparator(SwingConstants.HORIZONTAL), "w 100%, span 2, center"); + randomSelectionPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("nlSelectRandomSets")) + .fontSize(12).fontStyle(Font.ITALIC).build(), "w 80%!, h 22px!, gap 10 0 0 0, span 2, center"); + String pairPanelLayout = "wrap 2, w 30%"; + int componentIndex = 0; + int pairPerPanel = 3; + int panelCompsCount = 0; + for (CardEdition.Type editionType : allEditionTypes.keySet()) { + if (panelCompsCount == 0) + typeFieldsPanel = new JPanel(new MigLayout("insets 10, gap 25 5, wrap 3")); + typeFieldsPanel.setOpaque(false); + JPanel pairPanel = new JPanel(new MigLayout(pairPanelLayout)); + pairPanel.setOpaque(false); + pairPanel.add(labelsEditionTypeMap.get(editionType), "w 100!, align left, span 1"); + pairPanel.add(spinnersEditionTypeMap.get(editionType), "w 45!, align right, span 1"); + typeFieldsPanel.add(pairPanel, "span 1, left"); + panelCompsCount += 1; + componentIndex += 1; + if ((panelCompsCount == pairPerPanel) || (componentIndex == editionTypeSpinners.size())) { + // add panel to outer container if we ran out of space, or we are processing the last item + randomSelectionPanel.add(typeFieldsPanel, "w 100%, span 2"); + panelCompsCount = 0; // reset counter for the new panel, in case + } + } + randomSelectionPanel.add(new JSeparator(SwingConstants.HORIZONTAL), "w 100%, span 2, gap 0"); + FButton clearSelectionButton = new FButton(Localizer.getInstance().getMessage("lblClearSelection")); + clearSelectionButton.setFont(FSkin.getBoldFont(13)); + + // == UPDATE RANDOM PANEL LAYOUT == + randomSelectionPanel.add(clearSelectionButton, "gaptop 15, w 40%, h 26!, center"); + randomSelectionPanel.add(randomSelectionButton, "gaptop 15, w 40%, h 26!, center"); + if (showWantReprintsCheckbox) { + randomSelectionPanel.add(cbWantReprints, "gaptop 10, left, span, wrap"); + } + + // === 2. OPTIONS PANEL === + // =================================================================== + JPanel optionsPanel = new JPanel(new MigLayout("insets 10, gap 5, center, wrap 2")); optionsPanel.setOpaque(false); - optionsPanel.add(new JSeparator(SwingConstants.HORIZONTAL), "w 100%, span 2, growx"); - optionsPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblSelectRandomSets")) - .fontSize(17).fontStyle(Font.BOLD).build(), "h 40!, span 2"); - // a. Left Options - // TO BE DECIDED on these three - FTextField coreField = new FTextField.Builder().text("0").maxLength(3).build(); - FTextField expansionField = new FTextField.Builder().text("0").maxLength(3).build(); - FTextField otherField = new FTextField.Builder().text("0").maxLength(3).build(); + // === 2. FORMAT OPTIONS PANEL === + // This will include a button for each format and a NO-Format Radio Button (default) + JPanel formatOptionsPanel = new JPanel(new MigLayout("insets 10, gap 25 5, center")); + formatOptionsPanel.setOpaque(false); + formatOptionsPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblFormatRestrictions") + ":") + .fontSize(14).fontStyle(Font.BOLD).build(), "span 1"); - JPanel leftOptionsPanel = new JPanel(new MigLayout("insets 10, gap 5, center, wrap 3")); - leftOptionsPanel.setOpaque(false); - leftOptionsPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblSelectNumber") + ":") - .fontSize(14).fontStyle(Font.BOLD).build(), " span 2"); - - leftOptionsPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblCore") + ":").build()); - leftOptionsPanel.add(coreField, "w 40!"); - - leftOptionsPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblExpansion") + ":").build()); - leftOptionsPanel.add(expansionField, "w 40!"); - - leftOptionsPanel.add(new FLabel.Builder().text("Other:").build()); - leftOptionsPanel.add(otherField, "w 40!"); - - // b. Right Options - JPanel rightOptionsPanel = new JPanel(new MigLayout("insets 10, gap 25 5, center, wrap 3")); - rightOptionsPanel.setOpaque(false); - rightOptionsPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblFormatRestrictions") +":") - .fontSize(14).fontStyle(Font.BOLD).build(), "span 2"); - - // Format Options ButtonGroup formatButtonGroup = new ButtonGroup(); List gameFormats = new ArrayList<>(); FModel.getFormats().getSanctionedList().forEach(gameFormats::add); - - // TODO: Automate game formats using appropriate Enum? + Map formatButtonGroupMap = new HashMap<>(); gameFormats.forEach(item -> { - if (item.getName().equals("Legacy")) { - FRadioButton button = new FRadioButton(Localizer.getInstance().getMessage("lblLegacyOrVintage")); - button.setActionCommand(item.getName()); - formatButtonGroup.add(button); - rightOptionsPanel.add(button); - } else if (!item.getName().equals("Vintage")) { - FRadioButton button = new FRadioButton(item.getName()); - button.setActionCommand(item.getName()); - formatButtonGroup.add(button); - rightOptionsPanel.add(button); - } + FRadioButton button = new FRadioButton(item.getName()); + button.setActionCommand(item.getName()); + button.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + /* Whenever a Format button will be pressed, the status of the UI will be + updated accordingly. + In particular, for each format, the number of allowed editions will be retrieved. + (EMPTY LIST in case of NO RESTRICTIONS). + */ + List allowedSetCodes = item.getAllowedSetCodes(); + /* A. NO RESTRICTIONS: + ------------------- + All the components will be enabled, namely: + - all nodes in the checkbox tree; + - all spinners are enabled and their maximum value updated accordingly from the Tree status + */ + if (allowedSetCodes.size() == 0) { + for (CardEdition ce : allCardEditions) { + String code = ce.getCode(); + FTreeNode node = checkBoxTree.getNodeByKey(code); + if (node != null) + checkBoxTree.setNodeEnabledStatus(node, true); + } + for (CardEdition.Type editionType : allEditionTypes.keySet()) { + int numberOfEnabledEditions = allEditionTypes.get(editionType); + if (numberOfEnabledEditions == 0) + // This component will remain disabled, no matter the format selected + continue; + FSpinner spinner = spinnersEditionTypeMap.get(editionType); + FLabel label = labelsEditionTypeMap.get(editionType); + spinner.setEnabled(true); + label.setEnabled(true); + FTreeNode node = checkBoxTree.getNodeByKey(editionType); + if (node != null){ + int maxValue = checkBoxTree.getNumberOfActiveChildNodes(node); + int currentValue = (int) spinner.getValue(); + spinner.setValue(Math.min(currentValue, maxValue)); + SpinnerNumberModel m = (SpinnerNumberModel) spinner.getModel(); + m.setMaximum(maxValue); + } else { + spinner.setValue(0); + } + } + return; + } + /* B. FORMAT RESTRICTIONS: + ----------------------- + All components matching with **allowed** editions will be ENABLED. + This includes: + - nodes in the checkbox tree; + - spinners (along with their corresponding MAX values as returned from Tree status). + All components matching with the **BLACK LIST** of editions will be DISABLED + (Same as in the previous case). + */ + List codesToDisable = new ArrayList<>(); + Set typesToDisable = new HashSet<>(); + Set allowedTypes = new HashSet<>(); + for (CardEdition ce : allCardEditions) { + String code = ce.getCode(); + if (unselectableSets != null && unselectableSets.contains(code)) + continue; + if (!allowedSetCodes.contains(code)) { + codesToDisable.add(code); + typesToDisable.add(ce.getType()); + } else { + allowedTypes.add(ce.getType()); + } + } + // NOTE: We need to distinguish CardEdition.Type not having any actual CardEdition + // in the allowed sets (i.e. to be completely disabled) from those still + // having partial sets to be allowed. + // The latter will result in adjusted maxValues of the corresponding spinner, + // as well as their current value, when necessary. + typesToDisable.removeAll(allowedTypes); + + // == Update Checkbox Tree == + for (String code : codesToDisable) { + FTreeNode node = checkBoxTree.getNodeByKey(code); + if (node != null) + checkBoxTree.setNodeEnabledStatus(node, false); + } + for (String code : allowedSetCodes) { + FTreeNode node = checkBoxTree.getNodeByKey(code); + if (node != null) + checkBoxTree.setNodeEnabledStatus(node, true); + } + // == update spinners == + for (CardEdition.Type editionType : typesToDisable) { + FSpinner spinner = spinnersEditionTypeMap.get(editionType); + FLabel label = labelsEditionTypeMap.get(editionType); + spinner.setEnabled(false); + spinner.setValue(0); + label.setEnabled(false); + } + for (CardEdition.Type editionType : allowedTypes) { + if (allEditionTypes.get(editionType) == 0) + continue; + FLabel label = labelsEditionTypeMap.get(editionType); + label.setEnabled(true); + FSpinner spinner = spinnersEditionTypeMap.get(editionType); + spinner.setEnabled(true); + FTreeNode node = checkBoxTree.getNodeByKey(editionType); + if (node != null){ + int maxValue = checkBoxTree.getNumberOfActiveChildNodes(node); + int currentValue = (int) spinner.getValue(); + spinner.setValue(Math.min(currentValue, maxValue)); + SpinnerNumberModel m = (SpinnerNumberModel) spinner.getModel(); + m.setMaximum(maxValue); + } else { + spinner.setValue(0); + } + } + } + }); + formatButtonGroup.add(button); + formatOptionsPanel.add(button); + formatButtonGroupMap.put(item.getName(), button); }); - // TODO: Remember to cross check what's the effect of this button - FRadioButton button = new FRadioButton(Localizer.getInstance().getMessage("lblModernCardFrame")); - button.setActionCommand("Modern Card Frame"); - formatButtonGroup.add(button); - rightOptionsPanel.add(button); - + // NO FORMAT Button FRadioButton noFormatSelectionButton = new FRadioButton(Localizer.getInstance().getMessage("lblNoFormatRestriction")); - noFormatSelectionButton.setActionCommand("No Format Restriction"); + noFormatSelectionButton.setActionCommand("No Format"); + noFormatSelectionButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + for (CardEdition ce: allCardEditions){ + String code = ce.getCode(); + FTreeNode node = checkBoxTree.getNodeByKey(code); + if (node != null) + checkBoxTree.setNodeEnabledStatus(node, true); + } + for (CardEdition.Type editionType : allEditionTypes.keySet()) { + if (allEditionTypes.get(editionType) == 0) + // This component will remain disabled, no matter the format selected + continue; + FSpinner spinner = spinnersEditionTypeMap.get(editionType); + FLabel label = labelsEditionTypeMap.get(editionType); + spinner.setEnabled(true); + label.setEnabled(true); + FTreeNode node = checkBoxTree.getNodeByKey(editionType); + if (node != null){ + int maxValue = checkBoxTree.getNumberOfActiveChildNodes(node); + int currentValue = (int) spinner.getValue(); + spinner.setValue(Math.min(currentValue, maxValue)); + SpinnerNumberModel m = (SpinnerNumberModel) spinner.getModel(); + m.setMaximum(maxValue); + } else { + spinner.setValue(0); + } + } + } + }); formatButtonGroup.add(noFormatSelectionButton); - rightOptionsPanel.add(noFormatSelectionButton); + formatOptionsPanel.add(noFormatSelectionButton); + formatButtonGroupMap.put("No Format", noFormatSelectionButton); noFormatSelectionButton.setSelected(true); - optionsPanel.add(leftOptionsPanel, "w 33%:40%:78%"); - optionsPanel.add(rightOptionsPanel, "w 33%:60%:78%"); - - // FIXME: this button is so far ineffective - FButton randomSelectionButton = new FButton(Localizer.getInstance().getMessage("lblRandomizeSets")); -// randomSelectionButton.addActionListener(actionEvent -> { -// -// int numberOfCoreSets = Integer.parseInt(coreField.getText()); -// int numberOfExpansionSets = Integer.parseInt(expansionField.getText()); -// int numberOfOtherSets = Integer.parseInt(otherField.getText()); -// int numberOfCustomeSets = 0; -// -// for (FCheckBox coreSet : coreSets) { -// coreSet.setSelected(false); -// } -// for (FCheckBox expansionSet : expansionSets) { -// expansionSet.setSelected(false); -// } -// for (FCheckBox otherSet : otherSets) { -// otherSet.setSelected(false); -// } -// -// -// Predicate formatPredicate = null; -// for (GameFormat gameFormat : gameFormats) { -// if (gameFormat.getName().equals(formatButtonGroup.getSelection().getActionCommand())) { -// formatPredicate = edition -> gameFormat.editionLegalPredicate.apply(edition) && (unselectableSets == null || !unselectableSets.contains(edition.getCode())); -// } else if (formatButtonGroup.getSelection().getActionCommand().equals("Modern Card Frame")) { -// formatPredicate = edition -> edition.getDate().after(new Date(1059350399L * 1000L)) && (unselectableSets == null || !unselectableSets.contains(edition.getCode())); -// } else if (formatButtonGroup.getSelection().getActionCommand().equals("No Format Restriction")) { -// formatPredicate = edition -> unselectableSets == null || !unselectableSets.contains(edition.getCode()); -// } -// } -// -// List filteredCoreSets = new ArrayList<>(); -// for (CardEdition edition : editions) { -// if (edition.getType() == CardEdition.Type.CORE) { -// if (formatPredicate != null && formatPredicate.test(edition)) { -// filteredCoreSets.add(edition); -// } -// } -// } -// -// List filteredExpansionSets = new ArrayList<>(); -// for (CardEdition edition : editions) { -// if (edition.getType() == CardEdition.Type.EXPANSION) { -// if (formatPredicate != null && formatPredicate.test(edition)) { -// filteredExpansionSets.add(edition); -// } -// } -// } -// -// List filteredOtherSets = new ArrayList<>(); -// for (CardEdition edition : editions) { -// if (edition.getType() != CardEdition.Type.CORE && edition.getType() != CardEdition.Type.EXPANSION) { -// if (formatPredicate != null && formatPredicate.test(edition)) { -// filteredOtherSets.add(edition); -// } -// } -// } -// -// Collections.shuffle(filteredCoreSets); -// Collections.shuffle(filteredExpansionSets); -// Collections.shuffle(filteredOtherSets); -// -// List filteredCustomSets = new ArrayList<>(); -// if (customSetsExist){ -// for (CardEdition edition : customEditions) { -// if (formatPredicate != null && formatPredicate.test(edition)) { -// filteredCustomSets.add(edition); -// } -// } -// Collections.shuffle(filteredCustomSets); -// } -// -// for (int i = 0; i < numberOfCoreSets && i < filteredCoreSets.size(); i++) { -// String name = TextUtil.concatWithSpace(filteredCoreSets.get(i).getName(), TextUtil.enclosedParen(filteredCoreSets.get(i).getCode())); -// for (FCheckBox set : coreSets) { -// if (set.getText().equals(name)) { -// set.setSelected(true); -// } -// } -// } -// -// for (int i = 0; i < numberOfExpansionSets && i < filteredExpansionSets.size(); i++) { -// String name = TextUtil.concatWithSpace(filteredExpansionSets.get(i).getName(), TextUtil.enclosedParen(filteredExpansionSets.get(i).getCode())); -// for (FCheckBox set : expansionSets) { -// if (set.getText().equals(name)) { -// set.setSelected(true); -// } -// } -// } -// -// for (int i = 0; i < numberOfOtherSets && i < filteredOtherSets.size(); i++) { -// String name = TextUtil.concatWithSpace(filteredOtherSets.get(i).getName(), TextUtil.enclosedParen(filteredOtherSets.get(i).getCode())); -// for (FCheckBox set : otherSets) { -// if (set.getText().equals(name)) { -// set.setSelected(true); -// } -// } -// } -// -// if (customSetsExist){ -// for (int i = 0; i < numberOfCustomeSets && i < filteredCustomSets.size(); i++) { -// String name = TextUtil.concatWithSpace(filteredCustomSets.get(i).getName(), -// TextUtil.enclosedParen(filteredCustomSets.get(i).getCode())); -// for (FCheckBox set : customSets) { -// if (set.getText().equals(name)) { -// set.setSelected(true); -// } -// } -// } -// } -// -// panel.repaintSelf(); -// -// }); - - // Clear Selection Button - // CLEAR Selection button - FButton clearSelectionButton = new FButton(Localizer.getInstance().getMessage("lblClearSelection")); - clearSelectionButton.addActionListener(actionEvent -> { - for (List checkBoxes : editionsCheckBoxes.values()){ - for (FCheckBox cBox : checkBoxes) - cBox.setSelected(false); - } - // Remove all the checkboxes from the selected sets - selectedCheckBoxes.replaceAll((t, v) -> new ArrayList<>()); - panel.repaintSelf(); - }); - - // === MIDDLE: SHOW OPTIONS BUTTON === - FButton showOptionsButton = new FButton(Localizer.getInstance().getMessage("lblShowOptions")); - showOptionsButton.addActionListener(actionEvent -> { - optionsPanel.setVisible(true); - showOptionsButton.setVisible(false); - }); - - // Hide Option Button - FButton hideOptionsButton = new FButton(Localizer.getInstance().getMessage("lblHideOptions")); - hideOptionsButton.addActionListener(actionEvent -> { - optionsPanel.setVisible(false); - showOptionsButton.setVisible(true); - }); - - // Button Panel to enable the three button sets: "random selection; clear selection, hide options" - JPanel buttonPanel = new JPanel(new MigLayout("h 50!, center, gap 10, insets 0, ay center")); - buttonPanel.setOpaque(false); - buttonPanel.add(randomSelectionButton, "w 175!, h 28!"); - buttonPanel.add(clearSelectionButton, "w 175!, h 28!"); - buttonPanel.add(hideOptionsButton, " w 175!, h 28!"); - optionsPanel.add(buttonPanel, "span 2, growx"); - if (showWantReprintsCheckbox) { - optionsPanel.add(cbWantReprints, "center, span, wrap"); - } - - // === SEPARATOR === - optionsPanel.add(new JSeparator(SwingConstants.HORIZONTAL), "w 100%, span 2, growx"); - - // === TOP PANEL === - - panel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblChooseSets")) - .fontSize(20).build(), "center, span, wrap, gaptop 10"); + // === Update Option Panel === + optionsPanel.add(formatOptionsPanel, "span 2, w 100%"); + optionsPanel.add(new JSeparator(SwingConstants.HORIZONTAL), "w 100%, span 2"); + // === EDITION (PER TYPE) SELECTION PANEL === // Selected Editions Panel - JPanel selectedEditionsPnl = new JPanel(new MigLayout("center, wrap")); - selectedEditionsPnl.setOpaque(false); - selectedEditionsPnl.add(new FLabel.Builder().text("Selected Editions").build()); - setupSelectedSetsList(selectedCheckBoxes, editionsCheckBoxes, selectedEditionsPnl); + JPanel editionSelectionPanel = new JPanel(new MigLayout("insets 10, gap 25 5, wrap 1, align left")); + editionSelectionPanel.setOpaque(false); + editionSelectionPanel.add(new FLabel.Builder().text( + Localizer.getInstance().getMessage("lblCardEditionTypeList")).fontSize(14) + .fontStyle(Font.BOLD).build(), "h 40!, w 100%, center, span 1"); + this.checkBoxTree.setOpaque(false); + this.checkBoxTree.setVisibleRowCount(21); + FScrollPane selectionScroller = new FScrollPane(checkBoxTree, true); + editionSelectionPanel.add(selectionScroller, "span 1, w 100%"); - // Checkboxes Panel - JPanel setsCheckBoxesPanel = new JPanel(new MigLayout("center, wrap")); - setsCheckBoxesPanel.setOpaque(false); - setsCheckBoxesPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblSetEdition")).build()); - FCheckBoxList setsCheckboxesList = setupEditionCheckBoxList(selectedCheckBoxes, setsCheckBoxesPanel); + // ======== ADD ACTION LISTENERS TO CLEAR AND RANDOM SELECT BUTTONS + clearSelectionButton.addActionListener(actionEvent -> { + this.checkBoxTree.resetCheckingState(); + allEditionTypes.forEach((editionType, count) -> { + if (count == 0) + return; + FSpinner spinner = spinnersEditionTypeMap.get(editionType); + FLabel label = labelsEditionTypeMap.get(editionType); + spinner.setValue(0); + spinner.setEnabled(true); + label.setEnabled(true); + }); + noFormatSelectionButton.setSelected(true); + cbWantReprints.setSelected(false); + mainDialogPanel.repaintSelf(); + }); + randomSelectionButton.addActionListener(actionEvent -> { + Map countPerEditionType = new HashMap<>(); + for (CardEdition.Type editionType: allEditionTypes.keySet()){ + if (allEditionTypes.get(editionType) == 0) + continue; + FSpinner spinner = spinnersEditionTypeMap.get(editionType); + if (!spinner.isEnabled()) + continue; + int value = (int) spinner.getValue(); + if (value > 0) + countPerEditionType.put(editionType, value); + } + // We can safely reset selections as this button would not be enabled at all + // if at least one spinner has been modified, and so countPerEdition updated. + checkBoxTree.resetCheckingState(); + String selectedFormat = formatButtonGroup.getSelection().getActionCommand(); + FRadioButton formatButton = formatButtonGroupMap.get(selectedFormat); + formatButton.doClick(); + for (CardEdition.Type editionType : countPerEditionType.keySet()){ + int totalToSelect = countPerEditionType.get(editionType); + FTreeNode setTypeNode = checkBoxTree.getNodeByKey(editionType); + if (setTypeNode != null){ + List activeChildNodes = checkBoxTree.getActiveChildNodes(setTypeNode); + Collections.shuffle(activeChildNodes); + for (int i = 0; i < totalToSelect; i++) + checkBoxTree.setNodeCheckStatus(activeChildNodes.get(i), true); + } + } + mainDialogPanel.repaintSelf(); + }); + // =================================================================== - // Edition Type Panel - JPanel editionTypesPanel = new JPanel(new MigLayout("center, wrap")); - editionTypesPanel.setOpaque(false); - editionTypesPanel.add(new FLabel.Builder().text("Edition Types").build()); - setupEditionTypesPanel(editionTypes, editionsCheckBoxes, setsCheckboxesList, editionTypesPanel); - - // ADD all panels to the main UI Panel - panel.add(editionTypesPanel, "aligny top"); - panel.add(setsCheckBoxesPanel, "aligny top"); - panel.add(selectedEditionsPnl, "aligny top"); - -// panel.add(showOptionsButton, "center, w 260!, h 30!, gap 10 0 20 0, span 3, hidemode 3"); -// panel.add(optionsPanel, "center, w 100, span 3, growx, hidemode 3"); + mainDialogPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblChooseSets")) + .fontSize(20).build(), "center, span, wrap, gaptop 10"); + mainDialogPanel.add(editionSelectionPanel, "aligny top, w 70%, growx, span 1"); + mainDialogPanel.add(randomSelectionPanel, "aligny top, w 30%, span 1"); + mainDialogPanel.add(optionsPanel, "center, w 100, span 2"); final JPanel overlay = FOverlay.SINGLETON_INSTANCE.getPanel(); overlay.setLayout(new MigLayout("insets 0, gap 0, wrap, ax center, ay center")); @@ -394,12 +465,11 @@ public class DialogChooseSets { southPanel.add(btnOk, "center, w 250!, h 30!"); southPanel.add(btnCancel, "center, w 250!, h 30!"); - panel.add(southPanel, "dock south, gapBottom 10"); + mainDialogPanel.add(southPanel, "dock south, gapBottom 10"); - overlay.add(panel); - panel.getRootPane().setDefaultButton(btnOk); + overlay.add(mainDialogPanel); + mainDialogPanel.getRootPane().setDefaultButton(btnOk); SOverlayUtils.showOverlay(); - } public void setOkCallback(Runnable onOk) { @@ -434,95 +504,12 @@ public class DialogChooseSets { textArea.setText(selectedEditionsLines); } - private void setupSelectedSetsList(Map> selectedEditions, - Map> editionsCheckBoxes, JPanel txtAreaPanel){ - - JTextArea selectedEditionsTxtArea = new JTextArea(26, 33); - selectedEditionsTxtArea.setEditable(false); - txtAreaPanel.add(new FScrollPane(selectedEditionsTxtArea, true, - ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS)); - refreshSelectedEditions(selectedEditions, selectedEditionsTxtArea); - // Program the event for checkboxes - for (String editionTypeLabel : editionsCheckBoxes.keySet()) { - List checkBoxes = editionsCheckBoxes.get(editionTypeLabel); - for (FCheckBox checkBox: checkBoxes){ - checkBox.addItemListener(new ItemListener() { - @Override - public void itemStateChanged(ItemEvent e) { - CardEdition.Type edType = CardEdition.Type.fromString(editionTypeLabel); - if (checkBox.isSelected()){ - selectedEditions.get(edType).add(checkBox); - } else { - selectedEditions.get(edType).remove(checkBox); - } - refreshSelectedEditions(selectedEditions, selectedEditionsTxtArea); - }}); - } - } - } - - private FCheckBoxList setupEditionCheckBoxList(Map> selectedEditions, - JPanel checkBoxesPnl) { - // Setup Sets Checkboxes - List checkBoxesToAddToScrollPane = new ArrayList<>(); - for (CardEdition.Type editionType : selectedEditions.keySet()) { - List checkBoxes = selectedEditions.get(editionType); - checkBoxesToAddToScrollPane.addAll(checkBoxes); - } - FCheckBoxList setsCbl = new FCheckBoxList<>(false); - setsCbl.setListData(checkBoxesToAddToScrollPane.toArray(new FCheckBox[checkBoxesToAddToScrollPane.size()])); - setsCbl.setVisibleRowCount(25); - checkBoxesPnl.add(new FScrollPane(setsCbl, true, - ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS)); ; - return setsCbl; - } - - private void setupEditionTypesPanel(List editionTypes, Map> editionsCheckBoxes, - FCheckBoxList checkBoxList, JPanel editionTypesPanel) { - - JList editionTypesList = new JList(editionTypes.toArray()); - editionTypesList.setFixedCellHeight(20); - editionTypesList.setFixedCellWidth(120); - editionTypesList.setVisibleRowCount(20); - ListSelectionModel listSelectionModel = editionTypesList.getSelectionModel(); - listSelectionModel.addListSelectionListener(new ListSelectionListener() { - @Override - public void valueChanged(ListSelectionEvent e) { - ListSelectionModel lsm = (ListSelectionModel) e.getSource(); - boolean isAdjusting = lsm.getValueIsAdjusting(); - if (!lsm.isSelectionEmpty() && !isAdjusting) { - // Find out which indexes are selected. - int minIndex = lsm.getMinSelectionIndex(); - int maxIndex = lsm.getMaxSelectionIndex(); - for (int i = minIndex; i <= maxIndex; i++) { - if (lsm.isSelectedIndex(i)) { - String editionTypeLabel = editionTypes.get(i); - List editionCheckBoxes = editionsCheckBoxes.get(editionTypeLabel); - checkBoxList.setListData(editionCheckBoxes.toArray(new FCheckBox[editionCheckBoxes.size()])); - } - } - } - }}); - editionTypesPanel.add(new FScrollPane(editionTypesList, true, - ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER)); - - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - editionTypesList.requestFocusInWindow(); - } - }); - } - private void handleOk() { - for (CardEdition.Type editionType : selectedCheckBoxes.keySet()){ - List choices = selectedCheckBoxes.get(editionType); - for (FCheckBox box : choices) { - if (box.isSelected()) { - selectedSets.add(box.getName()); - } - } + Object[] checkedValues = this.checkBoxTree.getCheckedValues(true); + for (Object data: checkedValues){ + CardEdition edition = (CardEdition) data; + selectedSets.add(edition.getCode()); } wantReprints = cbWantReprints.isSelected(); @@ -530,5 +517,4 @@ public class DialogChooseSets { okCallback.run(); } } - } From d8cb67a5f610314eacd37e9d18df9ef63748e3a4 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 4 Jul 2021 17:17:41 +0100 Subject: [PATCH 23/50] A few minor adjustments to allow the UI to restore status after an edit op. --- .../main/java/forge/toolbox/FCheckBoxTree.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/forge-gui-desktop/src/main/java/forge/toolbox/FCheckBoxTree.java b/forge-gui-desktop/src/main/java/forge/toolbox/FCheckBoxTree.java index b2bdb8ac2d9..073bb6d3531 100644 --- a/forge-gui-desktop/src/main/java/forge/toolbox/FCheckBoxTree.java +++ b/forge-gui-desktop/src/main/java/forge/toolbox/FCheckBoxTree.java @@ -151,7 +151,7 @@ public class FCheckBoxTree extends JTree { // == CONSTRUCTOR METHOD == // ======================== - public FCheckBoxTree() { + public FCheckBoxTree(){ super(new FTreeNode(new FTreeNodeData(ROOTNODE_LABEL))); // Disabling toggling by double-click this.setToggleClickCount(0); @@ -323,7 +323,7 @@ public class FCheckBoxTree extends JTree { checkedPaths = new HashSet<>(); nodesSet = new HashMap<>(); FTreeNode node = (FTreeNode) getModel().getRoot(); - if (node == null) + if (node == null || node.getChildCount() == 0) return; addSubtreeToCheckingStateTracking(node, false); } @@ -469,7 +469,7 @@ public class FCheckBoxTree extends JTree { this.setOpaque(false); this.checkBox = new FCheckBox(); this.displayNodesCount = displayNodesCount; - add(this.checkBox, "left, gap 0, w 250::450"); + add(this.checkBox, "left, gaptop 2, w 250::450, h 20!"); } @@ -589,14 +589,20 @@ public class FCheckBoxTree extends JTree { } public void addCheckChangeEventListener(CheckChangeEventListener listener) { + if (listenerList == null) + return; listenerList.add(CheckChangeEventListener.class, listener); } public void removeCheckChangeEventListener(CheckChangeEventListener listener) { + if (listenerList == null) + return; listenerList.remove(CheckChangeEventListener.class, listener); } void fireCheckChangeEvent(TreeCheckChangeEvent evt) { + if (listenerList == null) + return; Object[] listeners = listenerList.getListenerList(); for (int i = 0; i < listeners.length; i++) { if (listeners[i] == CheckChangeEventListener.class) { @@ -616,14 +622,20 @@ public class FCheckBoxTree extends JTree { } public void addEnableChangeEventListener(EnableChangeEventListener listener) { + if (listenerList == null) + return; listenerList.add(EnableChangeEventListener.class, listener); } public void removeEnableChangeEventListener(EnableChangeEventListener listener) { + if (listenerList == null) + return; listenerList.remove(EnableChangeEventListener.class, listener); } void fireEnabledChangeEvent(TreeEnabledChangeEvent evt) { + if (listenerList == null) + return; Object[] listeners = listenerList.getListenerList(); for (int i = 0; i < listeners.length; i++) { if (listeners[i] == CheckChangeEventListener.class) { From 8f01f56a1ebf21e020e1beac4530c26d91dcc7b8 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 4 Jul 2021 17:21:26 +0100 Subject: [PATCH 24/50] Updates to DialogChooseSets for UI sizes and status restore First off, the status of the "allowReprints" checkbox is updated accordingly, when a filter is edited. This fixes a previous bug that did not take this into account (more on this, in the next commit msg). Other improvements to the DialogChooseSets includes a better management of spaces, as well as dimension (width) of main windows that is now dynamically adapted to current resolution. Also, this update fixes a bug having some panels dynamically adjusting height to fit components. Now all the components should be correctly aligned, and spread across the panel. --- .../screens/home/quest/DialogChooseSets.java | 76 +++++++++++-------- 1 file changed, 46 insertions(+), 30 deletions(-) diff --git a/forge-gui-desktop/src/main/java/forge/screens/home/quest/DialogChooseSets.java b/forge-gui-desktop/src/main/java/forge/screens/home/quest/DialogChooseSets.java index 1706e048103..2b6d3c43c94 100644 --- a/forge-gui-desktop/src/main/java/forge/screens/home/quest/DialogChooseSets.java +++ b/forge-gui-desktop/src/main/java/forge/screens/home/quest/DialogChooseSets.java @@ -9,6 +9,7 @@ import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; +import forge.Singletons; import forge.toolbox.*; import forge.card.CardEdition; import forge.game.GameFormat; @@ -16,7 +17,6 @@ import forge.gui.SOverlayUtils; import forge.localinstance.skin.FSkinProp; import forge.model.FModel; import forge.util.Localizer; -import forge.util.TextUtil; import net.miginfocom.swing.MigLayout; import forge.toolbox.FCheckBoxTree.FTreeNode; import forge.toolbox.FCheckBoxTree.FTreeNodeData; @@ -30,7 +30,13 @@ public class DialogChooseSets { private final FCheckBox cbWantReprints = new FCheckBox(Localizer.getInstance().getMessage("lblDisplayRecentSetReprints")); private final FCheckBoxTree checkBoxTree = new FCheckBoxTree(); - public DialogChooseSets(Collection preselectedSets, Collection unselectableSets, boolean showWantReprintsCheckbox) { + public DialogChooseSets(Collection preselectedSets, Collection unselectableSets, + boolean showWantReprintsCheckbox) { + this(preselectedSets, unselectableSets, showWantReprintsCheckbox, false); + } + + public DialogChooseSets(Collection preselectedSets, Collection unselectableSets, + boolean showWantReprintsCheckbox, boolean allowReprints) { // get the map of each editions per type Map> editionsTypeMap = FModel.getMagicDb().getEditionsTypeMap(); @@ -79,7 +85,8 @@ public class DialogChooseSets { // === 0. MAIN PANEL WINDOW === // =================================================================== // Initialise UI - FPanel mainDialogPanel = new FPanel(new MigLayout("insets 10, gap 5, center, wrap 2, w 800:1024:2048")); + FPanel mainDialogPanel = new FPanel(new MigLayout( + String.format("insets 10, gap 5, center, wrap 2, w %d!", getMainDialogWidth()))); mainDialogPanel.setOpaque(false); mainDialogPanel.setBackgroundTexture(FSkin.getIcon(FSkinProp.BG_TEXTURE)); @@ -154,20 +161,20 @@ public class DialogChooseSets { JPanel typeFieldsPanel = null; randomSelectionPanel.add(new JSeparator(SwingConstants.HORIZONTAL), "w 100%, span 2, center"); randomSelectionPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("nlSelectRandomSets")) - .fontSize(12).fontStyle(Font.ITALIC).build(), "w 80%!, h 22px!, gap 10 0 0 0, span 2, center"); + .fontSize(12).fontStyle(Font.ITALIC).build(), "w 80%!, h 22px!, gap 5 0 0 0, span 2, center"); String pairPanelLayout = "wrap 2, w 30%"; int componentIndex = 0; int pairPerPanel = 3; int panelCompsCount = 0; for (CardEdition.Type editionType : allEditionTypes.keySet()) { if (panelCompsCount == 0) - typeFieldsPanel = new JPanel(new MigLayout("insets 10, gap 25 5, wrap 3")); + typeFieldsPanel = new JPanel(new MigLayout("insets 5, wrap 3")); typeFieldsPanel.setOpaque(false); JPanel pairPanel = new JPanel(new MigLayout(pairPanelLayout)); pairPanel.setOpaque(false); pairPanel.add(labelsEditionTypeMap.get(editionType), "w 100!, align left, span 1"); pairPanel.add(spinnersEditionTypeMap.get(editionType), "w 45!, align right, span 1"); - typeFieldsPanel.add(pairPanel, "span 1, left"); + typeFieldsPanel.add(pairPanel, "span 1, center, growx, h 50!"); panelCompsCount += 1; componentIndex += 1; if ((panelCompsCount == pairPerPanel) || (componentIndex == editionTypeSpinners.size())) { @@ -184,6 +191,7 @@ public class DialogChooseSets { randomSelectionPanel.add(clearSelectionButton, "gaptop 15, w 40%, h 26!, center"); randomSelectionPanel.add(randomSelectionButton, "gaptop 15, w 40%, h 26!, center"); if (showWantReprintsCheckbox) { + cbWantReprints.setSelected(allowReprints); randomSelectionPanel.add(cbWantReprints, "gaptop 10, left, span, wrap"); } @@ -374,7 +382,6 @@ public class DialogChooseSets { Localizer.getInstance().getMessage("lblCardEditionTypeList")).fontSize(14) .fontStyle(Font.BOLD).build(), "h 40!, w 100%, center, span 1"); this.checkBoxTree.setOpaque(false); - this.checkBoxTree.setVisibleRowCount(21); FScrollPane selectionScroller = new FScrollPane(checkBoxTree, true); editionSelectionPanel.add(selectionScroller, "span 1, w 100%"); @@ -429,8 +436,8 @@ public class DialogChooseSets { mainDialogPanel.add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblChooseSets")) .fontSize(20).build(), "center, span, wrap, gaptop 10"); - mainDialogPanel.add(editionSelectionPanel, "aligny top, w 70%, growx, span 1"); - mainDialogPanel.add(randomSelectionPanel, "aligny top, w 30%, span 1"); + mainDialogPanel.add(editionSelectionPanel, "aligny top, w 50%, span 1"); + mainDialogPanel.add(randomSelectionPanel, "aligny top, w 50%, span 1"); mainDialogPanel.add(optionsPanel, "center, w 100, span 2"); final JPanel overlay = FOverlay.SINGLETON_INSTANCE.getPanel(); @@ -472,6 +479,36 @@ public class DialogChooseSets { SOverlayUtils.showOverlay(); } + private int getMainDialogWidth() { + int winWidth = Singletons.getView().getFrame().getSize().width; + System.out.println("Win Width " + winWidth); + int[] sizeBoundaries = new int[] {800, 1024, 1280, 2048}; + return calculateRelativePanelDimension(winWidth, 90, sizeBoundaries); + } + + // So far, not yet used, but left here just in case + private int getMainDialogHeight() { + int winHeight = Singletons.getView().getFrame().getSize().height; + System.out.println("Win Height " + winHeight); + int[] sizeBoundaries = new int[] {600, 720, 780, 1024}; + return calculateRelativePanelDimension(winHeight, 40, sizeBoundaries); + } + + private int calculateRelativePanelDimension(int winDim, int ratio, int[] sizeBoundaries){ + int relativeWinDimension = winDim * ratio / 100; + if (winDim < sizeBoundaries[0]) + return relativeWinDimension; + for (int i = 1; i < sizeBoundaries.length; i++){ + int left = sizeBoundaries[i-1]; + int right = sizeBoundaries[i]; + if (winDim <= left || winDim > right) + continue; + return Math.min(right*90/100, relativeWinDimension); + } + return sizeBoundaries[sizeBoundaries.length - 1] * 90 / 100; // Max Size fixed + } + + public void setOkCallback(Runnable onOk) { okCallback = onOk; } @@ -483,29 +520,8 @@ public class DialogChooseSets { public boolean getWantReprints() { return wantReprints; } - - public void setWantReprintsCB(boolean isSet) { - cbWantReprints.setSelected(isSet); - } - - private String getSelectedSetLabel(String editionTypeLabel, String editionLabel){ - editionTypeLabel = TextUtil.enclosedParen(editionTypeLabel); - return editionTypeLabel + " " + editionLabel + "\n"; - } - - private void refreshSelectedEditions(Map> selectedEditions, JTextArea textArea){ - textArea.setText(""); - String selectedEditionsLines = ""; - for (CardEdition.Type editionType : selectedEditions.keySet()){ - List selectedCheckBoxes = selectedEditions.get(editionType); - for (FCheckBox cbox : selectedCheckBoxes) - selectedEditionsLines += getSelectedSetLabel(editionType.toString(), cbox.getText()); - } - textArea.setText(selectedEditionsLines); - } private void handleOk() { - Object[] checkedValues = this.checkBoxTree.getCheckedValues(true); for (Object data: checkedValues){ CardEdition edition = (CardEdition) data; From ef18dac22ca2bc19ecbc9a3797de3fda6fd50c21 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 4 Jul 2021 17:23:46 +0100 Subject: [PATCH 25/50] CardSetFilter and DeckSetFilter now includes the allowReprints option when instantiating (for edit) the DialogChooseSets so UI updates accordingly. --- .../main/java/forge/itemmanager/filters/CardSetFilter.java | 4 ++-- .../main/java/forge/itemmanager/filters/DeckSetFilter.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardSetFilter.java b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardSetFilter.java index a9f11a2f465..8c564feabab 100644 --- a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardSetFilter.java +++ b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardSetFilter.java @@ -50,9 +50,9 @@ public class CardSetFilter extends CardFormatFilter { } public void edit(final ItemManager itemManager) { - final DialogChooseSets dialog = new DialogChooseSets(this.sets, null, true); + final DialogChooseSets dialog = new DialogChooseSets(this.sets, null, true, + this.allowReprints); final CardSetFilter itemFilter = this; - dialog.setWantReprintsCB(allowReprints); dialog.setOkCallback(new Runnable() { @Override diff --git a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckSetFilter.java b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckSetFilter.java index 2ca2a0e5ca9..ede555d1319 100644 --- a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckSetFilter.java +++ b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckSetFilter.java @@ -47,7 +47,8 @@ public class DeckSetFilter extends DeckFormatFilter { } public void edit() { - final DialogChooseSets dialog = new DialogChooseSets(this.sets, null, true); + final DialogChooseSets dialog = new DialogChooseSets(this.sets, null, true, + this.allowReprints); dialog.setOkCallback(new Runnable() { @Override public void run() { From eed49554b5b625bc0a80f1e492c6cfc075652a15 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 4 Jul 2021 17:27:56 +0100 Subject: [PATCH 26/50] The CardQuestWorldFilter constructors overload to include option to disable reprints. The CardQuestWorldFilter has been updated with two extra constructors overload that also control the option to include or not the `allowReprints` attribute. By default, the allowReprints attribute is true for backward compatibility. The new constructor will be used (next commit) by CardManager when creating filters in Card Catalog. --- .../forge/itemmanager/filters/CardQuestWorldFilter.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardQuestWorldFilter.java b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardQuestWorldFilter.java index 518922a67d1..89d25ad301f 100644 --- a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardQuestWorldFilter.java +++ b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardQuestWorldFilter.java @@ -14,12 +14,21 @@ public class CardQuestWorldFilter extends CardFormatFilter { private final Set questWorlds = new HashSet<>(); public CardQuestWorldFilter(final ItemManager itemManager0) { + this(itemManager0, true); + } + public CardQuestWorldFilter(final ItemManager itemManager0, boolean allowReprints) { super(itemManager0); + this.allowReprints = allowReprints; } public CardQuestWorldFilter(final ItemManager itemManager0, final QuestWorld questWorld0) { + this(itemManager0, questWorld0, true); + } + + public CardQuestWorldFilter(final ItemManager itemManager0, final QuestWorld questWorld0, boolean allowReprints){ super(itemManager0); this.questWorlds.add(questWorld0); this.formats.add(getQuestWorldFormat(questWorld0)); + this.allowReprints = allowReprints; } @Override From 81b214f6edd0d6b9f78fb3e99635d31192e82b21 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 4 Jul 2021 17:40:33 +0100 Subject: [PATCH 27/50] CardManager updated to instantiate quest filters without reprints CardManager now instantiate Quest World filters forcing a NO-REPRINT policy. The `allowReprints` option was set to true by default for card and deck catalog, resulting in just a weird and unexpected side-effect IMHO. Whenever a block is selected, no other reprints should be taken into account. That's the point of choosing a block. --- .../src/main/java/forge/itemmanager/CardManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui-desktop/src/main/java/forge/itemmanager/CardManager.java b/forge-gui-desktop/src/main/java/forge/itemmanager/CardManager.java index f29c4f7a82b..9b40e9856b4 100644 --- a/forge-gui-desktop/src/main/java/forge/itemmanager/CardManager.java +++ b/forge-gui-desktop/src/main/java/forge/itemmanager/CardManager.java @@ -156,7 +156,7 @@ public class CardManager extends ItemManager { GuiUtils.addMenuItem(world, w.getName(), null, new Runnable() { @Override public void run() { - itemManager.addFilter(new CardQuestWorldFilter(itemManager, w)); + itemManager.addFilter(new CardQuestWorldFilter(itemManager, w, false)); } }, CardQuestWorldFilter.canAddQuestWorld(w, itemManager.getFilter(CardQuestWorldFilter.class))); } From 9c72cf2eb460c7a5a0b763eb21cc91c2e61d650c Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 4 Jul 2021 17:44:53 +0100 Subject: [PATCH 28/50] Updating all enum FormatType to UPPERCASE as constants --- .../src/main/java/forge/game/GameFormat.java | 48 +++++++++++++------ .../home/quest/DialogChooseFormats.java | 10 ++-- .../filters/HistoricFormatSelect.java | 12 ++--- .../gamemodes/quest/data/GameFormatQuest.java | 2 +- 4 files changed, 46 insertions(+), 26 deletions(-) diff --git a/forge-game/src/main/java/forge/game/GameFormat.java b/forge-game/src/main/java/forge/game/GameFormat.java index ace852683b6..0c7129fdad9 100644 --- a/forge-game/src/main/java/forge/game/GameFormat.java +++ b/forge-game/src/main/java/forge/game/GameFormat.java @@ -57,8 +57,28 @@ import forge.util.storage.StorageReaderRecursiveFolderWithUserFolder; public class GameFormat implements Comparable { private final String name; - public enum FormatType {Sanctioned, Casual, Historic, Digital, Custom} - public enum FormatSubType {Block, Standard, Extended, Pioneer, Modern, Legacy, Vintage, Commander, Planechase, Videogame, MTGO, Arena, Custom} + public enum FormatType { + SANCTIONED, + CASUAL, + HISTORIC, + DIGITAL, + CUSTOM + } + public enum FormatSubType { + Block, + Standard, + Extended, + Pioneer, + Modern, + Legacy, + Vintage, + Commander, + Planechase, + Videogame, + MTGO, + Arena, + Custom + } // contains allowed sets, when empty allows all sets private FormatType formatType; @@ -85,11 +105,11 @@ public class GameFormat implements Comparable { private final int index; public GameFormat(final String fName, final Iterable sets, final List bannedCards) { - this(fName, parseDate(DEFAULTDATE), sets, bannedCards, null, false, null, null, 0, FormatType.Custom, FormatSubType.Custom); + this(fName, parseDate(DEFAULTDATE), sets, bannedCards, null, false, null, null, 0, FormatType.CUSTOM, FormatSubType.Custom); } public static final GameFormat NoFormat = new GameFormat("(none)", parseDate(DEFAULTDATE) , null, null, null, false - , null, null, Integer.MAX_VALUE, FormatType.Custom, FormatSubType.Custom); + , null, null, Integer.MAX_VALUE, FormatType.CUSTOM, FormatSubType.Custom); public GameFormat(final String fName, final Date effectiveDate, final Iterable sets, final List bannedCards, final List restrictedCards, Boolean restrictedLegendary, final List additionalCards, @@ -283,7 +303,7 @@ public class GameFormat implements Comparable { return formatSubType.compareTo(other.formatSubType); } } - if (formatType.equals(FormatType.Historic)){ + if (formatType.equals(FormatType.HISTORIC)){ if(effectiveDate!=other.effectiveDate) {//for matching dates or default dates default to name sorting return other.effectiveDate.compareTo(effectiveDate); } @@ -340,7 +360,7 @@ public class GameFormat implements Comparable { try { formatType = FormatType.valueOf(section.get("type")); } catch (Exception e) { - formatType = FormatType.Custom; + formatType = FormatType.CUSTOM; } FormatSubType formatsubType; try { @@ -432,7 +452,7 @@ public class GameFormat implements Comparable { public Iterable getSanctionedList() { List coreList = new ArrayList<>(); for(GameFormat format: naturallyOrdered){ - if(format.getFormatType().equals(FormatType.Sanctioned)){ + if(format.getFormatType().equals(FormatType.SANCTIONED)){ coreList.add(format); } } @@ -442,8 +462,8 @@ public class GameFormat implements Comparable { public Iterable getFilterList() { List coreList = new ArrayList<>(); for(GameFormat format: naturallyOrdered){ - if(!format.getFormatType().equals(FormatType.Historic) - &&!format.getFormatType().equals(FormatType.Digital)){ + if(!format.getFormatType().equals(FormatType.HISTORIC) + &&!format.getFormatType().equals(FormatType.DIGITAL)){ coreList.add(format); } } @@ -453,7 +473,7 @@ public class GameFormat implements Comparable { public Iterable getHistoricList() { List coreList = new ArrayList<>(); for(GameFormat format: naturallyOrdered){ - if(format.getFormatType().equals(FormatType.Historic)){ + if(format.getFormatType().equals(FormatType.HISTORIC)){ coreList.add(format); } } @@ -463,7 +483,7 @@ public class GameFormat implements Comparable { public Map> getHistoricMap() { Map> coreList = new HashMap<>(); for(GameFormat format: naturallyOrdered){ - if(format.getFormatType().equals(FormatType.Historic)){ + if(format.getFormatType().equals(FormatType.HISTORIC)){ String alpha = format.getName().substring(0,1); if(!coreList.containsKey(alpha)){ coreList.put(alpha,new ArrayList<>()); @@ -528,7 +548,7 @@ public class GameFormat implements Comparable { Set coveredTypes = new HashSet<>(); CardPool allCards = deck.getAllCardsInASinglePool(); for(GameFormat gf : reverseDateOrdered) { - if (gf.getFormatType().equals(FormatType.Digital) && !exhaustive){ + if (gf.getFormatType().equals(FormatType.DIGITAL) && !exhaustive){ //exclude Digital formats from lists for now continue; } @@ -536,7 +556,7 @@ public class GameFormat implements Comparable { //exclude Commander format as other deck checks are not performed here continue; } - if (gf.getFormatType().equals(FormatType.Historic) && coveredTypes.contains(gf.getFormatSubType()) + if (gf.getFormatType().equals(FormatType.HISTORIC) && coveredTypes.contains(gf.getFormatSubType()) && !exhaustive){ //exclude duplicate formats - only keep first of e.g. Standard historical continue; @@ -570,7 +590,7 @@ public class GameFormat implements Comparable { return gf1.formatSubType.compareTo(gf2.formatSubType); } } - if (gf1.formatType.equals(FormatType.Historic)){ + if (gf1.formatType.equals(FormatType.HISTORIC)){ if(gf1.effectiveDate!=gf2.effectiveDate) {//for matching dates or default dates default to name sorting return gf1.effectiveDate.compareTo(gf2.effectiveDate); } diff --git a/forge-gui-desktop/src/main/java/forge/screens/home/quest/DialogChooseFormats.java b/forge-gui-desktop/src/main/java/forge/screens/home/quest/DialogChooseFormats.java index c271308c108..68f3454effe 100644 --- a/forge-gui-desktop/src/main/java/forge/screens/home/quest/DialogChooseFormats.java +++ b/forge-gui-desktop/src/main/java/forge/screens/home/quest/DialogChooseFormats.java @@ -48,15 +48,15 @@ public class DialogChooseFormats { FCheckBox box = new FCheckBox(format.getName()); box.setName(format.getName()); switch (format.getFormatType()){ - case Sanctioned: + case SANCTIONED: sanctioned.add(box); break; - case Historic: + case HISTORIC: historic.add(box); break; - case Custom: - case Casual: - case Digital: + case CUSTOM: + case CASUAL: + case DIGITAL: default: casual.add(box); break; diff --git a/forge-gui-mobile/src/forge/itemmanager/filters/HistoricFormatSelect.java b/forge-gui-mobile/src/forge/itemmanager/filters/HistoricFormatSelect.java index 8cc9d76f61c..e67066abdb4 100644 --- a/forge-gui-mobile/src/forge/itemmanager/filters/HistoricFormatSelect.java +++ b/forge-gui-mobile/src/forge/itemmanager/filters/HistoricFormatSelect.java @@ -36,7 +36,7 @@ public class HistoricFormatSelect extends FScreen { public HistoricFormatSelect() { super(Localizer.getInstance().getMessage("lblChooseFormat")); for (GameFormat.FormatType group:GameFormat.FormatType.values()){ - if (group == GameFormat.FormatType.Historic){ + if (group == GameFormat.FormatType.HISTORIC){ for (GameFormat.FormatSubType subgroup:GameFormat.FormatSubType.values()){ if (historicSubTypes.contains(subgroup)){ lstFormats.addGroup(group.name() + "-" + subgroup.name()); @@ -48,13 +48,13 @@ public class HistoricFormatSelect extends FScreen { } for (GameFormat format: FModel.getFormats().getOrderedList()){ switch(format.getFormatType()){ - case Sanctioned: + case SANCTIONED: lstFormats.addItem(format, 0); break; - case Casual: + case CASUAL: lstFormats.addItem(format, 1); break; - case Historic: + case HISTORIC: switch (format.getFormatSubType()){ case Block: lstFormats.addItem(format, 2); @@ -77,10 +77,10 @@ public class HistoricFormatSelect extends FScreen { } break; - case Digital: + case DIGITAL: lstFormats.addItem(format, 8); break; - case Custom: + case CUSTOM: lstFormats.addItem(format, 9); } } diff --git a/forge-gui/src/main/java/forge/gamemodes/quest/data/GameFormatQuest.java b/forge-gui/src/main/java/forge/gamemodes/quest/data/GameFormatQuest.java index 96eb2295ca2..ada10b80779 100644 --- a/forge-gui/src/main/java/forge/gamemodes/quest/data/GameFormatQuest.java +++ b/forge-gui/src/main/java/forge/gamemodes/quest/data/GameFormatQuest.java @@ -64,7 +64,7 @@ public final class GameFormatQuest extends GameFormat { public GameFormatQuest(final GameFormat toCopy, boolean allowSetUnlocks) { super(toCopy.getName(), toCopy.getEffectiveDate(), toCopy.getAllowedSetCodes(), toCopy.getBannedCardNames(), toCopy.getRestrictedCards(), toCopy.isRestrictedLegendary(),toCopy.getAdditionalCards(), toCopy.getAllowedRarities(), - toCopy.getIndex(), FormatType.Custom, FormatSubType.Custom); + toCopy.getIndex(), FormatType.CUSTOM, FormatSubType.Custom); allowUnlocks = allowSetUnlocks; } From 33526bb31b2bf7634469afb7dfc1d7614ea15bb9 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 4 Jul 2021 17:46:07 +0100 Subject: [PATCH 29/50] Updating all enum FormatSubType to UPPERCASE as constants --- .../src/main/java/forge/game/GameFormat.java | 32 +++++++++---------- .../filters/HistoricFormatSelect.java | 18 +++++------ .../gamemodes/quest/data/GameFormatQuest.java | 2 +- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/forge-game/src/main/java/forge/game/GameFormat.java b/forge-game/src/main/java/forge/game/GameFormat.java index 0c7129fdad9..6f4d58b11f2 100644 --- a/forge-game/src/main/java/forge/game/GameFormat.java +++ b/forge-game/src/main/java/forge/game/GameFormat.java @@ -65,19 +65,19 @@ public class GameFormat implements Comparable { CUSTOM } public enum FormatSubType { - Block, - Standard, - Extended, - Pioneer, - Modern, - Legacy, - Vintage, - Commander, - Planechase, - Videogame, + BLOCK, + STANDARD, + EXTENDED, + PIONEER, + MODERN, + LEGACY, + VINTAGE, + COMMANDER, + PLANECHASE, + VIDEOGAME, MTGO, - Arena, - Custom + ARENA, + CUSTOM } // contains allowed sets, when empty allows all sets @@ -105,11 +105,11 @@ public class GameFormat implements Comparable { private final int index; public GameFormat(final String fName, final Iterable sets, final List bannedCards) { - this(fName, parseDate(DEFAULTDATE), sets, bannedCards, null, false, null, null, 0, FormatType.CUSTOM, FormatSubType.Custom); + this(fName, parseDate(DEFAULTDATE), sets, bannedCards, null, false, null, null, 0, FormatType.CUSTOM, FormatSubType.CUSTOM); } public static final GameFormat NoFormat = new GameFormat("(none)", parseDate(DEFAULTDATE) , null, null, null, false - , null, null, Integer.MAX_VALUE, FormatType.CUSTOM, FormatSubType.Custom); + , null, null, Integer.MAX_VALUE, FormatType.CUSTOM, FormatSubType.CUSTOM); public GameFormat(final String fName, final Date effectiveDate, final Iterable sets, final List bannedCards, final List restrictedCards, Boolean restrictedLegendary, final List additionalCards, @@ -366,7 +366,7 @@ public class GameFormat implements Comparable { try { formatsubType = FormatSubType.valueOf(section.get("subtype")); } catch (Exception e) { - formatsubType = FormatSubType.Custom; + formatsubType = FormatSubType.CUSTOM; } Integer idx = section.getInt("order"); String dateStr = section.get("effective"); @@ -552,7 +552,7 @@ public class GameFormat implements Comparable { //exclude Digital formats from lists for now continue; } - if (gf.getFormatSubType().equals(FormatSubType.Commander)){ + if (gf.getFormatSubType().equals(FormatSubType.COMMANDER)){ //exclude Commander format as other deck checks are not performed here continue; } diff --git a/forge-gui-mobile/src/forge/itemmanager/filters/HistoricFormatSelect.java b/forge-gui-mobile/src/forge/itemmanager/filters/HistoricFormatSelect.java index e67066abdb4..9f8f3b9010c 100644 --- a/forge-gui-mobile/src/forge/itemmanager/filters/HistoricFormatSelect.java +++ b/forge-gui-mobile/src/forge/itemmanager/filters/HistoricFormatSelect.java @@ -27,9 +27,9 @@ public class HistoricFormatSelect extends FScreen { private GameFormat selectedFormat; private final FGroupList lstFormats = add(new FGroupList<>()); - private final Set historicSubTypes = new HashSet<>(Arrays.asList(GameFormat.FormatSubType.Block, - GameFormat.FormatSubType.Standard,GameFormat.FormatSubType.Extended,GameFormat.FormatSubType.Modern, - GameFormat.FormatSubType.Legacy, GameFormat.FormatSubType.Vintage)); + private final Set historicSubTypes = new HashSet<>(Arrays.asList(GameFormat.FormatSubType.BLOCK, + GameFormat.FormatSubType.STANDARD,GameFormat.FormatSubType.EXTENDED,GameFormat.FormatSubType.MODERN, + GameFormat.FormatSubType.LEGACY, GameFormat.FormatSubType.VINTAGE)); private Runnable onCloseCallBack; @@ -56,22 +56,22 @@ public class HistoricFormatSelect extends FScreen { break; case HISTORIC: switch (format.getFormatSubType()){ - case Block: + case BLOCK: lstFormats.addItem(format, 2); break; - case Standard: + case STANDARD: lstFormats.addItem(format, 3); break; - case Extended: + case EXTENDED: lstFormats.addItem(format, 4); break; - case Modern: + case MODERN: lstFormats.addItem(format, 5); break; - case Legacy: + case LEGACY: lstFormats.addItem(format, 6); break; - case Vintage: + case VINTAGE: lstFormats.addItem(format, 7); break; diff --git a/forge-gui/src/main/java/forge/gamemodes/quest/data/GameFormatQuest.java b/forge-gui/src/main/java/forge/gamemodes/quest/data/GameFormatQuest.java index ada10b80779..6a259c3a370 100644 --- a/forge-gui/src/main/java/forge/gamemodes/quest/data/GameFormatQuest.java +++ b/forge-gui/src/main/java/forge/gamemodes/quest/data/GameFormatQuest.java @@ -64,7 +64,7 @@ public final class GameFormatQuest extends GameFormat { public GameFormatQuest(final GameFormat toCopy, boolean allowSetUnlocks) { super(toCopy.getName(), toCopy.getEffectiveDate(), toCopy.getAllowedSetCodes(), toCopy.getBannedCardNames(), toCopy.getRestrictedCards(), toCopy.isRestrictedLegendary(),toCopy.getAdditionalCards(), toCopy.getAllowedRarities(), - toCopy.getIndex(), FormatType.CUSTOM, FormatSubType.Custom); + toCopy.getIndex(), FormatType.CUSTOM, FormatSubType.CUSTOM); allowUnlocks = allowSetUnlocks; } From 9d80ae2d5c1dca00d1f832f110ca7f66e0542c83 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 4 Jul 2021 18:22:11 +0100 Subject: [PATCH 30/50] Fixing format types and subtypes read after uppercase change --- forge-game/src/main/java/forge/game/GameFormat.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/forge-game/src/main/java/forge/game/GameFormat.java b/forge-game/src/main/java/forge/game/GameFormat.java index 6f4d58b11f2..cacb3f04109 100644 --- a/forge-game/src/main/java/forge/game/GameFormat.java +++ b/forge-game/src/main/java/forge/game/GameFormat.java @@ -296,6 +296,7 @@ public class GameFormat implements Comparable { if (null == other) { return 1; } + if (other.formatType != formatType){ return formatType.compareTo(other.formatType); }else{ @@ -358,13 +359,13 @@ public class GameFormat implements Comparable { String title = section.get("name"); FormatType formatType; try { - formatType = FormatType.valueOf(section.get("type")); + formatType = FormatType.valueOf(section.get("type").toUpperCase()); } catch (Exception e) { formatType = FormatType.CUSTOM; } FormatSubType formatsubType; try { - formatsubType = FormatSubType.valueOf(section.get("subtype")); + formatsubType = FormatSubType.valueOf(section.get("subtype").toUpperCase()); } catch (Exception e) { formatsubType = FormatSubType.CUSTOM; } From a2e97700dfd2b29ab36a0a87d021303847405da6 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 4 Jul 2021 18:31:29 +0100 Subject: [PATCH 31/50] Simplified sorting of QuestWorld --- .../main/java/forge/gamemodes/quest/QuestWorld.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/forge-gui/src/main/java/forge/gamemodes/quest/QuestWorld.java b/forge-gui/src/main/java/forge/gamemodes/quest/QuestWorld.java index 6915eaa7d6a..18f6e19d93f 100644 --- a/forge-gui/src/main/java/forge/gamemodes/quest/QuestWorld.java +++ b/forge-gui/src/main/java/forge/gamemodes/quest/QuestWorld.java @@ -231,15 +231,10 @@ public class QuestWorld implements Comparable{ */ @Override public int compareTo(QuestWorld other) { - if (null == other) { + if (null == other) return 1; - } - if (name == other.name) { - return 0; - } - if (null == name) { - return -1; - } + if (this.name == null) + return -1; // dummy, no format! return name.compareTo(other.name); } From 8a7848f411d51439e98ead6661797f20d2ce0d31 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 4 Jul 2021 20:44:04 +0100 Subject: [PATCH 32/50] Changed sets to protected to allow SubClassing --- .../src/main/java/forge/itemmanager/filters/CardSetFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardSetFilter.java b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardSetFilter.java index 8c564feabab..96aef45799b 100644 --- a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardSetFilter.java +++ b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardSetFilter.java @@ -14,7 +14,7 @@ import forge.screens.home.quest.DialogChooseSets; * */ public class CardSetFilter extends CardFormatFilter { - private final Set sets = new HashSet<>(); + protected final Set sets = new HashSet<>(); public CardSetFilter(ItemManager itemManager0, Collection sets0, boolean allowReprints0) { super(itemManager0); From 0ef7986e3a089ca9f9ef89d7f52de0ae18392365 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 4 Jul 2021 20:44:44 +0100 Subject: [PATCH 33/50] Corrected Set Codes for Masques and Time Spiral Block formats --- forge-gui/res/formats/Block/Masques Block.txt | 2 +- forge-gui/res/formats/Block/Time Spiral Block.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/forge-gui/res/formats/Block/Masques Block.txt b/forge-gui/res/formats/Block/Masques Block.txt index 43da27e6094..b67f2f4cf87 100644 --- a/forge-gui/res/formats/Block/Masques Block.txt +++ b/forge-gui/res/formats/Block/Masques Block.txt @@ -3,5 +3,5 @@ Name:Masques Block Type:Historic Subtype:Block Order:131 -Sets:PCY, NMS, MMA +Sets:MMQ, NMS, PCY Banned:Lin Sivvi, Defiant Hero; Rishadan Port diff --git a/forge-gui/res/formats/Block/Time Spiral Block.txt b/forge-gui/res/formats/Block/Time Spiral Block.txt index c0d7b66d34a..58f5950de7a 100644 --- a/forge-gui/res/formats/Block/Time Spiral Block.txt +++ b/forge-gui/res/formats/Block/Time Spiral Block.txt @@ -3,4 +3,4 @@ Name:Time Spiral Block Type:Historic Subtype:Block Order:124 -Sets:FUT, PLC, TSP, TSB +Sets:FUT, PLC, TSP From 9256fdfd1ae96d2f5bc1eeab0f4688235b1a9e23 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 4 Jul 2021 20:45:26 +0100 Subject: [PATCH 34/50] FIXED dates comparison for Historic formats, and used index in addition (if no date) --- forge-game/src/main/java/forge/game/GameFormat.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/forge-game/src/main/java/forge/game/GameFormat.java b/forge-game/src/main/java/forge/game/GameFormat.java index cacb3f04109..ab222201d6f 100644 --- a/forge-game/src/main/java/forge/game/GameFormat.java +++ b/forge-game/src/main/java/forge/game/GameFormat.java @@ -305,9 +305,10 @@ public class GameFormat implements Comparable { } } if (formatType.equals(FormatType.HISTORIC)){ - if(effectiveDate!=other.effectiveDate) {//for matching dates or default dates default to name sorting - return other.effectiveDate.compareTo(effectiveDate); - } + int compareDates = this.effectiveDate.compareTo(other.effectiveDate); + if (compareDates != 0) + return compareDates; + return (this.index - other.index); } return name.compareTo(other.name); //return index - other.index; From 1aa7825c52c71a31eec981d5dd815046900cbe51 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 4 Jul 2021 21:01:39 +0100 Subject: [PATCH 35/50] New Block CardManager filter (if Load Historic format is enabled) The new CardBlockFilter extends the generic CardSetFilter by specialising the selection to set codes allowed in the corresponding Block GameFormat. A new Label `lblBlock` has been added to language file (so far, English only) --- .../java/forge/itemmanager/CardManager.java | 43 ++++++---- .../itemmanager/filters/CardBlockFilter.java | 79 +++++++++++++++++++ forge-gui/res/languages/en-US.properties | 1 + 3 files changed, 107 insertions(+), 16 deletions(-) create mode 100644 forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardBlockFilter.java diff --git a/forge-gui-desktop/src/main/java/forge/itemmanager/CardManager.java b/forge-gui-desktop/src/main/java/forge/itemmanager/CardManager.java index 9b40e9856b4..86c4f82c562 100644 --- a/forge-gui-desktop/src/main/java/forge/itemmanager/CardManager.java +++ b/forge-gui-desktop/src/main/java/forge/itemmanager/CardManager.java @@ -1,5 +1,7 @@ package forge.itemmanager; +import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map.Entry; @@ -11,21 +13,8 @@ import forge.gamemodes.quest.QuestWorld; import forge.gamemodes.quest.data.QuestPreferences; import forge.gui.GuiUtils; import forge.item.PaperCard; -import forge.itemmanager.filters.AdvancedSearchFilter; -import forge.itemmanager.filters.CardCMCFilter; -import forge.itemmanager.filters.CardCMCRangeFilter; -import forge.itemmanager.filters.CardColorFilter; -import forge.itemmanager.filters.CardFoilFilter; -import forge.itemmanager.filters.CardFormatFilter; -import forge.itemmanager.filters.CardPowerFilter; -import forge.itemmanager.filters.CardQuestWorldFilter; -import forge.itemmanager.filters.CardRatingFilter; -import forge.itemmanager.filters.CardSearchFilter; -import forge.itemmanager.filters.CardSetFilter; -import forge.itemmanager.filters.CardToughnessFilter; -import forge.itemmanager.filters.CardTypeFilter; -import forge.itemmanager.filters.FormatFilter; -import forge.itemmanager.filters.ItemFilter; +import forge.itemmanager.filters.*; +import forge.localinstance.properties.ForgePreferences; import forge.model.FModel; import forge.screens.home.quest.DialogChooseFormats; import forge.screens.home.quest.DialogChooseSets; @@ -156,12 +145,34 @@ public class CardManager extends ItemManager { GuiUtils.addMenuItem(world, w.getName(), null, new Runnable() { @Override public void run() { - itemManager.addFilter(new CardQuestWorldFilter(itemManager, w, false)); + itemManager.addFilter(new CardQuestWorldFilter(itemManager, w)); } }, CardQuestWorldFilter.canAddQuestWorld(w, itemManager.getFilter(CardQuestWorldFilter.class))); } menu.add(world); + if (FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.LOAD_HISTORIC_FORMATS)) { + JMenu blocks = GuiUtils.createMenu(localizer.getMessage("lblBlock")); + List blockFormats = new ArrayList<>(); + for (GameFormat format : FModel.getFormats().getHistoricList()){ + if (format.getFormatSubType() != GameFormat.FormatSubType.BLOCK) + continue; + if (!format.getName().endsWith("Block")) + continue; + blockFormats.add(format); + } + Collections.sort(blockFormats); // GameFormat will be sorted by Index! + for (final GameFormat f : blockFormats) { + GuiUtils.addMenuItem(blocks, f.getName(), null, new Runnable() { + @Override + public void run() { + itemManager.addFilter(new CardBlockFilter(itemManager, f)); + } + }, CardBlockFilter.canAddCardBlockWorld(f, itemManager.getFilter(CardBlockFilter.class))); + } + menu.add(blocks); + } + GuiUtils.addSeparator(menu); GuiUtils.addMenuItem(menu, localizer.getMessage("lblColors"), null, new Runnable() { diff --git a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardBlockFilter.java b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardBlockFilter.java new file mode 100644 index 00000000000..174bb79fb1f --- /dev/null +++ b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardBlockFilter.java @@ -0,0 +1,79 @@ +package forge.itemmanager.filters; + +import forge.game.GameFormat; +import forge.item.PaperCard; +import forge.itemmanager.ItemManager; +import forge.model.FModel; + +import java.util.*; + + +public class CardBlockFilter extends CardSetFilter { + + private final Set selectedBlocks = new HashSet<>(); + private GameFormat cardBlock = null; + + public CardBlockFilter(final ItemManager itemManager0, final GameFormat cardBlock) { + super(itemManager0, cardBlock.getAllowedSetCodes(), false); + this.formats.add(cardBlock); + this.selectedBlocks.add(cardBlock); + } + + private CardBlockFilter(final ItemManager itemManager0, GameFormat cardBlock, + Set selectedBlocks){ + this(itemManager0, cardBlock); + this.selectedBlocks.addAll(selectedBlocks); + } + + @Override + public ItemFilter createCopy() { + return new CardBlockFilter(itemManager, this.cardBlock, this.selectedBlocks); + } + + public static boolean canAddCardBlockWorld(final GameFormat cardBlock, final ItemFilter existingFilter) { + if (cardBlock == null || FModel.getBlocks() == null) { + return false; //must have format + } + return existingFilter == null || !((CardBlockFilter)existingFilter).selectedBlocks.contains(cardBlock); + } + + /** + * Merge the given filter with this filter if possible + * @param filter + * @return true if filter merged in or to suppress adding a new filter, false to allow adding new filter + */ + @Override + public boolean merge(final ItemFilter filter) { + final CardBlockFilter cardBlockFilter = (CardBlockFilter)filter; + this.selectedBlocks.addAll(cardBlockFilter.selectedBlocks); + this.sets.addAll(cardBlockFilter.sets); + List allBannedCards = new ArrayList<>(); + for (GameFormat f : this.formats){ + List bannedCards = f.getBannedCardNames(); + if (bannedCards != null && bannedCards.size() > 0) + allBannedCards.addAll(bannedCards); + } + this.formats.clear(); + this.formats.add(new GameFormat(null, this.sets, allBannedCards)); + return true; + } + + @Override + protected String getCaption() { + return "Block"; + } + + @Override + protected int getCount() { + return this.selectedBlocks.size(); + } + + @Override + protected Iterable getList() { + final Set strings = new HashSet<>(); + for (final GameFormat f : this.selectedBlocks) { + strings.add(f.getName()); + } + return strings; + } +} diff --git a/forge-gui/res/languages/en-US.properties b/forge-gui/res/languages/en-US.properties index b9d6a0820bb..328506ca862 100644 --- a/forge-gui/res/languages/en-US.properties +++ b/forge-gui/res/languages/en-US.properties @@ -904,6 +904,7 @@ lblCard=Card lblFormat=Format lblFormats=Formats lblQuestWorld=Quest World +lblBlock=Block lblSets=Sets lblTypes=Types lblConvertedManaCosts=Converted mana From 96fa12928565b0ceaa1a30ab803d80caecab3807 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 4 Jul 2021 21:04:43 +0100 Subject: [PATCH 36/50] FIX typo cardBlock attribute was never set in constructor. --- .../main/java/forge/itemmanager/filters/CardBlockFilter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardBlockFilter.java b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardBlockFilter.java index 174bb79fb1f..a36383a4c72 100644 --- a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardBlockFilter.java +++ b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardBlockFilter.java @@ -11,11 +11,12 @@ import java.util.*; public class CardBlockFilter extends CardSetFilter { private final Set selectedBlocks = new HashSet<>(); - private GameFormat cardBlock = null; + private GameFormat cardBlock; public CardBlockFilter(final ItemManager itemManager0, final GameFormat cardBlock) { super(itemManager0, cardBlock.getAllowedSetCodes(), false); this.formats.add(cardBlock); + this.cardBlock = cardBlock; this.selectedBlocks.add(cardBlock); } From 8977303c00ec56d98bfcde52bff668a532cbb943 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 4 Jul 2021 21:09:38 +0100 Subject: [PATCH 37/50] Improved getCount summing up the number of allowed sets in all selected blocks. --- .../main/java/forge/itemmanager/filters/CardBlockFilter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardBlockFilter.java b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardBlockFilter.java index a36383a4c72..032d5812a69 100644 --- a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardBlockFilter.java +++ b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/CardBlockFilter.java @@ -66,7 +66,10 @@ public class CardBlockFilter extends CardSetFilter { @Override protected int getCount() { - return this.selectedBlocks.size(); + int setCount = 0; + for (GameFormat block : this.selectedBlocks) + setCount += block.getAllowedSetCodes().size(); + return setCount; } @Override From 146f44f06274e12cf9062bedaf9c8ef8456ccfff Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Sun, 4 Jul 2021 21:12:11 +0100 Subject: [PATCH 38/50] Made sets attr protected to allow subclassing --- .../src/main/java/forge/itemmanager/filters/DeckSetFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckSetFilter.java b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckSetFilter.java index ede555d1319..d8a1dd76d04 100644 --- a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckSetFilter.java +++ b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckSetFilter.java @@ -11,7 +11,7 @@ import forge.screens.home.quest.DialogChooseSets; public class DeckSetFilter extends DeckFormatFilter { - private final Set sets = new HashSet<>(); + protected final Set sets = new HashSet<>(); public DeckSetFilter(ItemManager itemManager0, Collection sets0, boolean allowReprints0) { super(itemManager0); From 5b67c08ae78e0c1daeba5728de625d3a7f8a1dcb Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Mon, 5 Jul 2021 01:06:25 +0100 Subject: [PATCH 39/50] buildPredicate not final anymore to allow for override in subclasses This is the first step to finally make the DeckSetFilter working properly! So far, the filter applies if **all** the cards in a deck matches selected specific set(s). We will allow for customisation to simplify and correct this filter - more in the next commit. --- .../main/java/forge/itemmanager/filters/DeckFormatFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckFormatFilter.java b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckFormatFilter.java index 6a3e9201b61..e07365768dd 100644 --- a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckFormatFilter.java +++ b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckFormatFilter.java @@ -25,7 +25,7 @@ public class DeckFormatFilter extends FormatFilter { } @Override - protected final Predicate buildPredicate() { + protected Predicate buildPredicate() { return DeckProxy.createPredicate(SFilterUtil.buildFormatFilter(this.formats, this.allowReprints)); } From 4372311297868354c744ce2b8213c2736f870416 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Mon, 5 Jul 2021 01:11:59 +0100 Subject: [PATCH 40/50] buildPredicate specialised for DeckSet filters Now this new implementation brings the deck set filter to finally work as expected. In particular, instead of checking that all cards in Deck Pools belong to a unique edition, the predicate now leverages on the getEdition() method of DeckProxy instances, which returns the latest of the earliest sets of cards. This function will be subject to change into a future Merge Request state. --- .../forge/itemmanager/filters/DeckSetFilter.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckSetFilter.java b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckSetFilter.java index d8a1dd76d04..2e6398c82bf 100644 --- a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckSetFilter.java +++ b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckSetFilter.java @@ -4,10 +4,12 @@ import java.util.Collection; import java.util.HashSet; import java.util.Set; +import com.google.common.base.Predicate; import forge.deck.DeckProxy; import forge.game.GameFormat; import forge.itemmanager.ItemManager; import forge.screens.home.quest.DialogChooseSets; +import org.checkerframework.checker.nullness.compatqual.NullableDecl; public class DeckSetFilter extends DeckFormatFilter { @@ -75,4 +77,14 @@ public class DeckSetFilter extends DeckFormatFilter { protected Iterable getList() { return this.sets; } + + @Override + protected Predicate buildPredicate() { + return new Predicate() { + @Override + public boolean apply(@NullableDecl DeckProxy input) { + return input != null && sets.contains(input.getEdition().getCode()); + } + }; + } } From 1252b25b0a3657476793b3f1006b575e9310219e Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Mon, 5 Jul 2021 01:15:00 +0100 Subject: [PATCH 41/50] NEW DeckBlockFilter for Deck Catalog. This new filter mirrors (and extends) the one on Sets, which also relies on the renewed buildPredicate implementatio which looks at the edition of a DeckProxy. --- .../itemmanager/filters/DeckBlockFilter.java | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckBlockFilter.java diff --git a/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckBlockFilter.java b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckBlockFilter.java new file mode 100644 index 00000000000..8acf92aed40 --- /dev/null +++ b/forge-gui-desktop/src/main/java/forge/itemmanager/filters/DeckBlockFilter.java @@ -0,0 +1,86 @@ +package forge.itemmanager.filters; + +import forge.deck.DeckProxy; +import forge.game.GameFormat; +import forge.item.PaperCard; +import forge.itemmanager.ItemManager; +import forge.model.FModel; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + + +public class DeckBlockFilter extends DeckSetFilter { + + private final Set selectedBlocks = new HashSet<>(); + private GameFormat cardBlock; + + public DeckBlockFilter(ItemManager itemManager0, final GameFormat cardBlock) { + super(itemManager0, cardBlock.getAllowedSetCodes(), false); + this.formats.add(cardBlock); + this.selectedBlocks.add(cardBlock); + } + + private DeckBlockFilter(ItemManager itemManager0, GameFormat cardBlock, + Set selectedBlocks){ + this(itemManager0, cardBlock); + this.selectedBlocks.addAll(selectedBlocks); + } + + @Override + public ItemFilter createCopy() { + return new DeckBlockFilter(itemManager, this.cardBlock, this.selectedBlocks); + } + + public static boolean canAddCardBlock(final GameFormat cardBlock, final ItemFilter existingFilter) { + if (cardBlock == null || FModel.getBlocks() == null) { + return false; //must have format + } + return existingFilter == null || !((DeckBlockFilter)existingFilter).selectedBlocks.contains(cardBlock); + } + + /** + * Merge the given filter with this filter if possible + * @param filter + * @return true if filter merged in or to suppress adding a new filter, false to allow adding new filter + */ + @Override + public boolean merge(final ItemFilter filter) { + final DeckBlockFilter cardBlockFilter = (DeckBlockFilter)filter; + this.selectedBlocks.addAll(cardBlockFilter.selectedBlocks); + this.sets.addAll(cardBlockFilter.sets); + List allBannedCards = new ArrayList<>(); + for (GameFormat f : this.formats){ + List bannedCards = f.getBannedCardNames(); + if (bannedCards != null && bannedCards.size() > 0) + allBannedCards.addAll(bannedCards); + } + this.formats.clear(); + this.formats.add(new GameFormat(null, this.sets, allBannedCards)); + return true; + } + + @Override + protected String getCaption() { + return "Block"; + } + + @Override + protected int getCount() { + int setCount = 0; + for (GameFormat block : this.selectedBlocks) + setCount += block.getAllowedSetCodes().size(); + return setCount; + } + + @Override + protected Iterable getList() { + final Set strings = new HashSet<>(); + for (final GameFormat f : this.selectedBlocks) { + strings.add(f.getName()); + } + return strings; + } +} From 6e2d5c13b4ccf7decebd80e316d1520185fabf26 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Mon, 5 Jul 2021 01:18:24 +0100 Subject: [PATCH 42/50] NDeckManager now includes the new DeckBlockFilter if preferences in menu say to load HIstoric formats --- .../java/forge/itemmanager/DeckManager.java | 41 ++++++++++++------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/forge-gui-desktop/src/main/java/forge/itemmanager/DeckManager.java b/forge-gui-desktop/src/main/java/forge/itemmanager/DeckManager.java index 6a73bfe668c..b0574553527 100644 --- a/forge-gui-desktop/src/main/java/forge/itemmanager/DeckManager.java +++ b/forge-gui-desktop/src/main/java/forge/itemmanager/DeckManager.java @@ -4,9 +4,7 @@ import java.awt.Component; import java.awt.Graphics; import java.awt.Rectangle; import java.awt.event.MouseEvent; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.Map.Entry; import javax.swing.JMenu; @@ -14,6 +12,8 @@ import javax.swing.JTable; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; +import forge.itemmanager.filters.*; +import forge.localinstance.properties.ForgePreferences; import org.apache.commons.lang3.StringUtils; import forge.Singletons; @@ -29,15 +29,6 @@ import forge.gui.GuiUtils; import forge.gui.UiCommand; import forge.gui.framework.FScreen; import forge.item.InventoryItem; -import forge.itemmanager.filters.AdvancedSearchFilter; -import forge.itemmanager.filters.DeckColorFilter; -import forge.itemmanager.filters.DeckFolderFilter; -import forge.itemmanager.filters.DeckFormatFilter; -import forge.itemmanager.filters.DeckQuestWorldFilter; -import forge.itemmanager.filters.DeckSearchFilter; -import forge.itemmanager.filters.DeckSetFilter; -import forge.itemmanager.filters.FormatFilter; -import forge.itemmanager.filters.ItemFilter; import forge.itemmanager.views.ItemCellRenderer; import forge.itemmanager.views.ItemListView; import forge.itemmanager.views.ItemTableColumn; @@ -123,7 +114,7 @@ public final class DeckManager extends ItemManager implements IHasGam /** * Sets the delete command. * - * @param c0   {@link forge.forge.gui.UiCommand} command executed on delete. + * @param c0   {@link forge.gui.UiCommand} command executed on delete. */ public void setDeleteCommand(final UiCommand c0) { this.cmdDelete = c0; @@ -132,7 +123,7 @@ public final class DeckManager extends ItemManager implements IHasGam /** * Sets the select command. * - * @param c0   {@link forge.forge.gui.UiCommand} command executed on row select. + * @param c0   {@link forge.gui.UiCommand} command executed on row select. */ public void setSelectCommand(final UiCommand c0) { this.cmdSelect = c0; @@ -289,6 +280,28 @@ public final class DeckManager extends ItemManager implements IHasGam } menu.add(world); + if (FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.LOAD_HISTORIC_FORMATS)) { + JMenu blocks = GuiUtils.createMenu(localizer.getMessage("lblBlock")); + List blockFormats = new ArrayList<>(); + for (GameFormat format : FModel.getFormats().getHistoricList()){ + if (format.getFormatSubType() != GameFormat.FormatSubType.BLOCK) + continue; + if (!format.getName().endsWith("Block")) + continue; + blockFormats.add(format); + } + Collections.sort(blockFormats); // GameFormat will be sorted by Index! + for (final GameFormat f : blockFormats) { + GuiUtils.addMenuItem(blocks, f.getName(), null, new Runnable() { + @Override + public void run() { + addFilter(new DeckBlockFilter(DeckManager.this, f)); + } + }, DeckBlockFilter.canAddCardBlock(f, getFilter(DeckBlockFilter.class))); + } + menu.add(blocks); + } + GuiUtils.addSeparator(menu); GuiUtils.addMenuItem(menu, localizer.getMessage("lblColors"), null, new Runnable() { From 81ec996ab3cd969b7dbbf0154134ba5f848f81dc Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Mon, 5 Jul 2021 08:04:19 +0100 Subject: [PATCH 43/50] DRAFT_INNOVATION card edition type renamed as DRAFT The new name IMHO is easier and more appropriate as a category name. This would be a mismatch with Scryfall Nomenclature, but Forge contains already mismatch (e.g. REPRINT) so not a big deal. --- forge-core/src/main/java/forge/card/CardEdition.java | 2 +- .../src/forge/itemmanager/filters/FormatFilter.java | 2 +- forge-gui/res/editions/Battlebond.txt | 2 +- forge-gui/res/editions/Commander Legends.txt | 2 +- forge-gui/res/editions/Conspiracy Take the Crown.txt | 2 +- forge-gui/res/editions/Conspiracy.txt | 2 +- forge-gui/res/editions/Jumpstart.txt | 2 +- forge-gui/res/editions/Modern Horizons 1 Timeshifts.txt | 2 +- forge-gui/res/editions/Modern Horizons 2.txt | 2 +- forge-gui/res/editions/Modern Horizons.txt | 2 +- forge-gui/res/editions/Strixhaven Mystical Archive.txt | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/forge-core/src/main/java/forge/card/CardEdition.java b/forge-core/src/main/java/forge/card/CardEdition.java index 0e4ff082712..533f425c466 100644 --- a/forge-core/src/main/java/forge/card/CardEdition.java +++ b/forge-core/src/main/java/forge/card/CardEdition.java @@ -83,7 +83,7 @@ public final class CardEdition implements Comparable { PROMO, ONLINE, - DRAFT_INNOVATION, + DRAFT, COMMANDER, MULTIPLAYER, diff --git a/forge-gui-mobile/src/forge/itemmanager/filters/FormatFilter.java b/forge-gui-mobile/src/forge/itemmanager/filters/FormatFilter.java index 9057bd14739..ddfb35dc39b 100644 --- a/forge-gui-mobile/src/forge/itemmanager/filters/FormatFilter.java +++ b/forge-gui-mobile/src/forge/itemmanager/filters/FormatFilter.java @@ -186,7 +186,7 @@ public abstract class FormatFilter extends ItemFilter Date: Mon, 5 Jul 2021 08:05:02 +0100 Subject: [PATCH 44/50] G18 Set added to Pioneer format --- forge-gui/res/formats/Sanctioned/Pioneer.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui/res/formats/Sanctioned/Pioneer.txt b/forge-gui/res/formats/Sanctioned/Pioneer.txt index 52d9762ff70..c4b473332c5 100644 --- a/forge-gui/res/formats/Sanctioned/Pioneer.txt +++ b/forge-gui/res/formats/Sanctioned/Pioneer.txt @@ -3,5 +3,5 @@ Name:Pioneer Order:102 Subtype:Pioneer Type:Sanctioned -Sets:RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, ORI, BFZ, OGW, SOI, EMN, KLD, AER, AKH, HOU, XLN, RIX, DOM, M19, GRN, RNA, WAR, M20, ELD, THB, IKO, M21, ZNR, KHM, STX +Sets:RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, ORI, BFZ, OGW, SOI, EMN, KLD, AER, AKH, HOU, XLN, RIX, DOM, M19, G18, GRN, RNA, WAR, M20, ELD, THB, IKO, M21, ZNR, KHM, STX Banned:Balustrade Spy; Bloodstained Mire; Felidar Guardian; Field of the Dead; Flooded Strand; Inverter of Truth; Kethis, the Hidden Hand; Leyline of Abundance; Nexus of Fate; Oko, Thief of Crowns; Once Upon a Time; Polluted Delta; Smuggler's Copter; Teferi, Time Raveler; Undercity Informer; Underworld Breach; Uro, Titan of Nature's Wrath; Veil of Summer; Walking Ballista; Wilderness Reclamation; Windswept Heath; Wooded Foothills From 411e77c8c690330ed984f7a2dd27c84a2f5aa8cf Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Mon, 5 Jul 2021 08:06:46 +0100 Subject: [PATCH 45/50] Modern format now also includes: TSR, MMA, MM3, W16 sets Modern format now inclides TimeSpiral Remastered, Modern Masters (all) and Welcome Deck 2016 (all new frame cards, since also W17 was included) --- forge-gui/res/formats/Sanctioned/Modern.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui/res/formats/Sanctioned/Modern.txt b/forge-gui/res/formats/Sanctioned/Modern.txt index 43a7dc47987..2365b4c6edd 100644 --- a/forge-gui/res/formats/Sanctioned/Modern.txt +++ b/forge-gui/res/formats/Sanctioned/Modern.txt @@ -3,5 +3,5 @@ Name:Modern Order:103 Subtype:Modern Type:Sanctioned -Sets:8ED, MRD, DST, 5DN, CHK, BOK, SOK, 9ED, RAV, GPT, DIS, CSP, TSP, TSB, PLC, FUT, 10E, LRW, EVE, SHM, MOR, ALA, CFX, ARB, M10, ZEN, WWK, ROE, M11, SOM, MBS, NPH, M12, ISD, DKA, AVR, M13, RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, MM2, ORI, BFZ, OGW, SOI, EMN, KLD, AER, AKH, W17, HOU, XLN, RIX, DOM, M19, G18, GRN, RNA, WAR, MH1, M20, ELD, THB, IKO, M21, ZNR, KHM, STX, MH2 +Sets:8ED, MRD, DST, 5DN, CHK, BOK, SOK, 9ED, RAV, GPT, DIS, CSP, TSP, TSB, TSR, PLC, FUT, 10E, LRW, EVE, SHM, MOR, ALA, CFX, ARB, M10, ZEN, WWK, ROE, M11, SOM, MBS, NPH, M12, ISD, DKA, AVR, M13, RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, MMA, MM2, MM3, ORI, BFZ, OGW, SOI, EMN, KLD, AER, AKH, W16, W17, HOU, XLN, RIX, DOM, M19, G18, GRN, RNA, WAR, MH1, M20, ELD, THB, IKO, M21, ZNR, KHM, STX, MH2 Banned:Ancient Den; Arcum's Astrolabe; Birthing Pod; Blazing Shoal; Bridge from Below; Chrome Mox; Cloudpost; Dark Depths; Deathrite Shaman; Dig Through Time; Dread Return; Eye of Ugin; Faithless Looting; Field of the Dead; Gitaxian Probe; Glimpse of Nature; Golgari Grave-Troll; Great Furnace; Green Sun's Zenith; Hogaak, Arisen Necropolis; Hypergenesis; Krark-Clan Ironworks; Mental Misstep; Mox Opal; Mycosynth Lattice; Mystic Sanctuary; Oko, Thief of Crowns; Once Upon A Time; Ponder; Preordain; Punishing Fire; Rite of Flame; Seat of the Synod; Second Sunrise; Seething Song; Sensei's Divining Top; Simian Spirit Guide; Skullclamp; Splinter Twin; Summer Bloom; Tibalt's Trickery; Treasure Cruise; Tree of Tales; Umezawa's Jitte; Uro, Titan of Nature's Wrath; Vault of Whispers From 57c81ec49f760b5cf7a6bdfaeac448925a5bca34 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Mon, 5 Jul 2021 08:14:46 +0100 Subject: [PATCH 46/50] Updated to new DRAFT edition type --- forge-gui/res/editions/Mystery Booster Retail Edition Foils.txt | 2 +- forge-gui/res/editions/Mystery Booster.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/forge-gui/res/editions/Mystery Booster Retail Edition Foils.txt b/forge-gui/res/editions/Mystery Booster Retail Edition Foils.txt index 4b711c4791f..699135f44b3 100644 --- a/forge-gui/res/editions/Mystery Booster Retail Edition Foils.txt +++ b/forge-gui/res/editions/Mystery Booster Retail Edition Foils.txt @@ -2,7 +2,7 @@ Code=FMB1 Date=2020-03-08 Name=Mystery Booster Retail Edition Foils -Type=Draft_Innovation +Type=Draft ScryfallCode=FMB1 [cards] diff --git a/forge-gui/res/editions/Mystery Booster.txt b/forge-gui/res/editions/Mystery Booster.txt index cb27d0f4c7d..b478bd5e8b9 100644 --- a/forge-gui/res/editions/Mystery Booster.txt +++ b/forge-gui/res/editions/Mystery Booster.txt @@ -2,7 +2,7 @@ Code=MB1 Date=2019-11-07 Name=Mystery Booster -Type=Draft_Innovation +Type=Draft BoosterCovers=1 Booster=2 fromSheet("MB1 White CommonUncommon"), 2 fromSheet("MB1 Blue CommonUncommon"), 2 fromSheet("MB1 Black CommonUncommon"), 2 fromSheet("MB1 Green CommonUncommon"), 2 fromSheet("MB1 Red CommonUncommon"), 1 fromSheet("MB1 Multi CommonUncommon"), 1 fromSheet("MB1 Artifact Land CommonUncommon"), 1 fromSheet("MB1 Pre M15"), 1 fromSheet("MB1 Post M15 RareMythic"), 1 fromSheet("MB1 Foils") Foil=NotSupported From a276118409045aad9b592e90bd19161a1e1f6001 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Mon, 5 Jul 2021 09:22:25 +0100 Subject: [PATCH 47/50] Set restrictions to Legacy and Vintage to allow for proper edition selection in sets filters --- forge-gui/res/formats/Sanctioned/Legacy.txt | 1 + forge-gui/res/formats/Sanctioned/Vintage.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/forge-gui/res/formats/Sanctioned/Legacy.txt b/forge-gui/res/formats/Sanctioned/Legacy.txt index eddc5206ad3..f51401790b6 100644 --- a/forge-gui/res/formats/Sanctioned/Legacy.txt +++ b/forge-gui/res/formats/Sanctioned/Legacy.txt @@ -3,4 +3,5 @@ Name:Legacy Order:105 Subtype:Legacy Type:Sanctioned +Sets:7ED, 9ED, ORI, M14, M15, 6ED, 8ED, M11, 3ED, M10, M12, 10E, M13, G18, M21, M20, M19, 5ED, 2ED, 4ED, LEB, LEA, 5DN, SOM, KTK, THS, DIS, JOU, MOR, TMP, SOI, FEM, USG, ALL, ROE, EXO, TSP, LRW, TOR, ALA, RIX, DGM, DKA, MBS, AER, RNA, GTC, CSP, HML, NPH, OGW, ZNR, EMN, UDS, SHM, BNG, SOK, EVE, INV, THB, DOM, NMS, VIS, WAR, GRN, PCY, SCG, MRD, XLN, ONS, IKO, MMQ, CHK, ULG, AKH, MIR, ISD, AVR, KLD, APC, RTR, WWK, PLC, HOU, LEG, AFR, ARN, ICE, STX, LGN, ARB, KHM, CFX, TSB, ZEN, ELD, JUD, GPT, BFZ, BOK, DTK, FRF, FUT, WTH, ODY, RAV, ATQ, DRK, PLS, STH, DST, TD2, HA1, ME4, HA3, HA2, HA5, HA4, MED, ANB, ME3, KLR, PZ2, ANA, PRM, PZ1, AJMP, ME2, TD1, TD0, TPR, VMA, AKR, MBP, PZEN, PGTW, PL21, PFUT, PWAR, PAL01, PJUD, PAL00, PTKDF, PWOR, PWP12, PSTH, POGW, PFRF, PG07, PSUS, PUST, J18, PWP10, PAL02, PAL03, PWP11, J19, PGRN, PM10, PDP14, PRTR, PMPS06, PBNG, J21, G09, PNPH, PM15, PAL06, G08, PDST, J20, PMBS, PMPS07, PEXO, PDOM, PONS, PRW2, PMPS11, PMPS, PM19, PWWK, PCEL, PAL04, PAL05, PMPS10, PDTK, PALP, F10, F04, PMOR, PAL99, PEMN, PCNS, PPLC, PRAV, PPP1, PI14, PXLN, PF20, PTSP, F05, F11, PSCG, PBOOK, F07, F13, PODY, PM12, P08, PSS1, P2HG, P09, PTOR, PDP13, F12, F06, PALA, PXTC, F02, F16, PHOU, PSOM, PI13, PCON, PDGM, PIDW, PMRD, PRNA, P9ED, PHEL, F17, F03, PURL, F15, F01, PWOS, PPC1, PBOK, PTMP, PS19, PS18, PF19, PGPT, PCHK, FNM, F14, PISD, PAKH, PDP15, PRIX, PS15, PPCY, OLGC, OVNT, PLGN, PS14, P03, PDTP, PM14, FS, PPLS, MPR, PKTK, PS16, PRWK, PS17, PBFZ, PSS2, PINV, G03, P8ED, PARL, P04, P10, PSDC, JGP, G99, WW, P11, P05, PDIS, PROE, PDP10, F08, P10E, PELP, PMH1, P07, P5DN, PGRU, SHC, PM11, P06, PUSG, PCMP, PULG, F09, PUDS, PARB, DRC94, PMPS09, PORI, J12, G06, PMMQ, G07, J13, PMPS08, PM20, PSOI, PJSE, G05, G11, PNAT, PSOK, PEVE, PRED, G10, G04, PSHM, PPRO, PAPC, PJJT, ARENA, PKLD, G00, J14, PLGM, P15A, PCSP, PWPN, PJAS, PWP21, PWP09, PDKA, PNEM, PPTK, J15, G01, PG08, PLRW, PMEI, PM13, PHJ, PGTC, J17, PRES, PWCQ, PJOU, PDP12, PAER, PAVR, PTHS, G02, J16, PSUM, PGPX, UGF, PSS3, MM2, MM3, A25, 2XM, MMA, PLIST, CHR, EMA, IMA, TSR, UMA, PUMA, E02, DPA, ATH, MD1, GK1, GK2, CST, BRB, BTD, DKM, FVE, V17, V13, STA, MPS_RNA, V16, SLD, V12, CC1, MPS_GRN, DRB, FVR, SS3, SS1, MPS_AKH, FVL, V15, MPS_KLD, ZNE, PDS, SS2, PD3, SLU, V14, PD2, EXP, MPS_WAR, DDQ, DDE, GS1, DDS, DDU, DD1, DDL, DDF, DDP, DD2, DDR, DDH, DDT, DDK, DDG, DDC, DDM, DDJ, DDO, GVL, JVC, DDI, DVD, DDN, EVG, DDD, C18, C19, C21, C20, C13, CMA, C14, C15, KHC, ZNC, C17, C16, COM, CM1, CM2, PO2, S99, W16, W17, S00, PTK, CP3, POR, CP1, CP2, CMR, MH2, H1R, CNS, BBD, MH1, CN2, JMP, PCA, GNT, ARC, GN2, PC2, E01, HOP Banned:Adriana's Valor; Advantageous Proclamation; Arcum's Astrolabe; Assemble the Rank and Vile; Backup Plan; Brago's Favor; Deathrite Shaman; Double Stroke; Dreadhorde Arcanist; Echoing Boon; Emissary's Ploy; Gitaxian Probe; Hired Heist; Hold the Perimeter; Hymn of the Wilds; Immediate Action; Incendiary Dissent; Iterative Analysis; Lurrus of the Dream-Den; Muzzio's Preparations; Natural Unity; Oko, Thief of Crowns; Power Play; Secret Summoning; Secrets of Paradise; Sentinel Dispatch; Sovereign's Realm; Summoner's Bond; Underworld Breach; Unexpected Potential; Weight Advantage; Worldknit; Amulet of Quoz; Bronze Tablet; Contract from Below; Darkpact; Demonic Attorney; Jeweled Bird; Rebirth; Tempest Efreet; Timmerian Fiends; Ancestral Recall; Balance; Bazaar of Baghdad; Black Lotus; Channel; Chaos Orb; Demonic Consultation; Demonic Tutor; Dig Through Time; Earthcraft; Falling Star; Fastbond; Flash; Frantic Search; Goblin Recruiter; Gush; Hermit Druid; Imperial Seal; Library of Alexandria; Mana Crypt; Mana Drain; Mana Vault; Memory Jar; Mental Misstep; Mind Twist; Mind's Desire; Mishra's Workshop; Mox Emerald; Mox Jet; Mox Pearl; Mox Ruby; Mox Sapphire; Mystical Tutor; Necropotence; Oath of Druids; Sensei's Divining Top; Shahrazad; Skullclamp; Sol Ring; Strip Mine; Survival of the Fittest; Time Vault; Time Walk; Timetwister; Tinker; Tolarian Academy; Treasure Cruise; Vampiric Tutor; Wheel of Fortune; Windfall; Wrenn and Six; Yawgmoth's Bargain; Yawgmoth's Will; Zirda, the Dawnwaker diff --git a/forge-gui/res/formats/Sanctioned/Vintage.txt b/forge-gui/res/formats/Sanctioned/Vintage.txt index a857b29e14c..161024ba544 100644 --- a/forge-gui/res/formats/Sanctioned/Vintage.txt +++ b/forge-gui/res/formats/Sanctioned/Vintage.txt @@ -3,5 +3,6 @@ Name:Vintage Order:104 Subtype:Vintage Type:Sanctioned +Sets:7ED, 9ED, ORI, M14, M15, 6ED, 8ED, M11, 3ED, M10, M12, 10E, M13, G18, M21, M20, M19, 5ED, 2ED, 4ED, LEB, LEA, 5DN, SOM, KTK, THS, DIS, JOU, MOR, TMP, SOI, FEM, USG, ALL, ROE, EXO, TSP, LRW, TOR, ALA, RIX, DGM, DKA, MBS, AER, RNA, GTC, CSP, HML, NPH, OGW, ZNR, EMN, UDS, SHM, BNG, SOK, EVE, INV, THB, DOM, NMS, VIS, WAR, GRN, PCY, SCG, MRD, XLN, ONS, IKO, MMQ, CHK, ULG, AKH, MIR, ISD, AVR, KLD, APC, RTR, WWK, PLC, HOU, LEG, AFR, ARN, ICE, STX, LGN, ARB, KHM, CFX, TSB, ZEN, ELD, JUD, GPT, BFZ, BOK, DTK, FRF, FUT, WTH, ODY, RAV, ATQ, DRK, PLS, STH, DST, TD2, HA1, ME4, HA3, HA2, HA5, HA4, MED, ANB, ME3, KLR, PZ2, ANA, PRM, PZ1, AJMP, ME2, TD1, TD0, TPR, VMA, AKR, MBP, PZEN, PGTW, PL21, PFUT, PWAR, PAL01, PJUD, PAL00, PTKDF, PWOR, PWP12, PSTH, POGW, PFRF, PG07, PSUS, PUST, J18, PWP10, PAL02, PAL03, PWP11, J19, PGRN, PM10, PDP14, PRTR, PMPS06, PBNG, J21, G09, PNPH, PM15, PAL06, G08, PDST, J20, PMBS, PMPS07, PEXO, PDOM, PONS, PRW2, PMPS11, PMPS, PM19, PWWK, PCEL, PAL04, PAL05, PMPS10, PDTK, PALP, F10, F04, PMOR, PAL99, PEMN, PCNS, PPLC, PRAV, PPP1, PI14, PXLN, PF20, PTSP, F05, F11, PSCG, PBOOK, F07, F13, PODY, PM12, P08, PSS1, P2HG, P09, PTOR, PDP13, F12, F06, PALA, PXTC, F02, F16, PHOU, PSOM, PI13, PCON, PDGM, PIDW, PMRD, PRNA, P9ED, PHEL, F17, F03, PURL, F15, F01, PWOS, PPC1, PBOK, PTMP, PS19, PS18, PF19, PGPT, PCHK, FNM, F14, PISD, PAKH, PDP15, PRIX, PS15, PPCY, OLGC, OVNT, PLGN, PS14, P03, PDTP, PM14, FS, PPLS, MPR, PKTK, PS16, PRWK, PS17, PBFZ, PSS2, PINV, G03, P8ED, PARL, P04, P10, PSDC, JGP, G99, WW, P11, P05, PDIS, PROE, PDP10, F08, P10E, PELP, PMH1, P07, P5DN, PGRU, SHC, PM11, P06, PUSG, PCMP, PULG, F09, PUDS, PARB, DRC94, PMPS09, PORI, J12, G06, PMMQ, G07, J13, PMPS08, PM20, PSOI, PJSE, G05, G11, PNAT, PSOK, PEVE, PRED, G10, G04, PSHM, PPRO, PAPC, PJJT, ARENA, PKLD, G00, J14, PLGM, P15A, PCSP, PWPN, PJAS, PWP21, PWP09, PDKA, PNEM, PPTK, J15, G01, PG08, PLRW, PMEI, PM13, PHJ, PGTC, J17, PRES, PWCQ, PJOU, PDP12, PAER, PAVR, PTHS, G02, J16, PSUM, PGPX, UGF, PSS3, MM2, MM3, A25, 2XM, MMA, PLIST, CHR, EMA, IMA, TSR, UMA, PUMA, E02, DPA, ATH, MD1, GK1, GK2, CST, BRB, BTD, DKM, FVE, V17, V13, STA, MPS_RNA, V16, SLD, V12, CC1, MPS_GRN, DRB, FVR, SS3, SS1, MPS_AKH, FVL, V15, MPS_KLD, ZNE, PDS, SS2, PD3, SLU, V14, PD2, EXP, MPS_WAR, DDQ, DDE, GS1, DDS, DDU, DD1, DDL, DDF, DDP, DD2, DDR, DDH, DDT, DDK, DDG, DDC, DDM, DDJ, DDO, GVL, JVC, DDI, DVD, DDN, EVG, DDD, C18, C19, C21, C20, C13, CMA, C14, C15, KHC, ZNC, C17, C16, COM, CM1, CM2, PO2, S99, W16, W17, S00, PTK, CP3, POR, CP1, CP2, CMR, MH2, H1R, CNS, BBD, MH1, CN2, JMP, PCA, GNT, ARC, GN2, PC2, E01, HOP Banned:Adriana's Valor; Advantageous Proclamation; Assemble the Rank and Vile; Backup Plan; Brago's Favor; Double Stroke; Echoing Boon; Emissary's Ploy; Hired Heist; Hold the Perimeter; Hymn of the Wilds; Immediate Action; Incendiary Dissent; Iterative Analysis; Muzzio's Preparations; Natural Unity; Power Play; Secret Summoning; Secrets of Paradise; Sentinel Dispatch; Sovereign's Realm; Summoner's Bond; Unexpected Potential; Weight Advantage; Worldknit; Amulet of Quoz; Bronze Tablet; Contract from Below; Darkpact; Demonic Attorney; Jeweled Bird; Rebirth; Tempest Efreet; Timmerian Fiends; Chaos Orb; Falling Star; Shahrazad Restricted:Ancestral Recall; Balance; Black Lotus; Brainstorm; Chalice of the Void; Channel; Demonic Consultation; Demonic Tutor; Dig Through Time; Flash; Gitaxian Probe; Golgari Grave-Troll; Gush; Imperial Seal; Karn, the Great Creator; Library of Alexandria; Lion's Eye Diamond; Lodestone Golem; Lotus Petal; Mana Crypt; Mana Vault; Memory Jar; Mental Misstep; Merchant Scroll; Mind's Desire; Monastery Mentor; Mox Emerald; Mox Jet; Mox Pearl; Mox Ruby; Mox Sapphire; Mystic Forge; Mystical Tutor; Narset, Parter of Veils; Necropotence; Ponder; Sol Ring; Strip Mine; Thorn of Amethyst; Time Vault; Time Walk; Timetwister; Tinker; Tolarian Academy; Treasure Cruise; Trinisphere; Vampiric Tutor; Wheel of Fortune; Windfall; Yawgmoth's Will From dab893c24f0d5aae37ecebe7898a8a8ca695a4c9 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Mon, 5 Jul 2021 09:35:02 +0100 Subject: [PATCH 48/50] Changed options not showing node counts on disabled nodes. --- .../src/main/java/forge/toolbox/FCheckBoxTree.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui-desktop/src/main/java/forge/toolbox/FCheckBoxTree.java b/forge-gui-desktop/src/main/java/forge/toolbox/FCheckBoxTree.java index 073bb6d3531..892f75ff983 100644 --- a/forge-gui-desktop/src/main/java/forge/toolbox/FCheckBoxTree.java +++ b/forge-gui-desktop/src/main/java/forge/toolbox/FCheckBoxTree.java @@ -491,7 +491,7 @@ public class FCheckBoxTree extends JTree { String chkBoxTxt = nodeInfo.label; int disabledNodes = cn.numberOfChildren - cn.enabledChildrenCount; int totalActiveNodes = cn.numberOfChildren - disabledNodes; - if (this.displayNodesCount && !node.isLeaf() && cn.numberOfChildren > 0) { + if (this.displayNodesCount && !node.isLeaf() && cn.numberOfChildren > 0 && totalActiveNodes > 0) { chkBoxTxt += String.format(" (%d/%d)", cn.selectedChildrenCount, totalActiveNodes);; } this.checkBox.setText(chkBoxTxt); From 4c264b7e3df401a03b816d6be684bed7dbe03c36 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Mon, 5 Jul 2021 09:38:47 +0100 Subject: [PATCH 49/50] Changed labels for format restrctions to Sanctioned formats (en only) Other languages would be OK the same with previous wordings. --- forge-gui/res/languages/en-US.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui/res/languages/en-US.properties b/forge-gui/res/languages/en-US.properties index 328506ca862..e31368baf82 100644 --- a/forge-gui/res/languages/en-US.properties +++ b/forge-gui/res/languages/en-US.properties @@ -2048,7 +2048,7 @@ lblChooseSets=Choose Card Sets lblDisplayRecentSetReprints=Include Compatible Reprints from other Sets lblSelectRandomSets=Random Selection Options nlSelectRandomSets=Decide how many card sets per type should be selected at random. -lblFormatRestrictions=Format Restrictions +lblFormatRestrictions=Sanctioned Formats lblNoFormatRestriction=No Format Restriction lblRandomizeSets=Select Random Card Sets lblClearSelection=Clear Selection From 921fc43f75227910e3e327362f870a3df470f3e7 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Mon, 5 Jul 2021 11:18:47 +0100 Subject: [PATCH 50/50] Updates to Legacy and Vintage with left out sets --- forge-gui/res/formats/Sanctioned/Legacy.txt | 2 +- forge-gui/res/formats/Sanctioned/Vintage.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/forge-gui/res/formats/Sanctioned/Legacy.txt b/forge-gui/res/formats/Sanctioned/Legacy.txt index f51401790b6..c6a8f66d607 100644 --- a/forge-gui/res/formats/Sanctioned/Legacy.txt +++ b/forge-gui/res/formats/Sanctioned/Legacy.txt @@ -3,5 +3,5 @@ Name:Legacy Order:105 Subtype:Legacy Type:Sanctioned -Sets:7ED, 9ED, ORI, M14, M15, 6ED, 8ED, M11, 3ED, M10, M12, 10E, M13, G18, M21, M20, M19, 5ED, 2ED, 4ED, LEB, LEA, 5DN, SOM, KTK, THS, DIS, JOU, MOR, TMP, SOI, FEM, USG, ALL, ROE, EXO, TSP, LRW, TOR, ALA, RIX, DGM, DKA, MBS, AER, RNA, GTC, CSP, HML, NPH, OGW, ZNR, EMN, UDS, SHM, BNG, SOK, EVE, INV, THB, DOM, NMS, VIS, WAR, GRN, PCY, SCG, MRD, XLN, ONS, IKO, MMQ, CHK, ULG, AKH, MIR, ISD, AVR, KLD, APC, RTR, WWK, PLC, HOU, LEG, AFR, ARN, ICE, STX, LGN, ARB, KHM, CFX, TSB, ZEN, ELD, JUD, GPT, BFZ, BOK, DTK, FRF, FUT, WTH, ODY, RAV, ATQ, DRK, PLS, STH, DST, TD2, HA1, ME4, HA3, HA2, HA5, HA4, MED, ANB, ME3, KLR, PZ2, ANA, PRM, PZ1, AJMP, ME2, TD1, TD0, TPR, VMA, AKR, MBP, PZEN, PGTW, PL21, PFUT, PWAR, PAL01, PJUD, PAL00, PTKDF, PWOR, PWP12, PSTH, POGW, PFRF, PG07, PSUS, PUST, J18, PWP10, PAL02, PAL03, PWP11, J19, PGRN, PM10, PDP14, PRTR, PMPS06, PBNG, J21, G09, PNPH, PM15, PAL06, G08, PDST, J20, PMBS, PMPS07, PEXO, PDOM, PONS, PRW2, PMPS11, PMPS, PM19, PWWK, PCEL, PAL04, PAL05, PMPS10, PDTK, PALP, F10, F04, PMOR, PAL99, PEMN, PCNS, PPLC, PRAV, PPP1, PI14, PXLN, PF20, PTSP, F05, F11, PSCG, PBOOK, F07, F13, PODY, PM12, P08, PSS1, P2HG, P09, PTOR, PDP13, F12, F06, PALA, PXTC, F02, F16, PHOU, PSOM, PI13, PCON, PDGM, PIDW, PMRD, PRNA, P9ED, PHEL, F17, F03, PURL, F15, F01, PWOS, PPC1, PBOK, PTMP, PS19, PS18, PF19, PGPT, PCHK, FNM, F14, PISD, PAKH, PDP15, PRIX, PS15, PPCY, OLGC, OVNT, PLGN, PS14, P03, PDTP, PM14, FS, PPLS, MPR, PKTK, PS16, PRWK, PS17, PBFZ, PSS2, PINV, G03, P8ED, PARL, P04, P10, PSDC, JGP, G99, WW, P11, P05, PDIS, PROE, PDP10, F08, P10E, PELP, PMH1, P07, P5DN, PGRU, SHC, PM11, P06, PUSG, PCMP, PULG, F09, PUDS, PARB, DRC94, PMPS09, PORI, J12, G06, PMMQ, G07, J13, PMPS08, PM20, PSOI, PJSE, G05, G11, PNAT, PSOK, PEVE, PRED, G10, G04, PSHM, PPRO, PAPC, PJJT, ARENA, PKLD, G00, J14, PLGM, P15A, PCSP, PWPN, PJAS, PWP21, PWP09, PDKA, PNEM, PPTK, J15, G01, PG08, PLRW, PMEI, PM13, PHJ, PGTC, J17, PRES, PWCQ, PJOU, PDP12, PAER, PAVR, PTHS, G02, J16, PSUM, PGPX, UGF, PSS3, MM2, MM3, A25, 2XM, MMA, PLIST, CHR, EMA, IMA, TSR, UMA, PUMA, E02, DPA, ATH, MD1, GK1, GK2, CST, BRB, BTD, DKM, FVE, V17, V13, STA, MPS_RNA, V16, SLD, V12, CC1, MPS_GRN, DRB, FVR, SS3, SS1, MPS_AKH, FVL, V15, MPS_KLD, ZNE, PDS, SS2, PD3, SLU, V14, PD2, EXP, MPS_WAR, DDQ, DDE, GS1, DDS, DDU, DD1, DDL, DDF, DDP, DD2, DDR, DDH, DDT, DDK, DDG, DDC, DDM, DDJ, DDO, GVL, JVC, DDI, DVD, DDN, EVG, DDD, C18, C19, C21, C20, C13, CMA, C14, C15, KHC, ZNC, C17, C16, COM, CM1, CM2, PO2, S99, W16, W17, S00, PTK, CP3, POR, CP1, CP2, CMR, MH2, H1R, CNS, BBD, MH1, CN2, JMP, PCA, GNT, ARC, GN2, PC2, E01, HOP +Sets:7ED, 9ED, ORI, M14, M15, 6ED, 8ED, M11, 3ED, M10, M12, 10E, M13, G18, M21, M20, M19, 5ED, 2ED, 4ED, LEB, LEA, 5DN, SOM, KTK, THS, DIS, JOU, MOR, TMP, SOI, FEM, USG, ALL, ROE, EXO, TSP, LRW, TOR, ALA, RIX, DGM, DKA, MBS, AER, RNA, GTC, CSP, HML, NPH, OGW, ZNR, EMN, UDS, SHM, BNG, SOK, EVE, INV, THB, DOM, NMS, VIS, WAR, GRN, PCY, SCG, MRD, XLN, ONS, IKO, MMQ, CHK, ULG, AKH, MIR, ISD, AVR, KLD, APC, RTR, WWK, PLC, HOU, LEG, AFR, ARN, ICE, STX, LGN, ARB, KHM, CFX, TSB, ZEN, ELD, JUD, GPT, BFZ, BOK, DTK, FRF, FUT, WTH, ODY, RAV, ATQ, DRK, PLS, STH, DST, TD2, HA1, ME4, HA3, HA2, HA5, HA4, MED, ANB, ME3, KLR, PZ2, ANA, PRM, PZ1, AJMP, ME2, TD1, TD0, TPR, VMA, AKR, MBP, PZEN, PGTW, PL21, PFUT, PWAR, PAL01, PJUD, PAL00, PTKDF, PWOR, PWP12, PSTH, POGW, PFRF, PG07, PSUS, PUST, J18, PWP10, PAL02, PAL03, PWP11, J19, PGRN, PM10, PDP14, PRTR, PMPS06, PBNG, J21, G09, PNPH, PM15, PAL06, G08, PDST, J20, PMBS, PMPS07, PEXO, PDOM, PONS, PRW2, PMPS11, PMPS, PM19, PWWK, PCEL, PAL04, PAL05, PMPS10, PDTK, PALP, F10, F04, PMOR, PAL99, PEMN, PCNS, PPLC, PRAV, PPP1, PI14, PXLN, PF20, PTSP, F05, F11, PSCG, PBOOK, F07, F13, PODY, PM12, P08, PSS1, P2HG, P09, PTOR, PDP13, F12, F06, PALA, PXTC, F02, F16, PHOU, PSOM, PI13, PCON, PDGM, PIDW, PMRD, PRNA, P9ED, PHEL, F17, F03, PURL, F15, F01, PWOS, PPC1, PBOK, PTMP, PS19, PS18, PF19, PGPT, PCHK, FNM, F14, PISD, PAKH, PDP15, PRIX, PS15, PPCY, OLGC, OVNT, PLGN, PS14, P03, PDTP, PM14, FS, PPLS, MPR, PKTK, PS16, PRWK, PS17, PBFZ, PSS2, PINV, G03, P8ED, PARL, P04, P10, PSDC, JGP, G99, WW, P11, P05, PDIS, PROE, PDP10, F08, P10E, PELP, PMH1, P07, P5DN, PGRU, SHC, PM11, P06, PUSG, PCMP, PULG, F09, PUDS, PARB, DRC94, PMPS09, PORI, J12, G06, PMMQ, G07, J13, PMPS08, PM20, PSOI, PJSE, G05, G11, PNAT, PSOK, PEVE, PRED, G10, G04, PSHM, PPRO, PAPC, PJJT, ARENA, PKLD, G00, J14, PLGM, P15A, PCSP, PWPN, PJAS, PWP21, PWP09, PDKA, PNEM, PPTK, J15, G01, PG08, PLRW, PMEI, PM13, PHJ, PGTC, J17, PRES, PWCQ, PJOU, PDP12, PAER, PAVR, PTHS, G02, J16, PSUM, PGPX, UGF, PSS3, MM2, MM3, MB1, FMB1, A25, 2XM, MMA, PLIST, CHR, EMA, IMA, TSR, UMA, PUMA, E02, DPA, ATH, MD1, GK1, GK2, CST, BRB, BTD, DKM, FVE, V17, V13, STA, MPS_RNA, V16, SLD, V12, CC1, MPS_GRN, DRB, FVR, SS3, SS1, MPS_AKH, FVL, V15, MPS_KLD, ZNE, PDS, SS2, PD3, SLU, V14, PD2, EXP, MPS_WAR, DDQ, DDE, GS1, DDS, DDU, DD1, DDL, DDF, DDP, DD2, DDR, DDH, DDT, DDK, DDG, DDC, DDM, DDJ, DDO, GVL, JVC, DDI, DVD, DDN, EVG, DDD, C18, C19, C21, C20, C13, CMA, C14, C15, KHC, ZNC, C17, C16, COM, CM1, CM2, PO2, S99, W16, W17, S00, PTK, CP3, POR, CP1, CP2, CMR, MH2, H1R, CNS, BBD, MH1, CN2, JMP, PCA, GNT, ARC, GN2, PC2, E01, HOP, PLG20, PLG21 Banned:Adriana's Valor; Advantageous Proclamation; Arcum's Astrolabe; Assemble the Rank and Vile; Backup Plan; Brago's Favor; Deathrite Shaman; Double Stroke; Dreadhorde Arcanist; Echoing Boon; Emissary's Ploy; Gitaxian Probe; Hired Heist; Hold the Perimeter; Hymn of the Wilds; Immediate Action; Incendiary Dissent; Iterative Analysis; Lurrus of the Dream-Den; Muzzio's Preparations; Natural Unity; Oko, Thief of Crowns; Power Play; Secret Summoning; Secrets of Paradise; Sentinel Dispatch; Sovereign's Realm; Summoner's Bond; Underworld Breach; Unexpected Potential; Weight Advantage; Worldknit; Amulet of Quoz; Bronze Tablet; Contract from Below; Darkpact; Demonic Attorney; Jeweled Bird; Rebirth; Tempest Efreet; Timmerian Fiends; Ancestral Recall; Balance; Bazaar of Baghdad; Black Lotus; Channel; Chaos Orb; Demonic Consultation; Demonic Tutor; Dig Through Time; Earthcraft; Falling Star; Fastbond; Flash; Frantic Search; Goblin Recruiter; Gush; Hermit Druid; Imperial Seal; Library of Alexandria; Mana Crypt; Mana Drain; Mana Vault; Memory Jar; Mental Misstep; Mind Twist; Mind's Desire; Mishra's Workshop; Mox Emerald; Mox Jet; Mox Pearl; Mox Ruby; Mox Sapphire; Mystical Tutor; Necropotence; Oath of Druids; Sensei's Divining Top; Shahrazad; Skullclamp; Sol Ring; Strip Mine; Survival of the Fittest; Time Vault; Time Walk; Timetwister; Tinker; Tolarian Academy; Treasure Cruise; Vampiric Tutor; Wheel of Fortune; Windfall; Wrenn and Six; Yawgmoth's Bargain; Yawgmoth's Will; Zirda, the Dawnwaker diff --git a/forge-gui/res/formats/Sanctioned/Vintage.txt b/forge-gui/res/formats/Sanctioned/Vintage.txt index 161024ba544..5a68eb7c073 100644 --- a/forge-gui/res/formats/Sanctioned/Vintage.txt +++ b/forge-gui/res/formats/Sanctioned/Vintage.txt @@ -3,6 +3,6 @@ Name:Vintage Order:104 Subtype:Vintage Type:Sanctioned -Sets:7ED, 9ED, ORI, M14, M15, 6ED, 8ED, M11, 3ED, M10, M12, 10E, M13, G18, M21, M20, M19, 5ED, 2ED, 4ED, LEB, LEA, 5DN, SOM, KTK, THS, DIS, JOU, MOR, TMP, SOI, FEM, USG, ALL, ROE, EXO, TSP, LRW, TOR, ALA, RIX, DGM, DKA, MBS, AER, RNA, GTC, CSP, HML, NPH, OGW, ZNR, EMN, UDS, SHM, BNG, SOK, EVE, INV, THB, DOM, NMS, VIS, WAR, GRN, PCY, SCG, MRD, XLN, ONS, IKO, MMQ, CHK, ULG, AKH, MIR, ISD, AVR, KLD, APC, RTR, WWK, PLC, HOU, LEG, AFR, ARN, ICE, STX, LGN, ARB, KHM, CFX, TSB, ZEN, ELD, JUD, GPT, BFZ, BOK, DTK, FRF, FUT, WTH, ODY, RAV, ATQ, DRK, PLS, STH, DST, TD2, HA1, ME4, HA3, HA2, HA5, HA4, MED, ANB, ME3, KLR, PZ2, ANA, PRM, PZ1, AJMP, ME2, TD1, TD0, TPR, VMA, AKR, MBP, PZEN, PGTW, PL21, PFUT, PWAR, PAL01, PJUD, PAL00, PTKDF, PWOR, PWP12, PSTH, POGW, PFRF, PG07, PSUS, PUST, J18, PWP10, PAL02, PAL03, PWP11, J19, PGRN, PM10, PDP14, PRTR, PMPS06, PBNG, J21, G09, PNPH, PM15, PAL06, G08, PDST, J20, PMBS, PMPS07, PEXO, PDOM, PONS, PRW2, PMPS11, PMPS, PM19, PWWK, PCEL, PAL04, PAL05, PMPS10, PDTK, PALP, F10, F04, PMOR, PAL99, PEMN, PCNS, PPLC, PRAV, PPP1, PI14, PXLN, PF20, PTSP, F05, F11, PSCG, PBOOK, F07, F13, PODY, PM12, P08, PSS1, P2HG, P09, PTOR, PDP13, F12, F06, PALA, PXTC, F02, F16, PHOU, PSOM, PI13, PCON, PDGM, PIDW, PMRD, PRNA, P9ED, PHEL, F17, F03, PURL, F15, F01, PWOS, PPC1, PBOK, PTMP, PS19, PS18, PF19, PGPT, PCHK, FNM, F14, PISD, PAKH, PDP15, PRIX, PS15, PPCY, OLGC, OVNT, PLGN, PS14, P03, PDTP, PM14, FS, PPLS, MPR, PKTK, PS16, PRWK, PS17, PBFZ, PSS2, PINV, G03, P8ED, PARL, P04, P10, PSDC, JGP, G99, WW, P11, P05, PDIS, PROE, PDP10, F08, P10E, PELP, PMH1, P07, P5DN, PGRU, SHC, PM11, P06, PUSG, PCMP, PULG, F09, PUDS, PARB, DRC94, PMPS09, PORI, J12, G06, PMMQ, G07, J13, PMPS08, PM20, PSOI, PJSE, G05, G11, PNAT, PSOK, PEVE, PRED, G10, G04, PSHM, PPRO, PAPC, PJJT, ARENA, PKLD, G00, J14, PLGM, P15A, PCSP, PWPN, PJAS, PWP21, PWP09, PDKA, PNEM, PPTK, J15, G01, PG08, PLRW, PMEI, PM13, PHJ, PGTC, J17, PRES, PWCQ, PJOU, PDP12, PAER, PAVR, PTHS, G02, J16, PSUM, PGPX, UGF, PSS3, MM2, MM3, A25, 2XM, MMA, PLIST, CHR, EMA, IMA, TSR, UMA, PUMA, E02, DPA, ATH, MD1, GK1, GK2, CST, BRB, BTD, DKM, FVE, V17, V13, STA, MPS_RNA, V16, SLD, V12, CC1, MPS_GRN, DRB, FVR, SS3, SS1, MPS_AKH, FVL, V15, MPS_KLD, ZNE, PDS, SS2, PD3, SLU, V14, PD2, EXP, MPS_WAR, DDQ, DDE, GS1, DDS, DDU, DD1, DDL, DDF, DDP, DD2, DDR, DDH, DDT, DDK, DDG, DDC, DDM, DDJ, DDO, GVL, JVC, DDI, DVD, DDN, EVG, DDD, C18, C19, C21, C20, C13, CMA, C14, C15, KHC, ZNC, C17, C16, COM, CM1, CM2, PO2, S99, W16, W17, S00, PTK, CP3, POR, CP1, CP2, CMR, MH2, H1R, CNS, BBD, MH1, CN2, JMP, PCA, GNT, ARC, GN2, PC2, E01, HOP +Sets:7ED, 9ED, ORI, M14, M15, 6ED, 8ED, M11, 3ED, M10, M12, 10E, M13, G18, M21, M20, M19, 5ED, 2ED, 4ED, LEB, LEA, 5DN, SOM, KTK, THS, DIS, JOU, MOR, TMP, SOI, FEM, USG, ALL, ROE, EXO, TSP, LRW, TOR, ALA, RIX, DGM, DKA, MBS, AER, RNA, GTC, CSP, HML, NPH, OGW, ZNR, EMN, UDS, SHM, BNG, SOK, EVE, INV, THB, DOM, NMS, VIS, WAR, GRN, PCY, SCG, MRD, XLN, ONS, IKO, MMQ, CHK, ULG, AKH, MIR, ISD, AVR, KLD, APC, RTR, WWK, PLC, HOU, LEG, AFR, ARN, ICE, STX, LGN, ARB, KHM, CFX, TSB, ZEN, ELD, JUD, GPT, BFZ, BOK, DTK, FRF, FUT, WTH, ODY, RAV, ATQ, DRK, PLS, STH, DST, TD2, HA1, ME4, HA3, HA2, HA5, HA4, MED, ANB, ME3, KLR, PZ2, ANA, PRM, PZ1, AJMP, ME2, TD1, TD0, TPR, VMA, AKR, MBP, PZEN, PGTW, PL21, PFUT, PWAR, PAL01, PJUD, PAL00, PTKDF, PWOR, PWP12, PSTH, POGW, PFRF, PG07, PSUS, PUST, J18, PWP10, PAL02, PAL03, PWP11, J19, PGRN, PM10, PDP14, PRTR, PMPS06, PBNG, J21, G09, PNPH, PM15, PAL06, G08, PDST, J20, PMBS, PMPS07, PEXO, PDOM, PONS, PRW2, PMPS11, PMPS, PM19, PWWK, PCEL, PAL04, PAL05, PMPS10, PDTK, PALP, F10, F04, PMOR, PAL99, PEMN, PCNS, PPLC, PRAV, PPP1, PI14, PXLN, PF20, PTSP, F05, F11, PSCG, PBOOK, F07, F13, PODY, PM12, P08, PSS1, P2HG, P09, PTOR, PDP13, F12, F06, PALA, PXTC, F02, F16, PHOU, PSOM, PI13, PCON, PDGM, PIDW, PMRD, PRNA, P9ED, PHEL, F17, F03, PURL, F15, F01, PWOS, PPC1, PBOK, PTMP, PS19, PS18, PF19, PGPT, PCHK, FNM, F14, PISD, PAKH, PDP15, PRIX, PS15, PPCY, OLGC, OVNT, PLGN, PS14, P03, PDTP, PM14, FS, PPLS, MPR, PKTK, PS16, PRWK, PS17, PBFZ, PSS2, PINV, G03, P8ED, PARL, P04, P10, PSDC, JGP, G99, WW, P11, P05, PDIS, PROE, PDP10, F08, P10E, PELP, PMH1, P07, P5DN, PGRU, SHC, PM11, P06, PUSG, PCMP, PULG, F09, PUDS, PARB, DRC94, PMPS09, PORI, J12, G06, PMMQ, G07, J13, PMPS08, PM20, PSOI, PJSE, G05, G11, PNAT, PSOK, PEVE, PRED, G10, G04, PSHM, PPRO, PAPC, PJJT, ARENA, PKLD, G00, J14, PLGM, P15A, PCSP, PWPN, PJAS, PWP21, PWP09, PDKA, PNEM, PPTK, J15, G01, PG08, PLRW, PMEI, PM13, PHJ, PGTC, J17, PRES, PWCQ, PJOU, PDP12, PAER, PAVR, PTHS, G02, J16, PSUM, PGPX, UGF, PSS3, MM2, MM3, MB1, FMB1, A25, 2XM, MMA, PLIST, CHR, EMA, IMA, TSR, UMA, PUMA, E02, DPA, ATH, MD1, GK1, GK2, CST, BRB, BTD, DKM, FVE, V17, V13, STA, MPS_RNA, V16, SLD, V12, CC1, MPS_GRN, DRB, FVR, SS3, SS1, MPS_AKH, FVL, V15, MPS_KLD, ZNE, PDS, SS2, PD3, SLU, V14, PD2, EXP, MPS_WAR, DDQ, DDE, GS1, DDS, DDU, DD1, DDL, DDF, DDP, DD2, DDR, DDH, DDT, DDK, DDG, DDC, DDM, DDJ, DDO, GVL, JVC, DDI, DVD, DDN, EVG, DDD, C18, C19, C21, C20, C13, CMA, C14, C15, KHC, ZNC, C17, C16, COM, CM1, CM2, PO2, S99, W16, W17, S00, PTK, CP3, POR, CP1, CP2, CMR, MH2, H1R, CNS, BBD, MH1, CN2, JMP, PCA, GNT, ARC, GN2, PC2, E01, HOP, PLG20, PLG21 Banned:Adriana's Valor; Advantageous Proclamation; Assemble the Rank and Vile; Backup Plan; Brago's Favor; Double Stroke; Echoing Boon; Emissary's Ploy; Hired Heist; Hold the Perimeter; Hymn of the Wilds; Immediate Action; Incendiary Dissent; Iterative Analysis; Muzzio's Preparations; Natural Unity; Power Play; Secret Summoning; Secrets of Paradise; Sentinel Dispatch; Sovereign's Realm; Summoner's Bond; Unexpected Potential; Weight Advantage; Worldknit; Amulet of Quoz; Bronze Tablet; Contract from Below; Darkpact; Demonic Attorney; Jeweled Bird; Rebirth; Tempest Efreet; Timmerian Fiends; Chaos Orb; Falling Star; Shahrazad Restricted:Ancestral Recall; Balance; Black Lotus; Brainstorm; Chalice of the Void; Channel; Demonic Consultation; Demonic Tutor; Dig Through Time; Flash; Gitaxian Probe; Golgari Grave-Troll; Gush; Imperial Seal; Karn, the Great Creator; Library of Alexandria; Lion's Eye Diamond; Lodestone Golem; Lotus Petal; Mana Crypt; Mana Vault; Memory Jar; Mental Misstep; Merchant Scroll; Mind's Desire; Monastery Mentor; Mox Emerald; Mox Jet; Mox Pearl; Mox Ruby; Mox Sapphire; Mystic Forge; Mystical Tutor; Narset, Parter of Veils; Necropotence; Ponder; Sol Ring; Strip Mine; Thorn of Amethyst; Time Vault; Time Walk; Timetwister; Tinker; Tolarian Academy; Treasure Cruise; Trinisphere; Vampiric Tutor; Wheel of Fortune; Windfall; Yawgmoth's Will