From a5d964a3348072b9fc5b73e4b19f8973ef261d0c Mon Sep 17 00:00:00 2001 From: austinio7116 Date: Tue, 10 Apr 2018 07:28:28 +0100 Subject: [PATCH] Updated formats to include subtype enum and made a first batch attempt to set the value Now sorting formats by type, subtype then name Added new "additional" property to gameformats to allow additional non printed but legal cards to be included e.g. dual lands in extended 1999 --- .../src/main/java/forge/game/GameFormat.java | 59 ++++++++++++++++--- .../home/quest/DialogChooseFormats.java | 3 +- .../itemmanager/filters/FormatFilter.java | 5 +- forge-gui/res/formats/Amonkhet Block.txt | 1 + forge-gui/res/formats/Antiquities.txt | 1 + forge-gui/res/formats/Arabian Nights.txt | 1 + forge-gui/res/formats/Aug 2 1994.txt | 1 + .../res/formats/Battle for Zendikar Block.txt | 1 + .../formats/Classic Restricted, Apr 1999.txt | 1 + ...ssic Restricted, Classic Sixth Edition.txt | 1 + .../formats/Classic Restricted, Exodus.txt | 1 + .../Classic Restricted, Fifth Edition.txt | 1 + .../formats/Classic Restricted, Jan 1997.txt | 1 + .../formats/Classic Restricted, Jan 1999.txt | 1 + .../formats/Classic Restricted, Mirage.txt | 1 + .../formats/Classic Restricted, Oct 1996.txt | 1 + .../Classic Restricted, Stronghold.txt | 1 + .../formats/Classic Restricted, Tempest.txt | 1 + .../Classic Restricted, Urza's Destiny.txt | 1 + .../Classic Restricted, Urza's Legacy.txt | 1 + .../Classic Restricted, Urza's Saga.txt | 1 + .../formats/Classic Restricted, Visions.txt | 1 + .../Classic Restricted, Weatherlight.txt | 1 + forge-gui/res/formats/Classic, Apr 1999.txt | 1 + .../Classic, Classic Sixth Edition.txt | 1 + forge-gui/res/formats/Classic, Exodus.txt | 1 + .../res/formats/Classic, Fifth Edition.txt | 1 + forge-gui/res/formats/Classic, Mirage.txt | 1 + forge-gui/res/formats/Classic, Oct 1996.txt | 1 + forge-gui/res/formats/Classic, Stronghold.txt | 1 + forge-gui/res/formats/Classic, Tempest.txt | 1 + .../res/formats/Classic, Urza's Destiny.txt | 1 + .../res/formats/Classic, Urza's Legacy.txt | 1 + .../res/formats/Classic, Urza's Saga.txt | 1 + forge-gui/res/formats/Classic, Visions.txt | 1 + .../res/formats/Classic, Weatherlight.txt | 1 + forge-gui/res/formats/Commander.txt | 1 + forge-gui/res/formats/Conspiracy.txt | 1 + forge-gui/res/formats/Duels.txt | 3 +- .../res/formats/Extended, Alara Reborn.txt | 1 + forge-gui/res/formats/Extended, Apr 1999.txt | 1 + forge-gui/res/formats/Extended, Apr 2000.txt | 1 + forge-gui/res/formats/Extended, Apr 2001.txt | 1 + forge-gui/res/formats/Extended, Aug 1999.txt | 1 + .../res/formats/Extended, Avacyn Restored.txt | 1 + .../Extended, Betrayers of Kamigawa.txt | 1 + .../Extended, Champions of Kamigawa.txt | 1 + .../Extended, Classic Sixth Edition.txt | 1 + forge-gui/res/formats/Extended, Coldsnap.txt | 1 + forge-gui/res/formats/Extended, Conflux.txt | 1 + .../res/formats/Extended, Dark Ascension.txt | 1 + forge-gui/res/formats/Extended, Darksteel.txt | 1 + .../res/formats/Extended, Dissension.txt | 1 + .../res/formats/Extended, Eighth Edition.txt | 1 + forge-gui/res/formats/Extended, Eventide.txt | 1 + forge-gui/res/formats/Extended, Exodus.txt | 1 + .../res/formats/Extended, Fifth Dawn.txt | 1 + .../res/formats/Extended, Future Sight.txt | 1 + forge-gui/res/formats/Extended, Guildpact.txt | 1 + forge-gui/res/formats/Extended, Innistrad.txt | 1 + forge-gui/res/formats/Extended, Invasion.txt | 1 + forge-gui/res/formats/Extended, Jan 1999.txt | 1 + forge-gui/res/formats/Extended, Jan 2004.txt | 1 + forge-gui/res/formats/Extended, Judgment.txt | 1 + forge-gui/res/formats/Extended, July 2010.txt | 1 + forge-gui/res/formats/Extended, Legions.txt | 1 + forge-gui/res/formats/Extended, Lorwyn.txt | 1 + .../res/formats/Extended, Magic 2010.txt | 1 + .../res/formats/Extended, Magic 2011.txt | 1 + .../res/formats/Extended, Magic 2012.txt | 1 + .../res/formats/Extended, Magic 2013.txt | 1 + .../formats/Extended, Mercadian Masques.txt | 1 + .../formats/Extended, Mirrodin Besieged.txt | 1 + forge-gui/res/formats/Extended, Mirrodin.txt | 1 + .../res/formats/Extended, Morningtide.txt | 1 + forge-gui/res/formats/Extended, Nemesis.txt | 1 + .../res/formats/Extended, New Phyrexia.txt | 1 + .../res/formats/Extended, Ninth Edition.txt | 1 + forge-gui/res/formats/Extended, Oct 1999.txt | 8 ++- forge-gui/res/formats/Extended, Oct 2003.txt | 1 + .../res/formats/Extended, October 2011.txt | 1 + forge-gui/res/formats/Extended, Odyssey.txt | 1 + forge-gui/res/formats/Extended, Onslaught.txt | 1 + .../res/formats/Extended, Planar Chaos.txt | 1 + .../res/formats/Extended, Planeshift.txt | 1 + forge-gui/res/formats/Extended, Prophecy.txt | 1 + .../Extended, Ravnica_ City of Guilds.txt | 1 + .../formats/Extended, Rise of the Eldrazi.txt | 1 + .../formats/Extended, Saviors of Kamigawa.txt | 1 + .../formats/Extended, Scars of Mirrodin.txt | 1 + forge-gui/res/formats/Extended, Scourge.txt | 1 + forge-gui/res/formats/Extended, Sep 2004.txt | 1 + forge-gui/res/formats/Extended, Sep 2005.txt | 1 + forge-gui/res/formats/Extended, Sep 2008.txt | 1 + .../res/formats/Extended, Seventh Edition.txt | 1 + .../res/formats/Extended, Shadowmoor.txt | 1 + .../res/formats/Extended, Shards of Alara.txt | 1 + .../res/formats/Extended, Stronghold.txt | 1 + forge-gui/res/formats/Extended, Tempest.txt | 1 + .../res/formats/Extended, Tenth Edition.txt | 1 + .../res/formats/Extended, Time Spiral.txt | 1 + forge-gui/res/formats/Extended, Torment.txt | 1 + .../res/formats/Extended, Urza's Destiny.txt | 1 + .../res/formats/Extended, Urza's Legacy.txt | 1 + .../res/formats/Extended, Urza's Saga.txt | 1 + .../res/formats/Extended, Weatherlight.txt | 1 + forge-gui/res/formats/Extended, Worldwake.txt | 1 + forge-gui/res/formats/Extended, Zendikar.txt | 1 + forge-gui/res/formats/Extended.txt | 1 + forge-gui/res/formats/Fallen Empires.txt | 1 + forge-gui/res/formats/Feb 23 1994.txt | 1 + .../Ice Age Block Constructed, Coldsnap.txt | 1 + forge-gui/res/formats/Ice Age Block.txt | 1 + .../res/formats/Ice Age-Only, Oct 1996.txt | 1 + ...nnistrad Block Constructed, April 2012.txt | 1 + ...rad Block Constructed, Avacyn Restored.txt | 1 + ...trad Block Constructed, Dark Ascension.txt | 1 + ...Innistrad Block Constructed, Innistrad.txt | 1 + .../Innistrad-Avacyn Restored Block.txt | 1 + ...Invasion Block Constructed, Apocalypse.txt | 1 + .../Invasion Block Constructed, Invasion.txt | 1 + ...Invasion Block Constructed, Planeshift.txt | 1 + forge-gui/res/formats/Invasion Block.txt | 1 + forge-gui/res/formats/Ixalan Block.txt | 1 + forge-gui/res/formats/Jan 1999 Classic.txt | 1 + forge-gui/res/formats/Jan 25 1994.txt | 1 + forge-gui/res/formats/Jun 13 1994.txt | 1 + forge-gui/res/formats/Kaladesh Block.txt | 1 + ...ock Constructed, Betrayers of Kamigawa.txt | 1 + ...ock Constructed, Champions of Kamigawa.txt | 1 + ...Block Constructed, Saviors of Kamigawa.txt | 1 + forge-gui/res/formats/Kamigawa Block.txt | 1 + .../res/formats/Khans of Tarkir Block.txt | 1 + .../res/formats/Legacy, Alara Reborn.txt | 1 + .../res/formats/Legacy, Avacyn Restored.txt | 1 + .../formats/Legacy, Betrayers of Kamigawa.txt | 1 + .../formats/Legacy, Champions of Kamigawa.txt | 1 + forge-gui/res/formats/Legacy, Coldsnap.txt | 1 + forge-gui/res/formats/Legacy, Conflux.txt | 1 + .../res/formats/Legacy, Dark Ascension.txt | 1 + forge-gui/res/formats/Legacy, Dissension.txt | 1 + forge-gui/res/formats/Legacy, Eventide.txt | 1 + .../res/formats/Legacy, Future Sight.txt | 1 + forge-gui/res/formats/Legacy, Guildpact.txt | 1 + forge-gui/res/formats/Legacy, Innistrad.txt | 1 + .../res/formats/Legacy, January 2011.txt | 1 + forge-gui/res/formats/Legacy, July 2010.txt | 1 + forge-gui/res/formats/Legacy, July 2012.txt | 1 + forge-gui/res/formats/Legacy, Jun 2007.txt | 1 + forge-gui/res/formats/Legacy, Lorwyn.txt | 1 + forge-gui/res/formats/Legacy, Magic 2010.txt | 1 + forge-gui/res/formats/Legacy, Magic 2011.txt | 1 + forge-gui/res/formats/Legacy, Magic 2012.txt | 1 + forge-gui/res/formats/Legacy, Magic 2013.txt | 1 + .../res/formats/Legacy, Mirrodin Besieged.txt | 1 + forge-gui/res/formats/Legacy, Morningtide.txt | 1 + .../res/formats/Legacy, New Phyrexia.txt | 1 + .../res/formats/Legacy, Ninth Edition.txt | 1 + .../res/formats/Legacy, October 2009.txt | 1 + .../res/formats/Legacy, Planar Chaos.txt | 1 + .../Legacy, Ravnica_ City of Guilds.txt | 1 + .../formats/Legacy, Rise of the Eldrazi.txt | 1 + .../formats/Legacy, Saviors of Kamigawa.txt | 1 + .../res/formats/Legacy, Scars of Mirrodin.txt | 1 + forge-gui/res/formats/Legacy, Sep 2007.txt | 1 + forge-gui/res/formats/Legacy, Sep 2008.txt | 1 + forge-gui/res/formats/Legacy, Shadowmoor.txt | 1 + .../res/formats/Legacy, Shards of Alara.txt | 1 + .../res/formats/Legacy, Tenth Edition.txt | 1 + forge-gui/res/formats/Legacy, Time Spiral.txt | 1 + forge-gui/res/formats/Legacy, Worldwake.txt | 1 + forge-gui/res/formats/Legacy, Zendikar.txt | 1 + forge-gui/res/formats/Legacy.txt | 1 + forge-gui/res/formats/Legends.txt | 1 + .../res/formats/Limited Edition Alpha.txt | 1 + .../res/formats/Limited Edition Beta.txt | 1 + .../Lorwyn Block Constructed, Lorwyn.txt | 1 + .../Lorwyn Block Constructed, Morningtide.txt | 1 + ...Shadowmoor Block Constructed, Eventide.txt | 1 + ...adowmoor Block Constructed, Shadowmoor.txt | 1 + .../res/formats/Lorwyn-Shadowmoor Block.txt | 1 + forge-gui/res/formats/MTGO.txt | 3 +- forge-gui/res/formats/Mar 23 1994.txt | 1 + ...s Block Constructed, Mercadian Masques.txt | 1 + .../Masques Block Constructed, Nemesis.txt | 1 + .../Masques Block Constructed, Prophecy.txt | 1 + forge-gui/res/formats/Masques Block.txt | 1 + forge-gui/res/formats/May 1994.txt | 1 + forge-gui/res/formats/MicroProse.txt | 3 +- forge-gui/res/formats/Mirage Block.txt | 1 + .../Mirrodin Block Constructed, Darksteel.txt | 1 + ...Mirrodin Block Constructed, Fifth Dawn.txt | 1 + .../Mirrodin Block Constructed, Jun 2004.txt | 1 + .../Mirrodin Block Constructed, Mar 2006.txt | 1 + .../Mirrodin Block Constructed, Mirrodin.txt | 1 + forge-gui/res/formats/Mirrodin Block.txt | 1 + forge-gui/res/formats/Modern, August 2011.txt | 1 + .../res/formats/Modern, Avacyn Restored.txt | 1 + .../res/formats/Modern, Dark Ascension.txt | 1 + forge-gui/res/formats/Modern, Innistrad.txt | 1 + .../res/formats/Modern, January 2012.txt | 1 + forge-gui/res/formats/Modern, Magic 2013.txt | 1 + .../res/formats/Modern, October 2011.txt | 1 + forge-gui/res/formats/Modern.txt | 1 + forge-gui/res/formats/Oct 10 1994.txt | 1 + .../Odyssey Block Constructed, Judgment.txt | 1 + .../Odyssey Block Constructed, Odyssey.txt | 1 + .../Odyssey Block Constructed, Torment.txt | 1 + forge-gui/res/formats/Odyssey Block.txt | 1 + .../Onslaught Block Constructed, Legions.txt | 1 + ...Onslaught Block Constructed, Onslaught.txt | 1 + .../Onslaught Block Constructed, Scourge.txt | 1 + forge-gui/res/formats/Onslaught Block.txt | 1 + .../Ravnica Block Constructed, Dissension.txt | 1 + .../Ravnica Block Constructed, Guildpact.txt | 1 + ...k Constructed, Ravnica_ City of Guilds.txt | 1 + forge-gui/res/formats/Ravnica Block.txt | 1 + .../res/formats/Return to Ravnica Block.txt | 1 + forge-gui/res/formats/Revised Edition.txt | 1 + ...n Block Constructed, Mirrodin Besieged.txt | 1 + ...rrodin Block Constructed, New Phyrexia.txt | 1 + ...n Block Constructed, Scars of Mirrodin.txt | 1 + .../res/formats/Scars of Mirrodin Block.txt | 1 + .../formats/Shadows over Innistrad Block.txt | 1 + ... Alara Block Constructed, Alara Reborn.txt | 1 + ...ds of Alara Block Constructed, Conflux.txt | 1 + ...ara Block Constructed, Shards of Alara.txt | 1 + .../res/formats/Shards of Alara Block.txt | 1 + .../res/formats/Standard, Alara Reborn.txt | 1 + .../res/formats/Standard, Apocalypse.txt | 1 + forge-gui/res/formats/Standard, Apr 1999.txt | 1 + .../res/formats/Standard, Avacyn Restored.txt | 1 + .../Standard, Betrayers of Kamigawa.txt | 1 + .../Standard, Champions of Kamigawa.txt | 1 + .../Standard, Classic Sixth Edition.txt | 1 + forge-gui/res/formats/Standard, Coldsnap.txt | 1 + forge-gui/res/formats/Standard, Conflux.txt | 1 + .../res/formats/Standard, Dark Ascension.txt | 1 + forge-gui/res/formats/Standard, Darksteel.txt | 1 + .../res/formats/Standard, Dissension.txt | 1 + .../res/formats/Standard, Eighth Edition.txt | 1 + forge-gui/res/formats/Standard, Eventide.txt | 1 + forge-gui/res/formats/Standard, Exodus.txt | 1 + .../res/formats/Standard, Fifth Dawn.txt | 1 + .../res/formats/Standard, Fifth Edition.txt | 1 + .../res/formats/Standard, Future Sight.txt | 1 + forge-gui/res/formats/Standard, Guildpact.txt | 1 + forge-gui/res/formats/Standard, Innistrad.txt | 1 + forge-gui/res/formats/Standard, Invasion.txt | 1 + forge-gui/res/formats/Standard, Jan 1997.txt | 1 + forge-gui/res/formats/Standard, Jan 1999.txt | 1 + forge-gui/res/formats/Standard, Judgment.txt | 1 + forge-gui/res/formats/Standard, July 2011.txt | 1 + forge-gui/res/formats/Standard, Jun 2004.txt | 1 + forge-gui/res/formats/Standard, Legions.txt | 1 + forge-gui/res/formats/Standard, Lorwyn.txt | 1 + .../res/formats/Standard, Magic 2010.txt | 1 + .../res/formats/Standard, Magic 2011.txt | 1 + .../res/formats/Standard, Magic 2012.txt | 1 + .../res/formats/Standard, Magic 2013.txt | 1 + forge-gui/res/formats/Standard, Mar 2005.txt | 1 + .../formats/Standard, Mercadian Masques.txt | 1 + forge-gui/res/formats/Standard, Mirage.txt | 1 + .../formats/Standard, Mirrodin Besieged.txt | 1 + forge-gui/res/formats/Standard, Mirrodin.txt | 1 + .../res/formats/Standard, Morningtide.txt | 1 + forge-gui/res/formats/Standard, Nemesis.txt | 1 + .../res/formats/Standard, New Phyrexia.txt | 1 + .../res/formats/Standard, Ninth Edition.txt | 1 + forge-gui/res/formats/Standard, Oct 1996.txt | 1 + forge-gui/res/formats/Standard, Odyssey.txt | 1 + forge-gui/res/formats/Standard, Onslaught.txt | 1 + .../res/formats/Standard, Planar Chaos.txt | 1 + .../res/formats/Standard, Planeshift.txt | 1 + forge-gui/res/formats/Standard, Prophecy.txt | 1 + .../Standard, Ravnica_City of Guilds.txt | 1 + .../formats/Standard, Rise of the Eldrazi.txt | 1 + .../formats/Standard, Saviors of Kamigawa.txt | 1 + .../formats/Standard, Scars of Mirrodin.txt | 1 + forge-gui/res/formats/Standard, Scourge.txt | 1 + .../res/formats/Standard, Seventh Edition.txt | 1 + .../res/formats/Standard, Shadowmoor.txt | 1 + .../res/formats/Standard, Shards of Alara.txt | 1 + .../res/formats/Standard, Stronghold.txt | 1 + forge-gui/res/formats/Standard, Tempest.txt | 1 + .../res/formats/Standard, Tenth Edition.txt | 1 + .../res/formats/Standard, Time Spiral.txt | 1 + forge-gui/res/formats/Standard, Torment.txt | 1 + .../res/formats/Standard, Urza's Destiny.txt | 1 + .../res/formats/Standard, Urza's Legacy.txt | 1 + .../res/formats/Standard, Urza's Saga.txt | 1 + forge-gui/res/formats/Standard, Visions.txt | 1 + .../res/formats/Standard, Weatherlight.txt | 1 + forge-gui/res/formats/Standard, Worldwake.txt | 1 + forge-gui/res/formats/Standard, Zendikar.txt | 1 + .../res/formats/Tempest Block, Tempest.txt | 1 + forge-gui/res/formats/Tempest Block.txt | 1 + forge-gui/res/formats/The Dark.txt | 1 + forge-gui/res/formats/Theros Block.txt | 1 + ...Spiral Block Constructed, Future Sight.txt | 1 + ...Spiral Block Constructed, Planar Chaos.txt | 1 + ... Spiral Block Constructed, Time Spiral.txt | 1 + forge-gui/res/formats/Time Spiral Block.txt | 1 + forge-gui/res/formats/Type 1, Apocalypse.txt | 1 + forge-gui/res/formats/Type 1, Apr 2003.txt | 1 + forge-gui/res/formats/Type 1, Chronicles.txt | 1 + forge-gui/res/formats/Type 1, Darksteel.txt | 1 + .../res/formats/Type 1, Eighth Edition.txt | 1 + forge-gui/res/formats/Type 1, Fifth Dawn.txt | 1 + .../res/formats/Type 1, Fourth Edition.txt | 1 + forge-gui/res/formats/Type 1, Ice Age.txt | 1 + forge-gui/res/formats/Type 1, Invasion.txt | 1 + forge-gui/res/formats/Type 1, Jan 2002.txt | 1 + forge-gui/res/formats/Type 1, Jan 2004.txt | 1 + forge-gui/res/formats/Type 1, Judgment.txt | 1 + forge-gui/res/formats/Type 1, Jul 2003.txt | 1 + forge-gui/res/formats/Type 1, Legions.txt | 1 + .../res/formats/Type 1, Mercadian Masques.txt | 1 + forge-gui/res/formats/Type 1, Mirrodin.txt | 1 + forge-gui/res/formats/Type 1, Nemesis.txt | 1 + forge-gui/res/formats/Type 1, Oct 1999.txt | 1 + forge-gui/res/formats/Type 1, Oct 2000.txt | 1 + forge-gui/res/formats/Type 1, Odyssey.txt | 1 + forge-gui/res/formats/Type 1, Onslaught.txt | 1 + forge-gui/res/formats/Type 1, Planeshift.txt | 1 + forge-gui/res/formats/Type 1, Prophecy.txt | 1 + forge-gui/res/formats/Type 1, Scourge.txt | 1 + .../res/formats/Type 1, Seventh Edition.txt | 1 + forge-gui/res/formats/Type 1, Torment.txt | 1 + .../res/formats/Type 1.5, Apocalypse.txt | 1 + forge-gui/res/formats/Type 1.5, Apr 2003.txt | 1 + forge-gui/res/formats/Type 1.5, Darksteel.txt | 1 + .../res/formats/Type 1.5, Eighth Edition.txt | 1 + .../res/formats/Type 1.5, Fifth Dawn.txt | 1 + forge-gui/res/formats/Type 1.5, Invasion.txt | 1 + forge-gui/res/formats/Type 1.5, Jan 2002.txt | 1 + forge-gui/res/formats/Type 1.5, Jan 2004.txt | 1 + forge-gui/res/formats/Type 1.5, Judgment.txt | 1 + forge-gui/res/formats/Type 1.5, Jul 2003.txt | 1 + forge-gui/res/formats/Type 1.5, Legions.txt | 1 + .../formats/Type 1.5, Mercadian Masques.txt | 1 + forge-gui/res/formats/Type 1.5, Mirrodin.txt | 1 + forge-gui/res/formats/Type 1.5, Nemesis.txt | 1 + forge-gui/res/formats/Type 1.5, Oct 1999.txt | 1 + forge-gui/res/formats/Type 1.5, Oct 2000.txt | 1 + forge-gui/res/formats/Type 1.5, Odyssey.txt | 1 + forge-gui/res/formats/Type 1.5, Onslaught.txt | 1 + .../res/formats/Type 1.5, Planeshift.txt | 1 + forge-gui/res/formats/Type 1.5, Prophecy.txt | 1 + forge-gui/res/formats/Type 1.5, Scourge.txt | 1 + forge-gui/res/formats/Type 1.5, Sep 2004.txt | 1 + .../res/formats/Type 1.5, Seventh Edition.txt | 1 + forge-gui/res/formats/Type 1.5, Torment.txt | 1 + forge-gui/res/formats/Type 2, Chronicles.txt | 1 + .../res/formats/Type 2, Fourth Edition.txt | 1 + forge-gui/res/formats/Type 2, Ice Age.txt | 1 + forge-gui/res/formats/Type I, Alliances.txt | 7 --- forge-gui/res/formats/Type I, Apr 1996.txt | 7 --- forge-gui/res/formats/Type I, Feb 1996.txt | 7 --- forge-gui/res/formats/Type I, Homelands.txt | 7 --- forge-gui/res/formats/Type I, Nov 1995.txt | 7 --- .../res/formats/Type I, October 1995.txt | 7 --- forge-gui/res/formats/Type I.5, Alliances.txt | 6 -- forge-gui/res/formats/Type I.5, May 1996.txt | 6 -- forge-gui/res/formats/Type II, Alliances.txt | 7 --- forge-gui/res/formats/Type II, Apr 1996.txt | 7 --- forge-gui/res/formats/Type II, Feb 1996.txt | 7 --- forge-gui/res/formats/Type II, Homelands.txt | 7 --- forge-gui/res/formats/Type II, Nov 1995.txt | 7 --- .../res/formats/Type II, October 1995.txt | 7 --- forge-gui/res/formats/Un-Sets.txt | 1 + forge-gui/res/formats/Unlimited Edition.txt | 1 + .../Urza Block Constructed, Apr 1999.txt | 1 + ...Urza Block Constructed, Urza's Destiny.txt | 1 + .../Urza Block Constructed, Urza's Legacy.txt | 1 + forge-gui/res/formats/Urza Block.txt | 1 + .../Urza's Saga Block, Urza's Saga.txt | 1 + .../res/formats/Vintage, Alara Reborn.txt | 1 + .../res/formats/Vintage, Avacyn Restored.txt | 1 + .../Vintage, Betrayers of Kamigawa.txt | 1 + .../Vintage, Champions of Kamigawa.txt | 1 + forge-gui/res/formats/Vintage, Coldsnap.txt | 1 + forge-gui/res/formats/Vintage, Conflux.txt | 1 + .../res/formats/Vintage, Dark Ascension.txt | 1 + forge-gui/res/formats/Vintage, Dec 2004.txt | 1 + forge-gui/res/formats/Vintage, Dissension.txt | 1 + forge-gui/res/formats/Vintage, Eventide.txt | 1 + .../res/formats/Vintage, Future Sight.txt | 1 + forge-gui/res/formats/Vintage, Guildpact.txt | 1 + forge-gui/res/formats/Vintage, Innistrad.txt | 1 + forge-gui/res/formats/Vintage, July 2009.txt | 1 + forge-gui/res/formats/Vintage, Jun 2007.txt | 1 + forge-gui/res/formats/Vintage, Jun 2008.txt | 1 + forge-gui/res/formats/Vintage, Lorwyn.txt | 1 + forge-gui/res/formats/Vintage, Magic 2010.txt | 1 + forge-gui/res/formats/Vintage, Magic 2011.txt | 1 + forge-gui/res/formats/Vintage, Magic 2012.txt | 1 + forge-gui/res/formats/Vintage, Magic 2013.txt | 1 + forge-gui/res/formats/Vintage, Mar 2005.txt | 1 + .../formats/Vintage, Mirrodin Besieged.txt | 1 + .../res/formats/Vintage, Morningtide.txt | 1 + .../res/formats/Vintage, New Phyrexia.txt | 1 + .../res/formats/Vintage, Ninth Edition.txt | 1 + .../res/formats/Vintage, October 2011.txt | 1 + .../res/formats/Vintage, Planar Chaos.txt | 1 + .../Vintage, Ravnica_ City of Guilds.txt | 1 + .../formats/Vintage, Rise of the Eldrazi.txt | 1 + .../formats/Vintage, Saviors of Kamigawa.txt | 1 + .../formats/Vintage, Scars of Mirrodin.txt | 1 + forge-gui/res/formats/Vintage, Sep 2004.txt | 1 + forge-gui/res/formats/Vintage, Sep 2005.txt | 1 + forge-gui/res/formats/Vintage, Sep 2007.txt | 1 + forge-gui/res/formats/Vintage, Sep 2008.txt | 1 + forge-gui/res/formats/Vintage, Shadowmoor.txt | 1 + .../res/formats/Vintage, Shards of Alara.txt | 1 + .../res/formats/Vintage, Tenth Edition.txt | 1 + .../res/formats/Vintage, Time Spiral.txt | 1 + forge-gui/res/formats/Vintage, Worldwake.txt | 1 + forge-gui/res/formats/Vintage, Zendikar.txt | 1 + forge-gui/res/formats/Vintage.txt | 1 + ...Block Constructed, Rise of the Eldrazi.txt | 1 + .../Zendikar Block Constructed, Worldwake.txt | 1 + .../Zendikar Block Constructed, Zendikar.txt | 1 + forge-gui/res/formats/Zendikar Block.txt | 1 + forge-gui/res/formats/pauper.txt | 1 + forge-gui/res/formats/standard.txt | 1 + .../forge/quest/data/GameFormatQuest.java | 2 +- 427 files changed, 473 insertions(+), 114 deletions(-) delete mode 100644 forge-gui/res/formats/Type I, Alliances.txt delete mode 100644 forge-gui/res/formats/Type I, Apr 1996.txt delete mode 100644 forge-gui/res/formats/Type I, Feb 1996.txt delete mode 100644 forge-gui/res/formats/Type I, Homelands.txt delete mode 100644 forge-gui/res/formats/Type I, Nov 1995.txt delete mode 100644 forge-gui/res/formats/Type I, October 1995.txt delete mode 100644 forge-gui/res/formats/Type I.5, Alliances.txt delete mode 100644 forge-gui/res/formats/Type I.5, May 1996.txt delete mode 100644 forge-gui/res/formats/Type II, Alliances.txt delete mode 100644 forge-gui/res/formats/Type II, Apr 1996.txt delete mode 100644 forge-gui/res/formats/Type II, Feb 1996.txt delete mode 100644 forge-gui/res/formats/Type II, Homelands.txt delete mode 100644 forge-gui/res/formats/Type II, Nov 1995.txt delete mode 100644 forge-gui/res/formats/Type II, October 1995.txt diff --git a/forge-game/src/main/java/forge/game/GameFormat.java b/forge-game/src/main/java/forge/game/GameFormat.java index 4f7ce8bdb58..f6cfe79b3a1 100644 --- a/forge-game/src/main/java/forge/game/GameFormat.java +++ b/forge-game/src/main/java/forge/game/GameFormat.java @@ -34,7 +34,6 @@ import forge.item.PaperCard; import forge.util.FileSection; import forge.util.FileUtil; import forge.util.storage.StorageBase; -import forge.util.storage.StorageReaderFileSections; import forge.util.storage.StorageReaderFolder; import java.io.File; @@ -45,18 +44,23 @@ import java.util.Map.Entry; public class GameFormat implements Comparable { private final String name; - public enum FormatType {Sanctioned, Casual, Historic, Custom} + public enum FormatType {Sanctioned, Casual, Historic, Digital, Custom} + public enum FormatSubType {Rotating, Eternal, Commander, Planechase, Block, Videogame, MTGO, Custom} + // contains allowed sets, when empty allows all sets private FormatType formatType; + private FormatSubType formatSubType; protected final List allowedSetCodes; // this is mutable to support quest mode set unlocks protected final List allowedRarities; protected final List bannedCardNames; protected final List restrictedCardNames; + protected final List additionalCardNames; // for cards that are legal but not reprinted in any of the allowed Sets protected final transient List allowedSetCodes_ro; protected final transient List bannedCardNames_ro; protected final transient List restrictedCardNames_ro; + protected final transient List additionalCardNames_ro; protected final transient Predicate filterRules; protected final transient Predicate filterPrinted; @@ -64,15 +68,17 @@ public class GameFormat implements Comparable { private final int index; public GameFormat(final String fName, final Iterable sets, final List bannedCards) { - this(fName, sets, bannedCards, null, null, 0, FormatType.Custom); + this(fName, sets, bannedCards, null, null, null, 0, FormatType.Custom, FormatSubType.Custom); } - public static final GameFormat NoFormat = new GameFormat("(none)", null, null, null, null, Integer.MAX_VALUE, FormatType.Custom); + public static final GameFormat NoFormat = new GameFormat("(none)", null, null, null, null, null, Integer.MAX_VALUE, FormatType.Custom, FormatSubType.Custom); public GameFormat(final String fName, final Iterable sets, final List bannedCards, - final List restrictedCards, final List rarities, int compareIdx, FormatType formatType) { + final List restrictedCards, final List additionalCards, + final List rarities, int compareIdx, FormatType formatType, FormatSubType formatSubType) { this.index = compareIdx; this.formatType = formatType; + this.formatSubType = formatSubType; this.name = fName; if(sets != null) { @@ -92,11 +98,13 @@ public class GameFormat implements Comparable { bannedCardNames = bannedCards == null ? new ArrayList() : Lists.newArrayList(bannedCards); restrictedCardNames = restrictedCards == null ? new ArrayList() : Lists.newArrayList(restrictedCards); + additionalCardNames = additionalCards == null ? new ArrayList() : Lists.newArrayList(additionalCards); allowedRarities = rarities == null ? Lists.newArrayList() : rarities; this.allowedSetCodes_ro = Collections.unmodifiableList(allowedSetCodes); this.bannedCardNames_ro = Collections.unmodifiableList(bannedCardNames); this.restrictedCardNames_ro = Collections.unmodifiableList(restrictedCardNames); + this.additionalCardNames_ro = Collections.unmodifiableList(additionalCardNames); this.filterRules = this.buildFilterRules(); this.filterPrinted = this.buildFilterPrinted(); @@ -115,6 +123,9 @@ public class GameFormat implements Comparable { } p = Predicates.and(p, Predicates.or(crp)); } + if (!this.additionalCardNames_ro.isEmpty() && !printed) { + p = Predicates.or(p, IPaperCard.Predicates.names(this.additionalCardNames_ro)); + } return p; } @@ -134,6 +145,10 @@ public class GameFormat implements Comparable { return this.formatType; } + public FormatSubType getFormatSubType() { + return this.formatSubType; + } + public List getAllowedSetCodes() { return this.allowedSetCodes_ro; } @@ -145,6 +160,11 @@ public class GameFormat implements Comparable { public List getRestrictedCards() { return restrictedCardNames_ro; } + + public List getAdditionalCards() { + return additionalCardNames_ro; + } + public List getAllowedRarities() { return allowedRarities; } @@ -217,7 +237,15 @@ public class GameFormat implements Comparable { if (null == other) { return 1; } - return index - other.index; + if (other.formatType != formatType){ + return formatType.compareTo(other.formatType); + }else{ + if (other.formatSubType != formatSubType){ + return formatSubType.compareTo(other.formatSubType); + } + } + return name.compareTo(other.name); + //return index - other.index; } public int getIndex() { @@ -237,15 +265,22 @@ public class GameFormat implements Comparable { List sets = null; // default: all sets allowed List bannedCards = null; // default: nothing banned List restrictedCards = null; // default: nothing restricted + List additionalCards = null; // default: nothing additional List rarities = null; FileSection section = FileSection.parse(contents.get("format"), ":"); String title = section.get("name"); FormatType formatType; try { formatType = FormatType.valueOf(section.get("type")); - } catch (IllegalArgumentException e) { + } catch (Exception e) { formatType = FormatType.Custom; } + FormatSubType formatsubType; + try { + formatsubType = FormatSubType.valueOf(section.get("subtype")); + } catch (Exception e) { + formatsubType = FormatSubType.Custom; + } Integer idx = section.getInt("order"); String strSets = section.get("sets"); if ( null != strSets ) { @@ -261,6 +296,11 @@ public class GameFormat implements Comparable { restrictedCards = Arrays.asList(strCars.split("; ")); } + strCars = section.get("additional"); + if ( strCars != null ) { + additionalCards = Arrays.asList(strCars.split("; ")); + } + strCars = section.get("rarities"); if ( strCars != null ) { CardRarity cr; @@ -273,7 +313,7 @@ public class GameFormat implements Comparable { } } - GameFormat result = new GameFormat(title, sets, bannedCards, restrictedCards, rarities, idx, formatType); + GameFormat result = new GameFormat(title, sets, bannedCards, restrictedCards, additionalCards, rarities, idx, formatType,formatsubType); naturallyOrdered.add(result); return result; } @@ -317,7 +357,8 @@ public class GameFormat implements Comparable { public Iterable getFilterList() { List coreList = new ArrayList<>(); for(GameFormat format: naturallyOrdered){ - if(!format.getFormatType().equals(FormatType.Historic)){ + if(!format.getFormatType().equals(FormatType.Historic) + &&!format.getFormatType().equals(FormatType.Digital)){ coreList.add(format); } } 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 c2a7465ea8f..37577c55809 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 @@ -45,6 +45,7 @@ public class DialogChooseFormats { break; case Custom: case Casual: + case Digital: default: casual.add(box); break; @@ -61,7 +62,7 @@ public class DialogChooseFormats { String constraints = "aligny top"; panel.add(makeCheckBoxList(sanctioned, "Sanctioned", true), constraints); - panel.add(makeCheckBoxList(casual, "Casual", false), constraints); + panel.add(makeCheckBoxList(casual, "Other", false), constraints); panel.add(makeCheckBoxList(historic, "Historic", false), constraints); final JPanel overlay = FOverlay.SINGLETON_INSTANCE.getPanel(); diff --git a/forge-gui-mobile/src/forge/itemmanager/filters/FormatFilter.java b/forge-gui-mobile/src/forge/itemmanager/filters/FormatFilter.java index a2fed88a002..3d8e0027c0f 100644 --- a/forge-gui-mobile/src/forge/itemmanager/filters/FormatFilter.java +++ b/forge-gui-mobile/src/forge/itemmanager/filters/FormatFilter.java @@ -135,8 +135,11 @@ public abstract class FormatFilter extends ItemFilter