Tokens and command objects reworked (part 1 of 2):

- fixed that copy effect doesn't restore original image after effect's end;
 - removed outdated availableImageSetCodes (all images auto-selected from tokens database now, related to #10139);
 - refactor command objects to use CommandObjectImpl;
 - refactor planes/emblems/etc objects to use MageObjectImpl, added copyable support;
 - refactor another game objects to remove some duplicated fields;
This commit is contained in:
Oleg Agafonov 2023-05-08 02:15:07 +04:00
parent 46f6593da8
commit 5f55c7c667
45 changed files with 517 additions and 477 deletions

View file

@ -19,21 +19,10 @@ public class EmblemView implements CommandObjectView, Serializable {
protected List<String> rules;
protected PlayableObjectStats playableStats = new PlayableObjectStats();
public EmblemView(Emblem emblem, Card sourceCard) {
this.id = emblem.getId();
this.name = "Emblem " + sourceCard.getName();
if (emblem.getExpansionSetCodeForImage() == null) {
this.expansionSetCode = sourceCard.getExpansionSetCode();
} else {
this.expansionSetCode = emblem.getExpansionSetCodeForImage();
}
this.rules = emblem.getAbilities().getRules(sourceCard.getName());
}
public EmblemView(Emblem emblem) {
this.id = emblem.getId();
this.name = emblem.getName();
this.expansionSetCode = emblem.getExpansionSetCodeForImage();
this.expansionSetCode = emblem.getExpansionSetCode();
this.rules = emblem.getAbilities().getRules(emblem.getName());
}