mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
Add image number support for command objects (#10774)
This commit is contained in:
parent
08bf721790
commit
d9a23d505a
5 changed files with 24 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -14,5 +14,7 @@ public interface CommandObjectView extends SelectableObjectView {
|
|||
|
||||
UUID getId();
|
||||
|
||||
int getImageNumber();
|
||||
|
||||
List<String> getRules();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue