mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +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 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();
|
||||||
|
|
Loading…
Reference in a new issue