mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- Foil cards will now correctly display in deck editors (with foil).
- Fixed the foil card display during the match.
This commit is contained in:
@@ -134,7 +134,7 @@ public class GameNew {
|
|||||||
// Assign card-specific foiling or random foiling on approximately 1:20 cards if enabled
|
// Assign card-specific foiling or random foiling on approximately 1:20 cards if enabled
|
||||||
CardEdition.FoilType foilType = CardEdition.FoilType.NOT_SUPPORTED;
|
CardEdition.FoilType foilType = CardEdition.FoilType.NOT_SUPPORTED;
|
||||||
if (card.getCurSetCode() != null && Singletons.getModel().getEditions().get(card.getCurSetCode()) != null) {
|
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)))) {
|
if (foilType != CardEdition.FoilType.NOT_SUPPORTED && (cp.isFoil() || (canRandomFoil && MyRandom.percentTrue(5)))) {
|
||||||
int iFoil = 0;
|
int iFoil = 0;
|
||||||
|
|||||||
@@ -25,11 +25,13 @@ import forge.Card;
|
|||||||
import forge.CardCharacteristicName;
|
import forge.CardCharacteristicName;
|
||||||
import forge.Command;
|
import forge.Command;
|
||||||
import forge.Singletons;
|
import forge.Singletons;
|
||||||
|
import forge.card.CardEdition;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.gui.match.views.VPicture;
|
import forge.gui.match.views.VPicture;
|
||||||
import forge.gui.toolbox.special.CardZoomer;
|
import forge.gui.toolbox.special.CardZoomer;
|
||||||
import forge.item.IPaperCard;
|
import forge.item.IPaperCard;
|
||||||
import forge.item.InventoryItem;
|
import forge.item.InventoryItem;
|
||||||
|
import forge.util.MyRandom;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controls the card picture panel in the match UI.
|
* Controls the card picture panel in the match UI.
|
||||||
@@ -66,7 +68,17 @@ public enum CPicture implements ICDoc {
|
|||||||
|
|
||||||
public void showCard(final InventoryItem item) {
|
public void showCard(final InventoryItem item) {
|
||||||
if (item instanceof IPaperCard) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user