added isRepresentedByACard method to MagicCardOnStack, use this instead of getting card from card on stack in MagicCipherAction
parent
46dbb37738
commit
9d67e3f149
|
@ -18,7 +18,7 @@ public class MagicCipherAction extends MagicAction {
|
|||
|
||||
@Override
|
||||
public void doAction(final MagicGame game) {
|
||||
if (cardOnStack.getCard().isToken() == false) {
|
||||
if (cardOnStack.isRepresentedByACard()) {
|
||||
// prevent auto move to graveyard
|
||||
game.doAction(new MagicChangeCardDestinationAction(cardOnStack, MagicLocationType.Play));
|
||||
game.addEvent(new MagicCipherEvent(cardOnStack, controller));
|
||||
|
|
|
@ -101,6 +101,10 @@ public class MagicCardOnStack extends MagicItemOnStack implements MagicSource {
|
|||
return true;
|
||||
}
|
||||
|
||||
public boolean isRepresentedByACard() {
|
||||
return getCard().isToken() == false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeCountered() {
|
||||
return !getCardDefinition().hasAbility(MagicAbility.CannotBeCountered);
|
||||
|
|
Loading…
Reference in New Issue