- Attempt to avoid spoiling that the face down card is a split card if it's face down and can't legally be seen by the player.

- Rotate Aftermath split cards correctly when they're in the graveyard.

git-svn-id: http://svn.slightlymagic.net/forge/trunk@35832 269b9781-a132-4a9b-9d4e-f004f1b56b58
This commit is contained in:
Agetian 2017-09-29 11:24:00 +00:00
parent 0f1c738130
commit 52df8e304c

View File

@ -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.<PlayerView>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) {