diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/AkkiRockspeaker.java b/Mage.Sets/src/mage/sets/championsofkamigawa/AkkiRockspeaker.java index 8b304575bc..78cee07856 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/AkkiRockspeaker.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/AkkiRockspeaker.java @@ -35,7 +35,7 @@ import mage.Constants.Rarity; import mage.MageInt; import mage.Mana; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.cards.CardImpl; /** @@ -53,7 +53,7 @@ public class AkkiRockspeaker extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - this.addAbility(new EntersBattlefieldTriggeredAbility(new ManaEffect(new Mana(Constants.ColoredManaSymbol.R)))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new BasicManaEffect(new Mana(Constants.ColoredManaSymbol.R)))); } public AkkiRockspeaker(final AkkiRockspeaker card) { diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/HonorWornShaku.java b/Mage.Sets/src/mage/sets/championsofkamigawa/HonorWornShaku.java index 699550196d..a772b7f453 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/HonorWornShaku.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/HonorWornShaku.java @@ -38,7 +38,7 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapTargetCost; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.filter.Filter; @@ -62,7 +62,7 @@ public class HonorWornShaku extends CardImpl { public HonorWornShaku(UUID ownerId) { super(ownerId, 254, "Honor-Worn Shaku", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}"); this.expansionSetCode = "CHK"; - this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new ManaEffect(new Mana(0, 0, 0, 0, 0, 1, 0)), new TapSourceCost())); + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 0, 0, 0, 1, 0)), new TapSourceCost())); Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new UntapSourceEffect(), new TapTargetCost(new TargetControlledPermanent(filter))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/OrochiLeafcaller.java b/Mage.Sets/src/mage/sets/championsofkamigawa/OrochiLeafcaller.java index ab4747a888..947cec8461 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/OrochiLeafcaller.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/OrochiLeafcaller.java @@ -37,6 +37,7 @@ import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ColoredManaCost; import mage.abilities.effects.common.AddManaOfAnyColorEffect; +import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; /** @@ -53,7 +54,7 @@ public class OrochiLeafcaller extends CardImpl { this.color.setGreen(true); this.power = new MageInt(1); this.toughness = new MageInt(1); - this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new ColoredManaCost(Constants.ColoredManaSymbol.G))); + this.addAbility(new AnyColorManaAbility(new ColoredManaCost(Constants.ColoredManaSymbol.G))); } public OrochiLeafcaller (final OrochiLeafcaller card) { diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/SachiDaughterOfSeshiro.java b/Mage.Sets/src/mage/sets/championsofkamigawa/SachiDaughterOfSeshiro.java index 7e434e052d..39b66cf712 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/SachiDaughterOfSeshiro.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/SachiDaughterOfSeshiro.java @@ -38,7 +38,7 @@ import mage.Mana; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.effects.common.continious.BoostControlledEffect; import mage.abilities.effects.common.continious.GainAbilityControlledEffect; import mage.cards.CardImpl; @@ -68,7 +68,7 @@ public class SachiDaughterOfSeshiro extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(3); this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostControlledEffect(0, 1, Constants.Duration.WhileOnBattlefield, snakeFilter, true))); - this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityControlledEffect(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new ManaEffect(new Mana(0, 2, 0, 0, 0, 0, 0)), new TapSourceCost()), Constants.Duration.WhileOnBattlefield, shamanFilter, false))); + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityControlledEffect(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 2, 0, 0, 0, 0, 0)), new TapSourceCost()), Constants.Duration.WhileOnBattlefield, shamanFilter, false))); } public SachiDaughterOfSeshiro(final SachiDaughterOfSeshiro card) { diff --git a/Mage.Sets/src/mage/sets/conflux/KnotvineMystic.java b/Mage.Sets/src/mage/sets/conflux/KnotvineMystic.java index 39d834b618..2a79623b75 100644 --- a/Mage.Sets/src/mage/sets/conflux/KnotvineMystic.java +++ b/Mage.Sets/src/mage/sets/conflux/KnotvineMystic.java @@ -35,7 +35,7 @@ import mage.MageInt; import mage.Mana; import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.BasicManaAbility; import mage.cards.CardImpl; @@ -74,7 +74,7 @@ public class KnotvineMystic extends CardImpl{ class KnotvineMysticManaAbility extends BasicManaAbility { public KnotvineMysticManaAbility() { - super(new ManaEffect(new Mana(1, 1, 0, 1, 0, 0, 0))); + super(new BasicManaEffect(new Mana(1, 1, 0, 1, 0, 0, 0))); this.netMana.setGreen(1); this.netMana.setRed(1); this.netMana.setWhite(1); diff --git a/Mage.Sets/src/mage/sets/conflux/ManaCylix.java b/Mage.Sets/src/mage/sets/conflux/ManaCylix.java index 6de9e55063..6b39729796 100644 --- a/Mage.Sets/src/mage/sets/conflux/ManaCylix.java +++ b/Mage.Sets/src/mage/sets/conflux/ManaCylix.java @@ -30,17 +30,15 @@ package mage.sets.conflux; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Rarity; -import mage.Constants.Zone; -import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.Ability; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.AddManaOfAnyColorEffect; +import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; -import mage.choices.ChoiceColor; /** * - * @author North + * @author North, Loki */ public class ManaCylix extends CardImpl { @@ -48,8 +46,7 @@ public class ManaCylix extends CardImpl { super(ownerId, 138, "Mana Cylix", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{1}"); this.expansionSetCode = "CON"; - SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new GenericManaCost(1)); - ability.addChoice(new ChoiceColor()); + Ability ability = new AnyColorManaAbility(new GenericManaCost(1)); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/conflux/RuptureSpire.java b/Mage.Sets/src/mage/sets/conflux/RuptureSpire.java index 976e449cd0..24775a1da5 100644 --- a/Mage.Sets/src/mage/sets/conflux/RuptureSpire.java +++ b/Mage.Sets/src/mage/sets/conflux/RuptureSpire.java @@ -31,16 +31,12 @@ package mage.sets.conflux; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Rarity; -import mage.Constants.Zone; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.AddManaOfAnyColorEffect; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; -import mage.choices.ChoiceColor; /** * @@ -54,9 +50,7 @@ public class RuptureSpire extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{1}")), false)); - SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new TapSourceCost()); - ability.addChoice(new ChoiceColor()); - this.addAbility(ability); + this.addAbility(new AnyColorManaAbility()); } public RuptureSpire (final RuptureSpire card) { diff --git a/Mage.Sets/src/mage/sets/darksteel/DarksteelIngot.java b/Mage.Sets/src/mage/sets/darksteel/DarksteelIngot.java index 1a850075d8..5c0489ee4f 100644 --- a/Mage.Sets/src/mage/sets/darksteel/DarksteelIngot.java +++ b/Mage.Sets/src/mage/sets/darksteel/DarksteelIngot.java @@ -29,13 +29,9 @@ package mage.sets.darksteel; import mage.Constants; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.AddManaOfAnyColorEffect; import mage.abilities.keyword.IndestructibleAbility; +import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; -import mage.choices.ChoiceColor; import java.util.UUID; @@ -49,9 +45,7 @@ public class DarksteelIngot extends CardImpl { super(ownerId, 112, "Darksteel Ingot", Constants.Rarity.COMMON, new Constants.CardType[]{Constants.CardType.ARTIFACT}, "{3}"); this.expansionSetCode = "DST"; this.addAbility(IndestructibleAbility.getInstance()); - Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new TapSourceCost()); - ability.addChoice(new ChoiceColor()); - this.addAbility(ability); + this.addAbility(new AnyColorManaAbility()); } public DarksteelIngot(final DarksteelIngot card) { diff --git a/Mage.Sets/src/mage/sets/darksteel/KrarkClanStoker.java b/Mage.Sets/src/mage/sets/darksteel/KrarkClanStoker.java index dd35f520b5..4f46219008 100644 --- a/Mage.Sets/src/mage/sets/darksteel/KrarkClanStoker.java +++ b/Mage.Sets/src/mage/sets/darksteel/KrarkClanStoker.java @@ -38,7 +38,7 @@ import mage.Mana; import mage.abilities.Ability; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.BasicManaAbility; import mage.cards.CardImpl; import mage.filter.Filter; @@ -84,7 +84,7 @@ public class KrarkClanStoker extends CardImpl { class KrarkClanStokerAbility extends BasicManaAbility { public KrarkClanStokerAbility() { - super(new ManaEffect(new Mana(2, 0, 0, 0, 0, 0, 0))); + super(new BasicManaEffect(new Mana(2, 0, 0, 0, 0, 0, 0))); this.netMana.setRed(2); } diff --git a/Mage.Sets/src/mage/sets/darksteel/MirrodinsCore.java b/Mage.Sets/src/mage/sets/darksteel/MirrodinsCore.java index 5521192a2d..7df4f76865 100644 --- a/Mage.Sets/src/mage/sets/darksteel/MirrodinsCore.java +++ b/Mage.Sets/src/mage/sets/darksteel/MirrodinsCore.java @@ -37,12 +37,11 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.AddManaOfAnyColorEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.mana.AnyColorManaAbility; import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.counters.CounterType; -import mage.counters.common.ChargeCounter; /** * @@ -55,7 +54,7 @@ public class MirrodinsCore extends CardImpl { this.expansionSetCode = "DST"; this.addAbility(new ColorlessManaAbility()); this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), new TapSourceCost())); - Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new TapSourceCost()); + Ability ability = new AnyColorManaAbility(); ability.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance())); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/darksteel/MyrMoonvessel.java b/Mage.Sets/src/mage/sets/darksteel/MyrMoonvessel.java index f77f6ffff6..630a471f48 100644 --- a/Mage.Sets/src/mage/sets/darksteel/MyrMoonvessel.java +++ b/Mage.Sets/src/mage/sets/darksteel/MyrMoonvessel.java @@ -35,7 +35,7 @@ import mage.Constants.Rarity; import mage.MageInt; import mage.Mana; import mage.abilities.common.PutIntoGraveFromBattlefieldTriggeredAbility; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.cards.CardImpl; /** @@ -49,7 +49,7 @@ public class MyrMoonvessel extends CardImpl { this.subtype.add("Myr"); this.power = new MageInt(1); this.toughness = new MageInt(1); - this.addAbility(new PutIntoGraveFromBattlefieldTriggeredAbility(new ManaEffect(new Mana(0, 0, 0, 0, 0, 1, 0)))); + this.addAbility(new PutIntoGraveFromBattlefieldTriggeredAbility(new BasicManaEffect(new Mana(0, 0, 0, 0, 0, 1, 0)))); } public MyrMoonvessel(final MyrMoonvessel card) { diff --git a/Mage.Sets/src/mage/sets/darksteel/UrGolemsEye.java b/Mage.Sets/src/mage/sets/darksteel/UrGolemsEye.java index 4c62d41a23..29d6dddb99 100644 --- a/Mage.Sets/src/mage/sets/darksteel/UrGolemsEye.java +++ b/Mage.Sets/src/mage/sets/darksteel/UrGolemsEye.java @@ -33,9 +33,7 @@ import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Rarity; import mage.Mana; -import mage.abilities.Ability; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.BasicManaAbility; import mage.cards.CardImpl; @@ -65,7 +63,7 @@ public class UrGolemsEye extends CardImpl { class UrGolemsEyeAbility extends BasicManaAbility { public UrGolemsEyeAbility() { - super(new ManaEffect(new Mana(0, 0, 0, 0, 0, 2, 0))); + super(new BasicManaEffect(new Mana(0, 0, 0, 0, 0, 2, 0))); this.netMana.setColorless(2); } diff --git a/Mage.Sets/src/mage/sets/darksteel/ViridianAcolyte.java b/Mage.Sets/src/mage/sets/darksteel/ViridianAcolyte.java index adf08ebff6..7d71b8786f 100644 --- a/Mage.Sets/src/mage/sets/darksteel/ViridianAcolyte.java +++ b/Mage.Sets/src/mage/sets/darksteel/ViridianAcolyte.java @@ -30,20 +30,14 @@ package mage.sets.darksteel; import java.util.UUID; -import mage.Constants; import mage.Constants.CardType; import mage.Constants.Rarity; import mage.MageInt; -import mage.Mana; import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.AddManaOfAnyColorEffect; -import mage.abilities.effects.common.ManaEffect; -import mage.abilities.mana.BasicManaAbility; +import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; -import mage.choices.ChoiceColor; /** * @author Loki @@ -58,9 +52,8 @@ public class ViridianAcolyte extends CardImpl { this.color.setGreen(true); this.power = new MageInt(1); this.toughness = new MageInt(1); - Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new GenericManaCost(1)); + Ability ability = new AnyColorManaAbility(new GenericManaCost(1)); ability.addCost(new TapSourceCost()); - ability.addChoice(new ChoiceColor()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/eventide/CascadeBluffs.java b/Mage.Sets/src/mage/sets/eventide/CascadeBluffs.java index 133925cfe1..f22c16cb00 100644 --- a/Mage.Sets/src/mage/sets/eventide/CascadeBluffs.java +++ b/Mage.Sets/src/mage/sets/eventide/CascadeBluffs.java @@ -34,7 +34,7 @@ import mage.Constants.CardType; import mage.Constants.Rarity; import mage.Mana; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.BasicManaAbility; import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; @@ -66,7 +66,7 @@ public class CascadeBluffs extends CardImpl { class CascadeBluffsFirstManaAbility extends BasicManaAbility { public CascadeBluffsFirstManaAbility() { - super(new ManaEffect(new Mana(0, 0, 2, 0, 0, 0, 0))); + super(new BasicManaEffect(new Mana(0, 0, 2, 0, 0, 0, 0))); this.addCost(new ManaCostsImpl("{U/R}")); this.netMana.setBlue(2); } @@ -84,7 +84,7 @@ class CascadeBluffsFirstManaAbility extends BasicManaAbility { public CascadeBluffsSecondManaAbility() { - super(new ManaEffect(new Mana(1, 0, 1, 0, 0, 0, 0))); + super(new BasicManaEffect(new Mana(1, 0, 1, 0, 0, 0, 0))); this.addCost(new ManaCostsImpl("{U/R}")); this.netMana.setBlue(1); this.netMana.setRed(1); @@ -103,7 +103,7 @@ class CascadeBluffsSecondManaAbility extends BasicManaAbility { public CascadeBluffsThirdManaAbility() { - super(new ManaEffect(new Mana(2, 0, 0, 0, 0, 0, 0))); + super(new BasicManaEffect(new Mana(2, 0, 0, 0, 0, 0, 0))); this.addCost(new ManaCostsImpl("{U/R}")); this.netMana.setRed(2); } diff --git a/Mage.Sets/src/mage/sets/eventide/FetidHeath.java b/Mage.Sets/src/mage/sets/eventide/FetidHeath.java index 2c6701114a..0ffff5a41f 100644 --- a/Mage.Sets/src/mage/sets/eventide/FetidHeath.java +++ b/Mage.Sets/src/mage/sets/eventide/FetidHeath.java @@ -33,7 +33,7 @@ import mage.Constants.CardType; import mage.Constants.Rarity; import mage.Mana; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.BasicManaAbility; import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; @@ -67,7 +67,7 @@ public class FetidHeath extends CardImpl { class FetidHeathFirstManaAbility extends BasicManaAbility { public FetidHeathFirstManaAbility() { - super(new ManaEffect(new Mana(0, 0, 0, 2, 0, 0, 0))); + super(new BasicManaEffect(new Mana(0, 0, 0, 2, 0, 0, 0))); this.addCost(new ManaCostsImpl("{W/B}")); this.netMana.setWhite(2); } @@ -85,7 +85,7 @@ class FetidHeathFirstManaAbility extends BasicManaAbility { public FetidHeathSecondManaAbility() { - super(new ManaEffect(new Mana(0, 0, 0, 1, 1, 0, 0))); + super(new BasicManaEffect(new Mana(0, 0, 0, 1, 1, 0, 0))); this.addCost(new ManaCostsImpl("{W/B}")); this.netMana.setBlack(1); this.netMana.setWhite(1); @@ -104,7 +104,7 @@ class FetidHeathSecondManaAbility extends BasicManaAbility { public FetidHeathThirdManaAbility() { - super(new ManaEffect(new Mana(0, 0, 0, 0, 2, 0, 0))); + super(new BasicManaEffect(new Mana(0, 0, 0, 0, 2, 0, 0))); this.addCost(new ManaCostsImpl("{W/B}")); this.netMana.setBlack(2); } diff --git a/Mage.Sets/src/mage/sets/eventide/FloodedGrove.java b/Mage.Sets/src/mage/sets/eventide/FloodedGrove.java index de4c368998..27ff4786eb 100644 --- a/Mage.Sets/src/mage/sets/eventide/FloodedGrove.java +++ b/Mage.Sets/src/mage/sets/eventide/FloodedGrove.java @@ -33,7 +33,7 @@ import mage.Constants.CardType; import mage.Constants.Rarity; import mage.Mana; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.BasicManaAbility; import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; @@ -67,7 +67,7 @@ public class FloodedGrove extends CardImpl { class FloodedGroveFirstManaAbility extends BasicManaAbility { public FloodedGroveFirstManaAbility() { - super(new ManaEffect(new Mana(0, 2, 0, 0, 0, 0, 0))); + super(new BasicManaEffect(new Mana(0, 2, 0, 0, 0, 0, 0))); this.addCost(new ManaCostsImpl("{G/U}")); this.netMana.setGreen(2); } @@ -85,7 +85,7 @@ class FloodedGroveFirstManaAbility extends BasicManaAbility { public FloodedGroveSecondManaAbility() { - super(new ManaEffect(new Mana(0, 1, 1, 0, 0, 0, 0))); + super(new BasicManaEffect(new Mana(0, 1, 1, 0, 0, 0, 0))); this.addCost(new ManaCostsImpl("{G/U}")); this.netMana.setGreen(1); this.netMana.setBlue(1); @@ -104,7 +104,7 @@ class FloodedGroveSecondManaAbility extends BasicManaAbility { public FloodedGroveThirdManaAbility() { - super(new ManaEffect(new Mana(0, 0, 2, 0, 0, 0, 0))); + super(new BasicManaEffect(new Mana(0, 0, 2, 0, 0, 0, 0))); this.addCost(new ManaCostsImpl("{G/U}")); this.netMana.setBlue(2); } diff --git a/Mage.Sets/src/mage/sets/eventide/RuggedPrairie.java b/Mage.Sets/src/mage/sets/eventide/RuggedPrairie.java index 183cdc3ed3..35fae218da 100644 --- a/Mage.Sets/src/mage/sets/eventide/RuggedPrairie.java +++ b/Mage.Sets/src/mage/sets/eventide/RuggedPrairie.java @@ -33,7 +33,7 @@ import mage.Constants.CardType; import mage.Constants.Rarity; import mage.Mana; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.BasicManaAbility; import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; @@ -66,7 +66,7 @@ public class RuggedPrairie extends CardImpl { class RuggedPrairieFirstManaAbility extends BasicManaAbility { public RuggedPrairieFirstManaAbility() { - super(new ManaEffect(new Mana(2, 0, 0, 0, 0, 0, 0))); + super(new BasicManaEffect(new Mana(2, 0, 0, 0, 0, 0, 0))); this.addCost(new ManaCostsImpl("{R/W}")); this.netMana.setRed(2); } @@ -84,7 +84,7 @@ class RuggedPrairieFirstManaAbility extends BasicManaAbility { public RuggedPrairieSecondManaAbility() { - super(new ManaEffect(new Mana(1, 0, 0, 1, 0, 0, 0))); + super(new BasicManaEffect(new Mana(1, 0, 0, 1, 0, 0, 0))); this.addCost(new ManaCostsImpl("{R/W}")); this.netMana.setRed(1); this.netMana.setWhite(1); @@ -103,7 +103,7 @@ class RuggedPrairieSecondManaAbility extends BasicManaAbility { public RuggedPrairieThirdManaAbility() { - super(new ManaEffect(new Mana(0, 0, 0, 2, 0, 0, 0))); + super(new BasicManaEffect(new Mana(0, 0, 0, 2, 0, 0, 0))); this.addCost(new ManaCostsImpl("{R/W}")); this.netMana.setWhite(2); } diff --git a/Mage.Sets/src/mage/sets/eventide/TwilightMire.java b/Mage.Sets/src/mage/sets/eventide/TwilightMire.java index 97259c19a5..ca137632d1 100644 --- a/Mage.Sets/src/mage/sets/eventide/TwilightMire.java +++ b/Mage.Sets/src/mage/sets/eventide/TwilightMire.java @@ -33,7 +33,7 @@ import mage.Constants.CardType; import mage.Constants.Rarity; import mage.Mana; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.BasicManaAbility; import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; @@ -67,7 +67,7 @@ public class TwilightMire extends CardImpl { class TwilightMireFirstManaAbility extends BasicManaAbility { public TwilightMireFirstManaAbility() { - super(new ManaEffect(new Mana(0, 0, 0, 0, 2, 0, 0))); + super(new BasicManaEffect(new Mana(0, 0, 0, 0, 2, 0, 0))); this.addCost(new ManaCostsImpl("{B/G}")); this.netMana.setBlack(2); } @@ -85,7 +85,7 @@ class TwilightMireFirstManaAbility extends BasicManaAbility { public TwilightMireSecondManaAbility() { - super(new ManaEffect(new Mana(0, 1, 0, 0, 1, 0, 0))); + super(new BasicManaEffect(new Mana(0, 1, 0, 0, 1, 0, 0))); this.addCost(new ManaCostsImpl("{B/G}")); this.netMana.setBlack(1); this.netMana.setGreen(1); @@ -104,7 +104,7 @@ class TwilightMireSecondManaAbility extends BasicManaAbility { public TwilightMireThirdManaAbility() { - super(new ManaEffect(new Mana(0, 2, 0, 0, 0, 0, 0))); + super(new BasicManaEffect(new Mana(0, 2, 0, 0, 0, 0, 0))); this.addCost(new ManaCostsImpl("{B/G}")); this.netMana.setGreen(2); } diff --git a/Mage.Sets/src/mage/sets/magic2011/PyreticRitual.java b/Mage.Sets/src/mage/sets/magic2011/PyreticRitual.java index f602828a71..e4ed43bef0 100644 --- a/Mage.Sets/src/mage/sets/magic2011/PyreticRitual.java +++ b/Mage.Sets/src/mage/sets/magic2011/PyreticRitual.java @@ -32,7 +32,7 @@ import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Rarity; import mage.Mana; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.cards.CardImpl; /** @@ -45,7 +45,7 @@ public class PyreticRitual extends CardImpl { super(ownerId, 153, "Pyretic Ritual", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}"); this.expansionSetCode = "M11"; this.color.setRed(true); - this.getSpellAbility().addEffect(new ManaEffect(Mana.RedMana(3))); + this.getSpellAbility().addEffect(new BasicManaEffect(Mana.RedMana(3))); } public PyreticRitual(final PyreticRitual card) { diff --git a/Mage.Sets/src/mage/sets/magic2012/Manalith.java b/Mage.Sets/src/mage/sets/magic2012/Manalith.java index a4d350b004..27bcba10b1 100644 --- a/Mage.Sets/src/mage/sets/magic2012/Manalith.java +++ b/Mage.Sets/src/mage/sets/magic2012/Manalith.java @@ -30,14 +30,10 @@ package mage.sets.magic2012; import java.util.UUID; -import mage.Constants; import mage.Constants.CardType; import mage.Constants.Rarity; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.AddManaOfAnyColorEffect; +import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; -import mage.choices.ChoiceColor; /** * @@ -48,9 +44,7 @@ public class Manalith extends CardImpl { public Manalith (UUID ownerId) { super(ownerId, 212, "Manalith", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{3}"); this.expansionSetCode = "M12"; - SimpleActivatedAbility ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new TapSourceCost()); - ability.addChoice(new ChoiceColor()); - this.addAbility(ability); + this.addAbility(new AnyColorManaAbility()); } public Manalith (final Manalith card) { diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/SphereOfTheSuns.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/SphereOfTheSuns.java index c38218809f..c8a891cbc8 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/SphereOfTheSuns.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/SphereOfTheSuns.java @@ -30,22 +30,18 @@ package mage.sets.mirrodinbesieged; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Rarity; -import mage.Constants.Zone; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.AddManaOfAnyColorEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; -import mage.choices.ChoiceColor; import mage.counters.CounterType; /** * - * @author North + * @author North, Loki */ public class SphereOfTheSuns extends CardImpl { @@ -59,8 +55,7 @@ public class SphereOfTheSuns extends CardImpl { this.addAbility(ability); RemoveCountersSourceCost removeCounterCost = new RemoveCountersSourceCost(CounterType.CHARGE.getName(), 1); - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new TapSourceCost()); - ability.addChoice(new ChoiceColor()); + ability = new AnyColorManaAbility(); ability.addCost(removeCounterCost); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/newphyrexia/AlloyMyr.java b/Mage.Sets/src/mage/sets/newphyrexia/AlloyMyr.java index 8583d6f8c4..d79f12b309 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/AlloyMyr.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/AlloyMyr.java @@ -30,17 +30,13 @@ package mage.sets.newphyrexia; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Rarity; -import mage.Constants.Zone; import mage.MageInt; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.AddManaOfAnyColorEffect; +import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; -import mage.choices.ChoiceColor; /** * - * @author North + * @author North, Loki */ public class AlloyMyr extends CardImpl { @@ -52,9 +48,7 @@ public class AlloyMyr extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new TapSourceCost()); - ability.addChoice(new ChoiceColor()); - this.addAbility(ability); + this.addAbility(new AnyColorManaAbility()); } public AlloyMyr(final AlloyMyr card) { diff --git a/Mage.Sets/src/mage/sets/newphyrexia/PriestOfUrabrask.java b/Mage.Sets/src/mage/sets/newphyrexia/PriestOfUrabrask.java index 75baeb656f..b6b5804397 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/PriestOfUrabrask.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/PriestOfUrabrask.java @@ -33,7 +33,7 @@ import mage.Constants.Rarity; import mage.MageInt; import mage.Mana; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.cards.CardImpl; /** @@ -52,7 +52,7 @@ public class PriestOfUrabrask extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(1); - this.addAbility(new EntersBattlefieldTriggeredAbility(new ManaEffect(Mana.RedMana(3)))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new BasicManaEffect(Mana.RedMana(3)))); } public PriestOfUrabrask(final PriestOfUrabrask card) { diff --git a/Mage.Sets/src/mage/sets/ravnika/BorosSignet.java b/Mage.Sets/src/mage/sets/ravnika/BorosSignet.java index 9eae8a6321..e9e9142bdb 100644 --- a/Mage.Sets/src/mage/sets/ravnika/BorosSignet.java +++ b/Mage.Sets/src/mage/sets/ravnika/BorosSignet.java @@ -36,7 +36,7 @@ import mage.Constants.Zone; import mage.Mana; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.BasicManaAbility; import mage.cards.CardImpl; @@ -64,7 +64,7 @@ public class BorosSignet extends CardImpl { class BorosSignetAbility extends BasicManaAbility { public BorosSignetAbility() { - super(new ManaEffect(new Mana(1, 0, 0, 1, 0, 0, 0))); + super(new BasicManaEffect(new Mana(1, 0, 0, 1, 0, 0, 0))); this.addCost(new GenericManaCost(1)); this.netMana.setRed(1); this.netMana.setWhite(1); diff --git a/Mage.Sets/src/mage/sets/ravnika/DimirSignet.java b/Mage.Sets/src/mage/sets/ravnika/DimirSignet.java index 4258aff8ad..e8e1b210c7 100644 --- a/Mage.Sets/src/mage/sets/ravnika/DimirSignet.java +++ b/Mage.Sets/src/mage/sets/ravnika/DimirSignet.java @@ -36,7 +36,7 @@ import mage.Constants.Zone; import mage.Mana; import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.BasicManaAbility; import mage.abilities.mana.ManaAbility; import mage.cards.CardImpl; @@ -67,7 +67,7 @@ public class DimirSignet extends CardImpl { class DimirSignetAbility extends BasicManaAbility { public DimirSignetAbility() { - super(new ManaEffect(new Mana(0, 0, 1, 0, 1, 0, 0))); + super(new BasicManaEffect(new Mana(0, 0, 1, 0, 1, 0, 0))); this.netMana.setBlue(1); this.netMana.setBlack(1); } diff --git a/Mage.Sets/src/mage/sets/ravnika/GolgariSignet.java b/Mage.Sets/src/mage/sets/ravnika/GolgariSignet.java index 8e4187f5eb..7636928d58 100644 --- a/Mage.Sets/src/mage/sets/ravnika/GolgariSignet.java +++ b/Mage.Sets/src/mage/sets/ravnika/GolgariSignet.java @@ -34,7 +34,7 @@ import mage.Constants.Rarity; import mage.Mana; import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.BasicManaAbility; import mage.cards.CardImpl; @@ -65,7 +65,7 @@ public class GolgariSignet extends CardImpl { class GolgariSignetAbility extends BasicManaAbility { public GolgariSignetAbility() { - super(new ManaEffect(new Mana(0, 1, 0, 0, 1, 0, 0))); + super(new BasicManaEffect(new Mana(0, 1, 0, 0, 1, 0, 0))); this.netMana.setGreen(1); this.netMana.setBlack(1); } diff --git a/Mage.Sets/src/mage/sets/ravnika/SelesnyaSignet.java b/Mage.Sets/src/mage/sets/ravnika/SelesnyaSignet.java index d0ff999f73..312ee291f2 100644 --- a/Mage.Sets/src/mage/sets/ravnika/SelesnyaSignet.java +++ b/Mage.Sets/src/mage/sets/ravnika/SelesnyaSignet.java @@ -35,7 +35,7 @@ import mage.Constants.Rarity; import mage.Mana; import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.BasicManaAbility; import mage.cards.CardImpl; @@ -66,7 +66,7 @@ public class SelesnyaSignet extends CardImpl { class SelesnyaSignetAbility extends BasicManaAbility { public SelesnyaSignetAbility() { - super(new ManaEffect(new Mana(0, 1, 0, 1, 0, 0, 0))); + super(new BasicManaEffect(new Mana(0, 1, 0, 1, 0, 0, 0))); this.netMana.setGreen(1); this.netMana.setWhite(1); } diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/DreamstoneHedron.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/DreamstoneHedron.java index 306b3dd25e..bda54b6018 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/DreamstoneHedron.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/DreamstoneHedron.java @@ -37,7 +37,7 @@ import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.DrawCardControllerEffect; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.cards.CardImpl; /** @@ -50,7 +50,7 @@ public class DreamstoneHedron extends CardImpl { super(ownerId, 216, "Dreamstone Hedron", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{6}"); this.expansionSetCode = "ROE"; - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ManaEffect(Mana.ColorlessMana(3)), new TapSourceCost())); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.ColorlessMana(3)), new TapSourceCost())); SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardControllerEffect(3), new GenericManaCost(3)); diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/EldraziTemple.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/EldraziTemple.java index c61d43d242..ff83f8b69e 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/EldraziTemple.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/EldraziTemple.java @@ -32,7 +32,7 @@ import mage.Constants.CardType; import mage.Constants.Rarity; import mage.MageObject; import mage.Mana; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.BasicManaAbility; import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; @@ -71,7 +71,7 @@ class EldraziTempleManaAbility extends BasicManaAbility(Mage Tip: This ability can only be activated when an Eldrazi spell or ability is on the stack.)"; EldraziTempleManaAbility ( ) { - super(new ManaEffect(Mana.ColorlessMana(2))); + super(new BasicManaEffect(Mana.ColorlessMana(2))); this.netMana.setColorless(2); } diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/JoragaTreespeaker.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/JoragaTreespeaker.java index b742fe6690..a409ba6356 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/JoragaTreespeaker.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/JoragaTreespeaker.java @@ -43,7 +43,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.continious.GainAbilityControlledEffect; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.keyword.LevelAbility; import mage.abilities.keyword.LevelUpAbility; import mage.abilities.mana.SimpleManaAbility; @@ -75,13 +75,13 @@ public class JoragaTreespeaker extends LevelerCard { this.addAbility(new LevelUpAbility(new ManaCostsImpl("{1}{G}"))); Abilities abilities1 = new AbilitiesImpl(); - abilities1.add(new SimpleManaAbility(Zone.BATTLEFIELD, new ManaEffect(Mana.GreenMana(2)), new TapSourceCost())); + abilities1.add(new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana(2)), new TapSourceCost())); this.getLevels().add(new LevelAbility(1, 4, abilities1, 1, 2)); Abilities abilities2 = new AbilitiesImpl(); abilities2.add(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(new SimpleActivatedAbility(Zone.BATTLEFIELD, - new ManaEffect(Mana.GreenMana(2)), + new BasicManaEffect(Mana.GreenMana(2)), new TapSourceCost()), Duration.WhileOnBattlefield, filter))); this.getLevels().add(new LevelAbility(5, -1, abilities2, 1, 4)); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/GrandArchitect.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/GrandArchitect.java index c0ca6f098c..291e9ef470 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/GrandArchitect.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/GrandArchitect.java @@ -46,7 +46,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.TapTargetCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.ContinuousEffectImpl; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.effects.common.continious.BoostControlledEffect; import mage.abilities.mana.ManaAbility; import mage.cards.CardImpl; @@ -152,7 +152,7 @@ class GrandArchitectManaAbility extends ManaAbility { } GrandArchitectManaAbility ( ) { - super(Zone.BATTLEFIELD, new ManaEffect(Mana.ColorlessMana(2)), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true))); + super(Zone.BATTLEFIELD, new BasicManaEffect(Mana.ColorlessMana(2)), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true))); this.netMana.setColorless(2); } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/MoxOpal.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/MoxOpal.java index 3d20db33e7..50908475a8 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/MoxOpal.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/MoxOpal.java @@ -30,19 +30,16 @@ package mage.sets.scarsofmirrodin; import mage.Constants.CardType; import mage.Constants.Rarity; +import mage.abilities.Ability; import mage.abilities.costs.common.MetalcraftCost; +import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import java.util.UUID; -import mage.Constants.Zone; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.AddManaOfAnyColorEffect; -import mage.choices.ChoiceColor; /** * - * @author BetaSteward_at_googlemail.com + * @author BetaSteward_at_googlemail.com, Loki */ public class MoxOpal extends CardImpl { @@ -51,8 +48,7 @@ public class MoxOpal extends CardImpl { this.supertype.add("Legendary"); this.expansionSetCode = "SOM"; - SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new TapSourceCost()); - ability.addChoice(new ChoiceColor()); + Ability ability = new AnyColorManaAbility(); ability.addCost(new MetalcraftCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/PalladiumMyr.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/PalladiumMyr.java index 5d39a1d746..32700c2dad 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/PalladiumMyr.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/PalladiumMyr.java @@ -32,7 +32,7 @@ import mage.Constants.CardType; import mage.Constants.Rarity; import mage.MageInt; import mage.Mana; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.BasicManaAbility; import mage.cards.CardImpl; @@ -66,7 +66,7 @@ public class PalladiumMyr extends CardImpl { class PalladiumMyrAbility extends BasicManaAbility { public PalladiumMyrAbility() { - super(new ManaEffect(Mana.ColorlessMana(2))); + super(new BasicManaEffect(Mana.ColorlessMana(2))); this.netMana.setColorless(2); } diff --git a/Mage.Sets/src/mage/sets/tenth/BirdsOfParadise.java b/Mage.Sets/src/mage/sets/tenth/BirdsOfParadise.java index 8ac5f80e0e..a985e2b039 100644 --- a/Mage.Sets/src/mage/sets/tenth/BirdsOfParadise.java +++ b/Mage.Sets/src/mage/sets/tenth/BirdsOfParadise.java @@ -31,18 +31,14 @@ package mage.sets.tenth; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Rarity; -import mage.Constants.Zone; import mage.MageInt; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.AddManaOfAnyColorEffect; import mage.abilities.keyword.FlyingAbility; +import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; -import mage.choices.ChoiceColor; /** * - * @author BetaSteward_at_googlemail.com + * @author BetaSteward_at_googlemail.com, Loki */ public class BirdsOfParadise extends CardImpl { @@ -56,9 +52,7 @@ public class BirdsOfParadise extends CardImpl { this.toughness = new MageInt(1); this.addAbility(FlyingAbility.getInstance()); - SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new TapSourceCost()); - ability.addChoice(new ChoiceColor()); - this.addAbility(ability); + this.addAbility(new AnyColorManaAbility()); } public BirdsOfParadise(final BirdsOfParadise card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/GreenweaverDruid.java b/Mage.Sets/src/mage/sets/zendikar/GreenweaverDruid.java index 9e31bbd110..9454edc27f 100644 --- a/Mage.Sets/src/mage/sets/zendikar/GreenweaverDruid.java +++ b/Mage.Sets/src/mage/sets/zendikar/GreenweaverDruid.java @@ -35,7 +35,7 @@ import mage.MageInt; import mage.Mana; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.cards.CardImpl; /** @@ -54,7 +54,7 @@ public class GreenweaverDruid extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ManaEffect(Mana.GreenMana(2)), new TapSourceCost())); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana(2)), new TapSourceCost())); } public GreenweaverDruid(final GreenweaverDruid card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/KhalniGem.java b/Mage.Sets/src/mage/sets/zendikar/KhalniGem.java index 3b545554af..b01a15bd52 100644 --- a/Mage.Sets/src/mage/sets/zendikar/KhalniGem.java +++ b/Mage.Sets/src/mage/sets/zendikar/KhalniGem.java @@ -38,7 +38,7 @@ 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.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.filter.common.FilterControlledPermanent; @@ -68,11 +68,11 @@ public class KhalniGem extends CardImpl { Target target = new TargetControlledPermanent(2, 2, filter, false); etbAbility.addTarget(target); this.addAbility(etbAbility); - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new ManaEffect(new Mana(2, 0, 0, 0, 0, 0, 0)), new TapSourceCost())); - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new ManaEffect(new Mana(0, 2, 0, 0, 0, 0, 0)), new TapSourceCost())); - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new ManaEffect(new Mana(0, 0, 2, 0, 0, 0, 0)), new TapSourceCost())); - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new ManaEffect(new Mana(0, 0, 0, 2, 0, 0, 0)), new TapSourceCost())); - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new ManaEffect(new Mana(0, 0, 0, 0, 2, 0, 0)), new TapSourceCost())); + 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())); } public KhalniGem (final KhalniGem card) { diff --git a/Mage/src/mage/abilities/effects/common/AddManaOfAnyColorEffect.java b/Mage/src/mage/abilities/effects/common/AddManaOfAnyColorEffect.java index f6d42f50bc..092a7f06df 100644 --- a/Mage/src/mage/abilities/effects/common/AddManaOfAnyColorEffect.java +++ b/Mage/src/mage/abilities/effects/common/AddManaOfAnyColorEffect.java @@ -40,10 +40,10 @@ import mage.players.Player; * * @author BetaSteward_at_googlemail.com */ -public class AddManaOfAnyColorEffect extends OneShotEffect { +public class AddManaOfAnyColorEffect extends ManaEffect { public AddManaOfAnyColorEffect() { - super(Outcome.PutManaInPool); + super(); } public AddManaOfAnyColorEffect(final AddManaOfAnyColorEffect effect) { diff --git a/Mage/src/mage/abilities/effects/common/BasicManaEffect.java b/Mage/src/mage/abilities/effects/common/BasicManaEffect.java new file mode 100644 index 0000000000..c83d0bd906 --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/BasicManaEffect.java @@ -0,0 +1,41 @@ +package mage.abilities.effects.common; + +import mage.Constants; +import mage.Mana; +import mage.abilities.Ability; +import mage.game.Game; + +public class BasicManaEffect extends ManaEffect { + protected Mana mana; + + public BasicManaEffect(Mana mana) { + super(); + this.mana = mana; + } + + public BasicManaEffect(final BasicManaEffect effect) { + super(effect); + this.mana = effect.mana.copy(); + } + + @Override + public BasicManaEffect copy() { + return new BasicManaEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + game.getPlayer(source.getControllerId()).getManaPool().changeMana(mana); + return true; + } + + + @Override + public String getText(Ability source) { + return "Add " + mana.toString() + " to your mana pool"; + } + + public Mana getMana() { + return mana; + } +} diff --git a/Mage/src/mage/abilities/effects/common/DynamicManaEffect.java b/Mage/src/mage/abilities/effects/common/DynamicManaEffect.java index c887c399db..0d20c33903 100644 --- a/Mage/src/mage/abilities/effects/common/DynamicManaEffect.java +++ b/Mage/src/mage/abilities/effects/common/DynamicManaEffect.java @@ -37,7 +37,7 @@ import mage.game.Game; * * @author North */ -public class DynamicManaEffect extends ManaEffect { +public class DynamicManaEffect extends BasicManaEffect { private Mana computedMana; private DynamicValue amount; diff --git a/Mage/src/mage/abilities/effects/common/ManaEffect.java b/Mage/src/mage/abilities/effects/common/ManaEffect.java index a555a0b745..48f7c92b35 100644 --- a/Mage/src/mage/abilities/effects/common/ManaEffect.java +++ b/Mage/src/mage/abilities/effects/common/ManaEffect.java @@ -38,37 +38,14 @@ import mage.game.Game; * * @author BetaSteward_at_googlemail.com */ -public class ManaEffect extends OneShotEffect { +public abstract class ManaEffect> extends OneShotEffect { - protected Mana mana; - - public ManaEffect(Mana mana) { + public ManaEffect() { super(Outcome.PutManaInPool); - this.mana = mana; } public ManaEffect(final ManaEffect effect) { super(effect); - this.mana = effect.mana.copy(); } - @Override - public ManaEffect copy() { - return new ManaEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - game.getPlayer(source.getControllerId()).getManaPool().changeMana(mana); - return true; - } - - @Override - public String getText(Ability source) { - return "Add " + mana.toString() + " to your mana pool"; - } - - public Mana getMana() { - return mana; - } } diff --git a/Mage/src/mage/abilities/mana/AnyColorManaAbility.java b/Mage/src/mage/abilities/mana/AnyColorManaAbility.java new file mode 100644 index 0000000000..cf5695952d --- /dev/null +++ b/Mage/src/mage/abilities/mana/AnyColorManaAbility.java @@ -0,0 +1,27 @@ +package mage.abilities.mana; + +import mage.Constants; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.AddManaOfAnyColorEffect; +import mage.choices.ChoiceColor; + +public class AnyColorManaAbility extends ManaAbility { + public AnyColorManaAbility() { + this(new TapSourceCost()); + } + + public AnyColorManaAbility(Cost cost) { + super(Constants.Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), cost); + this.addChoice(new ChoiceColor()); + } + + public AnyColorManaAbility(final AnyColorManaAbility ability) { + super(ability); + } + + @Override + public AnyColorManaAbility copy() { + return new AnyColorManaAbility(this); + } +} diff --git a/Mage/src/mage/abilities/mana/BlackManaAbility.java b/Mage/src/mage/abilities/mana/BlackManaAbility.java index efae430815..954ded3934 100644 --- a/Mage/src/mage/abilities/mana/BlackManaAbility.java +++ b/Mage/src/mage/abilities/mana/BlackManaAbility.java @@ -29,7 +29,7 @@ package mage.abilities.mana; import mage.Mana; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; /** * @@ -38,7 +38,7 @@ import mage.abilities.effects.common.ManaEffect; public class BlackManaAbility extends BasicManaAbility { public BlackManaAbility() { - super(new ManaEffect(Mana.BlackMana)); + super(new BasicManaEffect(Mana.BlackMana)); this.netMana.setBlack(1); } diff --git a/Mage/src/mage/abilities/mana/BlueManaAbility.java b/Mage/src/mage/abilities/mana/BlueManaAbility.java index 0ceeddf667..e4ca770bc4 100644 --- a/Mage/src/mage/abilities/mana/BlueManaAbility.java +++ b/Mage/src/mage/abilities/mana/BlueManaAbility.java @@ -29,7 +29,7 @@ package mage.abilities.mana; import mage.Mana; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; /** * @@ -38,7 +38,7 @@ import mage.abilities.effects.common.ManaEffect; public class BlueManaAbility extends BasicManaAbility { public BlueManaAbility() { - super(new ManaEffect(Mana.BlueMana)); + super(new BasicManaEffect(Mana.BlueMana)); this.netMana.setBlue(1); } diff --git a/Mage/src/mage/abilities/mana/ColorlessManaAbility.java b/Mage/src/mage/abilities/mana/ColorlessManaAbility.java index c7f54f3b72..7485a99502 100644 --- a/Mage/src/mage/abilities/mana/ColorlessManaAbility.java +++ b/Mage/src/mage/abilities/mana/ColorlessManaAbility.java @@ -29,6 +29,7 @@ package mage.abilities.mana; import mage.Mana; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.effects.common.ManaEffect; /** @@ -38,7 +39,7 @@ import mage.abilities.effects.common.ManaEffect; public class ColorlessManaAbility extends BasicManaAbility { public ColorlessManaAbility() { - super(new ManaEffect(Mana.ColorlessMana)); + super(new BasicManaEffect(Mana.ColorlessMana)); this.netMana.setColorless(1); } diff --git a/Mage/src/mage/abilities/mana/GreenManaAbility.java b/Mage/src/mage/abilities/mana/GreenManaAbility.java index 703f7b6f56..561a89518f 100644 --- a/Mage/src/mage/abilities/mana/GreenManaAbility.java +++ b/Mage/src/mage/abilities/mana/GreenManaAbility.java @@ -29,7 +29,7 @@ package mage.abilities.mana; import mage.Mana; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; /** * @@ -38,7 +38,7 @@ import mage.abilities.effects.common.ManaEffect; public class GreenManaAbility extends BasicManaAbility { public GreenManaAbility() { - super(new ManaEffect(Mana.GreenMana)); + super(new BasicManaEffect(Mana.GreenMana)); this.netMana.setGreen(1); } diff --git a/Mage/src/mage/abilities/mana/RedManaAbility.java b/Mage/src/mage/abilities/mana/RedManaAbility.java index 74483249e0..f85f5c464b 100644 --- a/Mage/src/mage/abilities/mana/RedManaAbility.java +++ b/Mage/src/mage/abilities/mana/RedManaAbility.java @@ -29,7 +29,7 @@ package mage.abilities.mana; import mage.Mana; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; /** * @@ -38,7 +38,7 @@ import mage.abilities.effects.common.ManaEffect; public class RedManaAbility extends BasicManaAbility { public RedManaAbility() { - super(new ManaEffect(Mana.RedMana)); + super(new BasicManaEffect(Mana.RedMana)); this.netMana.setRed(1); } diff --git a/Mage/src/mage/abilities/mana/WhiteManaAbility.java b/Mage/src/mage/abilities/mana/WhiteManaAbility.java index 3c3c6d84b9..2d981d722b 100644 --- a/Mage/src/mage/abilities/mana/WhiteManaAbility.java +++ b/Mage/src/mage/abilities/mana/WhiteManaAbility.java @@ -29,7 +29,7 @@ package mage.abilities.mana; import mage.Mana; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; /** * @@ -38,7 +38,7 @@ import mage.abilities.effects.common.ManaEffect; public class WhiteManaAbility extends BasicManaAbility { public WhiteManaAbility() { - super(new ManaEffect(Mana.WhiteMana)); + super(new BasicManaEffect(Mana.WhiteMana)); this.netMana.setWhite(1); } diff --git a/Mage/src/mage/game/permanent/token/EldraziSpawnToken.java b/Mage/src/mage/game/permanent/token/EldraziSpawnToken.java index 2bec8bca1b..c23544b6c3 100644 --- a/Mage/src/mage/game/permanent/token/EldraziSpawnToken.java +++ b/Mage/src/mage/game/permanent/token/EldraziSpawnToken.java @@ -33,7 +33,7 @@ import mage.Constants.Zone; import mage.MageInt; import mage.Mana; import mage.abilities.costs.common.SacrificeSourceCost; -import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.SimpleManaAbility; /** @@ -49,7 +49,7 @@ public class EldraziSpawnToken extends Token { subtype.add("Spawn"); power = new MageInt(0); toughness = new MageInt(1); - addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new ManaEffect(Mana.ColorlessMana), new SacrificeSourceCost())); + addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.ColorlessMana), new SacrificeSourceCost())); } }