mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Support selection of triggered abilities from cards on the stack.
This commit is contained in:
parent
9894593d4c
commit
dbd59f1b5c
1 changed files with 6 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue