mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
merge fix
This commit is contained in:
parent
62eb116124
commit
eec4f0ac7e
3 changed files with 11 additions and 16 deletions
|
|
@ -26,6 +26,7 @@ public abstract class CardWithSpellOption extends CardImpl {
|
||||||
|
|
||||||
public CardWithSpellOption(CardWithSpellOption card) {
|
public CardWithSpellOption(CardWithSpellOption card) {
|
||||||
super(card);
|
super(card);
|
||||||
|
// make sure all parts created and parent ref added
|
||||||
this.spellCard = card.getSpellCard().copy();
|
this.spellCard = card.getSpellCard().copy();
|
||||||
this.spellCard.setParentCard(this);
|
this.spellCard.setParentCard(this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,14 +62,11 @@ public abstract class ModalDoubleFacedCard extends CardImpl implements CardWithH
|
||||||
|
|
||||||
public ModalDoubleFacedCard(ModalDoubleFacedCard card) {
|
public ModalDoubleFacedCard(ModalDoubleFacedCard card) {
|
||||||
super(card);
|
super(card);
|
||||||
if (card.leftHalfCard != null) {
|
// make sure all parts created and parent ref added
|
||||||
this.leftHalfCard = card.leftHalfCard.copy();
|
this.leftHalfCard = card.getLeftHalfCard().copy();
|
||||||
((ModalDoubleFacedCardHalf) this.leftHalfCard).setParentCard(this);
|
((ModalDoubleFacedCardHalf) leftHalfCard).setParentCard(this);
|
||||||
}
|
this.rightHalfCard = card.rightHalfCard.copy();
|
||||||
if (card.rightHalfCard != null) {
|
((ModalDoubleFacedCardHalf) rightHalfCard).setParentCard(this);
|
||||||
this.rightHalfCard = card.rightHalfCard.copy();
|
|
||||||
((ModalDoubleFacedCardHalf) this.rightHalfCard).setParentCard(this);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ModalDoubleFacedCardHalf getLeftHalfCard() {
|
public ModalDoubleFacedCardHalf getLeftHalfCard() {
|
||||||
|
|
|
||||||
|
|
@ -38,14 +38,11 @@ public abstract class SplitCard extends CardImpl implements CardWithHalves {
|
||||||
|
|
||||||
protected SplitCard(SplitCard card) {
|
protected SplitCard(SplitCard card) {
|
||||||
super(card);
|
super(card);
|
||||||
if (card.leftHalfCard != null) {
|
// make sure all parts created and parent ref added
|
||||||
this.leftHalfCard = card.leftHalfCard.copy();
|
this.leftHalfCard = card.getLeftHalfCard().copy();
|
||||||
((SplitCardHalf) this.leftHalfCard).setParentCard(this);
|
((SplitCardHalf) leftHalfCard).setParentCard(this);
|
||||||
}
|
this.rightHalfCard = card.rightHalfCard.copy();
|
||||||
if (card.rightHalfCard != null) {
|
((SplitCardHalf) rightHalfCard).setParentCard(this);
|
||||||
this.rightHalfCard = card.rightHalfCard.copy();
|
|
||||||
((SplitCardHalf) this.rightHalfCard).setParentCard(this);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setParts(SplitCardHalf leftHalfCard, SplitCardHalf rightHalfCard) {
|
public void setParts(SplitCardHalf leftHalfCard, SplitCardHalf rightHalfCard) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue