This commit is contained in:
Jeff Wadsworth 2022-06-20 11:53:02 -05:00
parent 82d49ab29c
commit e7205391ba
2 changed files with 16 additions and 11 deletions

View file

@ -19,9 +19,9 @@ import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.ManaValuePredicate;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
import mage.target.common.TargetCardInGraveyard;
/**
* @author TheElk801
@ -57,8 +57,8 @@ class AncientBrassDragonEffect extends OneShotEffect {
AncientBrassDragonEffect() {
super(Outcome.Benefit);
staticText = "roll a d20. When you do, put any number of target creature cards with total mana value X " +
"or less from graveyards onto the battlefield under your control, where X is the result";
staticText = "roll a d20. When you do, put any number of target creature cards with total mana value X "
+ "or less from graveyards onto the battlefield under your control, where X is the result";
}
private AncientBrassDragonEffect(final AncientBrassDragonEffect effect) {
@ -86,7 +86,7 @@ class AncientBrassDragonEffect extends OneShotEffect {
}
}
class AncientBrassDragonTarget extends TargetCardInYourGraveyard {
class AncientBrassDragonTarget extends TargetCardInGraveyard {
private final int xValue;
@ -111,8 +111,8 @@ class AncientBrassDragonTarget extends TargetCardInYourGraveyard {
return false;
}
Card card = game.getCard(id);
return card != null &&
this.getTargets()
return card != null
&& this.getTargets()
.stream()
.map(game::getCard)
.mapToInt(Card::getManaValue)
@ -121,8 +121,8 @@ class AncientBrassDragonTarget extends TargetCardInYourGraveyard {
private static final FilterCard makeFilter(int xValue) {
FilterCard filter = new FilterCreatureCard(
"creature cards with total mana value " +
xValue + " or less from your graveyard"
"creature cards with total mana value "
+ xValue + " or less from graveyards"
);
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, xValue));
return filter;

View file

@ -25,15 +25,20 @@ public class TargetCardInGraveyard extends TargetCard {
}
public TargetCardInGraveyard(int numTargets, FilterCard filter) {
this(numTargets, numTargets, filter);
this(numTargets, numTargets, filter, false);
}
public TargetCardInGraveyard(int minNumTargets, int maxNumTargets) {
this(minNumTargets, maxNumTargets, defaultFilter);
this(minNumTargets, maxNumTargets, defaultFilter, false);
}
public TargetCardInGraveyard(int minNumTargets, int maxNumTargets, FilterCard filter) {
this(minNumTargets, maxNumTargets, filter, false);
}
public TargetCardInGraveyard(int minNumTargets, int maxNumTargets, FilterCard filter) {
public TargetCardInGraveyard(int minNumTargets, int maxNumTargets, FilterCard filter, boolean notTarget) {
super(minNumTargets, maxNumTargets, Zone.GRAVEYARD, filter);
this.setNotTarget(notTarget);
}
public TargetCardInGraveyard(final TargetCardInGraveyard target) {