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