mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
Changed some X cost abilities (untested)
This commit is contained in:
parent
8302aa1c54
commit
d68efc21c5
10 changed files with 99 additions and 72 deletions
|
|
@ -40,10 +40,11 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
|
import mage.constants.TargetAdjustment;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetCardInHand;
|
import mage.target.common.TargetCardInHand;
|
||||||
|
|
@ -54,14 +55,6 @@ import mage.target.common.TargetCardInHand;
|
||||||
*/
|
*/
|
||||||
public class AlexiZephyrMage extends CardImpl {
|
public class AlexiZephyrMage extends CardImpl {
|
||||||
|
|
||||||
private final UUID originalId;
|
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterPermanent("Target creatures");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public AlexiZephyrMage(UUID ownerId, CardSetInfo setInfo) {
|
public AlexiZephyrMage(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
|
||||||
addSuperType(SuperType.LEGENDARY);
|
addSuperType(SuperType.LEGENDARY);
|
||||||
|
|
@ -75,22 +68,21 @@ public class AlexiZephyrMage extends CardImpl {
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{X}{U}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{X}{U}"));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards"))));
|
ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards"))));
|
||||||
|
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_CREATURES));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
originalId = ability.getOriginalId();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void adjustTargets(Ability ability, Game game) {
|
public void adjustTargets(Ability ability, Game game) {
|
||||||
if (ability.getOriginalId().equals(originalId)) {
|
if (ability.getTargetAdjustment() == TargetAdjustment.XCOST) {
|
||||||
|
FilterPermanent filter2 = ((TargetPermanent) ability.getTargets().get(0)).getFilter();
|
||||||
ability.getTargets().clear();
|
ability.getTargets().clear();
|
||||||
ability.addTarget(new TargetPermanent(ability.getManaCostsToPay().getX(), filter));
|
ability.addTarget(new TargetPermanent(ability.getManaCostsToPay().getX(), filter2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public AlexiZephyrMage(final AlexiZephyrMage card) {
|
public AlexiZephyrMage(final AlexiZephyrMage card) {
|
||||||
super(card);
|
super(card);
|
||||||
this.originalId = card.originalId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,13 @@ import mage.abilities.effects.common.UntapTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.TargetAdjustment;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.common.FilterLandPermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.target.common.TargetLandPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -48,8 +51,6 @@ import mage.target.common.TargetLandPermanent;
|
||||||
*/
|
*/
|
||||||
public class CandelabraOfTawnos extends CardImpl {
|
public class CandelabraOfTawnos extends CardImpl {
|
||||||
|
|
||||||
private final UUID originalId;
|
|
||||||
|
|
||||||
public CandelabraOfTawnos(UUID ownerId, CardSetInfo setInfo) {
|
public CandelabraOfTawnos(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}");
|
||||||
|
|
||||||
|
|
@ -59,22 +60,22 @@ public class CandelabraOfTawnos extends CardImpl {
|
||||||
effect.setText("untap X target lands");
|
effect.setText("untap X target lands");
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}"));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
originalId = ability.getOriginalId();
|
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_LANDS));
|
||||||
|
ability.setTargetAdjustment(TargetAdjustment.XCOST);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void adjustTargets(Ability ability, Game game) {
|
public void adjustTargets(Ability ability, Game game) {
|
||||||
if (ability.getOriginalId().equals(originalId)){
|
if (ability.getTargetAdjustment() == TargetAdjustment.XCOST) {
|
||||||
int xValue = ability.getManaCostsToPay().getX();
|
FilterPermanent filter2 = ((TargetPermanent) ability.getTargets().get(0)).getFilter();
|
||||||
ability.getTargets().clear();
|
ability.getTargets().clear();
|
||||||
ability.addTarget(new TargetLandPermanent(xValue, xValue, new FilterLandPermanent(), false));
|
ability.addTarget(new TargetPermanent(ability.getManaCostsToPay().getX(), filter2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public CandelabraOfTawnos(final CandelabraOfTawnos card) {
|
public CandelabraOfTawnos(final CandelabraOfTawnos card) {
|
||||||
super(card);
|
super(card);
|
||||||
this.originalId = card.originalId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,12 @@ import mage.abilities.effects.common.TapTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.TargetAdjustment;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.target.common.TargetLandPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -48,8 +50,6 @@ import mage.target.common.TargetLandPermanent;
|
||||||
*/
|
*/
|
||||||
public class FloodwaterDam extends CardImpl {
|
public class FloodwaterDam extends CardImpl {
|
||||||
|
|
||||||
private final UUID originalId;
|
|
||||||
|
|
||||||
public FloodwaterDam(UUID ownerId, CardSetInfo setInfo) {
|
public FloodwaterDam(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||||
|
|
||||||
|
|
@ -59,22 +59,21 @@ public class FloodwaterDam extends CardImpl {
|
||||||
effect.setText("tap X target lands");
|
effect.setText("tap X target lands");
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}{X}{1}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}{X}{1}"));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
originalId = ability.getOriginalId();
|
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_LANDS));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void adjustTargets(Ability ability, Game game) {
|
public void adjustTargets(Ability ability, Game game) {
|
||||||
if (ability.getOriginalId().equals(originalId)){
|
if (ability.getTargetAdjustment() == TargetAdjustment.XCOST) {
|
||||||
int xValue = ability.getManaCostsToPay().getX();
|
FilterPermanent filter2 = ((TargetPermanent) ability.getTargets().get(0)).getFilter();
|
||||||
ability.getTargets().clear();
|
ability.getTargets().clear();
|
||||||
ability.addTarget(new TargetLandPermanent(xValue, xValue, new FilterLandPermanent(), false));
|
ability.addTarget(new TargetPermanent(ability.getManaCostsToPay().getX(), filter2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public FloodwaterDam(final FloodwaterDam card) {
|
public FloodwaterDam(final FloodwaterDam card) {
|
||||||
super(card);
|
super(card);
|
||||||
this.originalId = card.originalId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -39,18 +39,19 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.TargetAdjustment;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.filter.common.FilterLandPermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.target.common.TargetLandPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author duncant
|
* @author duncant
|
||||||
*/
|
*/
|
||||||
public class MagusOfTheCandelabra extends CardImpl {
|
public class MagusOfTheCandelabra extends CardImpl {
|
||||||
|
|
||||||
private final UUID originalId;
|
|
||||||
|
|
||||||
public MagusOfTheCandelabra(UUID ownerId, CardSetInfo setInfo) {
|
public MagusOfTheCandelabra(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}");
|
||||||
this.subtype.add(SubType.HUMAN);
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
|
@ -65,22 +66,22 @@ public class MagusOfTheCandelabra extends CardImpl {
|
||||||
effect.setText("untap X target lands");
|
effect.setText("untap X target lands");
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}"));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
originalId = ability.getOriginalId();
|
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_LANDS));
|
||||||
|
ability.setTargetAdjustment(TargetAdjustment.XCOST);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void adjustTargets(Ability ability, Game game) {
|
public void adjustTargets(Ability ability, Game game) {
|
||||||
if (ability.getOriginalId().equals(originalId)){
|
if (ability.getTargetAdjustment() == TargetAdjustment.XCOST) {
|
||||||
int xValue = ability.getManaCostsToPay().getX();
|
FilterPermanent filter2 = ((TargetPermanent) ability.getTargets().get(0)).getFilter();
|
||||||
ability.getTargets().clear();
|
ability.getTargets().clear();
|
||||||
ability.addTarget(new TargetLandPermanent(xValue, xValue, StaticFilters.FILTER_LANDS, false));
|
ability.addTarget(new TargetPermanent(ability.getManaCostsToPay().getX(), filter2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public MagusOfTheCandelabra(final MagusOfTheCandelabra card) {
|
public MagusOfTheCandelabra(final MagusOfTheCandelabra card) {
|
||||||
super(card);
|
super(card);
|
||||||
this.originalId = card.originalId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,12 @@ import mage.abilities.effects.common.TapTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.TargetAdjustment;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.target.common.TargetLandPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -48,8 +50,6 @@ import mage.target.common.TargetLandPermanent;
|
||||||
*/
|
*/
|
||||||
public class MishrasHelix extends CardImpl {
|
public class MishrasHelix extends CardImpl {
|
||||||
|
|
||||||
private final UUID originalId;
|
|
||||||
|
|
||||||
public MishrasHelix(UUID ownerId, CardSetInfo setInfo) {
|
public MishrasHelix(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{5}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{5}");
|
||||||
|
|
||||||
|
|
@ -58,22 +58,22 @@ public class MishrasHelix extends CardImpl {
|
||||||
Effect effect = new TapTargetEffect("X target lands");
|
Effect effect = new TapTargetEffect("X target lands");
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}"));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
originalId = ability.getOriginalId();
|
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_LANDS));
|
||||||
|
ability.setTargetAdjustment(TargetAdjustment.XCOST);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void adjustTargets(Ability ability, Game game) {
|
public void adjustTargets(Ability ability, Game game) {
|
||||||
if (ability.getOriginalId().equals(originalId)){
|
if (ability.getTargetAdjustment() == TargetAdjustment.XCOST) {
|
||||||
int xValue = ability.getManaCostsToPay().getX();
|
FilterPermanent filter2 = ((TargetPermanent) ability.getTargets().get(0)).getFilter();
|
||||||
ability.getTargets().clear();
|
ability.getTargets().clear();
|
||||||
ability.addTarget(new TargetLandPermanent(xValue, xValue, StaticFilters.FILTER_LANDS, false));
|
ability.addTarget(new TargetPermanent(ability.getManaCostsToPay().getX(), filter2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public MishrasHelix(final MishrasHelix card) {
|
public MishrasHelix(final MishrasHelix card) {
|
||||||
super(card);
|
super(card);
|
||||||
this.originalId = card.originalId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.TargetAdjustment;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
|
|
@ -53,9 +54,7 @@ import mage.target.TargetPermanent;
|
||||||
*/
|
*/
|
||||||
public class SynodArtificer extends CardImpl {
|
public class SynodArtificer extends CardImpl {
|
||||||
|
|
||||||
private final UUID tapId;
|
private static final FilterPermanent filter = new FilterPermanent("noncreature artifacts");
|
||||||
private final UUID untapId;
|
|
||||||
private static final FilterPermanent filter = new FilterPermanent("Target noncreature artifacts");
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
|
|
@ -75,6 +74,8 @@ public class SynodArtificer extends CardImpl {
|
||||||
tapEffect.setText("Tap X target noncreature artifacts.");
|
tapEffect.setText("Tap X target noncreature artifacts.");
|
||||||
Ability tapAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, tapEffect, new ManaCostsImpl("{X}"));
|
Ability tapAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, tapEffect, new ManaCostsImpl("{X}"));
|
||||||
tapAbility.addCost(new TapSourceCost());
|
tapAbility.addCost(new TapSourceCost());
|
||||||
|
tapAbility.setTargetAdjustment(TargetAdjustment.XCOST);
|
||||||
|
tapAbility.addTarget(new TargetPermanent(filter));
|
||||||
this.addAbility(tapAbility);
|
this.addAbility(tapAbility);
|
||||||
|
|
||||||
// {X}, {tap}: Untap X target noncreature artifacts.
|
// {X}, {tap}: Untap X target noncreature artifacts.
|
||||||
|
|
@ -82,24 +83,22 @@ public class SynodArtificer extends CardImpl {
|
||||||
untapEffect.setText("Untap X target noncreature artifacts.");
|
untapEffect.setText("Untap X target noncreature artifacts.");
|
||||||
Ability untapAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, untapEffect, new ManaCostsImpl("{X}"));
|
Ability untapAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, untapEffect, new ManaCostsImpl("{X}"));
|
||||||
untapAbility.addCost(new TapSourceCost());
|
untapAbility.addCost(new TapSourceCost());
|
||||||
|
untapAbility.setTargetAdjustment(TargetAdjustment.XCOST);
|
||||||
|
untapAbility.addTarget(new TargetPermanent(filter));
|
||||||
this.addAbility(untapAbility);
|
this.addAbility(untapAbility);
|
||||||
|
|
||||||
tapId = tapAbility.getOriginalId();
|
|
||||||
untapId = untapAbility.getOriginalId();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void adjustTargets(Ability ability, Game game) {
|
public void adjustTargets(Ability ability, Game game) {
|
||||||
if (ability.getOriginalId().equals(tapId) || ability.getOriginalId().equals(untapId)) {
|
if (ability.getTargetAdjustment() == TargetAdjustment.XCOST) {
|
||||||
|
FilterPermanent filter2 = ((TargetPermanent) ability.getTargets().get(0)).getFilter();
|
||||||
ability.getTargets().clear();
|
ability.getTargets().clear();
|
||||||
ability.addTarget(new TargetPermanent(ability.getManaCostsToPay().getX(), filter));
|
ability.addTarget(new TargetPermanent(ability.getManaCostsToPay().getX(), filter2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public SynodArtificer(final SynodArtificer card) {
|
public SynodArtificer(final SynodArtificer card) {
|
||||||
super(card);
|
super(card);
|
||||||
this.tapId = card.tapId;
|
|
||||||
this.untapId = card.untapId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ import mage.abilities.effects.Effects;
|
||||||
import mage.constants.AbilityType;
|
import mage.constants.AbilityType;
|
||||||
import mage.constants.AbilityWord;
|
import mage.constants.AbilityWord;
|
||||||
import mage.constants.EffectType;
|
import mage.constants.EffectType;
|
||||||
|
import mage.constants.TargetAdjustment;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.Controllable;
|
import mage.game.Controllable;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
|
@ -539,4 +540,8 @@ public interface Ability extends Controllable, Serializable {
|
||||||
void setCanFizzle(boolean canFizzle);
|
void setCanFizzle(boolean canFizzle);
|
||||||
|
|
||||||
boolean canFizzle();
|
boolean canFizzle();
|
||||||
|
|
||||||
|
void setTargetAdjustment(TargetAdjustment targetAdjustment);
|
||||||
|
|
||||||
|
TargetAdjustment getTargetAdjustment();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,7 @@ public abstract class AbilityImpl implements Ability {
|
||||||
protected List<Watcher> watchers = null;
|
protected List<Watcher> watchers = null;
|
||||||
protected List<Ability> subAbilities = null;
|
protected List<Ability> subAbilities = null;
|
||||||
protected boolean canFizzle = true;
|
protected boolean canFizzle = true;
|
||||||
|
protected TargetAdjustment targetAdjustment;
|
||||||
|
|
||||||
public AbilityImpl(AbilityType abilityType, Zone zone) {
|
public AbilityImpl(AbilityType abilityType, Zone zone) {
|
||||||
this.id = UUID.randomUUID();
|
this.id = UUID.randomUUID();
|
||||||
|
|
@ -1233,4 +1234,13 @@ public abstract class AbilityImpl implements Ability {
|
||||||
this.canFizzle = canFizzle;
|
this.canFizzle = canFizzle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setTargetAdjustment(TargetAdjustment targetAdjustment) {
|
||||||
|
this.targetAdjustment = targetAdjustment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TargetAdjustment getTargetAdjustment() {
|
||||||
|
return targetAdjustment;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
Mage/src/main/java/mage/constants/TargetAdjustment.java
Normal file
10
Mage/src/main/java/mage/constants/TargetAdjustment.java
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
package mage.constants;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public enum TargetAdjustment {
|
||||||
|
|
||||||
|
NONE,XCOST,DEFENDING_PLAYER
|
||||||
|
}
|
||||||
|
|
@ -74,6 +74,7 @@ public class StackAbility extends StackObjImpl implements Ability {
|
||||||
private UUID controllerId;
|
private UUID controllerId;
|
||||||
private String name;
|
private String name;
|
||||||
private String expansionSetCode;
|
private String expansionSetCode;
|
||||||
|
private TargetAdjustment targetAdjustment = TargetAdjustment.NONE;
|
||||||
|
|
||||||
public StackAbility(Ability ability, UUID controllerId) {
|
public StackAbility(Ability ability, UUID controllerId) {
|
||||||
this.ability = ability;
|
this.ability = ability;
|
||||||
|
|
@ -612,4 +613,13 @@ public class StackAbility extends StackObjImpl implements Ability {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setTargetAdjustment(TargetAdjustment targetAdjustment) {
|
||||||
|
this.targetAdjustment = targetAdjustment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TargetAdjustment getTargetAdjustment() {
|
||||||
|
return targetAdjustment;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue