Add image number support for command objects (#10774)

This commit is contained in:
PurpleCrowbar 2023-08-10 00:47:32 +01:00 committed by GitHub
parent 08bf721790
commit d9a23d505a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 1 deletions

View file

@ -706,7 +706,7 @@ public class CardView extends SimpleCardView {
this.frameStyle = FrameStyle.M15_NORMAL;
this.expansionSetCode = emblem.getExpansionSetCode();
this.cardNumber = "";
this.imageNumber = 0;
this.imageNumber = emblem.getImageNumber();
this.rarity = Rarity.COMMON;
this.playableStats = emblem.playableStats.copy();

View file

@ -14,5 +14,7 @@ public interface CommandObjectView extends SelectableObjectView {
UUID getId();
int getImageNumber();
List<String> getRules();
}

View file

@ -14,6 +14,7 @@ public class DungeonView implements CommandObjectView, Serializable {
protected UUID id;
protected String name;
protected int imageNum;
protected String expansionSetCode;
protected List<String> rules;
protected PlayableObjectStats playableStats = new PlayableObjectStats();
@ -21,6 +22,7 @@ public class DungeonView implements CommandObjectView, Serializable {
public DungeonView(Dungeon dungeon) {
this.id = dungeon.getId();
this.name = dungeon.getName();
this.imageNum = dungeon.getImageNumber();
this.expansionSetCode = dungeon.getExpansionSetCode();
this.rules = dungeon.getRules();
}
@ -40,6 +42,11 @@ public class DungeonView implements CommandObjectView, Serializable {
return id;
}
@Override
public int getImageNumber() {
return imageNum;
}
@Override
public List<String> getRules() {
return rules;

View file

@ -15,6 +15,7 @@ public class EmblemView implements CommandObjectView, Serializable {
protected UUID id;
protected String name;
protected int imageNum;
protected String expansionSetCode;
protected List<String> rules;
protected PlayableObjectStats playableStats = new PlayableObjectStats();
@ -22,6 +23,7 @@ public class EmblemView implements CommandObjectView, Serializable {
public EmblemView(Emblem emblem) {
this.id = emblem.getId();
this.name = emblem.getName();
this.imageNum = emblem.getImageNumber();
this.expansionSetCode = emblem.getExpansionSetCode();
this.rules = emblem.getAbilities().getRules(emblem.getName());
}
@ -41,6 +43,11 @@ public class EmblemView implements CommandObjectView, Serializable {
return id;
}
@Override
public int getImageNumber() {
return imageNum;
}
@Override
public List<String> getRules() {
return rules;

View file

@ -15,6 +15,7 @@ public class PlaneView implements CommandObjectView, Serializable {
protected UUID id;
protected String name;
protected int imageNum;
protected String expansionSetCode;
protected List<String> rules;
protected PlayableObjectStats playableStats = new PlayableObjectStats();
@ -22,6 +23,7 @@ public class PlaneView implements CommandObjectView, Serializable {
public PlaneView(Plane plane) {
this.id = plane.getId();
this.name = plane.getName();
this.imageNum = plane.getImageNumber();
this.expansionSetCode = plane.getExpansionSetCode();
this.rules = plane.getAbilities().getRules(plane.getName());
}
@ -41,6 +43,11 @@ public class PlaneView implements CommandObjectView, Serializable {
return id;
}
@Override
public int getImageNumber() {
return imageNum;
}
@Override
public List<String> getRules() {
return rules;