mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
Fixed full-arts seemingly not replicating properly
* The problem was that they key for caching rendered cards did not take into account the full art / not full artness of the cards, so when someone has both full art and non-full art variants of a land from the same set it one would override the other.
This commit is contained in:
parent
f0a1938b3e
commit
a638625c77
3 changed files with 9 additions and 2 deletions
|
|
@ -66,6 +66,9 @@ public class CardPanelRenderImpl extends CardPanel {
|
|||
if (!a.getExpansionSetCode().equals(b.getExpansionSetCode())) {
|
||||
return false;
|
||||
}
|
||||
if (a.getFrameStyle() != b.getFrameStyle()) {
|
||||
return false;
|
||||
}
|
||||
if (a.getCounters() == null) {
|
||||
if (b.getCounters() != null) {
|
||||
return false;
|
||||
|
|
@ -121,6 +124,7 @@ public class CardPanelRenderImpl extends CardPanel {
|
|||
sb.append((char) (this.view.isPlayable() ? 1 : 0));
|
||||
sb.append((char) (this.view.isCanAttack() ? 1 : 0));
|
||||
sb.append((char) (this.view.isFaceDown() ? 1 : 0));
|
||||
sb.append((char) this.view.getFrameStyle().ordinal());
|
||||
if (this.view instanceof PermanentView) {
|
||||
sb.append((char) (((PermanentView) this.view).hasSummoningSickness() ? 1 : 0));
|
||||
sb.append((char) (((PermanentView) this.view).getDamage()));
|
||||
|
|
|
|||
|
|
@ -206,6 +206,7 @@ public class ModernCardRenderer extends CardRenderer {
|
|||
BOX_HEIGHT_FRAC * cardHeight);
|
||||
|
||||
// Type line at
|
||||
LOGGER.info("Draw, " + cardView.getFrameStyle() + ", " + cardView.getFrameStyle().isFullArt());
|
||||
typeLineY = (int)(getTypeLineYFrac() * cardHeight);
|
||||
|
||||
// Box text height
|
||||
|
|
@ -297,7 +298,7 @@ public class ModernCardRenderer extends CardRenderer {
|
|||
*/
|
||||
private Rectangle2D getArtRect() {
|
||||
Rectangle2D rect;
|
||||
if (cardView.getFrameStyle().isFullArt()) {
|
||||
if (cardView.getFrameStyle().isFullArt() || cardView.isToken()) {
|
||||
rect = new Rectangle2D.Float(.079f, .11f, .84f, .63f);
|
||||
} else {
|
||||
rect = new Rectangle2D.Float(.079f, .11f, .84f, .42f);
|
||||
|
|
@ -307,7 +308,7 @@ public class ModernCardRenderer extends CardRenderer {
|
|||
|
||||
private float getTypeLineYFrac() {
|
||||
if (cardView.isToken()) {
|
||||
return TYPE_LINE_Y_FRAC;
|
||||
return TYPE_LINE_Y_FRAC_TOKEN;
|
||||
} else if (cardView.getFrameStyle().isFullArt()) {
|
||||
return TYPE_LINE_Y_FRAC_FULL_ART;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue