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.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<LuxCannon> {
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);
}

View file

@ -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<EverflowingChalice> {
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);
}