mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
[refactor] removed generic parameter from Target
This commit is contained in:
parent
7af040e70b
commit
82a45cee88
57 changed files with 70 additions and 73 deletions
|
|
@ -76,7 +76,7 @@ public class Outwit extends CardImpl<Outwit> {
|
||||||
return new Outwit(this);
|
return new Outwit(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class CustomTargetSpell extends TargetObject<CustomTargetSpell> {
|
private class CustomTargetSpell extends TargetObject {
|
||||||
|
|
||||||
protected FilterSpell filter;
|
protected FilterSpell filter;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ class StreamOfConsciousnessEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class StreamOfConsciousnessTarget extends TargetCard<StreamOfConsciousnessTarget> {
|
class StreamOfConsciousnessTarget extends TargetCard {
|
||||||
|
|
||||||
public StreamOfConsciousnessTarget() {
|
public StreamOfConsciousnessTarget() {
|
||||||
super(0, 4, Zone.GRAVEYARD, new FilterCard("cards from target player's graveyard"));
|
super(0, 4, Zone.GRAVEYARD, new FilterCard("cards from target player's graveyard"));
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ public class Reciprocate extends CardImpl<Reciprocate> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ReciprocateTarget extends TargetPermanent<ReciprocateTarget> {
|
class ReciprocateTarget extends TargetPermanent {
|
||||||
|
|
||||||
public ReciprocateTarget() {
|
public ReciprocateTarget() {
|
||||||
super(1, 1, new FilterCreaturePermanent(), false);
|
super(1, 1, new FilterCreaturePermanent(), false);
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ public class Squelch extends CardImpl<Squelch> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ActivatedAbilityTarget extends TargetObject<ActivatedAbilityTarget> {
|
class ActivatedAbilityTarget extends TargetObject {
|
||||||
|
|
||||||
public ActivatedAbilityTarget() {
|
public ActivatedAbilityTarget() {
|
||||||
this.minNumberOfTargets = 1;
|
this.minNumberOfTargets = 1;
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ public class GiltspireAvenger extends CardImpl<GiltspireAvenger> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class GiltspireAvengerTarget extends TargetPermanent<GiltspireAvengerTarget> {
|
class GiltspireAvengerTarget extends TargetPermanent {
|
||||||
|
|
||||||
public GiltspireAvengerTarget() {
|
public GiltspireAvengerTarget() {
|
||||||
super(1, 1, new FilterCreaturePermanent(), false);
|
super(1, 1, new FilterCreaturePermanent(), false);
|
||||||
|
|
|
||||||
|
|
@ -206,7 +206,7 @@ class RavagerOfTheFellsEffect extends OneShotEffect {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class RavagerOfTheFellsTarget extends TargetPermanent<RavagerOfTheFellsTarget> {
|
class RavagerOfTheFellsTarget extends TargetPermanent {
|
||||||
|
|
||||||
public RavagerOfTheFellsTarget() {
|
public RavagerOfTheFellsTarget() {
|
||||||
super(0, 1, new FilterCreaturePermanent(), false);
|
super(0, 1, new FilterCreaturePermanent(), false);
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ class LoamingShamanEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class LoamingShamanTargetCardsInGraveyard extends TargetCard<LoamingShamanTargetCardsInGraveyard> {
|
class LoamingShamanTargetCardsInGraveyard extends TargetCard {
|
||||||
|
|
||||||
public LoamingShamanTargetCardsInGraveyard(int minNumTargets, int maxNumTargets, FilterCard filter) {
|
public LoamingShamanTargetCardsInGraveyard(int minNumTargets, int maxNumTargets, FilterCard filter) {
|
||||||
super(minNumTargets, maxNumTargets, Zone.GRAVEYARD, filter);
|
super(minNumTargets, maxNumTargets, Zone.GRAVEYARD, filter);
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ class BaneAlleyBrokerDrawExileEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TargetCardInBaneAlleyBrokerExile extends TargetCard<TargetCardInBaneAlleyBrokerExile> {
|
class TargetCardInBaneAlleyBrokerExile extends TargetCard {
|
||||||
|
|
||||||
public TargetCardInBaneAlleyBrokerExile(UUID CardId) {
|
public TargetCardInBaneAlleyBrokerExile(UUID CardId) {
|
||||||
super(1, 1, Zone.EXILED, new FilterCard("card exiled with Bane Alley Broker"));
|
super(1, 1, Zone.EXILED, new FilterCard("card exiled with Bane Alley Broker"));
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ public class ExecutionersSwing extends CardImpl<ExecutionersSwing> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TargetCreaturePermanentThatDealtDamageThisTurn extends TargetPermanent<TargetCreaturePermanentThatDealtDamageThisTurn> {
|
class TargetCreaturePermanentThatDealtDamageThisTurn extends TargetPermanent {
|
||||||
|
|
||||||
public TargetCreaturePermanentThatDealtDamageThisTurn() {
|
public TargetCreaturePermanentThatDealtDamageThisTurn() {
|
||||||
super(1, 1, new FilterCreaturePermanent(), false);
|
super(1, 1, new FilterCreaturePermanent(), false);
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ class MemorysJourneyEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MemorysJourneyTarget extends TargetCard<MemorysJourneyTarget> {
|
class MemorysJourneyTarget extends TargetCard {
|
||||||
|
|
||||||
public MemorysJourneyTarget() {
|
public MemorysJourneyTarget() {
|
||||||
super(0, 3, Zone.GRAVEYARD, new FilterCard());
|
super(0, 3, Zone.GRAVEYARD, new FilterCard());
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ class TargetControlledPermanentSharingOpponentPermanentCardType extends TargetCo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class DaringThiefSecondTarget extends TargetPermanent<DaringThiefSecondTarget> {
|
class DaringThiefSecondTarget extends TargetPermanent {
|
||||||
|
|
||||||
private Permanent firstTarget = null;
|
private Permanent firstTarget = null;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@ class FaceUpPredicate implements Predicate<Card> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MirrorOfFateTarget extends TargetCard<MirrorOfFateTarget> {
|
class MirrorOfFateTarget extends TargetCard {
|
||||||
|
|
||||||
public MirrorOfFateTarget() {
|
public MirrorOfFateTarget() {
|
||||||
super(0, 7, Zone.EXILED, new FilterCard());
|
super(0, 7, Zone.EXILED, new FilterCard());
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ class ChandraPyromasterEffect1 extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ChandraPyromasterTarget extends TargetPermanent<ChandraPyromasterTarget> {
|
class ChandraPyromasterTarget extends TargetPermanent {
|
||||||
|
|
||||||
public ChandraPyromasterTarget() {
|
public ChandraPyromasterTarget() {
|
||||||
super(0, 1, new FilterCreaturePermanent("creature that the targeted player controls"), false);
|
super(0, 1, new FilterCreaturePermanent("creature that the targeted player controls"), false);
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ class StrionicResonatorEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TargetTriggeredAbility extends TargetObject<TargetTriggeredAbility> {
|
class TargetTriggeredAbility extends TargetObject {
|
||||||
|
|
||||||
public TargetTriggeredAbility() {
|
public TargetTriggeredAbility() {
|
||||||
this.minNumberOfTargets = 1;
|
this.minNumberOfTargets = 1;
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ public class AEtherBurst extends CardImpl<AEtherBurst> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class DynamicTargetCreaturePermanent extends TargetPermanent<DynamicTargetCreaturePermanent> {
|
class DynamicTargetCreaturePermanent extends TargetPermanent {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creatures");
|
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creatures");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ class DiaochanArtfulBeautyDestroyEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TargetOpponentsChoiceCreaturePermanent extends TargetPermanent<TargetOpponentsChoiceCreaturePermanent> {
|
class TargetOpponentsChoiceCreaturePermanent extends TargetPermanent {
|
||||||
|
|
||||||
private UUID opponentId = null;
|
private UUID opponentId = null;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ public class AvengingArrow extends CardImpl<AvengingArrow> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AvengingArrowTarget extends TargetPermanent<AvengingArrowTarget> {
|
class AvengingArrowTarget extends TargetPermanent {
|
||||||
|
|
||||||
public AvengingArrowTarget() {
|
public AvengingArrowTarget() {
|
||||||
super(1, 1, new FilterCreaturePermanent(), false);
|
super(1, 1, new FilterCreaturePermanent(), false);
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ public class NotOfThisWorld extends CardImpl<NotOfThisWorld> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TargetSpellTargetingControlledPermanent extends TargetObject<TargetSpellTargetingControlledPermanent> {
|
class TargetSpellTargetingControlledPermanent extends TargetObject {
|
||||||
|
|
||||||
|
|
||||||
public TargetSpellTargetingControlledPermanent() {
|
public TargetSpellTargetingControlledPermanent() {
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ public class TurnAside extends CardImpl<TurnAside> {
|
||||||
return new TurnAside(this);
|
return new TurnAside(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class CustomTargetSpell extends TargetObject<CustomTargetSpell> {
|
private class CustomTargetSpell extends TargetObject {
|
||||||
|
|
||||||
protected FilterSpell filter;
|
protected FilterSpell filter;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ class GaeasBlessingEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class GaeasBlessingTarget extends TargetCard<GaeasBlessingTarget> {
|
class GaeasBlessingTarget extends TargetCard {
|
||||||
|
|
||||||
public GaeasBlessingTarget() {
|
public GaeasBlessingTarget() {
|
||||||
super(0, 3, Zone.GRAVEYARD, new FilterCard());
|
super(0, 3, Zone.GRAVEYARD, new FilterCard());
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ public class Intervene extends CardImpl<Intervene> {
|
||||||
return new Intervene(this);
|
return new Intervene(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class InterveneTargetSpell extends TargetObject<InterveneTargetSpell> {
|
private class InterveneTargetSpell extends TargetObject {
|
||||||
|
|
||||||
|
|
||||||
public InterveneTargetSpell() {
|
public InterveneTargetSpell() {
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ class SearingBlazeEffect extends OneShotEffect {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class SearingBlazeTarget extends TargetPermanent<SearingBlazeTarget> {
|
class SearingBlazeTarget extends TargetPermanent {
|
||||||
|
|
||||||
public SearingBlazeTarget() {
|
public SearingBlazeTarget() {
|
||||||
super(1, 1, new FilterCreaturePermanent(), false);
|
super(1, 1, new FilterCreaturePermanent(), false);
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,8 @@ import mage.players.Player;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
* @param <T>
|
|
||||||
*/
|
*/
|
||||||
public abstract class TargetAmount<T extends TargetAmount<T>> extends TargetImpl<T> {
|
public abstract class TargetAmount extends TargetImpl {
|
||||||
|
|
||||||
boolean amountWasSet = false;
|
boolean amountWasSet = false;
|
||||||
DynamicValue amount;
|
DynamicValue amount;
|
||||||
|
|
@ -65,6 +64,9 @@ public abstract class TargetAmount<T extends TargetAmount<T>> extends TargetImpl
|
||||||
this.amountWasSet = target.amountWasSet;
|
this.amountWasSet = target.amountWasSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public abstract TargetAmount copy();
|
||||||
|
|
||||||
public int getAmountRemaining() {
|
public int getAmountRemaining() {
|
||||||
return remainingAmount;
|
return remainingAmount;
|
||||||
}
|
}
|
||||||
|
|
@ -127,8 +129,8 @@ public abstract class TargetAmount<T extends TargetAmount<T>> extends TargetImpl
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<T> getTargetOptions(Ability source, Game game) {
|
public List<? extends TargetAmount> getTargetOptions(Ability source, Game game) {
|
||||||
List<T> options = new ArrayList<>();
|
List<TargetAmount> options = new ArrayList<>();
|
||||||
Set<UUID> possibleTargets = possibleTargets(source.getSourceId(), source.getControllerId(), game);
|
Set<UUID> possibleTargets = possibleTargets(source.getSourceId(), source.getControllerId(), game);
|
||||||
|
|
||||||
addTargets(this, possibleTargets, options, source, game);
|
addTargets(this, possibleTargets, options, source, game);
|
||||||
|
|
@ -136,13 +138,13 @@ public abstract class TargetAmount<T extends TargetAmount<T>> extends TargetImpl
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addTargets(TargetAmount<T> target, Set<UUID> targets, List<T> options, Ability source, Game game) {
|
protected void addTargets(TargetAmount target, Set<UUID> targets, List<TargetAmount> options, Ability source, Game game) {
|
||||||
if (!amountWasSet) {
|
if (!amountWasSet) {
|
||||||
setAmount(source, game);
|
setAmount(source, game);
|
||||||
}
|
}
|
||||||
for (UUID targetId: targets) {
|
for (UUID targetId: targets) {
|
||||||
for (int n = 1; n <= target.remainingAmount; n++) {
|
for (int n = 1; n <= target.remainingAmount; n++) {
|
||||||
T t = target.copy();
|
TargetAmount t = target.copy();
|
||||||
t.addTarget(targetId, n, source, game, true);
|
t.addTarget(targetId, n, source, game, true);
|
||||||
if (t.remainingAmount > 0) {
|
if (t.remainingAmount > 0) {
|
||||||
if (targets.size() > 1) {
|
if (targets.size() > 1) {
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,8 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
* @param <T>
|
|
||||||
*/
|
*/
|
||||||
public class TargetCard<T extends TargetCard<T>> extends TargetObject<TargetCard<T>> {
|
public class TargetCard extends TargetObject {
|
||||||
|
|
||||||
protected FilterCard filter;
|
protected FilterCard filter;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,8 @@ import java.util.*;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
* @param <T>
|
|
||||||
*/
|
*/
|
||||||
public abstract class TargetImpl<T extends TargetImpl<T>> implements Target {
|
public abstract class TargetImpl implements Target {
|
||||||
|
|
||||||
protected Map<UUID, Integer> targets = new LinkedHashMap<>();
|
protected Map<UUID, Integer> targets = new LinkedHashMap<>();
|
||||||
protected Map<UUID, Integer> zoneChangeCounters = new HashMap<>();
|
protected Map<UUID, Integer> zoneChangeCounters = new HashMap<>();
|
||||||
|
|
@ -60,7 +59,7 @@ public abstract class TargetImpl<T extends TargetImpl<T>> implements Target {
|
||||||
protected boolean atRandom = false;
|
protected boolean atRandom = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public abstract T copy();
|
public abstract TargetImpl copy();
|
||||||
|
|
||||||
public TargetImpl() {
|
public TargetImpl() {
|
||||||
this(false);
|
this(false);
|
||||||
|
|
@ -70,7 +69,7 @@ public abstract class TargetImpl<T extends TargetImpl<T>> implements Target {
|
||||||
this.notTarget = notTarget;
|
this.notTarget = notTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TargetImpl(final TargetImpl<T> target) {
|
public TargetImpl(final TargetImpl target) {
|
||||||
this.targetName = target.targetName;
|
this.targetName = target.targetName;
|
||||||
this.zone = target.zone;
|
this.zone = target.zone;
|
||||||
this.maxNumberOfTargets = target.maxNumberOfTargets;
|
this.maxNumberOfTargets = target.maxNumberOfTargets;
|
||||||
|
|
@ -340,14 +339,14 @@ public abstract class TargetImpl<T extends TargetImpl<T>> implements Target {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<T> getTargetOptions(Ability source, Game game) {
|
public List<? extends TargetImpl> getTargetOptions(Ability source, Game game) {
|
||||||
List<T> options = new ArrayList<T>();
|
List<TargetImpl> options = new ArrayList<>();
|
||||||
Set<UUID> possibleTargets = possibleTargets(source.getSourceId(), source.getControllerId(), game);
|
Set<UUID> possibleTargets = possibleTargets(source.getSourceId(), source.getControllerId(), game);
|
||||||
possibleTargets.removeAll(getTargets());
|
possibleTargets.removeAll(getTargets());
|
||||||
Iterator<UUID> it = possibleTargets.iterator();
|
Iterator<UUID> it = possibleTargets.iterator();
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
UUID targetId = it.next();
|
UUID targetId = it.next();
|
||||||
T target = this.copy();
|
TargetImpl target = this.copy();
|
||||||
target.clearChosen();
|
target.clearChosen();
|
||||||
target.addTarget(targetId, source, game, true);
|
target.addTarget(targetId, source, game, true);
|
||||||
if (!target.isChosen()) {
|
if (!target.isChosen()) {
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,8 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
* @param <T>
|
|
||||||
*/
|
*/
|
||||||
public abstract class TargetObject<T extends TargetObject<T>> extends TargetImpl<T> {
|
public abstract class TargetObject extends TargetImpl {
|
||||||
|
|
||||||
protected TargetObject() {}
|
protected TargetObject() {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,8 @@ import mage.game.permanent.Permanent;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
* @param <T>
|
|
||||||
*/
|
*/
|
||||||
public class TargetPermanent<T extends TargetPermanent<T>> extends TargetObject<TargetPermanent<T>> {
|
public class TargetPermanent extends TargetObject {
|
||||||
|
|
||||||
protected FilterPermanent filter;
|
protected FilterPermanent filter;
|
||||||
|
|
||||||
|
|
@ -79,7 +78,7 @@ public class TargetPermanent<T extends TargetPermanent<T>> extends TargetObject<
|
||||||
this.notTarget = notTarget;
|
this.notTarget = notTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TargetPermanent(final TargetPermanent<T> target) {
|
public TargetPermanent(final TargetPermanent target) {
|
||||||
super(target);
|
super(target);
|
||||||
this.filter = target.filter.copy();
|
this.filter = target.filter.copy();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ import java.util.UUID;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetPlayer<T extends TargetPlayer<T>> extends TargetImpl<TargetPlayer<T>> {
|
public class TargetPlayer extends TargetImpl {
|
||||||
|
|
||||||
protected FilterPlayer filter;
|
protected FilterPlayer filter;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ import java.util.UUID;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetSource extends TargetObject<TargetSource> {
|
public class TargetSource extends TargetObject {
|
||||||
|
|
||||||
protected FilterObject filter;
|
protected FilterObject filter;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ import mage.game.stack.StackObject;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetSpell extends TargetObject<TargetSpell> {
|
public class TargetSpell extends TargetObject {
|
||||||
|
|
||||||
protected FilterSpell filter;
|
protected FilterSpell filter;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ import java.util.UUID;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetStackObject extends TargetObject<TargetStackObject> {
|
public class TargetStackObject extends TargetObject {
|
||||||
|
|
||||||
protected FilterStackObject filter;
|
protected FilterStackObject filter;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ import mage.target.TargetObject;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
public class TargetActivatedOrTriggeredAbility extends TargetObject<TargetActivatedOrTriggeredAbility> {
|
public class TargetActivatedOrTriggeredAbility extends TargetObject {
|
||||||
|
|
||||||
public TargetActivatedOrTriggeredAbility() {
|
public TargetActivatedOrTriggeredAbility() {
|
||||||
this.minNumberOfTargets = 1;
|
this.minNumberOfTargets = 1;
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,8 @@ import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ayratn
|
* @author ayratn
|
||||||
* @param <T>
|
|
||||||
*/
|
*/
|
||||||
public class TargetArtifactPermanent<T extends TargetArtifactPermanent<T>> extends TargetPermanent<TargetArtifactPermanent<T>> {
|
public class TargetArtifactPermanent extends TargetPermanent {
|
||||||
|
|
||||||
public TargetArtifactPermanent(boolean required) {
|
public TargetArtifactPermanent(boolean required) {
|
||||||
this();
|
this();
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ import mage.target.TargetPermanent;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetAttackingCreature extends TargetPermanent<TargetAttackingCreature> {
|
public class TargetAttackingCreature extends TargetPermanent {
|
||||||
|
|
||||||
public TargetAttackingCreature() {
|
public TargetAttackingCreature() {
|
||||||
this(1, 1, new FilterAttackingCreature(), false);
|
this(1, 1, new FilterAttackingCreature(), false);
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ import mage.target.TargetPermanent;
|
||||||
*
|
*
|
||||||
* @author nantuko
|
* @author nantuko
|
||||||
*/
|
*/
|
||||||
public class TargetAttackingOrBlockingCreature extends TargetPermanent<TargetAttackingOrBlockingCreature> {
|
public class TargetAttackingOrBlockingCreature extends TargetPermanent {
|
||||||
|
|
||||||
public TargetAttackingOrBlockingCreature() {
|
public TargetAttackingOrBlockingCreature() {
|
||||||
this(1, 1, new FilterAttackingOrBlockingCreature(), false);
|
this(1, 1, new FilterAttackingOrBlockingCreature(), false);
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ import mage.target.TargetCard;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetBasicLandCard extends TargetCard<TargetBasicLandCard> {
|
public class TargetBasicLandCard extends TargetCard {
|
||||||
|
|
||||||
public TargetBasicLandCard(Zone zone) {
|
public TargetBasicLandCard(Zone zone) {
|
||||||
super(zone);
|
super(zone);
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ import mage.target.TargetCard;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
public class TargetCardInASingleGraveyard extends TargetCard<TargetCardInASingleGraveyard> {
|
public class TargetCardInASingleGraveyard extends TargetCard {
|
||||||
|
|
||||||
public TargetCardInASingleGraveyard(int minNumTargets, int maxNumTargets, FilterCard filter) {
|
public TargetCardInASingleGraveyard(int minNumTargets, int maxNumTargets, FilterCard filter) {
|
||||||
super(minNumTargets, maxNumTargets, Zone.GRAVEYARD, filter);
|
super(minNumTargets, maxNumTargets, Zone.GRAVEYARD, filter);
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ import mage.target.TargetCard;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetCardInExile extends TargetCard<TargetCardInExile> {
|
public class TargetCardInExile extends TargetCard {
|
||||||
|
|
||||||
private UUID zoneId;
|
private UUID zoneId;
|
||||||
private boolean allExileZones;
|
private boolean allExileZones;
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ import mage.target.TargetCard;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetCardInGraveyard extends TargetCard<TargetCardInGraveyard> {
|
public class TargetCardInGraveyard extends TargetCard {
|
||||||
|
|
||||||
public TargetCardInGraveyard() {
|
public TargetCardInGraveyard() {
|
||||||
this(1, 1, new FilterCard("card from a graveyard"));
|
this(1, 1, new FilterCard("card from a graveyard"));
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ import mage.target.TargetCard;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetCardInHand extends TargetCard<TargetCardInHand> {
|
public class TargetCardInHand extends TargetCard {
|
||||||
|
|
||||||
public TargetCardInHand() {
|
public TargetCardInHand() {
|
||||||
this(1, 1, new FilterCard());
|
this(1, 1, new FilterCard());
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ import mage.target.TargetCard;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetCardInLibrary extends TargetCard<TargetCardInLibrary> {
|
public class TargetCardInLibrary extends TargetCard {
|
||||||
|
|
||||||
private int librarySearchLimit;
|
private int librarySearchLimit;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import mage.target.TargetCard;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
|
||||||
public class TargetCardInOpponentsGraveyard extends TargetCard<TargetCardInOpponentsGraveyard> {
|
public class TargetCardInOpponentsGraveyard extends TargetCard {
|
||||||
|
|
||||||
protected boolean allFromOneOpponent;
|
protected boolean allFromOneOpponent;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ import mage.target.TargetCard;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetCardInYourGraveyard extends TargetCard<TargetCardInYourGraveyard> {
|
public class TargetCardInYourGraveyard extends TargetCard {
|
||||||
|
|
||||||
public TargetCardInYourGraveyard() {
|
public TargetCardInYourGraveyard() {
|
||||||
this(1, 1, new FilterCard("card from your graveyard"));
|
this(1, 1, new FilterCard("card from your graveyard"));
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ import mage.target.TargetPermanent;
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
* @param <T>
|
* @param <T>
|
||||||
*/
|
*/
|
||||||
public class TargetControlledPermanent<T extends TargetControlledPermanent<T>> extends TargetPermanent<TargetControlledPermanent<T>> {
|
public class TargetControlledPermanent<T extends TargetControlledPermanent<T>> extends TargetPermanent {
|
||||||
|
|
||||||
public TargetControlledPermanent() {
|
public TargetControlledPermanent() {
|
||||||
this(1, 1, new FilterControlledPermanent(), false);
|
this(1, 1, new FilterControlledPermanent(), false);
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ import mage.target.TargetPermanent;
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public class TargetCreatureOrPlaneswalker<T extends TargetCreatureOrPlaneswalker<T>> extends TargetPermanent<TargetCreatureOrPlaneswalker<T>> {
|
public class TargetCreatureOrPlaneswalker<T extends TargetCreatureOrPlaneswalker<T>> extends TargetPermanent {
|
||||||
|
|
||||||
public TargetCreatureOrPlaneswalker() {
|
public TargetCreatureOrPlaneswalker() {
|
||||||
this(1, 1 ,new FilterCreatureOrPlaneswalkerPermanent(), false);
|
this(1, 1 ,new FilterCreatureOrPlaneswalkerPermanent(), false);
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ import java.util.UUID;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetCreatureOrPlayer extends TargetImpl<TargetCreatureOrPlayer> {
|
public class TargetCreatureOrPlayer extends TargetImpl {
|
||||||
|
|
||||||
protected FilterCreatureOrPlayer filter;
|
protected FilterCreatureOrPlayer filter;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ import mage.target.TargetAmount;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetCreatureOrPlayerAmount extends TargetAmount<TargetCreatureOrPlayerAmount> {
|
public class TargetCreatureOrPlayerAmount extends TargetAmount {
|
||||||
|
|
||||||
protected FilterCreatureOrPlayer filter;
|
protected FilterCreatureOrPlayer filter;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ import mage.target.TargetPermanent;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetCreaturePermanent extends TargetPermanent<TargetCreaturePermanent> {
|
public class TargetCreaturePermanent extends TargetPermanent {
|
||||||
|
|
||||||
public TargetCreaturePermanent() {
|
public TargetCreaturePermanent() {
|
||||||
this(1, 1, new FilterCreaturePermanent(), false);
|
this(1, 1, new FilterCreaturePermanent(), false);
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ import mage.target.TargetAmount;
|
||||||
*
|
*
|
||||||
* @author North
|
* @author North
|
||||||
*/
|
*/
|
||||||
public class TargetCreaturePermanentAmount extends TargetAmount<TargetCreaturePermanentAmount> {
|
public class TargetCreaturePermanentAmount extends TargetAmount {
|
||||||
|
|
||||||
protected FilterCreaturePermanent filter;
|
protected FilterCreaturePermanent filter;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ import java.util.UUID;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetDefender extends TargetImpl<TargetDefender> {
|
public class TargetDefender extends TargetImpl {
|
||||||
|
|
||||||
protected FilterPlaneswalkerOrPlayer filter;
|
protected FilterPlaneswalkerOrPlayer filter;
|
||||||
protected UUID attackerId;
|
protected UUID attackerId;
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ import mage.filter.predicate.other.OwnerIdPredicate;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetDiscard extends TargetCard<TargetDiscard> {
|
public class TargetDiscard extends TargetCard {
|
||||||
|
|
||||||
private UUID playerId;
|
private UUID playerId;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ import mage.target.TargetPermanent;
|
||||||
*
|
*
|
||||||
* @param <T>
|
* @param <T>
|
||||||
*/
|
*/
|
||||||
public class TargetEnchantmentPermanent<T extends TargetEnchantmentPermanent<T>> extends TargetPermanent<TargetEnchantmentPermanent<T>> {
|
public class TargetEnchantmentPermanent<T extends TargetEnchantmentPermanent<T>> extends TargetPermanent {
|
||||||
|
|
||||||
public TargetEnchantmentPermanent(boolean required) {
|
public TargetEnchantmentPermanent(boolean required) {
|
||||||
this();
|
this();
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ import mage.target.TargetPermanent;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetLandPermanent<T extends TargetLandPermanent<T>> extends TargetPermanent<TargetLandPermanent<T>> {
|
public class TargetLandPermanent<T extends TargetLandPermanent<T>> extends TargetPermanent {
|
||||||
|
|
||||||
public TargetLandPermanent() {
|
public TargetLandPermanent() {
|
||||||
this(1, 1, new FilterLandPermanent(), false);
|
this(1, 1, new FilterLandPermanent(), false);
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ import mage.target.TargetPermanent;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetNonlandPermanent extends TargetPermanent<TargetNonlandPermanent> {
|
public class TargetNonlandPermanent extends TargetPermanent {
|
||||||
|
|
||||||
public TargetNonlandPermanent() {
|
public TargetNonlandPermanent() {
|
||||||
this(1, 1, false);
|
this(1, 1, false);
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ import mage.target.TargetPlayer;
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
* @author North
|
* @author North
|
||||||
*/
|
*/
|
||||||
public class TargetOpponent extends TargetPlayer<TargetOpponent> {
|
public class TargetOpponent extends TargetPlayer {
|
||||||
|
|
||||||
public TargetOpponent() {
|
public TargetOpponent() {
|
||||||
this(false);
|
this(false);
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ import java.util.UUID;
|
||||||
*
|
*
|
||||||
* @author nantuko
|
* @author nantuko
|
||||||
*/
|
*/
|
||||||
public class TargetPermanentOrPlayer extends TargetImpl<TargetPermanentOrPlayer> {
|
public class TargetPermanentOrPlayer extends TargetImpl {
|
||||||
|
|
||||||
protected FilterPermanentOrPlayer filter;
|
protected FilterPermanentOrPlayer filter;
|
||||||
protected FilterPermanent filterPermanent;
|
protected FilterPermanent filterPermanent;
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ import mage.target.TargetImpl;
|
||||||
*
|
*
|
||||||
* @author LevelX
|
* @author LevelX
|
||||||
*/
|
*/
|
||||||
public class TargetSpellOrPermanent extends TargetImpl<TargetSpellOrPermanent> {
|
public class TargetSpellOrPermanent extends TargetImpl {
|
||||||
|
|
||||||
protected FilterSpellOrPermanent filter;
|
protected FilterSpellOrPermanent filter;
|
||||||
protected FilterPermanent filterPermanent;
|
protected FilterPermanent filterPermanent;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue