mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
Fix Watchers of the Dead bug when opponent has 1 card in graveyard
This commit is contained in:
parent
bf556c1a77
commit
8057b20cbf
1 changed files with 4 additions and 6 deletions
|
@ -34,10 +34,7 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.common.ExileSourceCost;
|
import mage.abilities.costs.common.ExileSourceCost;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.cards.Card;
|
import mage.cards.*;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.cards.Cards;
|
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
@ -103,8 +100,9 @@ class WatchersOfTheDeadEffect extends OneShotEffect {
|
||||||
TargetCard target = new TargetCardInYourGraveyard(2, 2, new FilterCard());
|
TargetCard target = new TargetCardInYourGraveyard(2, 2, new FilterCard());
|
||||||
target.setNotTarget(true);
|
target.setNotTarget(true);
|
||||||
Cards cardsInGraveyard = opponent.getGraveyard();
|
Cards cardsInGraveyard = opponent.getGraveyard();
|
||||||
opponent.choose(outcome, cardsInGraveyard, target, game);
|
|
||||||
if (!cardsInGraveyard.isEmpty()) {
|
if (cardsInGraveyard.size() > 2) {
|
||||||
|
opponent.choose(outcome, cardsInGraveyard, target, game);
|
||||||
for (Card cardInGraveyard : cardsInGraveyard.getCards(game)) {
|
for (Card cardInGraveyard : cardsInGraveyard.getCards(game)) {
|
||||||
if (!target.getTargets().contains(cardInGraveyard.getId())) {
|
if (!target.getTargets().contains(cardInGraveyard.getId())) {
|
||||||
opponent.moveCardToExileWithInfo(cardInGraveyard, CardUtil.getCardExileZoneId(game, source.getId()),
|
opponent.moveCardToExileWithInfo(cardInGraveyard, CardUtil.getCardExileZoneId(game, source.getId()),
|
||||||
|
|
Loading…
Reference in a new issue