mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
- Added an option to toggle filtering lands by color identity on/off.
This commit is contained in:
@@ -115,6 +115,8 @@ public enum CSubmenuPreferences implements ICDoc {
|
|||||||
lstControls.add(Pair.of(view.getCbStackCreatures(), FPref.UI_STACK_CREATURES));
|
lstControls.add(Pair.of(view.getCbStackCreatures(), FPref.UI_STACK_CREATURES));
|
||||||
lstControls.add(Pair.of(view.getCbManaLostPrompt(), FPref.UI_MANA_LOST_PROMPT));
|
lstControls.add(Pair.of(view.getCbManaLostPrompt(), FPref.UI_MANA_LOST_PROMPT));
|
||||||
|
|
||||||
|
lstControls.add(Pair.of(view.getCbFilterLandsByColorId(), FPref.UI_FILTER_LANDS_BY_COLOR_IDENTITY));
|
||||||
|
|
||||||
for(final Pair<JCheckBox, FPref> kv : lstControls) {
|
for(final Pair<JCheckBox, FPref> kv : lstControls) {
|
||||||
kv.getKey().addItemListener(new ItemListener() {
|
kv.getKey().addItemListener(new ItemListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
|||||||
private final JCheckBox cbOpenPacksIndiv = new OptionsCheckBox("Open Packs Individually");
|
private final JCheckBox cbOpenPacksIndiv = new OptionsCheckBox("Open Packs Individually");
|
||||||
private final JCheckBox cbTokensInSeparateRow = new OptionsCheckBox("Display Tokens in a Separate Row");
|
private final JCheckBox cbTokensInSeparateRow = new OptionsCheckBox("Display Tokens in a Separate Row");
|
||||||
private final JCheckBox cbStackCreatures = new OptionsCheckBox("Stack Creatures");
|
private final JCheckBox cbStackCreatures = new OptionsCheckBox("Stack Creatures");
|
||||||
|
private final JCheckBox cbFilterLandsByColorId = new OptionsCheckBox("Filter Lands by Color Identity");
|
||||||
|
|
||||||
private final Map<FPref, KeyboardShortcutField> shortcutFields = new HashMap<>();
|
private final Map<FPref, KeyboardShortcutField> shortcutFields = new HashMap<>();
|
||||||
|
|
||||||
@@ -171,6 +172,12 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
|||||||
pnlPrefs.add(cbRemoveArtifacts, regularConstraints);
|
pnlPrefs.add(cbRemoveArtifacts, regularConstraints);
|
||||||
pnlPrefs.add(new NoteLabel("Disables artifact cards in generated decks."), regularConstraints);
|
pnlPrefs.add(new NoteLabel("Disables artifact cards in generated decks."), regularConstraints);
|
||||||
|
|
||||||
|
// Deck building options
|
||||||
|
pnlPrefs.add(new SectionLabel("Deck Editor Options"), sectionConstraints);
|
||||||
|
|
||||||
|
pnlPrefs.add(cbFilterLandsByColorId, regularConstraints);
|
||||||
|
pnlPrefs.add(new NoteLabel("Filter lands by their color identity to make it easier to find relevant mana producing lands."), regularConstraints);
|
||||||
|
|
||||||
// Advanced
|
// Advanced
|
||||||
pnlPrefs.add(new SectionLabel("Advanced Settings"), sectionConstraints);
|
pnlPrefs.add(new SectionLabel("Advanced Settings"), sectionConstraints);
|
||||||
|
|
||||||
@@ -436,6 +443,11 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
|||||||
return cbRemoveArtifacts;
|
return cbRemoveArtifacts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @return {@link javax.swing.JCheckBox} */
|
||||||
|
public JCheckBox getCbFilterLandsByColorId() {
|
||||||
|
return cbFilterLandsByColorId;
|
||||||
|
}
|
||||||
|
|
||||||
/** @return {@link javax.swing.JCheckBox} */
|
/** @return {@link javax.swing.JCheckBox} */
|
||||||
public JCheckBox getCbEnableAICheats() {
|
public JCheckBox getCbEnableAICheats() {
|
||||||
return cbEnableAICheats;
|
return cbEnableAICheats;
|
||||||
|
|||||||
@@ -90,7 +90,12 @@ longer considered unless they can be produced by a land in the deck
|
|||||||
- Land Color Filtering in Deck Editor -
|
- Land Color Filtering in Deck Editor -
|
||||||
When filtering colors in the Deck Editor, lands that produce all selected colors will now be shown
|
When filtering colors in the Deck Editor, lands that produce all selected colors will now be shown
|
||||||
This means if you filter to show only green and white cards, lands that produce green and white will now be shown
|
This means if you filter to show only green and white cards, lands that produce green and white will now be shown
|
||||||
This should hopefully make finding multicolor lands for your decks easier
|
This should hopefully make finding multicolor lands for your decks easier.
|
||||||
|
An attempt was made to make this option behave in a more consistent and helpful way - now lands won't suddenly
|
||||||
|
disappear when one color is filtered out, basic lands of appropriate colors will be shown, lands that feature at
|
||||||
|
least one of the colors relevant for the deck will be shown. Also, the mode to filter lands in this way is now
|
||||||
|
optional and can be toggled on or off in the Preferences ("Filter Lands by Color Identity" under "Deck Editor
|
||||||
|
Options").
|
||||||
|
|
||||||
|
|
||||||
- Quest Starting Pool Configuration -
|
- Quest Starting Pool Configuration -
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import forge.interfaces.IButton;
|
|||||||
import forge.item.InventoryItem;
|
import forge.item.InventoryItem;
|
||||||
import forge.item.PaperCard;
|
import forge.item.PaperCard;
|
||||||
import forge.itemmanager.SItemManagerUtil.StatTypes;
|
import forge.itemmanager.SItemManagerUtil.StatTypes;
|
||||||
|
import forge.model.FModel;
|
||||||
|
import forge.properties.ForgePreferences;
|
||||||
import forge.util.BinaryUtil;
|
import forge.util.BinaryUtil;
|
||||||
import forge.util.PredicateString.StringOp;
|
import forge.util.PredicateString.StringOp;
|
||||||
|
|
||||||
@@ -168,7 +170,7 @@ public class SFilterUtil {
|
|||||||
boolean allColorsFilteredOut = colors == 0;
|
boolean allColorsFilteredOut = colors == 0;
|
||||||
|
|
||||||
//use color identity for lands, which allows filtering to just lands that can be played in your deck
|
//use color identity for lands, which allows filtering to just lands that can be played in your deck
|
||||||
boolean useColorIdentity = rules.getType().isLand() && !allColorsFilteredOut;
|
boolean useColorIdentity = rules.getType().isLand() && !allColorsFilteredOut && FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.UI_FILTER_LANDS_BY_COLOR_IDENTITY);
|
||||||
if (useColorIdentity) {
|
if (useColorIdentity) {
|
||||||
color = rules.getColorIdentity();
|
color = rules.getColorIdentity();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ public class ForgePreferences extends PreferencesStore<ForgePreferences.FPref> {
|
|||||||
UI_PAUSE_WHILE_MINIMIZED("false"),
|
UI_PAUSE_WHILE_MINIMIZED("false"),
|
||||||
UI_TOKENS_IN_SEPARATE_ROW("false"), // Display tokens in their own battlefield row.
|
UI_TOKENS_IN_SEPARATE_ROW("false"), // Display tokens in their own battlefield row.
|
||||||
UI_DISPLAY_CURRENT_COLORS("Never"),
|
UI_DISPLAY_CURRENT_COLORS("Never"),
|
||||||
|
UI_FILTER_LANDS_BY_COLOR_IDENTITY("true"),
|
||||||
|
|
||||||
UI_FOR_TOUCHSCREN("false"),
|
UI_FOR_TOUCHSCREN("false"),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user