mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
Merge pull request #2538 from nigelzor/mana-cleanup
Mana ability cleanup
This commit is contained in:
commit
6f96ec5be5
94 changed files with 154 additions and 353 deletions
|
@ -65,8 +65,8 @@ public class AxebaneGuardian extends CardImpl {
|
|||
this.addAbility(DefenderAbility.getInstance());
|
||||
|
||||
// {tap}: Add X mana in any combination of colors to your mana pool, where X is the number of creatures with defender you control.
|
||||
this.addAbility(new DynamicManaAbility(new Mana(0,0,0,0,0,0,1, 0), new PermanentsOnBattlefieldCount(filter), new TapSourceCost(),
|
||||
"Add X mana in any combination of colors to your mana pool, where X is the number of creatures with defender you control."));
|
||||
this.addAbility(new DynamicManaAbility(new Mana(0,0,0,0,0,0,1, 0), new PermanentsOnBattlefieldCount(filter),
|
||||
"Add X mana in any combination of colors to your mana pool, where X is the number of creatures with defender you control."));
|
||||
}
|
||||
|
||||
public AxebaneGuardian(final AxebaneGuardian card) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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.<br/><br/><i>Threshold</i> - Add {B}{B}{B}{B}{B} to your mana pool instead if seven or more cards are in your graveyard"));
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -61,7 +61,7 @@ public class CircleOfElders extends CardImpl {
|
|||
// <i>Formidable</i> - {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);
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -107,17 +107,7 @@ class CoalitionRelicEffect extends OneShotEffect {
|
|||
}
|
||||
player.choose(outcome, choice, game);
|
||||
}
|
||||
if (choice.getColor().isBlack()) {
|
||||
mana.increaseBlack();
|
||||
} else if (choice.getColor().isBlue()) {
|
||||
mana.increaseBlue();
|
||||
} else if (choice.getColor().isRed()) {
|
||||
mana.increaseRed();
|
||||
} else if (choice.getColor().isGreen()) {
|
||||
mana.increaseGreen();
|
||||
} else if (choice.getColor().isWhite()) {
|
||||
mana.increaseWhite();
|
||||
}
|
||||
choice.increaseMana(mana);
|
||||
choice.clearChoice();
|
||||
}
|
||||
player.getManaPool().addMana(mana, game, source);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -140,17 +140,7 @@ class DawnsReflectionManaEffect extends ManaEffect {
|
|||
while (controller.canRespond() && !controller.choose(Outcome.Benefit, choiceColor, game)) {
|
||||
}
|
||||
|
||||
if (choiceColor.getColor().isBlack()) {
|
||||
mana.increaseBlack();
|
||||
} else if (choiceColor.getColor().isBlue()) {
|
||||
mana.increaseBlue();
|
||||
} else if (choiceColor.getColor().isRed()) {
|
||||
mana.increaseRed();
|
||||
} else if (choiceColor.getColor().isGreen()) {
|
||||
mana.increaseGreen();
|
||||
} else if (choiceColor.getColor().isWhite()) {
|
||||
mana.increaseWhite();
|
||||
}
|
||||
choiceColor.increaseMana(mana);
|
||||
}
|
||||
|
||||
controller.getManaPool().addMana(mana, game, source);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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}"));
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ package mage.cards.f;
|
|||
import java.util.UUID;
|
||||
import mage.ConditionalMana;
|
||||
import mage.Mana;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.ExileTargetCost;
|
||||
|
@ -116,22 +115,11 @@ class FoodChainManaEffect extends ManaEffect {
|
|||
}
|
||||
ChoiceColor choice = new ChoiceColor();
|
||||
controller.choose(Outcome.PutManaInPool, choice, game);
|
||||
ObjectColor chosenColor = choice.getColor();
|
||||
if (chosenColor == null) {
|
||||
if (choice.getColor() == null) {
|
||||
return false;
|
||||
}
|
||||
Mana mana = null;
|
||||
if (chosenColor.isBlack()) {
|
||||
mana = new FoodChainManaBuilder().setMana(Mana.BlackMana(manaCostExiled + 1), source, game).build();
|
||||
} else if (chosenColor.isBlue()) {
|
||||
mana = new FoodChainManaBuilder().setMana(Mana.BlueMana(manaCostExiled + 1), source, game).build();
|
||||
} else if (chosenColor.isRed()) {
|
||||
mana = new FoodChainManaBuilder().setMana(Mana.RedMana(manaCostExiled + 1), source, game).build();
|
||||
} else if (chosenColor.isGreen()) {
|
||||
mana = new FoodChainManaBuilder().setMana(Mana.GreenMana(manaCostExiled + 1), source, game).build();
|
||||
} else if (chosenColor.isWhite()) {
|
||||
mana = new FoodChainManaBuilder().setMana(Mana.WhiteMana(manaCostExiled + 1), source, game).build();
|
||||
}
|
||||
Mana chosen = choice.getMana(manaCostExiled + 1);
|
||||
Mana mana = new FoodChainManaBuilder().setMana(chosen, source, game).build();
|
||||
if (mana != null) {
|
||||
checkToFirePossibleEvents(mana, game, source);
|
||||
controller.getManaPool().addMana(mana, game, source);
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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}"));
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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<Ability> abilities2 = new AbilitiesImpl<Ability>();
|
||||
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(
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -135,11 +135,11 @@ class MarketFestivalManaEffect extends ManaEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if(controller != null && sourceObject != null){
|
||||
int x = 2;
|
||||
if (controller != null && sourceObject != null) {
|
||||
int x = 2;
|
||||
|
||||
Mana mana = new Mana();
|
||||
for(int i = 0; i < x; i++){
|
||||
for (int i = 0; i < x; i++) {
|
||||
ChoiceColor choiceColor = new ChoiceColor();
|
||||
if (i == 0) {
|
||||
choiceColor.setMessage("First mana color for " + sourceObject.getLogName());
|
||||
|
@ -152,22 +152,11 @@ class MarketFestivalManaEffect extends ManaEffect {
|
|||
}
|
||||
}
|
||||
|
||||
if (choiceColor.getColor().isBlack()) {
|
||||
mana.increaseBlack();
|
||||
} else if (choiceColor.getColor().isBlue()) {
|
||||
mana.increaseBlue();
|
||||
} else if (choiceColor.getColor().isRed()) {
|
||||
mana.increaseRed();
|
||||
} else if (choiceColor.getColor().isGreen()) {
|
||||
mana.increaseGreen();
|
||||
} else if (choiceColor.getColor().isWhite()) {
|
||||
mana.increaseWhite();
|
||||
}
|
||||
choiceColor.increaseMana(mana);
|
||||
}
|
||||
checkToFirePossibleEvents(mana, game, source);
|
||||
controller.getManaPool().addMana(mana, game, source);
|
||||
return true;
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,17 +134,7 @@ class PlasmCaptureManaEffect extends ManaEffect {
|
|||
}
|
||||
}
|
||||
|
||||
if (choiceColor.getColor().isBlack()) {
|
||||
mana.increaseBlack();
|
||||
} else if (choiceColor.getColor().isBlue()) {
|
||||
mana.increaseBlue();
|
||||
} else if (choiceColor.getColor().isRed()) {
|
||||
mana.increaseRed();
|
||||
} else if (choiceColor.getColor().isGreen()) {
|
||||
mana.increaseGreen();
|
||||
} else if (choiceColor.getColor().isWhite()) {
|
||||
mana.increaseWhite();
|
||||
}
|
||||
choiceColor.increaseMana(mana);
|
||||
}
|
||||
|
||||
player.getManaPool().addMana(mana, game, source);
|
||||
|
|
|
@ -56,7 +56,7 @@ public class PriestOfYawgmoth extends CardImpl {
|
|||
|
||||
// {T}, Sacrifice an artifact: Add to your mana pool an amount of {B} equal to the sacrificed artifact's converted mana cost.
|
||||
Ability ability = new DynamicManaAbility(Mana.BlackMana(1), new SacrificeCostConvertedMana("artifact"),
|
||||
new TapSourceCost(), "add to your mana pool an amount of {B} equal to the sacrificed artifact's converted mana cost");
|
||||
"add to your mana pool an amount of {B} equal to the sacrificed artifact's converted mana cost");
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent())));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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}"));
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ public class SoldeviAdnate extends CardImpl {
|
|||
|
||||
// {T}, Sacrifice a black or artifact creature: Add to your mana pool an amount of {B} equal to the sacrificed creature's converted mana cost.
|
||||
Ability ability = new DynamicManaAbility(Mana.BlackMana(1), new SacrificeCostConvertedMana("creature"),
|
||||
new TapSourceCost(), "add to your mana pool an amount of {B} equal to the sacrificed creature's converted mana cost");
|
||||
"add to your mana pool an amount of {B} equal to the sacrificed creature's converted mana cost");
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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()));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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()));
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -156,24 +156,13 @@ class VedalkenEngineerEffect extends ManaEffect {
|
|||
return false;
|
||||
}
|
||||
|
||||
Mana mana = new Mana();
|
||||
ChoiceColor choiceColor = new ChoiceColor(true);
|
||||
while (!controller.choose(Outcome.Benefit, choiceColor, game)) {
|
||||
if (!controller.canRespond()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (choiceColor.getColor().isBlack()) {
|
||||
mana.setBlack(amount);
|
||||
} else if (choiceColor.getColor().isBlue()) {
|
||||
mana.setBlue(amount);
|
||||
} else if (choiceColor.getColor().isRed()) {
|
||||
mana.setRed(amount);
|
||||
} else if (choiceColor.getColor().isGreen()) {
|
||||
mana.setGreen(amount);
|
||||
} else if (choiceColor.getColor().isWhite()) {
|
||||
mana.setWhite(amount);
|
||||
}
|
||||
Mana mana = choiceColor.getMana(amount);
|
||||
Mana condMana = manaBuilder.setMana(mana, source, game).build();
|
||||
checkToFirePossibleEvents(condMana, game, source);
|
||||
controller.getManaPool().addMana(condMana, game, source);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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())));
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,17 +90,7 @@ public class ConditionalManaEffect extends ManaEffect {
|
|||
return false; // it happens, don't know how
|
||||
}
|
||||
|
||||
if (choice.getColor().isBlack()) {
|
||||
createdMana = Mana.BlackMana(amount);
|
||||
} else if (choice.getColor().isBlue()) {
|
||||
createdMana = Mana.BlueMana(amount);
|
||||
} else if (choice.getColor().isRed()) {
|
||||
createdMana = Mana.RedMana(amount);
|
||||
} else if (choice.getColor().isGreen()) {
|
||||
createdMana = Mana.GreenMana(amount);
|
||||
} else if (choice.getColor().isWhite()) {
|
||||
createdMana = Mana.WhiteMana(amount);
|
||||
}
|
||||
createdMana = choice.getMana(amount);
|
||||
}
|
||||
mana = createdMana;
|
||||
}
|
||||
|
@ -117,8 +107,7 @@ public class ConditionalManaEffect extends ManaEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Mana getMana(Game game, Ability source
|
||||
) {
|
||||
public Mana getMana(Game game, Ability source) {
|
||||
Mana mana = null;
|
||||
if (condition.apply(game, source)) {
|
||||
mana = effect.getMana();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,19 +94,10 @@ public class AddConditionalManaOfAnyColorEffect extends ManaEffect {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
Mana mana = null;
|
||||
if (choice.getColor().isBlack()) {
|
||||
mana = manaBuilder.setMana(Mana.BlackMana(1), source, game).build();
|
||||
} else if (choice.getColor().isBlue()) {
|
||||
mana = manaBuilder.setMana(Mana.BlueMana(1), source, game).build();
|
||||
} else if (choice.getColor().isRed()) {
|
||||
mana = manaBuilder.setMana(Mana.RedMana(1), source, game).build();
|
||||
} else if (choice.getColor().isGreen()) {
|
||||
mana = manaBuilder.setMana(Mana.GreenMana(1), source, game).build();
|
||||
} else if (choice.getColor().isWhite()) {
|
||||
mana = manaBuilder.setMana(Mana.WhiteMana(1), source, game).build();
|
||||
Mana mana = choice.getMana(1);
|
||||
if (mana != null) {
|
||||
mana = manaBuilder.setMana(mana, source, game).build();
|
||||
}
|
||||
|
||||
if (mana != null) {
|
||||
checkToFirePossibleEvents(mana, game, source);
|
||||
controller.getManaPool().addMana(mana, game, source);
|
||||
|
|
|
@ -64,19 +64,7 @@ public class AddManaAnyColorAttachedControllerEffect extends ManaEffect {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
int amount = 1;
|
||||
Mana mana = null;
|
||||
if (choice.getColor().isBlack()) {
|
||||
mana = Mana.BlackMana(amount);
|
||||
} else if (choice.getColor().isBlue()) {
|
||||
mana = Mana.BlueMana(amount);
|
||||
} else if (choice.getColor().isRed()) {
|
||||
mana = Mana.RedMana(amount);
|
||||
} else if (choice.getColor().isGreen()) {
|
||||
mana = Mana.GreenMana(amount);
|
||||
} else if (choice.getColor().isWhite()) {
|
||||
mana = Mana.WhiteMana(amount);
|
||||
}
|
||||
Mana mana = choice.getMana(1);
|
||||
if (mana != null) {
|
||||
checkToFirePossibleEvents(mana, game, source);
|
||||
player.getManaPool().addMana(mana, game, source);
|
||||
|
|
|
@ -46,7 +46,7 @@ public class AddManaOfAnyColorEffect extends BasicManaEffect {
|
|||
}
|
||||
|
||||
public AddManaOfAnyColorEffect(final int amount) {
|
||||
super(new Mana(0,0,0,0,0,0, amount, 0));
|
||||
super(new Mana(0, 0, 0, 0, 0, 0, amount, 0));
|
||||
this.amount = amount;
|
||||
this.staticText = new StringBuilder("add ")
|
||||
.append(CardUtil.numberToText(amount))
|
||||
|
@ -75,18 +75,7 @@ public class AddManaOfAnyColorEffect extends BasicManaEffect {
|
|||
if (choice.getColor() == null) {
|
||||
return false; // it happens, don't know how
|
||||
}
|
||||
Mana createdMana = null;
|
||||
if (choice.getColor().isBlack()) {
|
||||
createdMana = Mana.BlackMana(amount);
|
||||
} else if (choice.getColor().isBlue()) {
|
||||
createdMana = Mana.BlueMana(amount);
|
||||
} else if (choice.getColor().isRed()) {
|
||||
createdMana = Mana.RedMana(amount);
|
||||
} else if (choice.getColor().isGreen()) {
|
||||
createdMana = Mana.GreenMana(amount);
|
||||
} else if (choice.getColor().isWhite()) {
|
||||
createdMana = Mana.WhiteMana(amount);
|
||||
}
|
||||
Mana createdMana = choice.getMana(amount);
|
||||
if (createdMana != null) {
|
||||
checkToFirePossibleEvents(createdMana, game, source);
|
||||
controller.getManaPool().addMana(createdMana, game, source);
|
||||
|
@ -103,7 +92,7 @@ public class AddManaOfAnyColorEffect extends BasicManaEffect {
|
|||
|
||||
@Override
|
||||
public Mana getMana() {
|
||||
return (new Mana(0,0,0,0,0,0,amount, 0));
|
||||
return new Mana(0, 0, 0, 0, 0, 0, amount, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -42,7 +42,6 @@ import mage.players.Player;
|
|||
*/
|
||||
public class DynamicManaEffect extends BasicManaEffect {
|
||||
|
||||
private final Mana computedMana;
|
||||
private final DynamicValue amount;
|
||||
private final DynamicValue netAmount;
|
||||
private String text = null;
|
||||
|
@ -73,7 +72,6 @@ public class DynamicManaEffect extends BasicManaEffect {
|
|||
public DynamicManaEffect(Mana mana, DynamicValue amount, String text, boolean oneChoice, DynamicValue netAmount) {
|
||||
super(mana);
|
||||
this.amount = amount;
|
||||
computedMana = new Mana();
|
||||
this.text = text;
|
||||
this.oneChoice = oneChoice;
|
||||
this.netAmount = netAmount;
|
||||
|
@ -81,7 +79,6 @@ public class DynamicManaEffect extends BasicManaEffect {
|
|||
|
||||
public DynamicManaEffect(final DynamicManaEffect effect) {
|
||||
super(effect);
|
||||
this.computedMana = effect.computedMana.copy();
|
||||
this.amount = effect.amount.copy();
|
||||
this.text = effect.text;
|
||||
this.oneChoice = effect.oneChoice;
|
||||
|
@ -99,7 +96,7 @@ public class DynamicManaEffect extends BasicManaEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
computeMana(false, game, source);
|
||||
Mana computedMana = computeMana(false, game, source);
|
||||
checkToFirePossibleEvents(computedMana, game, source);
|
||||
game.getPlayer(source.getControllerId()).getManaPool().addMana(computedMana, game, source);
|
||||
return true;
|
||||
|
@ -119,7 +116,7 @@ public class DynamicManaEffect extends BasicManaEffect {
|
|||
}
|
||||
|
||||
public Mana computeMana(boolean netMana, Game game, Ability source) {
|
||||
this.computedMana.clear();
|
||||
Mana computedMana = new Mana();
|
||||
int count;
|
||||
if (netMana && netAmount != null) {
|
||||
// calculate the maximum available mana
|
||||
|
@ -155,17 +152,7 @@ public class DynamicManaEffect extends BasicManaEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (choiceColor.getColor().isBlack()) {
|
||||
computedMana.increaseBlack();
|
||||
} else if (choiceColor.getColor().isBlue()) {
|
||||
computedMana.increaseBlue();
|
||||
} else if (choiceColor.getColor().isRed()) {
|
||||
computedMana.increaseRed();
|
||||
} else if (choiceColor.getColor().isGreen()) {
|
||||
computedMana.increaseGreen();
|
||||
} else if (choiceColor.getColor().isWhite()) {
|
||||
computedMana.increaseWhite();
|
||||
}
|
||||
choiceColor.increaseMana(computedMana);
|
||||
if (!oneChoice) {
|
||||
choiceColor.clearChoice();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -317,7 +317,7 @@ public class ManaOptions extends ArrayList<Mana> {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
payCombinations.add(new Mana(0, 0, 0, 0, 0, 0, 0, number));
|
||||
payCombinations.add(Mana.ColorlessMana(number));
|
||||
}
|
||||
return payCombinations;
|
||||
}
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
package mage.choices;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mage.Mana;
|
||||
import mage.ObjectColor;
|
||||
|
||||
/**
|
||||
|
@ -90,4 +92,33 @@ public class ChoiceColor extends ChoiceImpl {
|
|||
return color;
|
||||
}
|
||||
|
||||
public Mana getMana(int amount) {
|
||||
Mana mana = null;
|
||||
if (getColor().isBlack()) {
|
||||
mana = Mana.BlackMana(amount);
|
||||
} else if (getColor().isBlue()) {
|
||||
mana = Mana.BlueMana(amount);
|
||||
} else if (getColor().isRed()) {
|
||||
mana = Mana.RedMana(amount);
|
||||
} else if (getColor().isGreen()) {
|
||||
mana = Mana.GreenMana(amount);
|
||||
} else if (getColor().isWhite()) {
|
||||
mana = Mana.WhiteMana(amount);
|
||||
}
|
||||
return mana;
|
||||
}
|
||||
|
||||
public void increaseMana(Mana mana) {
|
||||
if (getColor().isBlack()) {
|
||||
mana.increaseBlack();
|
||||
} else if (getColor().isBlue()) {
|
||||
mana.increaseBlue();
|
||||
} else if (getColor().isRed()) {
|
||||
mana.increaseRed();
|
||||
} else if (getColor().isGreen()) {
|
||||
mana.increaseGreen();
|
||||
} else if (getColor().isWhite()) {
|
||||
mana.increaseWhite();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue