diff --git a/forge-gui/src/main/java/forge/game/Match.java b/forge-gui/src/main/java/forge/game/Match.java index 30901d91349..e504e85aeb7 100644 --- a/forge-gui/src/main/java/forge/game/Match.java +++ b/forge-gui/src/main/java/forge/game/Match.java @@ -99,13 +99,12 @@ public class Match { */ public void startGame(final Game game, final CountDownLatch latch) { final boolean canRandomFoil = Singletons.getModel().getPreferences().getPrefBoolean(FPref.UI_RANDOM_FOIL) && gameType == GameType.Constructed; - final boolean useRandomArt = Singletons.getModel().getPreferences().getPrefBoolean(FPref.UI_RANDOM_CARD_ART); // This code could be run run from EDT. game.getAction().invoke(new Runnable() { @Override public void run() { - prepareAllZones(game, canRandomFoil, useRandomArt); + prepareAllZones(game, canRandomFoil); if (useAnte) { // Deciding which cards go to ante Multimap list = game.chooseCardsForAnte(); @@ -237,22 +236,18 @@ public class Match { return myRemovedAnteCards; } - private static void preparePlayerLibrary(Player player, final ZoneType zoneType, CardPool section, boolean canRandomFoil, boolean useRandomArt, Random generator) { + private static void preparePlayerLibrary(Player player, final ZoneType zoneType, CardPool section, boolean canRandomFoil, Random generator) { PlayerZone library = player.getZone(zoneType); List newLibrary = new ArrayList(); for (final Entry stackOfCards : section) { final PaperCard cp = stackOfCards.getKey(); for (int i = 0; i < stackOfCards.getValue(); i++) { - // apply random pictures for cards - // TODO: potentially suboptimal implementation. Do NOT randomly remove this code! If you know how to implement - // it better, feel free to do so. Until then, unfortunately, this is the best implementation thus far. - PaperCard cpi = null; - if (useRandomArt) { - cpi = Singletons.getMagicDb().getCommonCards().getCard(cp.getName(), cp.getEdition(), -1); - if ( cp.isFoil() ) - cpi = Singletons.getMagicDb().getCommonCards().getFoiled(cpi); - } + // apply random art for cards with multiple pictures (basic lands, etc.) - currently always enabled + // TODO: implement true distinction between cards with different art (in deck editor, match, etc.) + PaperCard cpi = Singletons.getMagicDb().getCommonCards().getCard(cp.getName(), cp.getEdition(), -1); + if ( cp.isFoil() ) + cpi = Singletons.getMagicDb().getCommonCards().getFoiled(cpi); final Card card = cpi == null ? Card.fromPaperCard(cp, player) : Card.fromPaperCard(cpi, player); @@ -267,7 +262,7 @@ public class Match { library.setCards(newLibrary); } - private void prepareAllZones(final Game game, final boolean canRandomFoil, final boolean useRandomArt) { + private void prepareAllZones(final Game game, final boolean canRandomFoil) { // need this code here, otherwise observables fail Trigger.resetIDs(); game.getTriggerHandler().clearDelayedTrigger(); @@ -318,9 +313,9 @@ public class Match { Random generator = MyRandom.getRandom(); - preparePlayerLibrary(player, ZoneType.Library, myDeck.getMain(), canRandomFoil, useRandomArt, generator); + preparePlayerLibrary(player, ZoneType.Library, myDeck.getMain(), canRandomFoil, generator); if (myDeck.has(DeckSection.Sideboard)) { - preparePlayerLibrary(player, ZoneType.Sideboard, myDeck.get(DeckSection.Sideboard), canRandomFoil, useRandomArt, generator); + preparePlayerLibrary(player, ZoneType.Sideboard, myDeck.get(DeckSection.Sideboard), canRandomFoil, generator); } player.shuffle(null); diff --git a/forge-gui/src/main/java/forge/gui/home/settings/CSubmenuPreferences.java b/forge-gui/src/main/java/forge/gui/home/settings/CSubmenuPreferences.java index 546d3348f2b..00f1e2bf95c 100644 --- a/forge-gui/src/main/java/forge/gui/home/settings/CSubmenuPreferences.java +++ b/forge-gui/src/main/java/forge/gui/home/settings/CSubmenuPreferences.java @@ -75,7 +75,6 @@ public enum CSubmenuPreferences implements ICDoc { lstControls.add(Pair.of(view.getCbUploadDraft(), FPref.UI_UPLOAD_DRAFT)); lstControls.add(Pair.of(view.getCbEnableAICheats(), FPref.UI_ENABLE_AI_CHEATS)); lstControls.add(Pair.of(view.getCbRandomFoil(), FPref.UI_RANDOM_FOIL)); - lstControls.add(Pair.of(view.getCbRandomizeArt(), FPref.UI_RANDOM_CARD_ART)); lstControls.add(Pair.of(view.getCbEnableSounds(), FPref.UI_ENABLE_SOUNDS)); lstControls.add(Pair.of(view.getCbAltSoundSystem(), FPref.UI_ALT_SOUND_SYSTEM)); lstControls.add(Pair.of(view.getCbUiForTouchScreen(), FPref.UI_FOR_TOUCHSCREN)); diff --git a/forge-gui/src/main/java/forge/gui/home/settings/VSubmenuPreferences.java b/forge-gui/src/main/java/forge/gui/home/settings/VSubmenuPreferences.java index 5b2cdb66ab7..f129003f520 100644 --- a/forge-gui/src/main/java/forge/gui/home/settings/VSubmenuPreferences.java +++ b/forge-gui/src/main/java/forge/gui/home/settings/VSubmenuPreferences.java @@ -77,7 +77,6 @@ public enum VSubmenuPreferences implements IVSubmenu { private final JCheckBox cbCloneImgSource = new OptionsCheckBox("Clones use original card art"); private final JCheckBox cbScaleLarger = new OptionsCheckBox("Scale Image Larger"); private final JCheckBox cbRandomFoil = new OptionsCheckBox("Random Foil"); - private final JCheckBox cbRandomizeArt = new OptionsCheckBox("Randomize Card Art"); private final JCheckBox cbEnableSounds = new OptionsCheckBox("Enable Sounds"); private final JCheckBox cbAltSoundSystem = new OptionsCheckBox("Use Alternate Sound System"); private final JCheckBox cbUiForTouchScreen = new OptionsCheckBox("Enchance UI for touchscreens"); @@ -188,9 +187,6 @@ public enum VSubmenuPreferences implements IVSubmenu { pnlPrefs.add(cbRandomFoil, regularConstraints); pnlPrefs.add(new NoteLabel("Adds foiled effects to random cards."), regularConstraints); - pnlPrefs.add(cbRandomizeArt, regularConstraints); - pnlPrefs.add(new NoteLabel("Randomize the card art for cards in the human's deck."), regularConstraints); - pnlPrefs.add(cbScaleLarger, regularConstraints); pnlPrefs.add(new NoteLabel("Allows card pictures to be expanded larger than their original size."), regularConstraints); @@ -430,11 +426,6 @@ public enum VSubmenuPreferences implements IVSubmenu { return cbRandomFoil; } - /** @return {@link javax.swing.JCheckBox} */ - public JCheckBox getCbRandomizeArt() { - return cbRandomizeArt; - } - /** @return {@link javax.swing.JCheckBox} */ public JCheckBox getCbAnte() { return cbAnte; diff --git a/forge-gui/src/main/java/forge/properties/ForgePreferences.java b/forge-gui/src/main/java/forge/properties/ForgePreferences.java index a269ce8dd07..a3d4f9420b1 100644 --- a/forge-gui/src/main/java/forge/properties/ForgePreferences.java +++ b/forge-gui/src/main/java/forge/properties/ForgePreferences.java @@ -69,7 +69,6 @@ public class ForgePreferences extends PreferencesStore { UI_TARGETING_OVERLAY ("false"), UI_ENABLE_SOUNDS ("true"), UI_ALT_SOUND_SYSTEM ("false"), - UI_RANDOM_CARD_ART ("false"), UI_CURRENT_AI_PROFILE (AiProfileUtil.AI_PROFILE_RANDOM_MATCH), UI_CLONE_MODE_SOURCE ("false"), /** */ UI_MATCH_IMAGE_VISIBLE ("true"),