diff --git a/Mage/src/main/java/mage/cards/mock/MockSplitCard.java b/Mage/src/main/java/mage/cards/mock/MockSplitCard.java index 73a4e89553..ff7a83dd9d 100644 --- a/Mage/src/main/java/mage/cards/mock/MockSplitCard.java +++ b/Mage/src/main/java/mage/cards/mock/MockSplitCard.java @@ -5,6 +5,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.cards.CardSetInfo; import mage.cards.SplitCard; +import mage.cards.SplitCardHalf; import mage.cards.repository.CardInfo; import mage.cards.repository.CardRepository; import mage.constants.CardType; @@ -52,11 +53,13 @@ public class MockSplitCard extends SplitCard { CardInfo leftHalf = CardRepository.instance.findCard(getLeftHalfName(card)); if (leftHalf != null) { this.leftHalfCard = new MockSplitCardHalf(leftHalf); + ((SplitCardHalf)this.leftHalfCard).setParentCard(this); } CardInfo rightHalf = CardRepository.instance.findCard(getRightHalfName(card)); if (rightHalf != null) { this.rightHalfCard = new MockSplitCardHalf(rightHalf); + ((SplitCardHalf)this.rightHalfCard).setParentCard(this); } } diff --git a/Mage/src/main/java/mage/cards/mock/MockSplitCardHalf.java b/Mage/src/main/java/mage/cards/mock/MockSplitCardHalf.java index 633b630bdb..13040a0127 100644 --- a/Mage/src/main/java/mage/cards/mock/MockSplitCardHalf.java +++ b/Mage/src/main/java/mage/cards/mock/MockSplitCardHalf.java @@ -37,6 +37,8 @@ import mage.cards.repository.CardInfo; */ public class MockSplitCardHalf extends MockCard implements SplitCardHalf { + SplitCard splitCardParent; + public MockSplitCardHalf(CardInfo card) { super(card); } @@ -52,12 +54,12 @@ public class MockSplitCardHalf extends MockCard implements SplitCardHalf { @Override public void setParentCard(SplitCard card) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + this.splitCardParent = card; } @Override public SplitCard getParentCard() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + return splitCardParent; } }