Refactored cards with charge counters.

This commit is contained in:
magenoxx 2010-12-29 14:41:12 +03:00
parent 93267f7132
commit a4f3e4f97c
2 changed files with 6 additions and 4 deletions

View file

@ -38,6 +38,7 @@ import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.AddCountersSourceEffect; import mage.abilities.effects.common.AddCountersSourceEffect;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID; import java.util.UUID;
@ -51,9 +52,9 @@ public class LuxCannon extends CardImpl<LuxCannon> {
public LuxCannon (UUID ownerId) { public LuxCannon (UUID ownerId) {
super(ownerId, 173, "Lux Cannon", Rarity.MYTHIC, new CardType[]{CardType.ARTIFACT}, "{4}"); super(ownerId, 173, "Lux Cannon", Rarity.MYTHIC, new CardType[]{CardType.ARTIFACT}, "{4}");
this.expansionSetCode = "SOM"; 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 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()); ability.addTarget(new TargetPermanent());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -41,6 +41,7 @@ import mage.abilities.effects.common.ManaEffect;
import mage.abilities.keyword.MultikickerAbility; import mage.abilities.keyword.MultikickerAbility;
import mage.abilities.mana.ManaAbility; import mage.abilities.mana.ManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.game.Game; import mage.game.Game;
/** /**
@ -52,7 +53,7 @@ public class EverflowingChalice extends CardImpl<EverflowingChalice> {
public EverflowingChalice(UUID ownerId) { public EverflowingChalice(UUID ownerId) {
super(ownerId, 123, "Everflowing Chalice", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{0}"); super(ownerId, 123, "Everflowing Chalice", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{0}");
this.expansionSetCode = "WWK"; 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)); ability.addManaCost(new GenericManaCost(2));
this.addAbility(ability); this.addAbility(ability);
this.addAbility(new EverflowingChaliceAbility()); this.addAbility(new EverflowingChaliceAbility());
@ -116,7 +117,7 @@ class EverflowingChaliceEffect extends ManaEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
this.mana.clear(); 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); return super.apply(game, source);
} }