From af7c5f7506bc13ba0d510b8fb7ac6b704156f97b Mon Sep 17 00:00:00 2001 From: tjtillmancoag Date: Wed, 24 Oct 2018 19:24:28 -0700 Subject: [PATCH] Revert Default sort in Deckbuilder to code before !1035 Merge Request --- .../main/java/forge/itemmanager/GroupDef.java | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/forge-gui/src/main/java/forge/itemmanager/GroupDef.java b/forge-gui/src/main/java/forge/itemmanager/GroupDef.java index 8376b31bf6c..fe42da64f71 100644 --- a/forge-gui/src/main/java/forge/itemmanager/GroupDef.java +++ b/forge-gui/src/main/java/forge/itemmanager/GroupDef.java @@ -74,12 +74,12 @@ public enum GroupDef { return -1; } }), - DEFAULT("Default", //Beginning in DDU, "Artifacts" category is added at top of list - new String[] { "Artifacts", "Creatures", "Other Spells", "Lands" }, + DEFAULT("Default", + new String[] { "Creatures", "Spells", "Lands" }, new Function() { @Override public ColumnDef apply(final Integer groupIndex) { - if (groupIndex == 3) { + if (groupIndex == 2) { return ColumnDef.NAME; //pile lands by name regardless } return null; @@ -90,22 +90,20 @@ public enum GroupDef { public Integer apply(final InventoryItem item) { if (item instanceof PaperCard) { CardType type = ((PaperCard) item).getRules().getType(); - if (type.isArtifact()) { //artifact lands/creatures, too + if (type.isCreature()) { return 0; } - if (type.isCreature()) { - return 1; - } - if (type.isLand()) { - return 3; - } - if (type.isEnchantment() || type.isPlaneswalker() || type.isInstant() || type.isSorcery()) { + if (type.isLand()) { //make Artifact Lands appear in Lands group return 2; } + if (type.isArtifact() || type.isEnchantment() || type.isPlaneswalker() || type.isInstant() || type.isSorcery()) { + return 1; + } } return -1; } }), + CARD_TYPE("Type", new String[] { "Planeswalker", "Creature", "Sorcery", "Instant", "Artifact", "Enchantment", "Land", "Tribal instant" }, new Function() {