forked from External/mage
remove filter constructors for TargetArtifactPermanent
This commit is contained in:
parent
38bc1bbb20
commit
c9f7e916e4
17 changed files with 73 additions and 85 deletions
|
|
@ -17,7 +17,7 @@ import mage.game.events.GameEvent;
|
|||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -53,7 +53,7 @@ public class ModularAbility extends DiesSourceTriggeredAbility {
|
|||
|
||||
public ModularAbility(Card card, int amount, boolean sunburst) {
|
||||
super(new ModularDistributeCounterEffect(), true);
|
||||
this.addTarget(new TargetArtifactPermanent(filter));
|
||||
this.addTarget(new TargetPermanent(filter));
|
||||
this.amount = amount;
|
||||
this.sunburst = sunburst;
|
||||
if (sunburst) {
|
||||
|
|
@ -91,7 +91,7 @@ public class ModularAbility extends DiesSourceTriggeredAbility {
|
|||
public String getRule() {
|
||||
if (sunburst) {
|
||||
return "Modular—Sunburst <i>(This enters the battlefield with a +1/+1 counter on it for each"
|
||||
+ " color of mana spent to cast it. When it dies, you may put its +1/+1 counters on target artifact creature.)</i>";
|
||||
+ " color of mana spent to cast it. When it dies, you may put its +1/+1 counters on target artifact creature.)</i>";
|
||||
} else {
|
||||
return "Modular " + amount + " <i>(This creature enters the battlefield with " +
|
||||
CardUtil.getOneOneCountersText(amount) +
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package mage.target.common;
|
||||
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -18,19 +17,11 @@ public class TargetArtifactPermanent extends TargetPermanent {
|
|||
}
|
||||
|
||||
public TargetArtifactPermanent(int minNumTargets, int maxNumTargets) {
|
||||
this(minNumTargets, maxNumTargets,
|
||||
super(minNumTargets, maxNumTargets,
|
||||
(maxNumTargets > 1 ? StaticFilters.FILTER_PERMANENT_ARTIFACTS : StaticFilters.FILTER_PERMANENT_ARTIFACT),
|
||||
false);
|
||||
}
|
||||
|
||||
public TargetArtifactPermanent(FilterArtifactPermanent filter) {
|
||||
this(1, 1, filter, false);
|
||||
}
|
||||
|
||||
public TargetArtifactPermanent(int minNumTargets, int maxNumTargets, FilterArtifactPermanent filter, boolean notTarget) {
|
||||
super(minNumTargets, maxNumTargets, filter, notTarget);
|
||||
}
|
||||
|
||||
protected TargetArtifactPermanent(final TargetArtifactPermanent target) {
|
||||
super(target);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue