mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-11 16:26:22 +00:00
Add Battles for DeckEditor types
This commit is contained in:
@@ -604,6 +604,7 @@ public final class CardRulesPredicates {
|
||||
};
|
||||
|
||||
public static final Predicate<CardRules> IS_PLANESWALKER = CardRulesPredicates.coreType(true, CardType.CoreType.Planeswalker);
|
||||
public static final Predicate<CardRules> IS_BATTLE = CardRulesPredicates.coreType(true, CardType.CoreType.Battle);
|
||||
public static final Predicate<CardRules> IS_INSTANT = CardRulesPredicates.coreType(true, CardType.CoreType.Instant);
|
||||
public static final Predicate<CardRules> IS_SORCERY = CardRulesPredicates.coreType(true, CardType.CoreType.Sorcery);
|
||||
public static final Predicate<CardRules> IS_ENCHANTMENT = CardRulesPredicates.coreType(true, CardType.CoreType.Enchantment);
|
||||
|
||||
@@ -37,6 +37,7 @@ public class CardTypeFilter extends StatTypeFilter<PaperCard> {
|
||||
addToggleButton(widget, StatTypes.PLANESWALKER);
|
||||
addToggleButton(widget, StatTypes.INSTANT);
|
||||
addToggleButton(widget, StatTypes.SORCERY);
|
||||
addToggleButton(widget, StatTypes.BATTLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -66,6 +66,8 @@ public class CardZoom extends FOverlay {
|
||||
}
|
||||
|
||||
public static void show(final List<?> items0, int currentIndex0, ActivateHandler activateHandler0) {
|
||||
if (items == null) { return; }
|
||||
if (currentIndex0 < 0 || items.size() <= currentIndex0) { return; }
|
||||
items = items0;
|
||||
activateHandler = activateHandler0;
|
||||
currentIndex = currentIndex0;
|
||||
|
||||
@@ -824,6 +824,7 @@ lblEnchantments=Enchantments
|
||||
lblPlaneswalkers=Planeswalkers
|
||||
lblInstants=Instants
|
||||
lblSorceries=Sorceries
|
||||
lblBattles=Battles
|
||||
lblCCMC0=Cards with mana value 0
|
||||
lblCCMC1=Cards with mana value 1
|
||||
lblCCMC2=Cards with mana value 2
|
||||
|
||||
@@ -97,7 +97,7 @@ public enum GroupDef {
|
||||
if (type.isLand()) { //make Artifact Lands appear in Lands group
|
||||
return 2;
|
||||
}
|
||||
if (type.isArtifact() || type.isEnchantment() || type.isPlaneswalker() || type.isInstant() || type.isSorcery()) {
|
||||
if (type.isArtifact() || type.isEnchantment() || type.isPlaneswalker() || type.isInstant() || type.isSorcery() || type.isBattle()) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -106,7 +106,7 @@ public enum GroupDef {
|
||||
}),
|
||||
|
||||
CARD_TYPE("lblType",
|
||||
new String[] { "Planeswalker", "Creature", "Sorcery", "Instant", "Artifact", "Enchantment", "Land", "Tribal instant" },
|
||||
new String[] { "Planeswalker", "Creature", "Sorcery", "Instant", "Artifact", "Enchantment", "Land", "Tribal instant", "Battle" },
|
||||
new Function<Integer, ColumnDef>() {
|
||||
@Override
|
||||
public ColumnDef apply(final Integer groupIndex) {
|
||||
@@ -142,6 +142,9 @@ public enum GroupDef {
|
||||
if (type.isEnchantment()) {
|
||||
return 5;
|
||||
}
|
||||
if (type.isBattle()) {
|
||||
return 8;
|
||||
}
|
||||
if (type.isLand()) {
|
||||
return 6;
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ public final class SItemManagerUtil {
|
||||
PLANESWALKER (FSkinProp.IMG_PLANESWALKER, CardRulesPredicates.Presets.IS_PLANESWALKER, "lblPlaneswalkers"),
|
||||
INSTANT (FSkinProp.IMG_INSTANT, CardRulesPredicates.Presets.IS_INSTANT, "lblInstants"),
|
||||
SORCERY (FSkinProp.IMG_SORCERY, CardRulesPredicates.Presets.IS_SORCERY, "lblSorceries"),
|
||||
BATTLE (FSkinProp.IMG_BATTLE, CardRulesPredicates.Presets.IS_BATTLE, "lblBattles"),
|
||||
|
||||
CMC_0 (FSkinProp.IMG_MANA_0, new CardRulesPredicates.LeafNumber(CardRulesPredicates.LeafNumber.CardField.CMC, ComparableOp.EQUALS, 0), "lblCCMC0"),
|
||||
CMC_1 (FSkinProp.IMG_MANA_1, new CardRulesPredicates.LeafNumber(CardRulesPredicates.LeafNumber.CardField.CMC, ComparableOp.EQUALS, 1), "lblCCMC1"),
|
||||
|
||||
@@ -363,6 +363,7 @@ public enum FSkinProp {
|
||||
IMG_PLANESWALKER (new int[] {330, 740, 80, 80}, PropType.MANAICONS),
|
||||
IMG_PACK (new int[] {80, 760, 40, 40}, PropType.IMAGE),
|
||||
IMG_SORCERY (new int[] {412, 740, 80, 80}, PropType.MANAICONS),
|
||||
IMG_BATTLE (new int[] {412, 740, 80, 80}, PropType.MANAICONS), // TODO Change location once we have Battle in skin
|
||||
IMG_COMMANDER (new int[] {120, 760, 40, 40}, PropType.IMAGE),
|
||||
IMG_ALCHEMY (new int[] {248, 822, 80, 80}, PropType.MANAICONS),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user