[refactoring] Small change to SimpleManaAbility (please review)

This commit is contained in:
North 2012-07-15 14:29:00 +03:00
parent c611983f57
commit faa106b3c3
30 changed files with 50 additions and 64 deletions

View file

@ -37,7 +37,6 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -55,7 +54,7 @@ public class Kaleidostone extends CardImpl<Kaleidostone> {
// When Kaleidostone enters the battlefield, draw a card.
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardControllerEffect(1)));
// {5}, {tap}, Sacrifice Kaleidostone: Add {W}{U}{B}{R}{G} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(1, 1, 1, 1, 1, 0, 0)), new GenericManaCost(5));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 1, 1, 1, 0, 0), new GenericManaCost(5));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);

View file

@ -37,7 +37,6 @@ import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -70,7 +69,7 @@ public class AzoriusChancery extends CardImpl<AzoriusChancery> {
ability.addTarget(target);
this.addAbility(ability);
// {tap}: Add {W}{U} to your mana pool.
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 1, 1, 0, 0, 0)), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(0, 0, 1, 1, 0, 0, 0), new TapSourceCost()));
}
public AzoriusChancery(final AzoriusChancery card) {

View file

@ -37,7 +37,6 @@ import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -69,7 +68,7 @@ public class RakdosCarnarium extends CardImpl<RakdosCarnarium> {
ability.addTarget(target);
this.addAbility(ability);
// {tap}: Add {B}{R} to your mana pool.
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(1, 0, 0, 0, 1, 0, 0)), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 1, 0, 0), new TapSourceCost()));
}
public RakdosCarnarium(final RakdosCarnarium card) {

View file

@ -37,7 +37,6 @@ import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -70,7 +69,7 @@ public class SimicGrowthChamber extends CardImpl<SimicGrowthChamber> {
ability.addTarget(target);
this.addAbility(ability);
// {tap}: Add {G}{U} to your mana pool.
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 1, 1, 0, 0, 0, 0)), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(0, 1, 1, 0, 0, 0, 0), new TapSourceCost()));
}
public SimicGrowthChamber(final SimicGrowthChamber card) {

View file

@ -35,7 +35,6 @@ import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -48,7 +47,7 @@ public class GruulSignet extends CardImpl<GruulSignet> {
public GruulSignet(UUID ownerId) {
super(ownerId, 150, "Gruul Signet", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
this.expansionSetCode = "GPT";
Ability ability = new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(1, 1, 0, 0, 0, 0, 0)), new GenericManaCost(1));
Ability ability = new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(1, 1, 0, 0, 0, 0, 0), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -36,7 +36,6 @@ import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -65,7 +64,7 @@ public class IzzetBoilerworks extends CardImpl<IzzetBoilerworks> {
target.setRequired(true);
ability.addTarget(target);
this.addAbility(ability);
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(1, 0, 1, 0, 0, 0, 0)), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(1, 0, 1, 0, 0, 0, 0), new TapSourceCost()));
}
public IzzetBoilerworks(final IzzetBoilerworks card) {

View file

@ -35,7 +35,6 @@ import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -48,7 +47,7 @@ public class IzzetSignet extends CardImpl<IzzetSignet> {
public IzzetSignet(UUID ownerId) {
super(ownerId, 152, "Izzet Signet", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
this.expansionSetCode = "GPT";
Ability ability = new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(1, 0, 1, 0, 0, 0, 0)), new GenericManaCost(1));
Ability ability = new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(1, 0, 1, 0, 0, 0, 0), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -36,7 +36,6 @@ import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -66,7 +65,7 @@ public class OrzhovBasilica extends CardImpl<OrzhovBasilica> {
target.setRequired(true);
ability.addTarget(target);
this.addAbility(ability);
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 0, 1, 1, 0, 0)), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(0, 0, 0, 1, 1, 0, 0), new TapSourceCost()));
}
public OrzhovBasilica(final OrzhovBasilica card) {

View file

@ -35,7 +35,6 @@ import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -48,7 +47,7 @@ public class OrzhovSignet extends CardImpl<OrzhovSignet> {
public OrzhovSignet(UUID ownerId) {
super(ownerId, 155, "Orzhov Signet", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
this.expansionSetCode = "GPT";
Ability ability = new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 0, 1, 1, 0, 0)), new GenericManaCost(1));
Ability ability = new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(0, 0, 0, 1, 1, 0, 0), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -43,7 +43,6 @@ import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.effects.common.GetEmblemEffect;
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
@ -162,7 +161,7 @@ class LilianaOfTheDarkRealmsEmblem extends Emblem {
}
public LilianaOfTheDarkRealmsEmblem() {
SimpleManaAbility manaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana(4)), new TapSourceCost());
SimpleManaAbility manaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(4), new TapSourceCost());
Ability ability = new SimpleStaticAbility(Zone.COMMAND, new GainAbilityControlledEffect(manaAbility, Duration.WhileOnBattlefield, filter));
this.getAbilities().add(ability);
}

View file

@ -35,7 +35,6 @@ import mage.Constants.Rarity;
import mage.MageInt;
import mage.Mana;
import mage.abilities.costs.common.TapTargetCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
import mage.filter.common.FilterControlledCreaturePermanent;
@ -65,7 +64,7 @@ public class HeritageDruid extends CardImpl<HeritageDruid> {
this.color.setGreen(true);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 3, 0, 0, 0, 0, 0)), new TapTargetCost(new TargetControlledCreaturePermanent(3, 3, filter, false))));
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(0, 3, 0, 0, 0, 0, 0), new TapTargetCost(new TargetControlledCreaturePermanent(3, 3, filter, false))));
}
public HeritageDruid(final HeritageDruid card) {

View file

@ -37,7 +37,6 @@ import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -67,7 +66,7 @@ public class BorosGarrison extends CardImpl<BorosGarrison> {
target.setRequired(true);
ability.addTarget(target);
this.addAbility(ability);
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(1, 0, 0, 1, 0, 0, 0)), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(1, 0, 0, 1, 0, 0, 0), new TapSourceCost()));
}
public BorosGarrison(final BorosGarrison card) {

View file

@ -36,7 +36,6 @@ import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -65,7 +64,7 @@ public class GruulTurf extends CardImpl<GruulTurf> {
target.setRequired(true);
ability.addTarget(target);
this.addAbility(ability);
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(1, 1, 0, 0, 0, 0, 0)), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(1, 1, 0, 0, 0, 0, 0), new TapSourceCost()));
}
public GruulTurf(final GruulTurf card) {

View file

@ -36,7 +36,6 @@ import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -50,7 +49,7 @@ public class BorosSignet extends CardImpl<BorosSignet> {
super(ownerId, 255, "Boros Signet", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
this.expansionSetCode = "RAV";
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(1, 0, 0, 1, 0, 0, 0)), new GenericManaCost(1));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 1, 0, 0, 0), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -37,7 +37,6 @@ import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -70,7 +69,7 @@ public class DimirAqueduct extends CardImpl<DimirAqueduct> {
ability.addTarget(target);
this.addAbility(ability);
// {tap}: Add {U}{B} to your mana pool.
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 1, 0, 1, 0, 0)), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 1, 0, 0), new TapSourceCost()));
}
public DimirAqueduct(final DimirAqueduct card) {

View file

@ -36,7 +36,6 @@ import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -49,7 +48,7 @@ public class DimirSignet extends CardImpl<DimirSignet> {
public DimirSignet (UUID ownerId) {
super(ownerId, 260, "Dimir Signet", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
this.expansionSetCode = "RAV";
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 1, 0, 1, 0, 0)), new GenericManaCost(1));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 1, 0, 0), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -36,7 +36,6 @@ import mage.MageInt;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.effects.common.DamageControllerEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -58,7 +57,7 @@ public class ElvesOfDeepShadow extends CardImpl<ElvesOfDeepShadow> {
this.toughness = new MageInt(1);
// {tap}: Add {B} to your mana pool. Elves of Deep Shadow deals 1 damage to you.
Ability ability = new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana), new TapSourceCost());
Ability ability = new SimpleManaAbility(Constants.Zone.BATTLEFIELD, Mana.BlackMana, new TapSourceCost());
ability.addEffect(new DamageControllerEffect(1));
this.addAbility(ability);
}

View file

@ -37,7 +37,6 @@ import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -70,7 +69,7 @@ public class GolgariRotFarm extends CardImpl<GolgariRotFarm> {
ability.addTarget(target);
this.addAbility(ability);
// {tap}: Add {B}{G} to your mana pool.
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 1, 0, 0, 1, 0, 0)), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(0, 1, 0, 0, 1, 0, 0), new TapSourceCost()));
}
public GolgariRotFarm(final GolgariRotFarm card) {

View file

@ -37,7 +37,6 @@ import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -50,7 +49,7 @@ public class GolgariSignet extends CardImpl<GolgariSignet> {
public GolgariSignet (UUID ownerId) {
super(ownerId, 262, "Golgari Signet", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
this.expansionSetCode = "RAV";
Ability ability = new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 1, 0, 0, 1, 0, 0)), new GenericManaCost(1));
Ability ability = new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(0, 1, 0, 0, 1, 0, 0), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -37,7 +37,6 @@ import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -70,7 +69,7 @@ public class SelesnyaSanctuary extends CardImpl<SelesnyaSanctuary> {
ability.addTarget(target);
this.addAbility(ability);
// {tap}: Add {G}{W} to your mana pool.
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 1, 0, 1, 0, 0, 0)), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(0, 1, 0, 1, 0, 0, 0), new TapSourceCost()));
}
public SelesnyaSanctuary(final SelesnyaSanctuary card) {

View file

@ -37,7 +37,6 @@ import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -50,7 +49,7 @@ public class SelesnyaSignet extends CardImpl<SelesnyaSignet> {
public SelesnyaSignet (UUID ownerId) {
super(ownerId, 270, "Selesnya Signet", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
this.expansionSetCode = "RAV";
Ability ability = new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 1, 0, 1, 0, 0, 0)), new GenericManaCost(1));
Ability ability = new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(0, 1, 0, 1, 0, 0, 0), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -77,7 +77,7 @@ public class JoragaTreespeaker extends LevelerCard<JoragaTreespeaker> {
this.addAbility(new LevelUpAbility(new ManaCostsImpl("{1}{G}")));
Abilities<Ability> abilities1 = new AbilitiesImpl<Ability>();
abilities1.add(new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana(2)), new TapSourceCost()));
abilities1.add(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(2), new TapSourceCost()));
Abilities<Ability> abilities2 = new AbilitiesImpl<Ability>();
abilities2.add(new SimpleStaticAbility(Zone.BATTLEFIELD,

View file

@ -41,7 +41,6 @@ import mage.abilities.costs.CostImpl;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
import mage.filter.common.FilterControlledPermanent;
@ -61,8 +60,8 @@ public class LeechriddenSwamp extends CardImpl<LeechriddenSwamp> {
this.expansionSetCode = "SHM";
this.subtype.add("Swamp");
// <i>({tap}: Add {B} to your mana pool.)</i>
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana), new TapSourceCost()));
// ({tap}: Add {B} to your mana pool.)
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, Mana.BlackMana, new TapSourceCost()));
// Leechridden Swamp enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());

View file

@ -35,7 +35,6 @@ import mage.Constants.Rarity;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.effects.common.DamageControllerEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -48,7 +47,9 @@ public class AncientTomb extends CardImpl<AncientTomb> {
public AncientTomb(UUID ownerId) {
super(ownerId, 305, "Ancient Tomb", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, "");
this.expansionSetCode = "TMP";
Ability ability = new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 0, 0, 0, 2, 0)), new TapSourceCost());
// {tap}: Add to your mana pool. Ancient Tomb deals 2 damage to you.
Ability ability = new SimpleManaAbility(Constants.Zone.BATTLEFIELD, Mana.ColorlessMana(2), new TapSourceCost());
ability.addEffect(new DamageControllerEffect(2));
this.addAbility(ability);
}

View file

@ -35,7 +35,6 @@ import mage.Constants.Rarity;
import mage.MageInt;
import mage.Mana;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -52,7 +51,9 @@ public class BloodPet extends CardImpl<BloodPet> {
this.color.setBlack(true);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 0, 0, 1, 0, 0)), new SacrificeSourceCost()));
// Sacrifice Blood Pet: Add {B} to your mana pool.
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, Mana.BlackMana, new SacrificeSourceCost()));
}
public BloodPet(final BloodPet card) {

View file

@ -35,7 +35,6 @@ import mage.Constants.Rarity;
import mage.MageInt;
import mage.Mana;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
@ -51,7 +50,9 @@ public class CompositeGolem extends CardImpl<CompositeGolem> {
this.subtype.add("Golem");
this.power = new MageInt(4);
this.toughness = new MageInt(4);
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(1, 1, 1, 1, 1, 0, 0)), new SacrificeSourceCost()));
// Sacrifice Composite Golem: Add {W}{U}{B}{R}{G} to your mana pool.
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(1, 1, 1, 1, 1, 0, 0), new SacrificeSourceCost()));
}
public CompositeGolem(final CompositeGolem card) {

View file

@ -33,14 +33,14 @@ import mage.Constants.CardType;
import mage.Constants.Outcome;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.effects.common.AddManaOfAnyColorEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
import mage.choices.ChoiceColor;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.Game;
@ -65,15 +65,15 @@ public class KhalniGem extends CardImpl<KhalniGem> {
super(ownerId, 205, "Khalni Gem", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{4}");
this.expansionSetCode = "ZEN";
// When Khalni Gem enters the battlefield, return two lands you control to their owner's hand.
Ability etbAbility = new EntersBattlefieldTriggeredAbility(new KhalniGemReturnToHandTargetEffect());
Target target = new TargetControlledPermanent(2, 2, filter, false);
etbAbility.addTarget(target);
this.addAbility(etbAbility);
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(2, 0, 0, 0, 0, 0, 0)), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 2, 0, 0, 0, 0, 0)), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 2, 0, 0, 0, 0)), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 0, 2, 0, 0, 0)), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 0, 0, 2, 0, 0)), new TapSourceCost()));
// {tap}: Add two mana of any one color to your mana pool.
SimpleManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(2), new TapSourceCost());
ability.addChoice(new ChoiceColor());
this.addAbility(ability);
}
public KhalniGem (final KhalniGem card) {

View file

@ -42,14 +42,13 @@ public class AddManaOfAnyColorEffect extends ManaEffect<AddManaOfAnyColorEffect>
protected int amount;
public AddManaOfAnyColorEffect() {
super();
this.amount = 1;
staticText = "add one mana of any color to your mana pool";
this(1);
}
public AddManaOfAnyColorEffect(final int amount) {
super();
this.amount = amount;
this.staticText = "add " + amount + " mana of any color to your mana pool";
}
public AddManaOfAnyColorEffect(final AddManaOfAnyColorEffect effect) {

View file

@ -29,7 +29,9 @@
package mage.abilities.mana;
import mage.Constants.Zone;
import mage.Mana;
import mage.abilities.costs.Cost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.effects.common.ManaEffect;
/**
@ -42,6 +44,11 @@ public class SimpleManaAbility extends ManaAbility<SimpleManaAbility> {
super(zone, effect, cost);
}
public SimpleManaAbility(Zone zone, Mana mana, Cost cost) {
super(zone, new BasicManaEffect(mana), cost);
this.netMana = mana.copy();
}
public SimpleManaAbility(final SimpleManaAbility ability) {
super(ability);
}

View file

@ -33,7 +33,6 @@ import mage.Constants.Zone;
import mage.MageInt;
import mage.Mana;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.mana.SimpleManaAbility;
/**
@ -49,7 +48,7 @@ public class EldraziSpawnToken extends Token {
subtype.add("Spawn");
power = new MageInt(0);
toughness = new MageInt(1);
addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.ColorlessMana), new SacrificeSourceCost()));
addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana, new SacrificeSourceCost()));
}
}