mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
fixed synodArtificer
This commit is contained in:
parent
9f3f277adb
commit
0e000267b5
1 changed files with 11 additions and 4 deletions
|
@ -52,6 +52,8 @@ import mage.target.TargetPermanent;
|
||||||
*/
|
*/
|
||||||
public class SynodArtificer extends CardImpl {
|
public class SynodArtificer extends CardImpl {
|
||||||
|
|
||||||
|
private final UUID tapId;
|
||||||
|
private final UUID untapId;
|
||||||
private static final FilterPermanent filter = new FilterPermanent("Target noncreature artifacts");
|
private static final FilterPermanent filter = new FilterPermanent("Target noncreature artifacts");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
@ -71,20 +73,23 @@ public class SynodArtificer extends CardImpl {
|
||||||
Effect tapEffect = new TapTargetEffect();
|
Effect tapEffect = new TapTargetEffect();
|
||||||
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());
|
||||||
this.addAbility(tapAbility);
|
this.addAbility(tapAbility);
|
||||||
|
|
||||||
// {X}, {tap}: Untap X target noncreature artifacts.
|
// {X}, {tap}: Untap X target noncreature artifacts.
|
||||||
Effect untapEffect = new UntapTargetEffect();
|
Effect untapEffect = new UntapTargetEffect();
|
||||||
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());
|
||||||
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 instanceof SimpleActivatedAbility) {
|
if (ability.getOriginalId().equals(tapId) || ability.getOriginalId().equals(untapId)) {
|
||||||
ability.getTargets().clear();
|
ability.getTargets().clear();
|
||||||
ability.addTarget(new TargetPermanent(ability.getManaCostsToPay().getX(), filter));
|
ability.addTarget(new TargetPermanent(ability.getManaCostsToPay().getX(), filter));
|
||||||
}
|
}
|
||||||
|
@ -92,6 +97,8 @@ public class SynodArtificer extends CardImpl {
|
||||||
|
|
||||||
public SynodArtificer(final SynodArtificer card) {
|
public SynodArtificer(final SynodArtificer card) {
|
||||||
super(card);
|
super(card);
|
||||||
|
this.tapId = card.tapId;
|
||||||
|
this.untapId = card.untapId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue