diff --git a/Mage.Sets/src/mage/sets/magic2011/Triskelion.java b/Mage.Sets/src/mage/sets/magic2011/Triskelion.java index f43d6d85ea..056030f19d 100644 --- a/Mage.Sets/src/mage/sets/magic2011/Triskelion.java +++ b/Mage.Sets/src/mage/sets/magic2011/Triskelion.java @@ -40,6 +40,7 @@ import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; +import mage.counters.Counter; import mage.counters.CounterType; import mage.target.common.TargetCreatureOrPlayer; @@ -57,7 +58,7 @@ public class Triskelion extends CardImpl { this.toughness = new MageInt(1); this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), "with three +1/+1 counters on it")); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new RemoveCountersSourceCost("+1/+1", 1)); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/magic2012/CircleOfFlame.java b/Mage.Sets/src/mage/sets/magic2012/CircleOfFlame.java index eb35d81bd1..4fc749f61c 100644 --- a/Mage.Sets/src/mage/sets/magic2012/CircleOfFlame.java +++ b/Mage.Sets/src/mage/sets/magic2012/CircleOfFlame.java @@ -91,7 +91,7 @@ class CircleOfFlameTriggeredAbility extends TriggeredAbilityImpl { ability.addEffect(new TapSourceEffect()); this.addAbility(ability); - RemoveCountersSourceCost removeCounterCost = new RemoveCountersSourceCost(CounterType.CHARGE.getName(), 1); + RemoveCountersSourceCost removeCounterCost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance()); ability = new AnyColorManaAbility(); ability.addCost(removeCounterCost); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/ThopterAssembly.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/ThopterAssembly.java index cce002f115..4d79299055 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/ThopterAssembly.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/ThopterAssembly.java @@ -93,8 +93,7 @@ class ThopterAssemblyTriggeredAbility extends TriggeredAbilityImpl { this.expansionSetCode = "SOM"; this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(new ChargeCounter()), new TapSourceCost())); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost()); - ability.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.getName(), 3)); + ability.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(3))); ability.addTarget(new TargetPermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/zendikar/JourneyToNowhere.java b/Mage.Sets/src/mage/sets/zendikar/JourneyToNowhere.java index da90e24fef..630160fa47 100644 --- a/Mage.Sets/src/mage/sets/zendikar/JourneyToNowhere.java +++ b/Mage.Sets/src/mage/sets/zendikar/JourneyToNowhere.java @@ -53,8 +53,7 @@ public class JourneyToNowhere extends CardImpl { this.expansionSetCode = "ZEN"; this.color.setWhite(true); FilterCreaturePermanent filter = new FilterCreaturePermanent(); - filter.setId(this.getId()); - filter.setNotId(true); + filter.setAnother(true); Ability ability1 = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect(this.getId(), "Journey to Nowhere exile"), false); Target target = new TargetPermanent(filter); target.setRequired(true); diff --git a/Mage.Sets/src/mage/sets/zendikar/KhalniHeartExpedition.java b/Mage.Sets/src/mage/sets/zendikar/KhalniHeartExpedition.java index 65b59e7386..10daedd42d 100644 --- a/Mage.Sets/src/mage/sets/zendikar/KhalniHeartExpedition.java +++ b/Mage.Sets/src/mage/sets/zendikar/KhalniHeartExpedition.java @@ -39,9 +39,11 @@ import mage.abilities.costs.Costs; import mage.abilities.costs.CostsImpl; import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.common.CounterTargetEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; +import mage.counters.CounterType; import mage.counters.common.QuestCounter; import mage.filter.common.FilterBasicLandCard; import mage.target.common.TargetCardInLibrary; @@ -77,7 +79,7 @@ class KhalniHeartExpeditionAbility extends ActivatedAbilityImpl { this.addAbility(new LandfallAbility(new AddCountersSourceEffect(new QuestCounter()), true)); Costs costs = new CostsImpl(); - costs.add(new RemoveCountersSourceCost("quest", 3)); + costs.add(new RemoveCountersSourceCost(CounterType.QUEST.createInstance(3))); costs.add(new SacrificeSourceCost()); ActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(8), costs); this.addAbility(ability); diff --git a/Mage/src/mage/abilities/costs/common/RemoveCountersSourceCost.java b/Mage/src/mage/abilities/costs/common/RemoveCountersSourceCost.java index 396466b31a..a08255c09a 100644 --- a/Mage/src/mage/abilities/costs/common/RemoveCountersSourceCost.java +++ b/Mage/src/mage/abilities/costs/common/RemoveCountersSourceCost.java @@ -44,18 +44,11 @@ public class RemoveCountersSourceCost extends CostImpl private int amount; private String name; - public RemoveCountersSourceCost(String name, int amount) { - this.amount = amount; - this.name = name; - this.text = "Remove " + (amount == 1 ? "a" : amount) + " " + name + " counter" - + (amount != 1 ? "s" : "") + " from {this}"; - } - public RemoveCountersSourceCost(Counter counter) { this.amount = counter.getCount(); this.name = counter.getName(); this.text = "Remove " + (amount == 1 ? "a" : amount) + " " + name + " counter" - + (amount != 1 ? "s" : "") + "from {this}"; + + (amount != 1 ? "s" : "") + " from {this}"; } public RemoveCountersSourceCost(RemoveCountersSourceCost cost) { diff --git a/Mage/src/mage/filter/FilterObject.java b/Mage/src/mage/filter/FilterObject.java index 9653e9ea81..3f788a1d1b 100644 --- a/Mage/src/mage/filter/FilterObject.java +++ b/Mage/src/mage/filter/FilterObject.java @@ -70,8 +70,6 @@ public class FilterObject> ex protected ComparisonType powerComparison; protected int toughness; protected ComparisonType toughnessComparison; - protected UUID id; - protected boolean notId; /** * Indicates that filter shouldn't match the source. @@ -128,19 +126,12 @@ public class FilterObject> ex this.powerComparison = filter.powerComparison; this.toughness = filter.toughness; this.toughnessComparison = filter.toughnessComparison; - this.id = filter.id; - this.notId = filter.notId; this.another = filter.another; } @Override public boolean match(E object) { - if (id != null) { - if (object.getId().equals(id) == notId) - return notFilter; - } - if (name.size() > 0) { if (name.contains(object.getName()) == notName) return notFilter; @@ -321,14 +312,6 @@ public class FilterObject> ex this.useColorless = useColorless; } - public void setId(UUID id) { - this.id = id; - } - - public void setNotId(boolean notId) { - this.notId = notId; - } - public boolean isAnother() { return another; }