mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
[refactoring] removed generic from TargetCreaturePermanent
This commit is contained in:
parent
a4fba770c4
commit
dbc066c998
9 changed files with 13 additions and 16 deletions
|
|
@ -41,7 +41,6 @@ import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
|
||||||
import mage.watchers.common.PlayerDamagedBySourceWatcher;
|
import mage.watchers.common.PlayerDamagedBySourceWatcher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -69,7 +68,7 @@ public class Reciprocate extends CardImpl<Reciprocate> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ReciprocateTarget<T extends TargetCreaturePermanent<T>> extends TargetPermanent<TargetCreaturePermanent<T>> {
|
class ReciprocateTarget extends TargetPermanent<ReciprocateTarget> {
|
||||||
|
|
||||||
public ReciprocateTarget() {
|
public ReciprocateTarget() {
|
||||||
super(1, 1, new FilterCreaturePermanent(), false);
|
super(1, 1, new FilterCreaturePermanent(), false);
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@ import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
|
||||||
import mage.watchers.common.PlayerDamagedBySourceWatcher;
|
import mage.watchers.common.PlayerDamagedBySourceWatcher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -88,7 +87,7 @@ public class GiltspireAvenger extends CardImpl<GiltspireAvenger> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class GiltspireAvengerTarget<T extends TargetCreaturePermanent<T>> extends TargetPermanent<TargetCreaturePermanent<T>> {
|
class GiltspireAvengerTarget extends TargetPermanent<GiltspireAvengerTarget> {
|
||||||
|
|
||||||
public GiltspireAvengerTarget() {
|
public GiltspireAvengerTarget() {
|
||||||
super(1, 1, new FilterCreaturePermanent(), false);
|
super(1, 1, new FilterCreaturePermanent(), false);
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,6 @@ import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
|
||||||
import mage.watchers.common.SourceDidDamageWatcher;
|
import mage.watchers.common.SourceDidDamageWatcher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -74,7 +73,7 @@ public class ExecutionersSwing extends CardImpl<ExecutionersSwing> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TargetCreaturePermanentThatDealtDamageThisTurn<T extends TargetCreaturePermanent<T>> extends TargetPermanent<TargetCreaturePermanent<T>> {
|
class TargetCreaturePermanentThatDealtDamageThisTurn extends TargetPermanent<TargetCreaturePermanentThatDealtDamageThisTurn> {
|
||||||
|
|
||||||
public TargetCreaturePermanentThatDealtDamageThisTurn() {
|
public TargetCreaturePermanentThatDealtDamageThisTurn() {
|
||||||
super(1, 1, new FilterCreaturePermanent(), false);
|
super(1, 1, new FilterCreaturePermanent(), false);
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ import mage.filter.predicate.mageobject.NamePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.Target;
|
import mage.target.Target;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
|
@ -94,12 +94,12 @@ public class AEtherBurst extends CardImpl<AEtherBurst> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class DynamicTargetCreaturePermanent<T extends DynamicTargetCreaturePermanent<T>> extends TargetCreaturePermanent<DynamicTargetCreaturePermanent<T>> {
|
class DynamicTargetCreaturePermanent extends TargetPermanent<DynamicTargetCreaturePermanent> {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creatures");
|
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creatures");
|
||||||
|
|
||||||
public DynamicTargetCreaturePermanent() {
|
public DynamicTargetCreaturePermanent() {
|
||||||
super(new TargetCreaturePermanent(filterCreature));
|
super(filterCreature);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DynamicTargetCreaturePermanent(final DynamicTargetCreaturePermanent target) {
|
public DynamicTargetCreaturePermanent(final DynamicTargetCreaturePermanent target) {
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
|
||||||
import mage.watchers.common.SourceDidDamageWatcher;
|
import mage.watchers.common.SourceDidDamageWatcher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -70,7 +69,7 @@ public class AvengingArrow extends CardImpl<AvengingArrow> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AvengingArrowTarget<T extends TargetCreaturePermanent<T>> extends TargetPermanent<TargetCreaturePermanent<T>> {
|
class AvengingArrowTarget extends TargetPermanent<AvengingArrowTarget> {
|
||||||
|
|
||||||
public AvengingArrowTarget() {
|
public AvengingArrowTarget() {
|
||||||
super(1, 1, new FilterCreaturePermanent(), false);
|
super(1, 1, new FilterCreaturePermanent(), false);
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@ import mage.game.stack.StackObject;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
import mage.watchers.common.LandfallWatcher;
|
import mage.watchers.common.LandfallWatcher;
|
||||||
|
|
||||||
|
|
@ -122,7 +121,7 @@ class SearingBlazeEffect extends OneShotEffect<SearingBlazeEffect> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class SearingBlazeTarget<T extends TargetCreaturePermanent<T>> extends TargetPermanent<TargetCreaturePermanent<T>> {
|
class SearingBlazeTarget extends TargetPermanent<SearingBlazeTarget> {
|
||||||
|
|
||||||
public SearingBlazeTarget() {
|
public SearingBlazeTarget() {
|
||||||
super(1, 1, new FilterCreaturePermanent(), false);
|
super(1, 1, new FilterCreaturePermanent(), false);
|
||||||
|
|
|
||||||
|
|
@ -29,12 +29,13 @@
|
||||||
package mage.target.common;
|
package mage.target.common;
|
||||||
|
|
||||||
import mage.filter.common.FilterAttackingCreature;
|
import mage.filter.common.FilterAttackingCreature;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetAttackingCreature extends TargetCreaturePermanent<TargetAttackingCreature> {
|
public class TargetAttackingCreature extends TargetPermanent<TargetAttackingCreature> {
|
||||||
|
|
||||||
public TargetAttackingCreature() {
|
public TargetAttackingCreature() {
|
||||||
this(1, 1, new FilterAttackingCreature(), false);
|
this(1, 1, new FilterAttackingCreature(), false);
|
||||||
|
|
|
||||||
|
|
@ -29,12 +29,13 @@
|
||||||
package mage.target.common;
|
package mage.target.common;
|
||||||
|
|
||||||
import mage.filter.common.FilterAttackingOrBlockingCreature;
|
import mage.filter.common.FilterAttackingOrBlockingCreature;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author nantuko
|
* @author nantuko
|
||||||
*/
|
*/
|
||||||
public class TargetAttackingOrBlockingCreature extends TargetCreaturePermanent<TargetAttackingOrBlockingCreature> {
|
public class TargetAttackingOrBlockingCreature extends TargetPermanent<TargetAttackingOrBlockingCreature> {
|
||||||
|
|
||||||
public TargetAttackingOrBlockingCreature() {
|
public TargetAttackingOrBlockingCreature() {
|
||||||
this(1, 1, new FilterAttackingOrBlockingCreature(), false);
|
this(1, 1, new FilterAttackingOrBlockingCreature(), false);
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ import mage.target.TargetPermanent;
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TargetCreaturePermanent<T extends TargetCreaturePermanent<T>> extends TargetPermanent<TargetCreaturePermanent<T>> {
|
public class TargetCreaturePermanent extends TargetPermanent<TargetCreaturePermanent> {
|
||||||
|
|
||||||
public TargetCreaturePermanent() {
|
public TargetCreaturePermanent() {
|
||||||
this(1, 1, new FilterCreaturePermanent(), false);
|
this(1, 1, new FilterCreaturePermanent(), false);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue