forked from External/mage
Fix casting of Disturb cards with Auras on the back (#8600)
This commit is contained in:
parent
b473300680
commit
a94c837ad0
4 changed files with 18 additions and 6 deletions
|
|
@ -636,6 +636,15 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
|
|||
return secondSideCard;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpellAbility getSecondFaceSpellAbility() {
|
||||
Card secondFace = getSecondCardFace();
|
||||
if (secondFace == null || secondFace.getClass().equals(getClass())) {
|
||||
throw new IllegalArgumentException("Wrong code usage. getSecondFaceSpellAbility can only be used for double faced card (main side).");
|
||||
}
|
||||
return secondFace.getSpellAbility();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNightCard() {
|
||||
return this.nightCard;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue