mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
rollback changes to Deck, ManaCost, StorageBase, CardPool
This commit is contained in:
@@ -22,7 +22,6 @@ import java.util.Map.Entry;
|
||||
import forge.Singletons;
|
||||
import forge.card.CardEdition;
|
||||
import forge.card.MagicColor;
|
||||
import forge.deck.CardPool;
|
||||
import forge.deck.Deck;
|
||||
import forge.deck.DeckGroup;
|
||||
import forge.deck.DeckSection;
|
||||
|
||||
@@ -40,7 +40,7 @@ public class DeckColorFilter extends StatTypeFilter<Deck> {
|
||||
return new Predicate<Deck>() {
|
||||
@Override
|
||||
public boolean apply(Deck input) {
|
||||
byte colorProfile = input.getColor().getColorProfile();
|
||||
byte colorProfile = input.getColor().getColor();
|
||||
if (colorProfile == 0) {
|
||||
return buttonMap.get(StatTypes.DECK_COLORLESS).getSelected();
|
||||
}
|
||||
@@ -73,43 +73,43 @@ public class DeckColorFilter extends StatTypeFilter<Deck> {
|
||||
private static final Predicate<Deck> IS_WHITE = new Predicate<Deck>() {
|
||||
@Override
|
||||
public boolean apply(final Deck deck) {
|
||||
return deck.getColor().hasColor(MagicColor.WHITE);
|
||||
return deck.getColor().hasAnyColor(MagicColor.WHITE);
|
||||
}
|
||||
};
|
||||
private static final Predicate<Deck> IS_BLUE = new Predicate<Deck>() {
|
||||
@Override
|
||||
public boolean apply(final Deck deck) {
|
||||
return deck.getColor().hasColor(MagicColor.BLUE);
|
||||
return deck.getColor().hasAnyColor(MagicColor.BLUE);
|
||||
}
|
||||
};
|
||||
public static final Predicate<Deck> IS_BLACK = new Predicate<Deck>() {
|
||||
@Override
|
||||
public boolean apply(final Deck deck) {
|
||||
return deck.getColor().hasColor(MagicColor.BLACK);
|
||||
return deck.getColor().hasAnyColor(MagicColor.BLACK);
|
||||
}
|
||||
};
|
||||
public static final Predicate<Deck> IS_RED = new Predicate<Deck>() {
|
||||
@Override
|
||||
public boolean apply(final Deck deck) {
|
||||
return deck.getColor().hasColor(MagicColor.RED);
|
||||
return deck.getColor().hasAnyColor(MagicColor.RED);
|
||||
}
|
||||
};
|
||||
public static final Predicate<Deck> IS_GREEN = new Predicate<Deck>() {
|
||||
@Override
|
||||
public boolean apply(final Deck deck) {
|
||||
return deck.getColor().hasColor(MagicColor.GREEN);
|
||||
return deck.getColor().hasAnyColor(MagicColor.GREEN);
|
||||
}
|
||||
};
|
||||
private static final Predicate<Deck> IS_COLORLESS = new Predicate<Deck>() {
|
||||
@Override
|
||||
public boolean apply(final Deck deck) {
|
||||
return deck.getColor().getColorProfile() == 0;
|
||||
return deck.getColor().getColor() == 0;
|
||||
}
|
||||
};
|
||||
private static final Predicate<Deck> IS_MULTICOLOR = new Predicate<Deck>() {
|
||||
@Override
|
||||
public boolean apply(final Deck deck) {
|
||||
return BinaryUtil.bitCount(deck.getColor().getColorProfile()) > 1;
|
||||
return BinaryUtil.bitCount(deck.getColor().getColor()) > 1;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.util.regex.Pattern;
|
||||
import javax.swing.table.TableColumn;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
|
||||
import forge.Singletons;
|
||||
import forge.card.CardAiHints;
|
||||
import forge.card.CardEdition;
|
||||
@@ -406,7 +405,8 @@ public class ItemColumn extends TableColumn {
|
||||
if (deck == null) {
|
||||
return -1;
|
||||
}
|
||||
return deck.getFormatCompare(Singletons.getModel().getFormats().getFormatPredicates());
|
||||
return Singletons.getModel().getFormats().getFormatOfDeck(deck).getIndex();
|
||||
|
||||
}
|
||||
},
|
||||
new Function<Entry<? extends InventoryItem, Integer>, Object>() {
|
||||
@@ -416,7 +416,7 @@ public class ItemColumn extends TableColumn {
|
||||
if (deck == null) {
|
||||
return null;
|
||||
}
|
||||
return deck.getFormat(Singletons.getModel().getFormats().getFormatPredicates());
|
||||
return Singletons.getModel().getFormats().getFormatOfDeck(deck);
|
||||
}
|
||||
}),
|
||||
DECK_MAIN("Main", "Main Deck", 35, 35, 35, SortState.ASC, new IntegerRenderer(),
|
||||
@@ -525,7 +525,7 @@ public class ItemColumn extends TableColumn {
|
||||
private static Deck toDeck(final InventoryItem i) {
|
||||
return i instanceof Deck ? ((Deck) i) : null;
|
||||
}
|
||||
private static ManaCost toDeckColor(final InventoryItem i) {
|
||||
private static ColorSet toDeckColor(final InventoryItem i) {
|
||||
return i instanceof Deck ? ((Deck) i).getColor() : null;
|
||||
}
|
||||
private static int toDeckCount(final InventoryItem i, DeckSection section) {
|
||||
|
||||
Reference in New Issue
Block a user