forked from External/mage
Code cleanup: protect all copy constructors (#10750)
* apply regex to change public copy constructors to protected * cleanup code using now protected constructors * fix manaBuilder weird casting of Mana into ConditionalMana
This commit is contained in:
parent
b04b13d530
commit
f75b1c9f0a
1565 changed files with 2412 additions and 2731 deletions
|
|
@ -177,7 +177,7 @@ public class CardView extends SimpleCardView {
|
|||
this.defense = cardView.defense;
|
||||
this.startingDefense = cardView.startingDefense;
|
||||
this.cardTypes = new ArrayList<>(cardView.cardTypes);
|
||||
this.subTypes = new SubTypes(cardView.subTypes);
|
||||
this.subTypes = cardView.subTypes.copy();
|
||||
this.superTypes = cardView.superTypes;
|
||||
|
||||
this.expansionSetCode = cardView.expansionSetCode;
|
||||
|
|
@ -484,7 +484,7 @@ public class CardView extends SimpleCardView {
|
|||
this.power = Integer.toString(card.getPower().getValue());
|
||||
this.toughness = Integer.toString(card.getToughness().getValue());
|
||||
this.cardTypes = new ArrayList<>(card.getCardType(game));
|
||||
this.subTypes = new SubTypes(card.getSubtype(game));
|
||||
this.subTypes = card.getSubtype(game).copy();
|
||||
this.superTypes = card.getSuperType(game);
|
||||
this.color = card.getColor(game).copy();
|
||||
this.flipCard = card.isFlipCard();
|
||||
|
|
@ -631,7 +631,7 @@ public class CardView extends SimpleCardView {
|
|||
this.defense = "";
|
||||
}
|
||||
this.cardTypes = new ArrayList<>(object.getCardType(game));
|
||||
this.subTypes = new SubTypes(object.getSubtype(game));
|
||||
this.subTypes = object.getSubtype(game).copy();
|
||||
this.superTypes = new ArrayList<>(object.getSuperType(game));
|
||||
this.color = object.getColor(game).copy();
|
||||
this.manaCostLeftStr = String.join("", object.getManaCostSymbols());
|
||||
|
|
@ -848,7 +848,7 @@ public class CardView extends SimpleCardView {
|
|||
this.defense = "";
|
||||
this.startingDefense = "";
|
||||
this.cardTypes = new ArrayList<>(token.getCardType(game));
|
||||
this.subTypes = new SubTypes(token.getSubtype(game));
|
||||
this.subTypes = token.getSubtype(game).copy();
|
||||
this.superTypes = new ArrayList<>(token.getSuperType(game));
|
||||
this.color = token.getColor(game).copy();
|
||||
this.frameColor = token.getFrameColor(game).copy();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue