diff --git a/src/main/java/forge/game/GameNew.java b/src/main/java/forge/game/GameNew.java index 1e29fcb194f..13da8e84518 100644 --- a/src/main/java/forge/game/GameNew.java +++ b/src/main/java/forge/game/GameNew.java @@ -134,7 +134,7 @@ public class GameNew { // Assign card-specific foiling or random foiling on approximately 1:20 cards if enabled CardEdition.FoilType foilType = CardEdition.FoilType.NOT_SUPPORTED; if (card.getCurSetCode() != null && Singletons.getModel().getEditions().get(card.getCurSetCode()) != null) { - Singletons.getModel().getEditions().get(card.getCurSetCode()).getFoilType(); + foilType = Singletons.getModel().getEditions().get(card.getCurSetCode()).getFoilType(); } if (foilType != CardEdition.FoilType.NOT_SUPPORTED && (cp.isFoil() || (canRandomFoil && MyRandom.percentTrue(5)))) { int iFoil = 0; diff --git a/src/main/java/forge/gui/match/controllers/CPicture.java b/src/main/java/forge/gui/match/controllers/CPicture.java index 10babdda2f4..f96cb5682b4 100644 --- a/src/main/java/forge/gui/match/controllers/CPicture.java +++ b/src/main/java/forge/gui/match/controllers/CPicture.java @@ -25,11 +25,13 @@ import forge.Card; import forge.CardCharacteristicName; import forge.Command; import forge.Singletons; +import forge.card.CardEdition; import forge.gui.framework.ICDoc; import forge.gui.match.views.VPicture; import forge.gui.toolbox.special.CardZoomer; import forge.item.IPaperCard; import forge.item.InventoryItem; +import forge.util.MyRandom; /** * Controls the card picture panel in the match UI. @@ -66,7 +68,17 @@ public enum CPicture implements ICDoc { public void showCard(final InventoryItem item) { if (item instanceof IPaperCard) { - showCard(((IPaperCard)item).getMatchingForgeCard(), false); + Card c = ((IPaperCard)item).getMatchingForgeCard(); + if (((IPaperCard)item).isFoil() && c.getFoil() == 0) { + CardEdition.FoilType foilType = CardEdition.FoilType.NOT_SUPPORTED; + if (c.getCurSetCode() != null && Singletons.getModel().getEditions().get(c.getCurSetCode()) != null) { + foilType = Singletons.getModel().getEditions().get(c.getCurSetCode()).getFoilType(); + } + if (foilType != CardEdition.FoilType.NOT_SUPPORTED) { + c.setFoil(foilType == CardEdition.FoilType.MODERN ? MyRandom.getRandom().nextInt(9) + 1 : MyRandom.getRandom().nextInt(9) + 11); + } + } + showCard(c, false); return; }