- Fix related to #5686

This commit is contained in:
Jeff 2019-04-08 10:48:08 -05:00
parent bd6bb7b796
commit 8cd4497c2e
2 changed files with 18 additions and 16 deletions

View file

@ -1,4 +1,3 @@
package mage.cards.d;
import java.util.HashSet;
@ -31,9 +30,9 @@ import mage.target.common.TargetOpponent;
* @author LevelX2
*/
public final class DawnbreakReclaimer extends CardImpl {
public DawnbreakReclaimer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}");
this.subtype.add(SubType.ANGEL);
this.power = new MageInt(5);
this.toughness = new MageInt(5);
@ -44,11 +43,11 @@ public final class DawnbreakReclaimer extends CardImpl {
// You may return those cards to the battlefield under their owners' control.
this.addAbility(new BeginningOfEndStepTriggeredAbility(new DawnbreakReclaimerEffect(), TargetController.YOU, false));
}
public DawnbreakReclaimer(final DawnbreakReclaimer card) {
super(card);
}
@Override
public DawnbreakReclaimer copy() {
return new DawnbreakReclaimer(this);
@ -56,29 +55,28 @@ public final class DawnbreakReclaimer extends CardImpl {
}
class DawnbreakReclaimerEffect extends OneShotEffect {
public DawnbreakReclaimerEffect() {
super(Outcome.Detriment);
this.staticText = "choose a creature card in an opponent's graveyard, then that player chooses a creature card in your graveyard. You may return those cards to the battlefield under their owners' control";
}
public DawnbreakReclaimerEffect(final DawnbreakReclaimerEffect effect) {
super(effect);
}
@Override
public DawnbreakReclaimerEffect copy() {
return new DawnbreakReclaimerEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
/**
* 04.11.2015 If any opponent has a creature card in their
* graveyard as Dawnbreak Reclaimer's ability resolves, then you must
* choose one of those cards. You can't choose a different opponent with
* no creature cards in their graveyard to avoid returning one of
* those cards.
* 04.11.2015 If any opponent has a creature card in their graveyard as
* Dawnbreak Reclaimer's ability resolves, then you must choose one of
* those cards. You can't choose a different opponent with no creature
* cards in their graveyard to avoid returning one of those cards.
*
* 04.11.2015 If there are no creature cards in any opponent's graveyard
* as Dawnbreak Reclaimer's ability resolves, you'll still have the
@ -92,6 +90,7 @@ class DawnbreakReclaimerEffect extends OneShotEffect {
TargetCardInOpponentsGraveyard targetOpponentGraveyard = new TargetCardInOpponentsGraveyard(new FilterCreatureCard("a creature card in an opponent's graveyard"));
Player opponent = null;
Card cardOpponentGraveyard = null;
targetOpponentGraveyard.setNotTarget(true);
if (targetOpponentGraveyard.canChoose(source.getSourceId(), source.getControllerId(), game)) {
controller.choose(Outcome.Detriment, targetOpponentGraveyard, source.getSourceId(), game);
cardOpponentGraveyard = game.getCard(targetOpponentGraveyard.getFirstTarget());
@ -142,10 +141,10 @@ class DawnbreakReclaimerEffect extends OneShotEffect {
}
}
}
return true;
}
return false;
}
}

View file

@ -84,6 +84,7 @@ class GruesomeMenagerieEffect extends OneShotEffect {
Cards cards = new CardsImpl();
Target target;
target = new TargetCardInYourGraveyard(filter1);
target.setNotTarget(true);
if (player.choose(outcome, target, source.getSourceId(), game)) {
Card card = game.getCard(target.getFirstTarget());
if (card != null) {
@ -91,6 +92,7 @@ class GruesomeMenagerieEffect extends OneShotEffect {
}
}
target = new TargetCardInYourGraveyard(filter2);
target.setNotTarget(true);
if (player.choose(outcome, target, source.getSourceId(), game)) {
Card card = game.getCard(target.getFirstTarget());
if (card != null) {
@ -98,6 +100,7 @@ class GruesomeMenagerieEffect extends OneShotEffect {
}
}
target = new TargetCardInYourGraveyard(filter3);
target.setNotTarget(true);
if (player.choose(outcome, target, source.getSourceId(), game)) {
Card card = game.getCard(target.getFirstTarget());
if (card != null) {