diff --git a/forge-gui-mobile/src/forge/screens/planarconquest/ConquestPlaneSelector.java b/forge-gui-mobile/src/forge/screens/planarconquest/ConquestPlaneSelector.java index 2ab67264742..e319ac9e28f 100644 --- a/forge-gui-mobile/src/forge/screens/planarconquest/ConquestPlaneSelector.java +++ b/forge-gui-mobile/src/forge/screens/planarconquest/ConquestPlaneSelector.java @@ -177,9 +177,19 @@ public class ConquestPlaneSelector extends FDisplayObject { float artWidth = monitorWidth - 2 * monitorLeftOffset + 2; float artHeight = monitorHeight - monitorTopOffset - monitorBottomOffset + 2; - //scale up art to fill height of monitor while retain aspect ratio + //scale up art to fill height of monitor while retaining aspect ratio float fullArtWidth = artHeight * currentArt.getWidth() / currentArt.getHeight(); - g.startClip(x, y, artWidth, artHeight); + + float artHeightClipMod = 0f; + if (fullArtWidth < monitorWidth) { + //if the card art is too narrow, widen it to fully cover the monitor size + float scaledArtHeight = monitorWidth * (artHeight / fullArtWidth); + fullArtWidth = monitorWidth; + artHeightClipMod = scaledArtHeight - artHeight; + artHeight = scaledArtHeight; + } + + g.startClip(x, y, artWidth, artHeight - artHeightClipMod); g.drawImage(currentArt, x + (monitorWidth - fullArtWidth) / 2, y, fullArtWidth, artHeight); g.endClip(); diff --git a/forge-gui/src/main/java/forge/planarconquest/ConquestPlane.java b/forge-gui/src/main/java/forge/planarconquest/ConquestPlane.java index b4b8aaa527c..26fba5fb2f0 100644 --- a/forge-gui/src/main/java/forge/planarconquest/ConquestPlane.java +++ b/forge-gui/src/main/java/forge/planarconquest/ConquestPlane.java @@ -139,8 +139,12 @@ public class ConquestPlane { for (String name : planeCardNames) { PaperCard pc = variantCards.getCard(name); if (pc == null) { - System.out.println("\"" + name + "\" does not correspond to a valid Plane card"); - continue; + // try to get a non-variant Magic card in case a plane card with the given name does not exist + pc = FModel.getMagicDb().getCommonCards().getCard(name); + if (pc == null) { + System.out.println("\"" + name + "\" does not correspond to a valid Plane card or standard Magic card!"); + continue; + } } planeCards.add(pc); }