mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
- Making transform cards work as plane/region art in Planar Conquest (mobile Forge).
- Currently will show the cards untransformed on the plane selection screen and transformed on the multiverse/region screen.
This commit is contained in:
@@ -113,6 +113,11 @@ public class GuiDesktop implements IGuiBase {
|
||||
return null; //TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public ISkinImage getCardArt(final PaperCard card, final boolean backFace) {
|
||||
return null; //TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public ISkinImage createLayeredImage(final FSkinProp background, final String overlayFilename, final float opacity) {
|
||||
final BufferedImage image = new BufferedImage(background.getWidth(), background.getHeight(), BufferedImage.TYPE_INT_ARGB);
|
||||
|
||||
@@ -122,6 +122,11 @@ public class GuiMobile implements IGuiBase {
|
||||
return CardRenderer.getCardArt(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ISkinImage getCardArt(final PaperCard card, final boolean backFace) {
|
||||
return CardRenderer.getCardArt(card, backFace);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ISkinImage createLayeredImage(final FSkinProp background, final String overlayFilename, final float opacity) {
|
||||
return new FBufferedImage(background.getWidth(), background.getHeight(), opacity) {
|
||||
|
||||
@@ -107,8 +107,12 @@ public class CardRenderer {
|
||||
|
||||
//extract card art from the given card
|
||||
public static FImageComplex getCardArt(IPaperCard pc) {
|
||||
return getCardArt(pc, false);
|
||||
}
|
||||
|
||||
public static FImageComplex getCardArt(IPaperCard pc, boolean backFace) {
|
||||
CardType type = pc.getRules().getType();
|
||||
return getCardArt(pc.getImageKey(false), pc.getRules().getSplitType() == CardSplitType.Split, type.isPlane() || type.isPhenomenon(),pc.getRules().getOracleText().contains("Aftermath"));
|
||||
return getCardArt(pc.getImageKey(backFace), pc.getRules().getSplitType() == CardSplitType.Split, type.isPlane() || type.isPhenomenon(),pc.getRules().getOracleText().contains("Aftermath"));
|
||||
}
|
||||
|
||||
public static FImageComplex getCardArt(CardView card) {
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Alara|RegionSize:9|Desc:As the boundaries between the shards dissolve, cult
|
||||
Name:Amonkhet|RegionSize:9|Desc:On the surface, Amonkhet seems like a marvelous place to live, but something unsettling and nefarious lurks behind the grand facade.\nConsists of 45 events. Contains cards from AKH, HOU, some C17, and Amonkhet Invocations.
|
||||
Name:Dominaria|RegionSize:9|Unreachable:True|Desc:
|
||||
Name:Innistrad|RegionSize:9|Desc:On this plane, humanity is terrorized by vampires, werewolves, zombies, and ghouls.\nConsists of 45 events. Contains cards from ISD, DKA, AVR, SOI, EMN, and C14.
|
||||
Name:Ixalan|RegionSize:9|Unreachable:True|Desc:
|
||||
Name:Ixalan|RegionSize:9|Desc:
|
||||
Name:Kaladesh|RegionSize:9|Desc:Kaladesh is a living work of art. Aether is inextricably woven into the world's culture of inspired invention.\nConsists of 45 events. Contains cards from KLD, AER, some C17, and Kaladesh Inventions.
|
||||
Name:Kamigawa|RegionSize:6|Unreachable:True|Desc:For hundreds of years, Kamigawa's denizens peacefully worshipped the spirits of their world. Then suddenly their gods attacked, forcing the world into brutal war.\nContains cards from CHK, BOK, and SOK.
|
||||
Name:Lorwyn-Shadowmoor|RegionSize:9|Desc:A sunny utopia with a thriving storybook community, or a battle-wrought land cursed to perpetual gloom.\nConsists of 72 events. Contains cards from LRW, MOR, SHM, EVE, CNS/CN2, and C14.
|
||||
|
||||
@@ -29,6 +29,7 @@ public interface IGuiBase {
|
||||
ISkinImage getSkinIcon(FSkinProp skinProp);
|
||||
ISkinImage getUnskinnedIcon(String path);
|
||||
ISkinImage getCardArt(PaperCard card);
|
||||
ISkinImage getCardArt(PaperCard card, boolean backFace);
|
||||
ISkinImage createLayeredImage(FSkinProp background, String overlayFilename, float opacity);
|
||||
void showBugReportDialog(String title, String text, boolean showExitAppBtn);
|
||||
void showImageDialog(ISkinImage image, String message, String title);
|
||||
|
||||
@@ -13,6 +13,7 @@ import forge.assets.ISkinImage;
|
||||
import forge.card.CardRulesPredicates;
|
||||
import forge.card.ColorSet;
|
||||
import forge.deck.generation.DeckGenPool;
|
||||
import forge.game.card.Card;
|
||||
import forge.item.PaperCard;
|
||||
import forge.model.FModel;
|
||||
import forge.util.collect.FCollection;
|
||||
@@ -46,7 +47,17 @@ public class ConquestRegion {
|
||||
|
||||
public ISkinImage getArt() {
|
||||
if (art == null) {
|
||||
art = GuiBase.getInterface().getCardArt(cardPool.getCard(artCardName));
|
||||
PaperCard pc = cardPool.getCard(artCardName);
|
||||
boolean transformed = false;
|
||||
|
||||
if (pc == null) {
|
||||
pc = FModel.getMagicDb().getCommonCards().getCard(artCardName);
|
||||
if (!pc.getName().equals(artCardName) && Card.fromPaperCard(pc, null).hasAlternateState()) {
|
||||
return GuiBase.getInterface().getCardArt(pc, true);
|
||||
}
|
||||
}
|
||||
|
||||
art = GuiBase.getInterface().getCardArt(pc);
|
||||
}
|
||||
return art;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user