From a4f3e4f97c0d27374888540b50fdf78fa6dc9481 Mon Sep 17 00:00:00 2001 From: magenoxx Date: Wed, 29 Dec 2010 14:41:12 +0300 Subject: [PATCH] Refactored cards with charge counters. --- Mage.Sets/src/mage/sets/scarsofmirrodin/LuxCannon.java | 5 +++-- Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/LuxCannon.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/LuxCannon.java index 78f1095b1d..dba7f75735 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/LuxCannon.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/LuxCannon.java @@ -38,6 +38,7 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.AddCountersSourceEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; +import mage.counters.CounterType; import mage.target.TargetPermanent; import java.util.UUID; @@ -51,9 +52,9 @@ public class LuxCannon extends CardImpl { public LuxCannon (UUID ownerId) { super(ownerId, 173, "Lux Cannon", Rarity.MYTHIC, new CardType[]{CardType.ARTIFACT}, "{4}"); this.expansionSetCode = "SOM"; - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect("charge", 1), new TapSourceCost())); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.getName(), 1), new TapSourceCost())); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost()); - ability.addCost(new RemoveCountersSourceCost("charge", 3)); + ability.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.getName(), 3)); ability.addTarget(new TargetPermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java b/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java index 23dabfcfff..c503a68de3 100644 --- a/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java +++ b/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.ManaEffect; import mage.abilities.keyword.MultikickerAbility; import mage.abilities.mana.ManaAbility; import mage.cards.CardImpl; +import mage.counters.CounterType; import mage.game.Game; /** @@ -52,7 +53,7 @@ public class EverflowingChalice extends CardImpl { public EverflowingChalice(UUID ownerId) { super(ownerId, 123, "Everflowing Chalice", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{0}"); this.expansionSetCode = "WWK"; - MultikickerAbility ability = new MultikickerAbility(new AddCountersSourceEffect("charge", 1), false); + MultikickerAbility ability = new MultikickerAbility(new AddCountersSourceEffect(CounterType.CHARGE.getName(), 1), false); ability.addManaCost(new GenericManaCost(2)); this.addAbility(ability); this.addAbility(new EverflowingChaliceAbility()); @@ -116,7 +117,7 @@ class EverflowingChaliceEffect extends ManaEffect { @Override public boolean apply(Game game, Ability source) { this.mana.clear(); - this.mana.setColorless(game.getPermanent(source.getSourceId()).getCounters().getCount("charge")); + this.mana.setColorless(game.getPermanent(source.getSourceId()).getCounters().getCount(CounterType.CHARGE)); return super.apply(game, source); }