forked from External/mage
tests: allow cards to be added to exile during a card test (#11739)
This commit is contained in:
parent
9aae17d3f0
commit
0db2599fa5
4 changed files with 33 additions and 3 deletions
|
|
@ -3567,7 +3567,7 @@ public abstract class GameImpl implements Game {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void cheat(UUID ownerId, List<Card> library, List<Card> hand, List<PermanentCard> battlefield, List<Card> graveyard, List<Card> command) {
|
||||
public void cheat(UUID ownerId, List<Card> library, List<Card> hand, List<PermanentCard> battlefield, List<Card> graveyard, List<Card> command, List<Card> exiled) {
|
||||
// fake test ability for triggers and events
|
||||
Ability fakeSourceAbilityTemplate = new SimpleStaticAbility(Zone.OUTSIDE, new InfoEffect("adding testing cards"));
|
||||
fakeSourceAbilityTemplate.setControllerId(ownerId);
|
||||
|
|
@ -3579,6 +3579,7 @@ public abstract class GameImpl implements Game {
|
|||
loadCards(ownerId, battlefield);
|
||||
loadCards(ownerId, graveyard);
|
||||
loadCards(ownerId, command);
|
||||
loadCards(ownerId, exiled);
|
||||
|
||||
for (Card card : library) {
|
||||
player.getLibrary().putOnTop(card, this);
|
||||
|
|
@ -3604,6 +3605,11 @@ public abstract class GameImpl implements Game {
|
|||
throw new IllegalArgumentException("Command zone supports in commander test games");
|
||||
}
|
||||
|
||||
for (Card card : exiled) {
|
||||
card.setZone(Zone.EXILED, this);
|
||||
getExile().add(card);
|
||||
}
|
||||
|
||||
for (PermanentCard permanentCard : battlefield) {
|
||||
Ability fakeSourceAbility = fakeSourceAbilityTemplate.copy();
|
||||
fakeSourceAbility.setSourceId(permanentCard.getId());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue