From 564e2cd58bce1a04620b358a75c21b1a6562e824 Mon Sep 17 00:00:00 2001 From: Neil Gentleman Date: Sun, 17 Jul 2016 20:09:25 -0700 Subject: [PATCH] use Mana.ColorlessMana; SimpleManaAbility removing explicit `new BasicManaEffect()` calls, where SimpleManaAbility will do it implicitly --- Mage.Sets/src/mage/cards/b/BasalThrull.java | 3 +-- .../src/mage/cards/b/BasaltMonolith.java | 2 +- Mage.Sets/src/mage/cards/b/BloodVassal.java | 3 +-- Mage.Sets/src/mage/cards/b/BogWitch.java | 3 +-- .../mage/cards/b/BoseijuWhoSheltersAll.java | 2 +- Mage.Sets/src/mage/cards/c/CabalRitual.java | 4 ++-- Mage.Sets/src/mage/cards/c/Cathodion.java | 2 +- .../src/mage/cards/c/CircleOfElders.java | 2 +- Mage.Sets/src/mage/cards/c/CoalStoker.java | 2 +- .../src/mage/cards/c/CullingTheWeak.java | 2 +- Mage.Sets/src/mage/cards/d/DarkRitual.java | 2 +- Mage.Sets/src/mage/cards/d/Deconstruct.java | 2 +- .../src/mage/cards/d/DesperateRitual.java | 2 +- .../src/mage/cards/d/DreamstoneHedron.java | 21 ++-------------- Mage.Sets/src/mage/cards/d/DroidFoundry.java | 2 +- Mage.Sets/src/mage/cards/d/DwarvenRuins.java | 3 +-- .../src/mage/cards/e/EbonStronghold.java | 3 +-- .../src/mage/cards/e/ElvishSpiritGuide.java | 3 +-- Mage.Sets/src/mage/cards/e/EwokVillage.java | 2 +- .../src/mage/cards/f/FarrelitePriest.java | 7 ++---- Mage.Sets/src/mage/cards/f/FrontierSiege.java | 2 +- Mage.Sets/src/mage/cards/f/FyndhornElder.java | 2 +- .../src/mage/cards/g/GeothermalCrevice.java | 3 +-- .../src/mage/cards/g/GrandArchitect.java | 2 +- .../src/mage/cards/g/GreenweaverDruid.java | 3 +-- .../src/mage/cards/g/GroveOfTheGuardian.java | 2 +- .../mage/cards/h/HavenwoodBattleground.java | 3 +-- Mage.Sets/src/mage/cards/h/HeritageDruid.java | 2 +- Mage.Sets/src/mage/cards/h/HuttPalace.java | 2 +- .../mage/cards/i/InitiatesOfTheEbonHand.java | 5 +--- Mage.Sets/src/mage/cards/j/JediTemple.java | 2 +- .../src/mage/cards/j/JoragaTreespeaker.java | 5 +--- .../src/mage/cards/k/KnotvineMystic.java | 24 ++++--------------- Mage.Sets/src/mage/cards/l/LakeOfTheDead.java | 2 +- .../src/mage/cards/l/LiturgyOfBlood.java | 2 +- Mage.Sets/src/mage/cards/m/ManaDrain.java | 2 +- Mage.Sets/src/mage/cards/m/ManaEchoes.java | 2 +- Mage.Sets/src/mage/cards/m/MarkOfSakiko.java | 2 +- .../src/mage/cards/m/MoonscarredWerewolf.java | 3 +-- Mage.Sets/src/mage/cards/m/MyrMoonvessel.java | 2 +- Mage.Sets/src/mage/cards/m/MyrReservoir.java | 2 +- .../src/mage/cards/o/OvereagerApprentice.java | 3 +-- Mage.Sets/src/mage/cards/o/Overgrowth.java | 2 +- Mage.Sets/src/mage/cards/p/PalladiumMyr.java | 24 ++++--------------- .../src/mage/cards/r/RadhaHeirToKeld.java | 2 +- .../src/mage/cards/r/ReflectingPool.java | 2 +- Mage.Sets/src/mage/cards/r/RoguesPassage.java | 2 +- .../src/mage/cards/r/RosheenMeanderer.java | 2 +- .../src/mage/cards/r/RuinsOfTrokair.java | 3 +-- .../mage/cards/s/SachiDaughterOfSeshiro.java | 3 +-- .../mage/cards/s/SakikoMotherOfSummer.java | 2 +- Mage.Sets/src/mage/cards/s/SeaScryer.java | 3 +-- Mage.Sets/src/mage/cards/s/SeethingSong.java | 2 +- Mage.Sets/src/mage/cards/s/SeismicSpike.java | 2 +- .../mage/cards/s/SetonKrosanProtector.java | 6 ++--- .../mage/cards/s/ShizukoCallerOfAutumn.java | 2 +- .../src/mage/cards/s/SimianSpiritGuide.java | 3 +-- Mage.Sets/src/mage/cards/s/SisaysRing.java | 2 +- Mage.Sets/src/mage/cards/s/SithCitadel.java | 2 +- Mage.Sets/src/mage/cards/s/SolRing.java | 24 ++++--------------- .../src/mage/cards/s/SoulbrightFlamekin.java | 2 +- .../src/mage/cards/s/SquanderedResources.java | 2 +- Mage.Sets/src/mage/cards/s/StarCompass.java | 2 +- Mage.Sets/src/mage/cards/s/SuChi.java | 2 +- .../src/mage/cards/s/SvyeluniteTemple.java | 3 +-- Mage.Sets/src/mage/cards/t/TeferisIsle.java | 2 +- Mage.Sets/src/mage/cards/t/TinderWall.java | 3 +-- Mage.Sets/src/mage/cards/t/TurnToDust.java | 2 +- Mage.Sets/src/mage/cards/u/UrGolemsEye.java | 2 +- Mage.Sets/src/mage/cards/v/Valleymaker.java | 2 +- Mage.Sets/src/mage/cards/w/WasteNot.java | 2 +- Mage.Sets/src/mage/cards/w/WitchEngine.java | 2 +- Mage.Sets/src/mage/cards/w/Workhorse.java | 3 +-- .../src/mage/cards/w/WornPowerstone.java | 24 ++++--------------- .../AddConditionalColorlessManaEffect.java | 2 +- .../mana/AnyColorLandsProduceManaAbility.java | 2 +- .../abilities/mana/ColorlessManaAbility.java | 2 +- .../mana/ConditionalColorlessManaAbility.java | 2 +- .../java/mage/abilities/mana/ManaOptions.java | 2 +- 79 files changed, 95 insertions(+), 205 deletions(-) diff --git a/Mage.Sets/src/mage/cards/b/BasalThrull.java b/Mage.Sets/src/mage/cards/b/BasalThrull.java index fbc9f91344..2af03ae819 100644 --- a/Mage.Sets/src/mage/cards/b/BasalThrull.java +++ b/Mage.Sets/src/mage/cards/b/BasalThrull.java @@ -33,7 +33,6 @@ import mage.Mana; import mage.abilities.Ability; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -53,7 +52,7 @@ public class BasalThrull extends CardImpl { this.toughness = new MageInt(2); // {T}, Sacrifice Basal Thrull: Add {B}{B} to your mana pool. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 0, 0, 2, 0, 0, 0)), new TapSourceCost()); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(2), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BasaltMonolith.java b/Mage.Sets/src/mage/cards/b/BasaltMonolith.java index c0352e347c..0d55b96e07 100644 --- a/Mage.Sets/src/mage/cards/b/BasaltMonolith.java +++ b/Mage.Sets/src/mage/cards/b/BasaltMonolith.java @@ -53,7 +53,7 @@ public class BasaltMonolith extends CardImpl { // Basalt Monolith doesn't untap during your untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepSourceEffect())); // {tap}: Add {C}{C}{C} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 0, 0, 0, 0, 3), new TapSourceCost())); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(3), new TapSourceCost())); // {3}: Untap Basalt Monolith. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new GenericManaCost(3))); } diff --git a/Mage.Sets/src/mage/cards/b/BloodVassal.java b/Mage.Sets/src/mage/cards/b/BloodVassal.java index 492ee056b6..ef16ea0e6d 100644 --- a/Mage.Sets/src/mage/cards/b/BloodVassal.java +++ b/Mage.Sets/src/mage/cards/b/BloodVassal.java @@ -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; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -53,7 +52,7 @@ public class BloodVassal extends CardImpl { this.toughness = new MageInt(2); // Sacrifice Blood Vassal: Add {B}{B} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana(2)), new SacrificeSourceCost())); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(2), new SacrificeSourceCost())); } public BloodVassal(final BloodVassal card) { diff --git a/Mage.Sets/src/mage/cards/b/BogWitch.java b/Mage.Sets/src/mage/cards/b/BogWitch.java index 2e3584e5f0..4d446b1d5b 100644 --- a/Mage.Sets/src/mage/cards/b/BogWitch.java +++ b/Mage.Sets/src/mage/cards/b/BogWitch.java @@ -34,7 +34,6 @@ import mage.abilities.Ability; import mage.abilities.costs.common.DiscardCardCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -55,7 +54,7 @@ public class BogWitch extends CardImpl { this.toughness = new MageInt(1); // {B}, {tap}, Discard a card: Add {B}{B}{B} to your mana pool. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 0, 0, 3, 0, 0, 0)), new ManaCostsImpl("{B}")); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(3), new ManaCostsImpl("{B}")); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardCardCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java b/Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java index f04dc8d2c5..1604850763 100644 --- a/Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java +++ b/Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java @@ -67,7 +67,7 @@ public class BoseijuWhoSheltersAll extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); // {tap}, Pay 2 life: Add {C} to your mana pool. If that mana is spent on an instant or sorcery spell, that spell can't be countered by spells or abilities. - Mana mana = new Mana(0, 0, 0, 0, 0, 0, 0, 1); + Mana mana = Mana.ColorlessMana(1); mana.setFlag(true); // used to indicate this mana ability SimpleManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, mana, new TapSourceCost()); ability.addCost(new PayLifeCost(2)); diff --git a/Mage.Sets/src/mage/cards/c/CabalRitual.java b/Mage.Sets/src/mage/cards/c/CabalRitual.java index 41e5580d37..ce54456006 100644 --- a/Mage.Sets/src/mage/cards/c/CabalRitual.java +++ b/Mage.Sets/src/mage/cards/c/CabalRitual.java @@ -49,8 +49,8 @@ public class CabalRitual extends CardImpl { // Add {B}{B}{B} to your mana pool. // Threshold — Add {B}{B}{B}{B}{B} to your mana pool instead if seven or more cards are in your graveyard. this.getSpellAbility().addEffect(new ConditionalManaEffect( - new BasicManaEffect(new Mana(0, 0, 0, 0, 5, 0, 0, 0)), - new BasicManaEffect(new Mana(0, 0, 0, 0, 3, 0, 0, 0)), + new BasicManaEffect(Mana.BlackMana(5)), + new BasicManaEffect(Mana.BlackMana(3)), new CardsInControllerGraveCondition(7), "Add {B}{B}{B} to your mana pool.

Threshold - Add {B}{B}{B}{B}{B} to your mana pool instead if seven or more cards are in your graveyard")); } diff --git a/Mage.Sets/src/mage/cards/c/Cathodion.java b/Mage.Sets/src/mage/cards/c/Cathodion.java index 79db38278a..892804ee33 100644 --- a/Mage.Sets/src/mage/cards/c/Cathodion.java +++ b/Mage.Sets/src/mage/cards/c/Cathodion.java @@ -47,7 +47,7 @@ public class Cathodion extends CardImpl { this.subtype.add("Construct"); this.power = new MageInt(3); this.toughness = new MageInt(3); - this.addAbility(new DiesTriggeredAbility(new BasicManaEffect(new Mana(0, 0, 0, 0, 0, 0, 0, 3)), false)); + this.addAbility(new DiesTriggeredAbility(new BasicManaEffect(Mana.ColorlessMana(3)), false)); } public Cathodion(final Cathodion card) { diff --git a/Mage.Sets/src/mage/cards/c/CircleOfElders.java b/Mage.Sets/src/mage/cards/c/CircleOfElders.java index f0191bb77b..79581325e7 100644 --- a/Mage.Sets/src/mage/cards/c/CircleOfElders.java +++ b/Mage.Sets/src/mage/cards/c/CircleOfElders.java @@ -61,7 +61,7 @@ public class CircleOfElders extends CardImpl { // Formidable - {T}: Add {C}{C}{C} to your mana pool. Activate this only if creatures you control have total power 8 or greater. Ability ability = new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, - new BasicManaEffect(new Mana(0, 0, 0, 0, 0, 0, 0, 3)), + new BasicManaEffect(Mana.ColorlessMana(3)), new TapSourceCost(), FormidableCondition.getInstance()); ability.setAbilityWord(AbilityWord.FORMIDABLE); diff --git a/Mage.Sets/src/mage/cards/c/CoalStoker.java b/Mage.Sets/src/mage/cards/c/CoalStoker.java index 34e9262fa1..8692968bda 100644 --- a/Mage.Sets/src/mage/cards/c/CoalStoker.java +++ b/Mage.Sets/src/mage/cards/c/CoalStoker.java @@ -53,7 +53,7 @@ public class CoalStoker extends CardImpl { // When Coal Stoker enters the battlefield, if you cast it from your hand, add {R}{R}{R} to your mana pool. this.addAbility(new ConditionalTriggeredAbility( - new EntersBattlefieldTriggeredAbility(new BasicManaEffect(new Mana(3, 0, 0, 0, 0, 0, 0, 0)), false), + new EntersBattlefieldTriggeredAbility(new BasicManaEffect(Mana.RedMana(3)), false), new CastFromHandSourceCondition(), "When {this} enters the battlefield, if you cast it from your hand, add {R}{R}{R} to your mana pool."), new CastFromHandWatcher()); diff --git a/Mage.Sets/src/mage/cards/c/CullingTheWeak.java b/Mage.Sets/src/mage/cards/c/CullingTheWeak.java index e393f01b8f..4ba307f21c 100644 --- a/Mage.Sets/src/mage/cards/c/CullingTheWeak.java +++ b/Mage.Sets/src/mage/cards/c/CullingTheWeak.java @@ -51,7 +51,7 @@ public class CullingTheWeak extends CardImpl { this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("a creature")))); // Add {B}{B}{B}{B} to your mana pool. - this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(0, 0, 0, 0, 4, 0, 0, 0))); + this.getSpellAbility().addEffect(new BasicManaEffect(Mana.BlackMana(4))); } public CullingTheWeak(final CullingTheWeak card) { diff --git a/Mage.Sets/src/mage/cards/d/DarkRitual.java b/Mage.Sets/src/mage/cards/d/DarkRitual.java index 5471659d1d..3776d1e2e4 100644 --- a/Mage.Sets/src/mage/cards/d/DarkRitual.java +++ b/Mage.Sets/src/mage/cards/d/DarkRitual.java @@ -43,7 +43,7 @@ public class DarkRitual extends CardImpl { public DarkRitual(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}"); - this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(0, 0, 0, 0, 3, 0, 0, 0))); + this.getSpellAbility().addEffect(new BasicManaEffect(Mana.BlackMana(3))); } public DarkRitual(final DarkRitual card) { diff --git a/Mage.Sets/src/mage/cards/d/Deconstruct.java b/Mage.Sets/src/mage/cards/d/Deconstruct.java index 3815b9f101..1edd68dd50 100644 --- a/Mage.Sets/src/mage/cards/d/Deconstruct.java +++ b/Mage.Sets/src/mage/cards/d/Deconstruct.java @@ -55,7 +55,7 @@ public class Deconstruct extends CardImpl { this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addTarget(new TargetPermanent(filter)); - this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(0, 3, 0, 0, 0, 0, 0, 0))); + this.getSpellAbility().addEffect(new BasicManaEffect(Mana.GreenMana(3))); } public Deconstruct(final Deconstruct card) { diff --git a/Mage.Sets/src/mage/cards/d/DesperateRitual.java b/Mage.Sets/src/mage/cards/d/DesperateRitual.java index 9bff33b198..71b9c94f7c 100644 --- a/Mage.Sets/src/mage/cards/d/DesperateRitual.java +++ b/Mage.Sets/src/mage/cards/d/DesperateRitual.java @@ -47,7 +47,7 @@ public class DesperateRitual extends CardImpl { // Add {R}{R}{R} to your mana pool. - this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(3, 0, 0, 0, 0, 0, 0, 0))); + this.getSpellAbility().addEffect(new BasicManaEffect(Mana.RedMana(3))); // Splice onto Arcane {1}{R} this.addAbility(new SpliceOntoArcaneAbility("{1}{R}")); } diff --git a/Mage.Sets/src/mage/cards/d/DreamstoneHedron.java b/Mage.Sets/src/mage/cards/d/DreamstoneHedron.java index 61bfcf1323..ad24e32f98 100644 --- a/Mage.Sets/src/mage/cards/d/DreamstoneHedron.java +++ b/Mage.Sets/src/mage/cards/d/DreamstoneHedron.java @@ -33,9 +33,8 @@ import mage.abilities.common.SimpleActivatedAbility; 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.DrawCardSourceControllerEffect; -import mage.abilities.mana.BasicManaAbility; +import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -50,7 +49,7 @@ public class DreamstoneHedron extends CardImpl { public DreamstoneHedron(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{6}"); - this.addAbility(new DreamstoneHedronFirstManaAbility()); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(3), new TapSourceCost())); SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(3), new GenericManaCost(3)); @@ -68,20 +67,4 @@ public class DreamstoneHedron extends CardImpl { return new DreamstoneHedron(this); } - class DreamstoneHedronFirstManaAbility extends BasicManaAbility { - - public DreamstoneHedronFirstManaAbility() { - super(new BasicManaEffect(new Mana(0, 0, 0, 0, 0, 0, 0, 3))); - this.netMana.add(new Mana(0, 0, 0, 0, 0, 0, 0, 3)); - } - - public DreamstoneHedronFirstManaAbility(final DreamstoneHedronFirstManaAbility ability) { - super(ability); - } - - @Override - public DreamstoneHedronFirstManaAbility copy() { - return new DreamstoneHedronFirstManaAbility(this); - } - } } diff --git a/Mage.Sets/src/mage/cards/d/DroidFoundry.java b/Mage.Sets/src/mage/cards/d/DroidFoundry.java index d5ee50539f..4c26d322df 100644 --- a/Mage.Sets/src/mage/cards/d/DroidFoundry.java +++ b/Mage.Sets/src/mage/cards/d/DroidFoundry.java @@ -51,7 +51,7 @@ public class DroidFoundry extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); // When Droid Foundry enters the battlefield , add {U} to your mana pool. - this.addAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(new Mana(0, 0, 1, 0, 0, 0, 0, 0)))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(Mana.BlueMana(1)))); // {T}: Add {W} or {B} to you mana pool. this.addAbility(new WhiteManaAbility()); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenRuins.java b/Mage.Sets/src/mage/cards/d/DwarvenRuins.java index 28d589c6fc..92081e999c 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenRuins.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenRuins.java @@ -33,7 +33,6 @@ import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.RedManaAbility; import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; @@ -55,7 +54,7 @@ public class DwarvenRuins extends CardImpl { // {tap}: Add {R} to your mana pool. this.addAbility(new RedManaAbility()); // {tap}, Sacrifice Dwarven Ruins: Add {R}{R} to your mana pool. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.RedMana(2)), new TapSourceCost()); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(2), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/EbonStronghold.java b/Mage.Sets/src/mage/cards/e/EbonStronghold.java index 683e607a35..a4cf39efea 100644 --- a/Mage.Sets/src/mage/cards/e/EbonStronghold.java +++ b/Mage.Sets/src/mage/cards/e/EbonStronghold.java @@ -33,7 +33,6 @@ import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; @@ -55,7 +54,7 @@ public class EbonStronghold extends CardImpl { // {tap}: Add {B} to your mana pool. this.addAbility(new BlackManaAbility()); // {tap}, Sacrifice Ebon Stronghold: Add {B}{B} to your mana pool. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana(2)), new TapSourceCost()); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(2), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/ElvishSpiritGuide.java b/Mage.Sets/src/mage/cards/e/ElvishSpiritGuide.java index 5febf56936..2ebf989319 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishSpiritGuide.java +++ b/Mage.Sets/src/mage/cards/e/ElvishSpiritGuide.java @@ -33,7 +33,6 @@ import mage.Mana; import mage.abilities.Ability; import mage.abilities.costs.Cost; import mage.abilities.costs.CostImpl; -import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.SimpleManaAbility; import mage.cards.Card; import mage.cards.CardImpl; @@ -58,7 +57,7 @@ public class ElvishSpiritGuide extends CardImpl { this.toughness = new MageInt(2); // Exile Elvish Spirit Guide from your hand: Add {G} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.HAND, new BasicManaEffect(Mana.GreenMana(1)), new ExileSourceFromHandCost())); + this.addAbility(new SimpleManaAbility(Zone.HAND, Mana.GreenMana(1), new ExileSourceFromHandCost())); } public ElvishSpiritGuide(final ElvishSpiritGuide card) { diff --git a/Mage.Sets/src/mage/cards/e/EwokVillage.java b/Mage.Sets/src/mage/cards/e/EwokVillage.java index 3b102cb2cb..9b2c54729f 100644 --- a/Mage.Sets/src/mage/cards/e/EwokVillage.java +++ b/Mage.Sets/src/mage/cards/e/EwokVillage.java @@ -51,7 +51,7 @@ public class EwokVillage extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); // When Ewok Village enters the battlefield , add {G} to your mana pool. - this.addAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(new Mana(0, 1, 0, 0, 0, 0, 0, 0)))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(Mana.GreenMana(1)))); // {T}: Add {R} or {W} to you mana pool. this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/cards/f/FarrelitePriest.java b/Mage.Sets/src/mage/cards/f/FarrelitePriest.java index 25c2b46874..1c66774555 100644 --- a/Mage.Sets/src/mage/cards/f/FarrelitePriest.java +++ b/Mage.Sets/src/mage/cards/f/FarrelitePriest.java @@ -29,14 +29,13 @@ package mage.cards.f; import java.util.UUID; import mage.MageInt; -import static mage.Mana.WhiteMana; +import mage.Mana; import mage.abilities.Ability; import mage.abilities.ActivationInfo; import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; @@ -60,9 +59,7 @@ public class FarrelitePriest extends CardImpl { this.toughness = new MageInt(3); // {1}: Add {W} to your mana pool. If this ability has been activated four or more times this turn, sacrifice Farrelite Priest at the beginning of the next end step. - SimpleManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, - new BasicManaEffect(WhiteMana(1)), - new ManaCostsImpl("{1}")); + SimpleManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana(1), new ManaCostsImpl("{1}")); ability.addEffect(new FarrelitePriestEffect()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FrontierSiege.java b/Mage.Sets/src/mage/cards/f/FrontierSiege.java index e66ba55e93..38e6ae50a5 100644 --- a/Mage.Sets/src/mage/cards/f/FrontierSiege.java +++ b/Mage.Sets/src/mage/cards/f/FrontierSiege.java @@ -107,7 +107,7 @@ public class FrontierSiege extends CardImpl { class FrontierSiegeKhansTriggeredAbility extends TriggeredAbilityImpl { public FrontierSiegeKhansTriggeredAbility() { - super(Zone.BATTLEFIELD, new AddManaToManaPoolSourceControllerEffect(new Mana(0, 2, 0, 0, 0, 0, 0, 0)), false); + super(Zone.BATTLEFIELD, new AddManaToManaPoolSourceControllerEffect(Mana.GreenMana(2)), false); } diff --git a/Mage.Sets/src/mage/cards/f/FyndhornElder.java b/Mage.Sets/src/mage/cards/f/FyndhornElder.java index 0e2c765651..1a55aa3f5b 100644 --- a/Mage.Sets/src/mage/cards/f/FyndhornElder.java +++ b/Mage.Sets/src/mage/cards/f/FyndhornElder.java @@ -53,7 +53,7 @@ public class FyndhornElder extends CardImpl { this.toughness = new MageInt(1); // {tap}: Add {G}{G} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 2, 0, 0, 0, 0, 0, 0), new TapSourceCost())); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(2), new TapSourceCost())); } public FyndhornElder(final FyndhornElder card) { diff --git a/Mage.Sets/src/mage/cards/g/GeothermalCrevice.java b/Mage.Sets/src/mage/cards/g/GeothermalCrevice.java index 1b3802a9f6..f9c80b4894 100644 --- a/Mage.Sets/src/mage/cards/g/GeothermalCrevice.java +++ b/Mage.Sets/src/mage/cards/g/GeothermalCrevice.java @@ -35,7 +35,6 @@ import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.RedManaAbility; import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; @@ -56,7 +55,7 @@ public class GeothermalCrevice extends CardImpl { // {tap}: Add {R} to your mana pool. this.addAbility(new RedManaAbility()); // {tap}, Sacrifice Geothermal Crevice: Add {B}{G} to your mana pool. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 1, 0, 0, 1, 0, 0, 0)), new TapSourceCost()); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 0, 1, 0, 0, 0), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GrandArchitect.java b/Mage.Sets/src/mage/cards/g/GrandArchitect.java index f0e4911ee6..c9b1320838 100644 --- a/Mage.Sets/src/mage/cards/g/GrandArchitect.java +++ b/Mage.Sets/src/mage/cards/g/GrandArchitect.java @@ -145,7 +145,7 @@ class GrandArchitectManaAbility extends ManaAbility { GrandArchitectManaAbility() { super(Zone.BATTLEFIELD, new BasicManaEffect(new GrandArchitectConditionalMana()), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true))); - this.netMana.add(new Mana(0, 0, 0, 0, 0, 0, 0, 2)); + this.netMana.add(Mana.ColorlessMana(2)); } GrandArchitectManaAbility(GrandArchitectManaAbility ability) { diff --git a/Mage.Sets/src/mage/cards/g/GreenweaverDruid.java b/Mage.Sets/src/mage/cards/g/GreenweaverDruid.java index 5279396d20..6f380f8cdf 100644 --- a/Mage.Sets/src/mage/cards/g/GreenweaverDruid.java +++ b/Mage.Sets/src/mage/cards/g/GreenweaverDruid.java @@ -33,7 +33,6 @@ import mage.constants.Zone; import mage.MageInt; import mage.Mana; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -53,7 +52,7 @@ public class GreenweaverDruid extends CardImpl { this.toughness = new MageInt(1); // {T}: Add {G}{G} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana(2)), new TapSourceCost())); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(2), new TapSourceCost())); } public GreenweaverDruid(final GreenweaverDruid card) { diff --git a/Mage.Sets/src/mage/cards/g/GroveOfTheGuardian.java b/Mage.Sets/src/mage/cards/g/GroveOfTheGuardian.java index e71bc6745c..26834b1c1a 100644 --- a/Mage.Sets/src/mage/cards/g/GroveOfTheGuardian.java +++ b/Mage.Sets/src/mage/cards/g/GroveOfTheGuardian.java @@ -64,7 +64,7 @@ public class GroveOfTheGuardian extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); // {T}: Add {C} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 0, 0, 0, 0, 1), new TapSourceCost())); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(1), new TapSourceCost())); // {3}{G}{W}, {T}, Tap two untapped creatures you control, Sacrifice Grove of the Guardian: Create an 8/8 green and white Elemental creature token with vigilance. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ElementalToken(), 1), new ManaCostsImpl("{3}{G}{W}")); diff --git a/Mage.Sets/src/mage/cards/h/HavenwoodBattleground.java b/Mage.Sets/src/mage/cards/h/HavenwoodBattleground.java index 27ed5093e0..146e5a972f 100644 --- a/Mage.Sets/src/mage/cards/h/HavenwoodBattleground.java +++ b/Mage.Sets/src/mage/cards/h/HavenwoodBattleground.java @@ -33,7 +33,6 @@ import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; @@ -55,7 +54,7 @@ public class HavenwoodBattleground extends CardImpl { // {tap}: Add {G} to your mana pool. this.addAbility(new GreenManaAbility()); // {tap}, Sacrifice Havenwood Battleground: Add {G}{G} to your mana pool. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana(2)), new TapSourceCost()); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(2), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/HeritageDruid.java b/Mage.Sets/src/mage/cards/h/HeritageDruid.java index aca16a09f3..53eba0da9a 100644 --- a/Mage.Sets/src/mage/cards/h/HeritageDruid.java +++ b/Mage.Sets/src/mage/cards/h/HeritageDruid.java @@ -63,7 +63,7 @@ public class HeritageDruid extends CardImpl { this.toughness = new MageInt(1); // Tap three untapped Elves you control: Add {G}{G}{G} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 3, 0, 0, 0, 0, 0, 0), new TapTargetCost(new TargetControlledCreaturePermanent(3, 3, filter, true)))); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(3), new TapTargetCost(new TargetControlledCreaturePermanent(3, 3, filter, true)))); } public HeritageDruid(final HeritageDruid card) { diff --git a/Mage.Sets/src/mage/cards/h/HuttPalace.java b/Mage.Sets/src/mage/cards/h/HuttPalace.java index 19afcbf688..e6898be37f 100644 --- a/Mage.Sets/src/mage/cards/h/HuttPalace.java +++ b/Mage.Sets/src/mage/cards/h/HuttPalace.java @@ -51,7 +51,7 @@ public class HuttPalace extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); // When Hutt Palace enters the battlefield , add {R} to your mana pool. - this.addAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(new Mana(1, 0, 0, 0, 0, 0, 0, 0)))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(Mana.RedMana(1)))); // {T}: Add {B} or {G} to you mana pool. this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/cards/i/InitiatesOfTheEbonHand.java b/Mage.Sets/src/mage/cards/i/InitiatesOfTheEbonHand.java index 771e0ebaff..cc19a83bd6 100644 --- a/Mage.Sets/src/mage/cards/i/InitiatesOfTheEbonHand.java +++ b/Mage.Sets/src/mage/cards/i/InitiatesOfTheEbonHand.java @@ -36,7 +36,6 @@ import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; @@ -59,9 +58,7 @@ public class InitiatesOfTheEbonHand extends CardImpl { this.toughness = new MageInt(1); // {1}: Add {B} to your mana pool. If this ability has been activated four or more times this turn, sacrifice Initiates of the Ebon Hand at the beginning of the next end step. - SimpleManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, - new BasicManaEffect(BlackMana(1)), - new ManaCostsImpl("{1}")); + SimpleManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, BlackMana(1), new ManaCostsImpl("{1}")); ability.addEffect(new InitiatesOfTheEbonHandEffect()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/j/JediTemple.java b/Mage.Sets/src/mage/cards/j/JediTemple.java index 33042ca688..c443353898 100644 --- a/Mage.Sets/src/mage/cards/j/JediTemple.java +++ b/Mage.Sets/src/mage/cards/j/JediTemple.java @@ -51,7 +51,7 @@ public class JediTemple extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); // When Jedi Temple enters the battlefield , add {W} to your mana pool. - this.addAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(new Mana(0, 0, 0, 1, 0, 0, 0, 0)))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(Mana.WhiteMana(1)))); // {T}: Add {G} or {U} to you mana pool. this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/cards/j/JoragaTreespeaker.java b/Mage.Sets/src/mage/cards/j/JoragaTreespeaker.java index 0dabc2f191..198ecca2ba 100644 --- a/Mage.Sets/src/mage/cards/j/JoragaTreespeaker.java +++ b/Mage.Sets/src/mage/cards/j/JoragaTreespeaker.java @@ -40,7 +40,6 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.keyword.LevelUpAbility; import mage.abilities.keyword.LevelerCardBuilder; @@ -86,9 +85,7 @@ public class JoragaTreespeaker extends LevelerCard { // Elves you control have "{T}: Add {G}{G} to your mana pool." Abilities abilities2 = new AbilitiesImpl(); abilities2.add(new SimpleStaticAbility(Zone.BATTLEFIELD, - new GainAbilityControlledEffect(new SimpleManaAbility(Zone.BATTLEFIELD, - new BasicManaEffect(Mana.GreenMana(2)), - new TapSourceCost()), + new GainAbilityControlledEffect(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(2), new TapSourceCost()), Duration.WhileOnBattlefield, filter))); this.addAbilities(LevelerCardBuilder.construct( diff --git a/Mage.Sets/src/mage/cards/k/KnotvineMystic.java b/Mage.Sets/src/mage/cards/k/KnotvineMystic.java index b68d401490..48aca24d50 100644 --- a/Mage.Sets/src/mage/cards/k/KnotvineMystic.java +++ b/Mage.Sets/src/mage/cards/k/KnotvineMystic.java @@ -32,12 +32,13 @@ import java.util.UUID; import mage.MageInt; 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.BasicManaAbility; +import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Zone; /** * @@ -55,7 +56,7 @@ public class KnotvineMystic extends CardImpl { this.toughness = new MageInt(2); // {1}, {T}: Add {R}{G}{W} to your mana pool. - Ability ability = new KnotvineMysticManaAbility(); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 0, 1, 0, 0, 0, 0), new TapSourceCost()); ability.addManaCost(new GenericManaCost(1)); this.addAbility(ability); } @@ -70,20 +71,3 @@ public class KnotvineMystic extends CardImpl { } } - -class KnotvineMysticManaAbility extends BasicManaAbility { - - public KnotvineMysticManaAbility() { - super(new BasicManaEffect(new Mana(1, 1, 0, 1, 0, 0, 0, 0))); - this.netMana.add(new Mana(1, 1, 0, 1, 0, 0, 0, 0)); - } - - public KnotvineMysticManaAbility(final KnotvineMysticManaAbility ability) { - super(ability); - } - - @Override - public KnotvineMysticManaAbility copy() { - return new KnotvineMysticManaAbility(this); - } -} diff --git a/Mage.Sets/src/mage/cards/l/LakeOfTheDead.java b/Mage.Sets/src/mage/cards/l/LakeOfTheDead.java index d120540cd2..9c011ff95b 100644 --- a/Mage.Sets/src/mage/cards/l/LakeOfTheDead.java +++ b/Mage.Sets/src/mage/cards/l/LakeOfTheDead.java @@ -65,7 +65,7 @@ public class LakeOfTheDead extends CardImpl { this.addAbility(new BlackManaAbility()); // {tap}, Sacrifice a Swamp: Add {B}{B}{B}{B} to your mana pool. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 0, 4, 0, 0, 0), new TapSourceCost()); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(4), new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/l/LiturgyOfBlood.java b/Mage.Sets/src/mage/cards/l/LiturgyOfBlood.java index 1e93da8366..6425518dc8 100644 --- a/Mage.Sets/src/mage/cards/l/LiturgyOfBlood.java +++ b/Mage.Sets/src/mage/cards/l/LiturgyOfBlood.java @@ -49,7 +49,7 @@ public class LiturgyOfBlood extends CardImpl { // Destroy target creature. Add {B}{B}{B} to your mana pool. this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(0, 0, 0, 0, 3, 0, 0, 0))); + this.getSpellAbility().addEffect(new BasicManaEffect(Mana.BlackMana(3))); } public LiturgyOfBlood(final LiturgyOfBlood card) { diff --git a/Mage.Sets/src/mage/cards/m/ManaDrain.java b/Mage.Sets/src/mage/cards/m/ManaDrain.java index b1b9a75d8c..af7fae775d 100644 --- a/Mage.Sets/src/mage/cards/m/ManaDrain.java +++ b/Mage.Sets/src/mage/cards/m/ManaDrain.java @@ -92,7 +92,7 @@ class ManaDrainCounterEffect extends OneShotEffect { game.getStack().counter(getTargetPointer().getFirst(game, source), source.getSourceId(), game); // mana gets added also if counter is not successful int cmc = spell.getConvertedManaCost(); - Effect effect = new AddManaToManaPoolTargetControllerEffect(new Mana(0, 0, 0, 0, 0, 0, 0, cmc), "your"); + Effect effect = new AddManaToManaPoolTargetControllerEffect(Mana.ColorlessMana(cmc), "your"); effect.setTargetPointer(new FixedTarget(source.getControllerId())); AtTheBeginOfMainPhaseDelayedTriggeredAbility delayedAbility = new AtTheBeginOfMainPhaseDelayedTriggeredAbility(effect, false, TargetController.YOU, PhaseSelection.NEXT_MAIN); diff --git a/Mage.Sets/src/mage/cards/m/ManaEchoes.java b/Mage.Sets/src/mage/cards/m/ManaEchoes.java index 4d34b7fe44..bd90a651c7 100644 --- a/Mage.Sets/src/mage/cards/m/ManaEchoes.java +++ b/Mage.Sets/src/mage/cards/m/ManaEchoes.java @@ -96,7 +96,7 @@ class ManaEchoesEffect extends OneShotEffect { } } if (foundCreatures > 0) { - controller.getManaPool().addMana(new Mana(0, 0, 0, 0, 0, 0, 0, foundCreatures), game, source); + controller.getManaPool().addMana(Mana.ColorlessMana(foundCreatures), game, source); } return true; } diff --git a/Mage.Sets/src/mage/cards/m/MarkOfSakiko.java b/Mage.Sets/src/mage/cards/m/MarkOfSakiko.java index 3552775edf..f54ca0d7f1 100644 --- a/Mage.Sets/src/mage/cards/m/MarkOfSakiko.java +++ b/Mage.Sets/src/mage/cards/m/MarkOfSakiko.java @@ -111,7 +111,7 @@ class MarkOfSakikoTriggeredAbility extends TriggeredAbilityImpl { if (((DamagedEvent) event).isCombatDamage()) { if (event.getSourceId().equals(getSourceId())) { this.getEffects().clear(); - Effect effect = new AddManaToManaPoolTargetControllerEffect(new Mana(0,event.getAmount(),0,0,0,0,0, 0), "that player", true); + Effect effect = new AddManaToManaPoolTargetControllerEffect(Mana.GreenMana(event.getAmount()), "that player", true); effect.setTargetPointer(new FixedTarget(getControllerId())); effect.setText("add that much {G} to your mana pool. Until end of turn, this mana doesn't empty from your mana pool as steps and phases end"); this.addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/m/MoonscarredWerewolf.java b/Mage.Sets/src/mage/cards/m/MoonscarredWerewolf.java index da19075963..a5ca7f270a 100644 --- a/Mage.Sets/src/mage/cards/m/MoonscarredWerewolf.java +++ b/Mage.Sets/src/mage/cards/m/MoonscarredWerewolf.java @@ -38,7 +38,6 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.abilities.keyword.VigilanceAbility; @@ -66,7 +65,7 @@ public class MoonscarredWerewolf extends CardImpl { this.addAbility(VigilanceAbility.getInstance()); // {tap}: Add {G}{G} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana(2)), new TapSourceCost())); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(2), new TapSourceCost())); // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Moonscarred Werewolf. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); this.addAbility(new ConditionalTriggeredAbility(ability, diff --git a/Mage.Sets/src/mage/cards/m/MyrMoonvessel.java b/Mage.Sets/src/mage/cards/m/MyrMoonvessel.java index 9d0db42621..8f6fc8faae 100644 --- a/Mage.Sets/src/mage/cards/m/MyrMoonvessel.java +++ b/Mage.Sets/src/mage/cards/m/MyrMoonvessel.java @@ -46,7 +46,7 @@ public class MyrMoonvessel extends CardImpl { this.subtype.add("Myr"); this.power = new MageInt(1); this.toughness = new MageInt(1); - this.addAbility(new DiesTriggeredAbility(new BasicManaEffect(new Mana(0, 0, 0, 0, 0, 0, 0, 1)))); + this.addAbility(new DiesTriggeredAbility(new BasicManaEffect(Mana.ColorlessMana(1)))); } public MyrMoonvessel(final MyrMoonvessel card) { diff --git a/Mage.Sets/src/mage/cards/m/MyrReservoir.java b/Mage.Sets/src/mage/cards/m/MyrReservoir.java index 9bda1db0c0..cee739e904 100644 --- a/Mage.Sets/src/mage/cards/m/MyrReservoir.java +++ b/Mage.Sets/src/mage/cards/m/MyrReservoir.java @@ -86,7 +86,7 @@ class MyrReservoirManaAbility extends BasicManaAbility { MyrReservoirManaAbility() { super(new BasicManaEffect(new MyrConditionalMana())); - this.netMana.add(new Mana(0, 0, 0, 0, 0, 0, 0, 2)); + this.netMana.add(Mana.ColorlessMana(2)); } MyrReservoirManaAbility(MyrReservoirManaAbility ability) { diff --git a/Mage.Sets/src/mage/cards/o/OvereagerApprentice.java b/Mage.Sets/src/mage/cards/o/OvereagerApprentice.java index 39eb42bfff..46a537c2a2 100644 --- a/Mage.Sets/src/mage/cards/o/OvereagerApprentice.java +++ b/Mage.Sets/src/mage/cards/o/OvereagerApprentice.java @@ -33,7 +33,6 @@ import mage.Mana; import mage.abilities.Ability; import mage.abilities.costs.common.DiscardCardCost; import mage.abilities.costs.common.SacrificeSourceCost; -import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -55,7 +54,7 @@ public class OvereagerApprentice extends CardImpl { this.toughness = new MageInt(2); // Discard a card, Sacrifice Overeager Apprentice: Add {B}{B}{B} to your mana pool. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 0, 0, 3, 0, 0, 0)), new DiscardCardCost()); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(3), new DiscardCardCost()); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/Overgrowth.java b/Mage.Sets/src/mage/cards/o/Overgrowth.java index 0295b81fa4..ef7b819c33 100644 --- a/Mage.Sets/src/mage/cards/o/Overgrowth.java +++ b/Mage.Sets/src/mage/cards/o/Overgrowth.java @@ -82,7 +82,7 @@ class OvergrowthTriggeredAbility extends TriggeredManaAbility { public OvergrowthTriggeredAbility() { - super(Zone.BATTLEFIELD, new AddManaToManaPoolTargetControllerEffect(new Mana(0,2,0,0,0,0,0, 0), "his or her")); + super(Zone.BATTLEFIELD, new AddManaToManaPoolTargetControllerEffect(Mana.GreenMana(2), "his or her")); } public OvergrowthTriggeredAbility(final OvergrowthTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/cards/p/PalladiumMyr.java b/Mage.Sets/src/mage/cards/p/PalladiumMyr.java index 71582697fc..992a1ff8dc 100644 --- a/Mage.Sets/src/mage/cards/p/PalladiumMyr.java +++ b/Mage.Sets/src/mage/cards/p/PalladiumMyr.java @@ -30,11 +30,12 @@ package mage.cards.p; import java.util.UUID; import mage.MageInt; import mage.Mana; -import mage.abilities.effects.common.BasicManaEffect; -import mage.abilities.mana.BasicManaAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Zone; /** * @@ -47,7 +48,7 @@ public class PalladiumMyr extends CardImpl { this.subtype.add("Myr"); this.power = new MageInt(2); this.toughness = new MageInt(2); - this.addAbility(new PalladiumMyrAbility()); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(2), new TapSourceCost())); } public PalladiumMyr(final PalladiumMyr card) { @@ -59,20 +60,3 @@ public class PalladiumMyr extends CardImpl { return new PalladiumMyr(this); } } - -class PalladiumMyrAbility extends BasicManaAbility { - - public PalladiumMyrAbility() { - super(new BasicManaEffect(Mana.ColorlessMana(2))); - this.netMana.add(new Mana(0, 0, 0, 0, 0, 0, 0, 2)); - } - - public PalladiumMyrAbility(final PalladiumMyrAbility ability) { - super(ability); - } - - @Override - public PalladiumMyrAbility copy() { - return new PalladiumMyrAbility(this); - } -} diff --git a/Mage.Sets/src/mage/cards/r/RadhaHeirToKeld.java b/Mage.Sets/src/mage/cards/r/RadhaHeirToKeld.java index 485b1e9130..420a843200 100644 --- a/Mage.Sets/src/mage/cards/r/RadhaHeirToKeld.java +++ b/Mage.Sets/src/mage/cards/r/RadhaHeirToKeld.java @@ -53,7 +53,7 @@ public class RadhaHeirToKeld extends CardImpl { this.toughness = new MageInt(2); // Whenever Radha, Heir to Keld attacks, you may add {R}{R} to your mana pool. - Ability ability = new AttacksTriggeredAbility(new BasicManaEffect(new Mana(2,0,0,0,0,0,0, 0)), true); + Ability ability = new AttacksTriggeredAbility(new BasicManaEffect(Mana.RedMana(2)), true); this.addAbility(ability); // {tap}: Add {G} to your mana pool. diff --git a/Mage.Sets/src/mage/cards/r/ReflectingPool.java b/Mage.Sets/src/mage/cards/r/ReflectingPool.java index 26cdecf348..9c99a60b56 100644 --- a/Mage.Sets/src/mage/cards/r/ReflectingPool.java +++ b/Mage.Sets/src/mage/cards/r/ReflectingPool.java @@ -198,7 +198,7 @@ class ReflectingPoolEffect extends ManaEffect { netManas.add(new Mana(ColoredManaSymbol.W)); } if (types.getColorless() > 0) { - netManas.add(new Mana(0, 0, 0, 0, 0, 0, 0, 1)); + netManas.add(Mana.ColorlessMana(1)); } return netManas; } diff --git a/Mage.Sets/src/mage/cards/r/RoguesPassage.java b/Mage.Sets/src/mage/cards/r/RoguesPassage.java index 0787141ef1..72e164707f 100644 --- a/Mage.Sets/src/mage/cards/r/RoguesPassage.java +++ b/Mage.Sets/src/mage/cards/r/RoguesPassage.java @@ -50,7 +50,7 @@ public class RoguesPassage extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); // {T}: Add {C} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 0, 0, 0, 0, 1), new TapSourceCost())); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(1), new TapSourceCost())); // {4}, {T}: Target creature can't be blocked this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(), new ManaCostsImpl("{4}")); diff --git a/Mage.Sets/src/mage/cards/r/RosheenMeanderer.java b/Mage.Sets/src/mage/cards/r/RosheenMeanderer.java index ca17a0b2ff..307d9a6667 100644 --- a/Mage.Sets/src/mage/cards/r/RosheenMeanderer.java +++ b/Mage.Sets/src/mage/cards/r/RosheenMeanderer.java @@ -75,7 +75,7 @@ class RosheenMeandererManaAbility extends BasicManaAbility { RosheenMeandererManaAbility() { super(new BasicManaEffect(new RosheenMeandererConditionalMana())); - this.netMana.add(new Mana(0, 0, 0, 0, 0, 0, 0, 4)); + this.netMana.add(Mana.ColorlessMana(4)); } RosheenMeandererManaAbility(RosheenMeandererManaAbility ability) { diff --git a/Mage.Sets/src/mage/cards/r/RuinsOfTrokair.java b/Mage.Sets/src/mage/cards/r/RuinsOfTrokair.java index 1415d81e15..65eda5d15c 100644 --- a/Mage.Sets/src/mage/cards/r/RuinsOfTrokair.java +++ b/Mage.Sets/src/mage/cards/r/RuinsOfTrokair.java @@ -33,7 +33,6 @@ import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.SimpleManaAbility; import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; @@ -55,7 +54,7 @@ public class RuinsOfTrokair extends CardImpl { // {tap}: Add {W} to your mana pool. this.addAbility(new WhiteManaAbility()); // {tap}, Sacrifice Ruins of Trokair: Add {W}{W} to your mana pool. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.WhiteMana(2)), new TapSourceCost()); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana(2), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SachiDaughterOfSeshiro.java b/Mage.Sets/src/mage/cards/s/SachiDaughterOfSeshiro.java index e32d9e5914..5c8da52f34 100644 --- a/Mage.Sets/src/mage/cards/s/SachiDaughterOfSeshiro.java +++ b/Mage.Sets/src/mage/cards/s/SachiDaughterOfSeshiro.java @@ -32,7 +32,6 @@ import mage.MageInt; import mage.Mana; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.mana.SimpleManaAbility; @@ -71,7 +70,7 @@ public class SachiDaughterOfSeshiro extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(0, 1, Duration.WhileOnBattlefield, snakeFilter, true))); // Shamans you control have "{T}: Add {G}{G} to your mana pool." this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect( - new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana(2)), new TapSourceCost()), Duration.WhileOnBattlefield, shamanFilter, false))); + new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(2), new TapSourceCost()), Duration.WhileOnBattlefield, shamanFilter, false))); } public SachiDaughterOfSeshiro(final SachiDaughterOfSeshiro card) { diff --git a/Mage.Sets/src/mage/cards/s/SakikoMotherOfSummer.java b/Mage.Sets/src/mage/cards/s/SakikoMotherOfSummer.java index 520b005cd6..f8fc912ea9 100644 --- a/Mage.Sets/src/mage/cards/s/SakikoMotherOfSummer.java +++ b/Mage.Sets/src/mage/cards/s/SakikoMotherOfSummer.java @@ -100,7 +100,7 @@ class SakikoMotherOfSummerTriggeredAbility extends TriggeredAbilityImpl { Permanent creature = game.getPermanent(event.getSourceId()); if (creature != null && creature.getControllerId().equals(controllerId)) { this.getEffects().clear(); - Effect effect = new AddManaToManaPoolTargetControllerEffect(new Mana(0,event.getAmount(),0,0,0,0,0, 0), "that player", true); + Effect effect = new AddManaToManaPoolTargetControllerEffect(Mana.GreenMana(event.getAmount()), "that player", true); effect.setTargetPointer(new FixedTarget(creature.getControllerId())); effect.setText("add that much {G} to your mana pool. Until end of turn, this mana doesn't empty from your mana pool as steps and phases end"); this.addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/s/SeaScryer.java b/Mage.Sets/src/mage/cards/s/SeaScryer.java index 100440be2b..9de3d83533 100644 --- a/Mage.Sets/src/mage/cards/s/SeaScryer.java +++ b/Mage.Sets/src/mage/cards/s/SeaScryer.java @@ -33,7 +33,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.ColorlessManaAbility; import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; @@ -58,7 +57,7 @@ public class SeaScryer extends CardImpl { // {tap}: Add {C} to your mana pool. this.addAbility(new ColorlessManaAbility()); // {1}, {tap}: Add {U} to your mana pool. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlueMana(1)), new GenericManaCost(1)); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana(1), new GenericManaCost(1)); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SeethingSong.java b/Mage.Sets/src/mage/cards/s/SeethingSong.java index 6710381cb0..5bc9edb07b 100644 --- a/Mage.Sets/src/mage/cards/s/SeethingSong.java +++ b/Mage.Sets/src/mage/cards/s/SeethingSong.java @@ -43,7 +43,7 @@ public class SeethingSong extends CardImpl { public SeethingSong(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(5, 0, 0, 0, 0, 0, 0, 0))); + this.getSpellAbility().addEffect(new BasicManaEffect(Mana.RedMana(5))); } public SeethingSong(final SeethingSong card) { diff --git a/Mage.Sets/src/mage/cards/s/SeismicSpike.java b/Mage.Sets/src/mage/cards/s/SeismicSpike.java index cd17e3b71c..6575a40945 100644 --- a/Mage.Sets/src/mage/cards/s/SeismicSpike.java +++ b/Mage.Sets/src/mage/cards/s/SeismicSpike.java @@ -49,7 +49,7 @@ public class SeismicSpike extends CardImpl { // Destroy target land. Add {R}{R} to your mana pool. this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addTarget(new TargetLandPermanent()); - this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(2, 0, 0, 0, 0, 0, 0, 0))); + this.getSpellAbility().addEffect(new BasicManaEffect(Mana.RedMana(2))); } public SeismicSpike(final SeismicSpike card) { diff --git a/Mage.Sets/src/mage/cards/s/SetonKrosanProtector.java b/Mage.Sets/src/mage/cards/s/SetonKrosanProtector.java index 3f25eb48c5..553101d52c 100644 --- a/Mage.Sets/src/mage/cards/s/SetonKrosanProtector.java +++ b/Mage.Sets/src/mage/cards/s/SetonKrosanProtector.java @@ -31,7 +31,6 @@ import java.util.UUID; 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.cards.CardSetInfo; @@ -66,9 +65,8 @@ public class SetonKrosanProtector extends CardImpl { this.toughness = new MageInt(2); // Tap an untapped Druid you control: Add {G} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, - new BasicManaEffect(Mana.GreenMana(1)), - new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true)))); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(1), + new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true)))); } public SetonKrosanProtector(final SetonKrosanProtector card) { diff --git a/Mage.Sets/src/mage/cards/s/ShizukoCallerOfAutumn.java b/Mage.Sets/src/mage/cards/s/ShizukoCallerOfAutumn.java index c1110b3b76..5e3adfe17d 100644 --- a/Mage.Sets/src/mage/cards/s/ShizukoCallerOfAutumn.java +++ b/Mage.Sets/src/mage/cards/s/ShizukoCallerOfAutumn.java @@ -55,7 +55,7 @@ public class ShizukoCallerOfAutumn extends CardImpl { this.toughness = new MageInt(3); // At the beginning of each player's upkeep, that player adds {G}{G}{G} to his or her mana pool. Until end of turn, this mana doesn't empty from that player's mana pool as steps and phases end. - Effect effect = new AddManaToManaPoolTargetControllerEffect(new Mana(0,3,0,0,0,0,0, 0), "that player", true); + Effect effect = new AddManaToManaPoolTargetControllerEffect(Mana.GreenMana(3), "that player", true); effect.setText("that player adds {G}{G}{G} to his or her mana pool. Until end of turn, this mana doesn't empty from that player's mana pool as steps and phases end"); this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.ANY, false)); diff --git a/Mage.Sets/src/mage/cards/s/SimianSpiritGuide.java b/Mage.Sets/src/mage/cards/s/SimianSpiritGuide.java index 707aed2d88..c391ed6e99 100644 --- a/Mage.Sets/src/mage/cards/s/SimianSpiritGuide.java +++ b/Mage.Sets/src/mage/cards/s/SimianSpiritGuide.java @@ -35,7 +35,6 @@ import mage.Mana; import mage.abilities.Ability; import mage.abilities.costs.Cost; import mage.abilities.costs.CostImpl; -import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.SimpleManaAbility; import mage.cards.Card; import mage.cards.CardImpl; @@ -59,7 +58,7 @@ public class SimianSpiritGuide extends CardImpl { this.toughness = new MageInt(2); // Exile Simian Spirit Guide from your hand: Add {R} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.HAND, new BasicManaEffect(Mana.RedMana(1)), new ExileSourceFromHandCost())); + this.addAbility(new SimpleManaAbility(Zone.HAND, Mana.RedMana(1), new ExileSourceFromHandCost())); } public SimianSpiritGuide(final SimianSpiritGuide card) { diff --git a/Mage.Sets/src/mage/cards/s/SisaysRing.java b/Mage.Sets/src/mage/cards/s/SisaysRing.java index 9bbbd1316c..35742ac1e1 100644 --- a/Mage.Sets/src/mage/cards/s/SisaysRing.java +++ b/Mage.Sets/src/mage/cards/s/SisaysRing.java @@ -46,7 +46,7 @@ public class SisaysRing extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); // {tap}: Add {C}{C} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 0, 0, 0, 0, 2), new TapSourceCost())); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(2), new TapSourceCost())); } public SisaysRing(final SisaysRing card) { diff --git a/Mage.Sets/src/mage/cards/s/SithCitadel.java b/Mage.Sets/src/mage/cards/s/SithCitadel.java index 41fa539159..5a95d43844 100644 --- a/Mage.Sets/src/mage/cards/s/SithCitadel.java +++ b/Mage.Sets/src/mage/cards/s/SithCitadel.java @@ -51,7 +51,7 @@ public class SithCitadel extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); // When Sith Citadel enters the battlefield , add {B} to your mana pool. - this.addAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(new Mana(0, 0, 0, 0, 1, 0, 0, 0)))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(Mana.BlackMana(1)))); // {T}: Add {U} or {R} to you mana pool. this.addAbility(new BlueManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SolRing.java b/Mage.Sets/src/mage/cards/s/SolRing.java index d0c7dcaccd..5d63c3c8db 100644 --- a/Mage.Sets/src/mage/cards/s/SolRing.java +++ b/Mage.Sets/src/mage/cards/s/SolRing.java @@ -29,11 +29,12 @@ package mage.cards.s; import java.util.UUID; import mage.Mana; -import mage.abilities.effects.common.BasicManaEffect; -import mage.abilities.mana.BasicManaAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Zone; /** * @@ -43,7 +44,7 @@ public class SolRing extends CardImpl { public SolRing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.addAbility(new SolRingAbility()); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(2), new TapSourceCost())); } public SolRing(final SolRing card) { @@ -55,20 +56,3 @@ public class SolRing extends CardImpl { return new SolRing(this); } } - -class SolRingAbility extends BasicManaAbility { - - public SolRingAbility() { - super(new BasicManaEffect(Mana.ColorlessMana(2))); - this.netMana.add(new Mana(0, 0, 0, 0, 0, 0, 0, 2)); - } - - public SolRingAbility(final SolRingAbility ability) { - super(ability); - } - - @Override - public SolRingAbility copy() { - return new SolRingAbility(this); - } -} diff --git a/Mage.Sets/src/mage/cards/s/SoulbrightFlamekin.java b/Mage.Sets/src/mage/cards/s/SoulbrightFlamekin.java index dd710d5d5e..ac19daf9d8 100644 --- a/Mage.Sets/src/mage/cards/s/SoulbrightFlamekin.java +++ b/Mage.Sets/src/mage/cards/s/SoulbrightFlamekin.java @@ -121,7 +121,7 @@ class SoulbrightFlamekinEffect extends OneShotEffect { } info.activations++; if (info.activations == 3) { - controller.getManaPool().addMana(new Mana(8,0,0,0,0,0,0, 0), game, source); + controller.getManaPool().addMana(Mana.RedMana(8), game, source); } return true; } diff --git a/Mage.Sets/src/mage/cards/s/SquanderedResources.java b/Mage.Sets/src/mage/cards/s/SquanderedResources.java index 018752ae6c..b22da82c57 100644 --- a/Mage.Sets/src/mage/cards/s/SquanderedResources.java +++ b/Mage.Sets/src/mage/cards/s/SquanderedResources.java @@ -184,7 +184,7 @@ class SquanderedResourcesEffect extends ManaEffect { netManas.add(new Mana(ColoredManaSymbol.W)); } if (types.getGeneric() > 0) { - netManas.add(new Mana(0, 0, 0, 0, 0, 0, 0, 1)); + netManas.add(Mana.ColorlessMana(1)); } return netManas; } diff --git a/Mage.Sets/src/mage/cards/s/StarCompass.java b/Mage.Sets/src/mage/cards/s/StarCompass.java index 6cdec31049..45d67fe05b 100644 --- a/Mage.Sets/src/mage/cards/s/StarCompass.java +++ b/Mage.Sets/src/mage/cards/s/StarCompass.java @@ -202,7 +202,7 @@ class StarCompassManaEffect extends ManaEffect { netManas.add(new Mana(ColoredManaSymbol.W)); } if (types.getGeneric() > 0) { - netManas.add(new Mana(0, 0, 0, 0, 0, 0, 0, 1)); + netManas.add(Mana.ColorlessMana(1)); } return netManas; } diff --git a/Mage.Sets/src/mage/cards/s/SuChi.java b/Mage.Sets/src/mage/cards/s/SuChi.java index f65828b926..4fa205c993 100644 --- a/Mage.Sets/src/mage/cards/s/SuChi.java +++ b/Mage.Sets/src/mage/cards/s/SuChi.java @@ -50,7 +50,7 @@ public class SuChi extends CardImpl { this.toughness = new MageInt(4); // When Su-Chi dies, add {C}{C}{C}{C} to your mana pool. - this.addAbility(new DiesTriggeredAbility(new BasicManaEffect(new Mana(0, 0, 0, 0, 0, 0, 0, 4)), false)); + this.addAbility(new DiesTriggeredAbility(new BasicManaEffect(Mana.ColorlessMana(4)), false)); } public SuChi(final SuChi card) { diff --git a/Mage.Sets/src/mage/cards/s/SvyeluniteTemple.java b/Mage.Sets/src/mage/cards/s/SvyeluniteTemple.java index 504c3fb94d..573c425e28 100644 --- a/Mage.Sets/src/mage/cards/s/SvyeluniteTemple.java +++ b/Mage.Sets/src/mage/cards/s/SvyeluniteTemple.java @@ -33,7 +33,6 @@ import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.BlueManaAbility; import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; @@ -55,7 +54,7 @@ public class SvyeluniteTemple extends CardImpl { // {tap}: Add {U} to your mana pool. this.addAbility(new BlueManaAbility()); // {tap}, Sacrifice Svyelunite Temple: Add {U}{U} to your mana pool. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlueMana(2)), new TapSourceCost()); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana(2), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TeferisIsle.java b/Mage.Sets/src/mage/cards/t/TeferisIsle.java index 16cb1401c3..3ba8b5ff9c 100644 --- a/Mage.Sets/src/mage/cards/t/TeferisIsle.java +++ b/Mage.Sets/src/mage/cards/t/TeferisIsle.java @@ -53,7 +53,7 @@ public class TeferisIsle extends CardImpl { // Teferi's Isle enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); // {tap}: Add {U}{U} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 2, 0, 0, 0, 0, 0), new TapSourceCost())); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana(2), new TapSourceCost())); } diff --git a/Mage.Sets/src/mage/cards/t/TinderWall.java b/Mage.Sets/src/mage/cards/t/TinderWall.java index 19ab701ba0..cf708939fa 100644 --- a/Mage.Sets/src/mage/cards/t/TinderWall.java +++ b/Mage.Sets/src/mage/cards/t/TinderWall.java @@ -34,7 +34,6 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.keyword.DefenderAbility; import mage.abilities.mana.SimpleManaAbility; @@ -70,7 +69,7 @@ public class TinderWall extends CardImpl { // Defender this.addAbility(DefenderAbility.getInstance()); // Sacrifice Tinder Wall: Add {R}{R} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.RedMana(2)), new SacrificeSourceCost())); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(2), new SacrificeSourceCost())); // {R}, Sacrifice Tinder Wall: Tinder Wall deals 2 damage to target creature it's blocking. FilterAttackingCreature filter = new FilterAttackingCreature("creature it's blocking"); filter.add(new BlockedByIdPredicate(this.getId())); diff --git a/Mage.Sets/src/mage/cards/t/TurnToDust.java b/Mage.Sets/src/mage/cards/t/TurnToDust.java index 7c9539b3ad..c977672433 100644 --- a/Mage.Sets/src/mage/cards/t/TurnToDust.java +++ b/Mage.Sets/src/mage/cards/t/TurnToDust.java @@ -55,7 +55,7 @@ public class TurnToDust extends CardImpl { this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addTarget(new TargetPermanent(filter)); - this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(0, 1, 0, 0, 0, 0, 0, 0))); + this.getSpellAbility().addEffect(new BasicManaEffect(Mana.GreenMana(1))); } public TurnToDust(final TurnToDust card) { diff --git a/Mage.Sets/src/mage/cards/u/UrGolemsEye.java b/Mage.Sets/src/mage/cards/u/UrGolemsEye.java index 9a6ee9640d..128afb7b5b 100644 --- a/Mage.Sets/src/mage/cards/u/UrGolemsEye.java +++ b/Mage.Sets/src/mage/cards/u/UrGolemsEye.java @@ -46,7 +46,7 @@ public class UrGolemsEye extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); // {tap}: Add {C}{C} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 0, 0, 0, 0, 2), new TapSourceCost())); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(2), new TapSourceCost())); } public UrGolemsEye(final UrGolemsEye card) { diff --git a/Mage.Sets/src/mage/cards/v/Valleymaker.java b/Mage.Sets/src/mage/cards/v/Valleymaker.java index 47e5b71a35..53cda433c3 100644 --- a/Mage.Sets/src/mage/cards/v/Valleymaker.java +++ b/Mage.Sets/src/mage/cards/v/Valleymaker.java @@ -74,7 +74,7 @@ public class Valleymaker extends CardImpl { this.addAbility(ability); // {tap}, Sacrifice a Forest: Choose a player. That player adds {G}{G}{G} to his or her mana pool. - Ability ability2 = new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaToManaPoolTargetControllerEffect(new Mana(0,3,0,0,0,0,0, 0), "chosen player"), new TapSourceCost()); + Ability ability2 = new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaToManaPoolTargetControllerEffect(Mana.GreenMana(3), "chosen player"), new TapSourceCost()); ability2.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter2))); ability2.addTarget(new TargetPlayer(1, 1, true)); this.addAbility(ability2); diff --git a/Mage.Sets/src/mage/cards/w/WasteNot.java b/Mage.Sets/src/mage/cards/w/WasteNot.java index 9b9b1b2e61..1abad34e09 100644 --- a/Mage.Sets/src/mage/cards/w/WasteNot.java +++ b/Mage.Sets/src/mage/cards/w/WasteNot.java @@ -112,7 +112,7 @@ class WasteNotCreatureTriggeredAbility extends TriggeredAbilityImpl { class WasteNotLandTriggeredAbility extends TriggeredAbilityImpl { WasteNotLandTriggeredAbility() { - super(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 0, 0, 2, 0, 0, 0)), false); + super(Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana(2)), false); } WasteNotLandTriggeredAbility(final WasteNotLandTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/cards/w/WitchEngine.java b/Mage.Sets/src/mage/cards/w/WitchEngine.java index 3c24b68755..0c7380cc44 100644 --- a/Mage.Sets/src/mage/cards/w/WitchEngine.java +++ b/Mage.Sets/src/mage/cards/w/WitchEngine.java @@ -64,7 +64,7 @@ public class WitchEngine extends CardImpl { this.addAbility(new SwampwalkAbility()); // {tap}: Add {B}{B}{B}{B} to your mana pool. Target opponent gains control of Witch Engine. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 0, 0, 4, 0, 0, 0)), new TapSourceCost()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana(4)), new TapSourceCost()); ability.addEffect(new WitchEngineEffect()); ability.addTarget(new TargetOpponent()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/w/Workhorse.java b/Mage.Sets/src/mage/cards/w/Workhorse.java index 1095d26356..7176f9ccd2 100644 --- a/Mage.Sets/src/mage/cards/w/Workhorse.java +++ b/Mage.Sets/src/mage/cards/w/Workhorse.java @@ -56,8 +56,7 @@ public class Workhorse extends CardImpl { this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(4)), "with four +1/+1 counters on it")); // Remove a +1/+1 counter from Workhorse: Add {C} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, - new Mana(new Mana(0, 0, 0, 0, 0, 0, 0, 1)), + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(1), new RemoveCountersSourceCost(CounterType.P1P1.createInstance()))); } diff --git a/Mage.Sets/src/mage/cards/w/WornPowerstone.java b/Mage.Sets/src/mage/cards/w/WornPowerstone.java index 4342511866..1ab85de914 100644 --- a/Mage.Sets/src/mage/cards/w/WornPowerstone.java +++ b/Mage.Sets/src/mage/cards/w/WornPowerstone.java @@ -30,11 +30,12 @@ package mage.cards.w; import java.util.UUID; import mage.Mana; import mage.abilities.common.EntersBattlefieldTappedAbility; -import mage.abilities.effects.common.BasicManaEffect; -import mage.abilities.mana.BasicManaAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Zone; /** * @@ -45,7 +46,7 @@ public class WornPowerstone extends CardImpl { public WornPowerstone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); this.addAbility(new EntersBattlefieldTappedAbility()); - this.addAbility(new WornPowerstoneAbility()); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(2), new TapSourceCost())); } public WornPowerstone(final WornPowerstone card) { @@ -57,20 +58,3 @@ public class WornPowerstone extends CardImpl { return new WornPowerstone(this); } } - -class WornPowerstoneAbility extends BasicManaAbility { - - public WornPowerstoneAbility() { - super(new BasicManaEffect(Mana.ColorlessMana(2))); - this.netMana.add(new Mana(0, 0, 0, 0, 0, 0, 0, 2)); - } - - public WornPowerstoneAbility(final WornPowerstoneAbility ability) { - super(ability); - } - - @Override - public WornPowerstoneAbility copy() { - return new WornPowerstoneAbility(this); - } -} diff --git a/Mage/src/main/java/mage/abilities/effects/common/AddConditionalColorlessManaEffect.java b/Mage/src/main/java/mage/abilities/effects/common/AddConditionalColorlessManaEffect.java index 3bfd52a876..26aa0228f3 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/AddConditionalColorlessManaEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/AddConditionalColorlessManaEffect.java @@ -56,6 +56,6 @@ public class AddConditionalColorlessManaEffect extends ManaEffect { } public Mana getMana() { - return new Mana(0, 0, 0, 0, 0, 0, 0, amount); + return Mana.ColorlessMana(amount); } } diff --git a/Mage/src/main/java/mage/abilities/mana/AnyColorLandsProduceManaAbility.java b/Mage/src/main/java/mage/abilities/mana/AnyColorLandsProduceManaAbility.java index cf5f1d2e94..488ab25a73 100644 --- a/Mage/src/main/java/mage/abilities/mana/AnyColorLandsProduceManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/AnyColorLandsProduceManaAbility.java @@ -188,7 +188,7 @@ class AnyColorLandsProduceManaEffect extends ManaEffect { netManas.add(new Mana(ColoredManaSymbol.W)); } if (types.getColorless() > 0) { - netManas.add(new Mana(0, 0, 0, 0, 0, 0, 0, 1)); + netManas.add(Mana.ColorlessMana(1)); } return netManas; } diff --git a/Mage/src/main/java/mage/abilities/mana/ColorlessManaAbility.java b/Mage/src/main/java/mage/abilities/mana/ColorlessManaAbility.java index 629d640e10..b58d43e139 100644 --- a/Mage/src/main/java/mage/abilities/mana/ColorlessManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/ColorlessManaAbility.java @@ -38,7 +38,7 @@ public class ColorlessManaAbility extends BasicManaAbility { public ColorlessManaAbility() { super(new BasicManaEffect(Mana.ColorlessMana(1))); - this.netMana.add(new Mana(0, 0, 0, 0, 0, 0, 0, 1)); + this.netMana.add(Mana.ColorlessMana(1)); } public ColorlessManaAbility(ColorlessManaAbility ability) { diff --git a/Mage/src/main/java/mage/abilities/mana/ConditionalColorlessManaAbility.java b/Mage/src/main/java/mage/abilities/mana/ConditionalColorlessManaAbility.java index 6c604f3998..d341e0143b 100644 --- a/Mage/src/main/java/mage/abilities/mana/ConditionalColorlessManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/ConditionalColorlessManaAbility.java @@ -24,7 +24,7 @@ public class ConditionalColorlessManaAbility extends ManaAbility { public ConditionalColorlessManaAbility(Cost cost, int amount, ConditionalManaBuilder manaBuilder) { super(Zone.BATTLEFIELD, new AddConditionalColorlessManaEffect(amount, manaBuilder), cost); - this.netMana.add(new Mana(0, 0, 0, 0, 0, 0, 0, amount)); + this.netMana.add(Mana.ColorlessMana(amount)); } public ConditionalColorlessManaAbility(final ConditionalColorlessManaAbility ability) { diff --git a/Mage/src/main/java/mage/abilities/mana/ManaOptions.java b/Mage/src/main/java/mage/abilities/mana/ManaOptions.java index 56b416f212..4c09adacad 100644 --- a/Mage/src/main/java/mage/abilities/mana/ManaOptions.java +++ b/Mage/src/main/java/mage/abilities/mana/ManaOptions.java @@ -317,7 +317,7 @@ public class ManaOptions extends ArrayList { } } } else { - payCombinations.add(new Mana(0, 0, 0, 0, 0, 0, 0, number)); + payCombinations.add(Mana.ColorlessMana(number)); } return payCombinations; }