diff --git a/forge-gui-mobile/src/forge/card/CardImageRenderer.java b/forge-gui-mobile/src/forge/card/CardImageRenderer.java index d83b5a57..9a758d20 100644 --- a/forge-gui-mobile/src/forge/card/CardImageRenderer.java +++ b/forge-gui-mobile/src/forge/card/CardImageRenderer.java @@ -4,6 +4,7 @@ import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment; import com.google.common.collect.ImmutableList; +import com.google.common.collect.Lists; import forge.Graphics; import forge.assets.*; import forge.card.CardDetailUtil.DetailColors; @@ -12,6 +13,7 @@ import forge.card.mana.ManaCost; import forge.game.GameView; import forge.game.card.CardView; import forge.game.card.CardView.CardStateView; +import forge.game.player.PlayerView; import forge.game.zone.ZoneType; import forge.model.FModel; import forge.properties.ForgeConstants; @@ -329,6 +331,9 @@ public class CardImageRenderer { drawDetails(g, card, gameView, altState, x, y, w, h); return; } + + boolean canLook = card.getController() != null && card.canBeShownToAny(Lists.newArrayList(card.getController())); + if (image == ImageCache.defaultImage) { //support drawing card image manually if card image not found drawCardImage(g, card, altState, x, y, w, h, CardStackPosition.Top); } @@ -342,12 +347,12 @@ public class CardImageRenderer { boolean rotatePlane = FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.UI_ROTATE_PLANE_OR_PHENOMENON); if (rotatePlane && (card.getCurrentState().isPhenomenon() || card.getCurrentState().isPlane())) g.drawRotatedImage(image, new_x, new_y, new_w, new_h, new_x + new_w / 2, new_y + new_h / 2, -90); - else if (rotateSplit && isCurrentCard && card.isSplitCard()) - g.drawRotatedImage(image, new_x, new_y, new_w, new_h, new_x + new_w / 2, new_y + new_h / 2, card.getText().contains("Aftermath") ? 90:-90); + else if (rotateSplit && isCurrentCard && card.isSplitCard() && canLook) + g.drawRotatedImage(image, new_x, new_y, new_w, new_h, new_x + new_w / 2, new_y + new_h / 2, card.getText().contains("Aftermath") || card.getAlternateState().getOracleText().contains("Aftermath") ? 90:-90); else g.drawImage(image, x, y, w, h); } - CardRenderer.drawFoilEffect(g, card, x, y, w, h, isCurrentCard); + CardRenderer.drawFoilEffect(g, card, x, y, w, h, isCurrentCard && canLook); } public static void drawDetails(Graphics g, CardView card, GameView gameView, boolean altState, float x, float y, float w, float h) {