Support selection of triggered abilities from cards on the stack.

This commit is contained in:
LevelX2 2013-06-03 21:46:56 +02:00
parent 9894593d4c
commit dbd59f1b5c

View file

@ -39,6 +39,7 @@ import mage.game.permanent.Permanent;
import mage.target.targetpointer.TargetPointer;
import java.util.*;
import static mage.Constants.Zone.STACK;
/**
*
@ -65,8 +66,12 @@ public class CardsView extends LinkedHashMap<UUID, CardView> {
break;
case BATTLEFIELD:
sourceCard = game.getPermanent(ability.getSourceId());
if (sourceCard == null)
if (sourceCard == null) {
sourceCard = (Permanent)game.getLastKnownInformation(ability.getSourceId(), Zone.BATTLEFIELD);
}
break;
case STACK:
sourceCard = game.getCard(ability.getSourceId());
break;
case COMMAND:
ability.newId();