forked from External/mage
images: fixed miss token image in some use cases (if it was created from a card and a set contains multiple images);
This commit is contained in:
parent
8e2ff2db0f
commit
0e39d6a833
18 changed files with 82 additions and 57 deletions
|
|
@ -14,6 +14,7 @@ public abstract class CommandObjectImpl implements CommandObject {
|
|||
private String name = "";
|
||||
|
||||
private String expansionSetCode = "";
|
||||
private boolean usesVariousArt = false;
|
||||
private String cardNumber = "";
|
||||
private String imageFileName = "";
|
||||
private int imageNumber;
|
||||
|
|
@ -27,6 +28,7 @@ public abstract class CommandObjectImpl implements CommandObject {
|
|||
this.id = object.id;
|
||||
this.name = object.name;
|
||||
this.expansionSetCode = object.expansionSetCode;
|
||||
this.usesVariousArt = object.usesVariousArt;
|
||||
this.cardNumber = object.cardNumber;
|
||||
this.imageFileName = object.imageFileName;
|
||||
this.imageNumber = object.imageNumber;
|
||||
|
|
@ -47,6 +49,16 @@ public abstract class CommandObjectImpl implements CommandObject {
|
|||
this.expansionSetCode = expansionSetCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getUsesVariousArt() {
|
||||
return usesVariousArt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUsesVariousArt(boolean usesVariousArt) {
|
||||
this.usesVariousArt = usesVariousArt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCardNumber() {
|
||||
return cardNumber;
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ public abstract class Emblem extends CommandObjectImpl {
|
|||
);
|
||||
if (foundInfo != null) {
|
||||
this.setExpansionSetCode(foundInfo.getSetCode());
|
||||
this.setUsesVariousArt(false);
|
||||
this.setCardNumber("");
|
||||
this.setImageFileName(""); // use default
|
||||
this.setImageNumber(foundInfo.getImageNumber());
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ public abstract class Plane extends CommandObjectImpl {
|
|||
TokenInfo foundInfo = TokenRepository.instance.findPreferredTokenInfoForClass(this.getClass().getName(), null);
|
||||
if (foundInfo != null) {
|
||||
this.setExpansionSetCode(foundInfo.getSetCode());
|
||||
this.setUsesVariousArt(false);
|
||||
this.setCardNumber("");
|
||||
this.setImageFileName(""); // use default
|
||||
this.setImageNumber(foundInfo.getImageNumber());
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@ import java.util.stream.Collectors;
|
|||
* mana burn with Yurlok of Scorch Thrash, and anything else players might think of.
|
||||
*/
|
||||
public final class EmblemOfCard extends Emblem {
|
||||
|
||||
private final boolean usesVariousArt;
|
||||
|
||||
public static Card lookupCard(
|
||||
String cardName,
|
||||
|
|
@ -76,20 +74,20 @@ public final class EmblemOfCard extends Emblem {
|
|||
this.getAbilities().setSourceId(this.getId());
|
||||
|
||||
this.setExpansionSetCode(card.getExpansionSetCode());
|
||||
this.setUsesVariousArt(card.getUsesVariousArt());
|
||||
this.setCardNumber(card.getCardNumber());
|
||||
this.setImageFileName(card.getImageFileName());
|
||||
this.setImageNumber(card.getImageNumber());
|
||||
this.usesVariousArt = card.getUsesVariousArt();
|
||||
}
|
||||
|
||||
public EmblemOfCard(Card card) {
|
||||
this(card, Zone.BATTLEFIELD);
|
||||
}
|
||||
|
||||
private EmblemOfCard(EmblemOfCard eoc) {
|
||||
private EmblemOfCard(final EmblemOfCard eoc) {
|
||||
super(eoc);
|
||||
this.usesVariousArt = eoc.usesVariousArt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EmblemOfCard copy() {
|
||||
return new EmblemOfCard(this);
|
||||
|
|
@ -101,9 +99,5 @@ public final class EmblemOfCard extends Emblem {
|
|||
// super method would try and fail to find the emblem image here
|
||||
// (not sure why that would be setSoureObject's job; we get our image during construction)
|
||||
}
|
||||
|
||||
public boolean getUsesVariousArt() {
|
||||
return usesVariousArt;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ public class RadiationEmblem extends Emblem {
|
|||
TokenInfo foundInfo = TokenRepository.instance.findPreferredTokenInfoForXmage(TokenRepository.XMAGE_IMAGE_NAME_RADIATION, null);
|
||||
if (foundInfo != null) {
|
||||
this.setExpansionSetCode(foundInfo.getSetCode());
|
||||
this.setUsesVariousArt(false);
|
||||
this.setCardNumber("");
|
||||
this.setImageFileName(""); // use default
|
||||
this.setImageNumber(foundInfo.getImageNumber());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue