Some changes to mana handling to handle {C} mana.

This commit is contained in:
LevelX2 2016-01-08 23:25:42 +01:00
parent 7a3c0bb884
commit 782190bac3
185 changed files with 700 additions and 566 deletions

View file

@ -1,43 +1,42 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.view;
import java.io.Serializable;
import mage.ConditionalMana;
import mage.players.ManaPool;
import java.io.Serializable;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public class ManaPoolView implements Serializable {
private static final long serialVersionUID = 1L;
private int red;

View file

@ -56,6 +56,7 @@ import mage.abilities.SpellAbility;
import mage.abilities.TriggeredAbility;
import mage.abilities.costs.VariableCost;
import mage.abilities.costs.mana.ColoredManaCost;
import mage.abilities.costs.mana.ColorlessManaCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.costs.mana.HybridManaCost;
import mage.abilities.costs.mana.ManaCost;
@ -1007,7 +1008,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
if (card.getManaCost().getVariableCosts().size() > 0) {
//don't use variable mana costs unless there is at least 3 extra mana for X
for (Mana option : options) {
option.add(Mana.ColorlessMana(3));
option.add(Mana.GenericMana(3));
}
}
for (Mana mana : options) {
@ -1041,7 +1042,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
if (ability.getManaCosts().getVariableCosts().size() > 0) {
//don't use variable mana costs unless there is at least 3 extra mana for X
for (Mana option : abilityOptions) {
option.add(Mana.ColorlessMana(3));
option.add(Mana.GenericMana(3));
}
}
if (abilityOptions.size() == 0) {
@ -1167,6 +1168,18 @@ public class ComputerPlayer extends PlayerImpl implements Player {
}
}
}
// pay colorless
for (ManaAbility manaAbility : perm.getAbilities().getAvailableManaAbilities(Zone.BATTLEFIELD, game)) {
if (cost instanceof ColorlessManaCost) {
for (Mana netMana : manaAbility.getNetMana(game)) {
if (cost.testPay(netMana) || spendAnyMana) {
if (activateAbility(manaAbility, game)) {
return true;
}
}
}
}
}
// finally pay generic
for (ManaAbility manaAbility : perm.getAbilities().getAvailableManaAbilities(Zone.BATTLEFIELD, game)) {
if (cost instanceof GenericManaCost) {

View file

@ -30,7 +30,6 @@ package mage.sets.alliances;
import java.util.UUID;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
@ -71,7 +70,7 @@ public class BalduvianTradingPost extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.ALL, new EnterBattlefieldPayCostOrPutGraveyardEffect(new SacrificeTargetCost(new TargetControlledPermanent(filter)))));
// {tap}: Add {C}{R} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 0, 1,0 ), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 0, 0, 0, 1), new TapSourceCost()));
// {1}, {tap}: Balduvian Trading Post deals 1 damage to target attacking creature.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new GenericManaCost(1));

View file

@ -69,7 +69,7 @@ public class SoldeviExcavations extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.ALL, new EnterBattlefieldPayCostOrPutGraveyardEffect(new SacrificeTargetCost(new TargetControlledPermanent(filter)))));
// {tap}: Add {C}{U} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 0, 1, 0), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 0, 0, 0, 1), new TapSourceCost()));
// {1}, {tap}: Scry 1.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryEffect(1), new GenericManaCost(1));

View file

@ -78,8 +78,8 @@ class PowerArtifactCostModificationEffect extends CostModificationEffectImpl {
Player controller = game.getPlayer(abilityToModify.getControllerId());
if (controller != null) {
Mana mana = abilityToModify.getManaCostsToPay().getMana();
int reduce = mana.getColorless();
if (reduce > 0 && mana.count() == mana.getColorless()) {
int reduce = mana.getGeneric();
if (reduce > 0 && mana.count() == mana.getGeneric()) {
reduce--;
}
if (reduce > 2) {

View file

@ -100,12 +100,12 @@ class AvatarOfWoeCostReductionEffect extends CostModificationEffectImpl {
public boolean apply(Game game, Ability source, Ability abilityToModify) {
SpellAbility spellAbility = (SpellAbility) abilityToModify;
Mana mana = spellAbility.getManaCostsToPay().getMana();
if (mana.getColorless() > 0) {
int newCount = mana.getColorless() - 6;
if (mana.getGeneric() > 0) {
int newCount = mana.getGeneric() - 6;
if (newCount < 0) {
newCount = 0;
}
mana.setColorless(newCount);
mana.setGeneric(newCount);
spellAbility.getManaCostsToPay().load(mana.toString());
return true;
}

View file

@ -112,7 +112,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), "that player", true);
Effect effect = new AddManaToManaPoolTargetControllerEffect(new Mana(0,event.getAmount(),0,0,0,0,0, 0), "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);

View file

@ -70,7 +70,7 @@ public class PetalmaneBaku extends CardImpl {
// {1}, Remove X ki counters from Petalmane Baku: Add X mana of any one color to your mana pool.
Ability ability = new DynamicManaAbility(
new Mana(0, 0, 0, 0, 0, 0, 1),
new Mana(0, 0, 0, 0, 0, 0, 1, 0),
new RemovedCountersForCostValue(),
new ManaCostsImpl<>("{1}"),
"Add X mana of any one color to your mana pool",
@ -130,19 +130,19 @@ public class PetalmaneBaku extends CardImpl {
}
}
if (choice.getColor().isBlack()) {
player.getManaPool().addMana(new Mana(0, 0, 0, 0, numberOfMana, 0, 0), game, source);
player.getManaPool().addMana(new Mana(0, 0, 0, 0, numberOfMana, 0, 0, 0), game, source);
return true;
} else if (choice.getColor().isBlue()) {
player.getManaPool().addMana(new Mana(0, 0, numberOfMana, 0, 0, 0, 0), game, source);
player.getManaPool().addMana(new Mana(0, 0, numberOfMana, 0, 0, 0, 0, 0), game, source);
return true;
} else if (choice.getColor().isRed()) {
player.getManaPool().addMana(new Mana(numberOfMana, 0, 0, 0, 0, 0, 0), game, source);
player.getManaPool().addMana(new Mana(numberOfMana, 0, 0, 0, 0, 0, 0, 0), game, source);
return true;
} else if (choice.getColor().isGreen()) {
player.getManaPool().addMana(new Mana(0, numberOfMana, 0, 0, 0, 0, 0), game, source);
player.getManaPool().addMana(new Mana(0, numberOfMana, 0, 0, 0, 0, 0, 0), game, source);
return true;
} else if (choice.getColor().isWhite()) {
player.getManaPool().addMana(new Mana(0, 0, 0, numberOfMana, 0, 0, 0), game, source);
player.getManaPool().addMana(new Mana(0, 0, 0, numberOfMana, 0, 0, 0, 0), game, source);
return true;
}
}

View file

@ -101,7 +101,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), "that player", true);
Effect effect = new AddManaToManaPoolTargetControllerEffect(new Mana(0,event.getAmount(),0,0,0,0,0, 0), "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);

View file

@ -56,7 +56,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), "that player", true);
Effect effect = new AddManaToManaPoolTargetControllerEffect(new Mana(0,3,0,0,0,0,0, 0), "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));

View file

@ -95,7 +95,7 @@ class AstralCornucopiaManaAbility extends ManaAbility {
if (sourcePermanent != null) {
int counters = sourcePermanent.getCounters().getCount(CounterType.CHARGE.getName());
if (counters > 0) {
netMana.add(new Mana(0, 0, 0, 0, 0, 0, counters));
netMana.add(new Mana(0, 0, 0, 0, 0, 0, counters, 0));
}
}
return netMana;

View file

@ -88,13 +88,13 @@ class MarshmistTitanCostReductionEffect extends CostModificationEffectImpl {
public boolean apply(Game game, Ability source, Ability abilityToModify) {
SpellAbility spellAbility = (SpellAbility)abilityToModify;
Mana mana = spellAbility.getManaCostsToPay().getMana();
if (mana.getColorless() > 0) {
if (mana.getGeneric() > 0) {
int count = new DevotionCount(ColoredManaSymbol.B).calculate(game, source, this);
int newCount = mana.getColorless() - count;
int newCount = mana.getGeneric() - count;
if (newCount < 0) {
newCount = 0;
}
mana.setColorless(newCount);
mana.setGeneric(newCount);
spellAbility.getManaCostsToPay().load(mana.toString());
return true;
}

View file

@ -66,15 +66,15 @@ public class BoseijuWhoSheltersAll extends CardImpl {
// Boseiju, Who Shelters All enters the battlefield tapped.
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, 1, 0);
Mana mana = new Mana(0, 0, 0, 0, 0, 0, 0, 1);
mana.setFlag(true); // used to indicate this mana ability
SimpleManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, mana, new TapSourceCost());
ability.addCost(new PayLifeCost(2));
ability.getEffects().get(0).setText("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");
this.addAbility(ability);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoseijuWhoSheltersAllCantCounterEffect()), new BoseijuWhoSheltersAllWatcher());
}
@ -126,7 +126,7 @@ class BoseijuWhoSheltersAllWatcher extends Watcher {
class BoseijuWhoSheltersAllCantCounterEffect extends ContinuousRuleModifyingEffectImpl {
private static final FilterCard filter = new FilterInstantOrSorceryCard();
public BoseijuWhoSheltersAllCantCounterEffect() {
super(Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = null;
@ -154,12 +154,12 @@ class BoseijuWhoSheltersAllCantCounterEffect extends ContinuousRuleModifyingEffe
}
return null;
}
@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.COUNTER;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
BoseijuWhoSheltersAllWatcher watcher = (BoseijuWhoSheltersAllWatcher) game.getState().getWatchers().get("ManaPaidFromBoseijuWhoSheltersAllWatcher");

View file

@ -55,7 +55,6 @@ public class ScatteringStroke extends CardImpl {
super(ownerId, 60, "Scattering Stroke", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{U}{U}");
this.expansionSetCode = "CMD";
// Counter target spell. Clash with an opponent. If you win, at the beginning of your next main phase, you may add {X} to your mana pool, where X is that spell's converted mana cost.
this.getSpellAbility().addEffect(new ScatteringStrokeEffect());
this.getSpellAbility().addTarget(new TargetSpell());
@ -71,7 +70,6 @@ public class ScatteringStroke extends CardImpl {
}
}
class ScatteringStrokeEffect extends OneShotEffect {
public ScatteringStrokeEffect() {
@ -95,9 +93,9 @@ class ScatteringStrokeEffect extends OneShotEffect {
if (controller != null && spell != null) {
game.getStack().counter(spell.getId(), source.getSourceId(), game);
if (ClashEffect.getInstance().apply(game, source)) {
Effect effect = new AddManaToManaPoolSourceControllerEffect(new Mana(0,0,0,0,0,spell.getConvertedManaCost(),0));
AtTheBeginOfMainPhaseDelayedTriggeredAbility delayedAbility =
new AtTheBeginOfMainPhaseDelayedTriggeredAbility(effect, true, TargetController.YOU, AtTheBeginOfMainPhaseDelayedTriggeredAbility.PhaseSelection.NEXT_MAIN);
Effect effect = new AddManaToManaPoolSourceControllerEffect(new Mana(0, 0, 0, 0, 0, 0, 0, spell.getConvertedManaCost()));
AtTheBeginOfMainPhaseDelayedTriggeredAbility delayedAbility
= new AtTheBeginOfMainPhaseDelayedTriggeredAbility(effect, true, TargetController.YOU, AtTheBeginOfMainPhaseDelayedTriggeredAbility.PhaseSelection.NEXT_MAIN);
delayedAbility.setSourceId(source.getSourceId());
delayedAbility.setControllerId(source.getControllerId());
delayedAbility.setSourceObject(source.getSourceObject(game), game);
@ -107,4 +105,4 @@ class ScatteringStrokeEffect extends OneShotEffect {
}
return false;
}
}
}

View file

@ -115,15 +115,15 @@ class SpringjackPastureEffect extends OneShotEffect {
if (you != null && choice != null) {
int count = new GetXValue().calculate(game, source, this);
if (choice.getColor().isBlack()) {
you.getManaPool().addMana(new Mana(0, 0, 0, 0, count, 0, 0), game, source);
you.getManaPool().addMana(new Mana(0, 0, 0, 0, count, 0, 0, 0), game, source);
} else if (choice.getColor().isBlue()) {
you.getManaPool().addMana(new Mana(0, 0, count, 0, 0, 0, 0), game, source);
you.getManaPool().addMana(new Mana(0, 0, count, 0, 0, 0, 0, 0), game, source);
} else if (choice.getColor().isRed()) {
you.getManaPool().addMana(new Mana(count, 0, 0, 0, 0, 0, 0), game, source);
you.getManaPool().addMana(new Mana(count, 0, 0, 0, 0, 0, 0, 0), game, source);
} else if (choice.getColor().isGreen()) {
you.getManaPool().addMana(new Mana(0, count, 0, 0, 0, 0, 0), game, source);
you.getManaPool().addMana(new Mana(0, count, 0, 0, 0, 0, 0, 0), game, source);
} else if (choice.getColor().isWhite()) {
you.getManaPool().addMana(new Mana(0, 0, 0, count, 0, 0, 0), game, source);
you.getManaPool().addMana(new Mana(0, 0, 0, count, 0, 0, 0, 0), game, source);
}
return true;

View file

@ -53,12 +53,11 @@ public class CoralAtoll extends CardImpl {
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("an untapped Island");
static{
static {
filter.add(new SubtypePredicate("Island"));
filter.add(Predicates.not(new TappedPredicate()));
}
public CoralAtoll(UUID ownerId) {
super(ownerId, 287, "Coral Atoll", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, "");
this.expansionSetCode = "C14";
@ -68,9 +67,8 @@ public class CoralAtoll extends CardImpl {
// When Coral Atoll enters the battlefield, sacrifice it unless you return an untapped Island you control to its owner's hand.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)))));
// {tap}: Add {C}{U} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 0, 1,0 ), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 0, 0, 0, 1), new TapSourceCost()));
}
public CoralAtoll(final CoralAtoll card) {

View file

@ -53,7 +53,7 @@ public class DormantVolcano extends CardImpl {
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("an untapped Mountain");
static{
static {
filter.add(new SubtypePredicate("Mountain"));
filter.add(Predicates.not(new TappedPredicate()));
}
@ -69,7 +69,7 @@ public class DormantVolcano extends CardImpl {
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)))));
// {tap}: Add {C}{R} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 0, 1,0 ), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 0, 0, 0, 1), new TapSourceCost()));
}

View file

@ -69,7 +69,7 @@ public class Everglades extends CardImpl {
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(1, 1, filter, true)))));
// {tap}: Add {C}{B} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 0, 1, 1, 0), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 0, 0, 1, 0, 1), new TapSourceCost()));
}

View file

@ -53,7 +53,7 @@ public class JungleBasin extends CardImpl {
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("an untapped Forest");
static{
static {
filter.add(new SubtypePredicate("Forest"));
filter.add(Predicates.not(new TappedPredicate()));
}
@ -69,8 +69,8 @@ public class JungleBasin extends CardImpl {
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)))));
// {tap}: Add {C}{G} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 0, 0, 1,0 ), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 0, 0, 0, 0, 1), new TapSourceCost()));
}
public JungleBasin(final JungleBasin card) {

View file

@ -53,7 +53,7 @@ public class Karoo extends CardImpl {
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("an untapped Plains");
static{
static {
filter.add(new SubtypePredicate("Plains"));
filter.add(Predicates.not(new TappedPredicate()));
}
@ -69,7 +69,7 @@ public class Karoo extends CardImpl {
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)))));
// {tap}: Add {C}{W} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 1, 0, 1,0 ), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 1, 0, 0, 0, 1), new TapSourceCost()));
}

View file

@ -54,7 +54,7 @@ public class Kaleidostone extends CardImpl {
// When Kaleidostone enters the battlefield, draw a card.
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)));
// {5}, {tap}, Sacrifice Kaleidostone: Add {W}{U}{B}{R}{G} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 1, 1, 1, 0, 0), new GenericManaCost(5));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 1, 1, 1, 0, 0, 0), new GenericManaCost(5));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);

View file

@ -75,8 +75,8 @@ public class KnotvineMystic extends CardImpl{
class KnotvineMysticManaAbility extends BasicManaAbility {
public KnotvineMysticManaAbility() {
super(new BasicManaEffect(new Mana(1, 1, 0, 1, 0, 0, 0)));
this.netMana.add(new Mana(1, 1, 0, 1, 0, 0, 0));
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) {

View file

@ -25,18 +25,16 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.darksteel;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.MageInt;
import mage.Mana;
import mage.abilities.common.DiesTriggeredAbility;
import mage.abilities.effects.common.BasicManaEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
/**
* @author Loki
@ -49,7 +47,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, 1, 0))));
this.addAbility(new DiesTriggeredAbility(new BasicManaEffect(new Mana(0, 0, 0, 0, 0, 0, 0, 1))));
}
public MyrMoonvessel(final MyrMoonvessel card) {

View file

@ -25,17 +25,15 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.darksteel;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.Mana;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
/**
@ -44,15 +42,15 @@ import mage.constants.Zone;
*/
public class UrGolemsEye extends CardImpl {
public UrGolemsEye (UUID ownerId) {
public UrGolemsEye(UUID ownerId) {
super(ownerId, 155, "Ur-Golem's Eye", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{4}");
this.expansionSetCode = "DST";
// {tap}: Add {C}{C} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0,0,0,0,0,2,0), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 0, 0, 0, 0, 2), new TapSourceCost()));
}
public UrGolemsEye (final UrGolemsEye card) {
public UrGolemsEye(final UrGolemsEye card) {
super(card);
}
@ -62,4 +60,3 @@ public class UrGolemsEye extends CardImpl {
}
}

View file

@ -58,7 +58,7 @@ public class AzoriusChancery extends CardImpl {
// When Azorius Chancery enters the battlefield, return a land you control to its owner's hand.
this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(filter), false));
// {tap}: Add {W}{U} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 1, 0, 0, 0), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 1, 0, 0, 0, 0), new TapSourceCost()));
}
public AzoriusChancery(final AzoriusChancery card) {

View file

@ -50,7 +50,7 @@ public class AzoriusSignet extends CardImpl {
this.expansionSetCode = "DIS";
// {1}, {tap}: Add {W}{U} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 1, 0, 0, 0), new GenericManaCost(1));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 1, 0, 0, 0, 0), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -61,7 +61,7 @@ public class RakdosCarnarium extends CardImpl {
// When Rakdos Carnarium enters the battlefield, return a land you control to its owner's hand.
this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(filter), false));
// {tap}: Add {B}{R} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 1, 0, 0), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 1, 0, 0, 0), new TapSourceCost()));
}
public RakdosCarnarium(final RakdosCarnarium card) {

View file

@ -50,7 +50,7 @@ public class RakdosSignet extends CardImpl {
this.expansionSetCode = "DIS";
// {1}, {tap}: Add {B}{R} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 1, 0, 0), new GenericManaCost(1));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 1, 0, 0, 0), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -58,7 +58,7 @@ public class SimicGrowthChamber extends CardImpl {
// When Simic Growth Chamber enters the battlefield, return a land you control to its owner's hand.
this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(filter), false));
// {tap}: Add {G}{U} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 1, 0, 0, 0, 0), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 1, 0, 0, 0, 0, 0), new TapSourceCost()));
}
public SimicGrowthChamber(final SimicGrowthChamber card) {

View file

@ -50,7 +50,7 @@ public class SimicSignet extends CardImpl {
this.expansionSetCode = "DIS";
// {1}, {tap}: Add {G}{U} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 1, 0, 0, 0, 0), new GenericManaCost(1));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 1, 0, 0, 0, 0, 0), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -62,7 +62,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,3,0)),
new BasicManaEffect(new Mana(0, 0, 0, 0, 0, 0, 0, 3)),
new TapSourceCost(),
FormidableCondition.getInstance());
ability.setAbilityWord(AbilityWord.FORMIDABLE);

View file

@ -58,7 +58,7 @@ public class SavageVentmaw extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Whenever Savage Ventmaw attacks, add {R}{R}{R}{G}{G}{G} to your mana pool. Until end of turn, this mana doesn't empty from your mana pool as steps and phases end.
Effect effect = new SavageVentmawManaEffect(new Mana(3, 3, 0, 0, 0, 0, 0), "your", true);
Effect effect = new SavageVentmawManaEffect(new Mana(3, 3, 0, 0, 0, 0, 0, 0), "your", true);
effect.setText("add {R}{R}{R}{G}{G}{G} to your mana pool. Until end of turn, this mana doesn't empty from your mana pool as steps and phases end");
this.addAbility(new AttacksTriggeredAbility(effect, false));

View file

@ -80,7 +80,7 @@ public class StarCompass extends CardImpl {
class StarCompassManaAbility extends ManaAbility {
public StarCompassManaAbility() {
super(Zone.BATTLEFIELD, new StarCompassManaEffect(),new TapSourceCost());
super(Zone.BATTLEFIELD, new StarCompassManaEffect(), new TapSourceCost());
}
public StarCompassManaAbility(final StarCompassManaAbility ability) {
@ -94,14 +94,14 @@ class StarCompassManaAbility extends ManaAbility {
@Override
public List<Mana> getNetMana(Game game) {
return ((StarCompassManaEffect)getEffects().get(0)).getNetMana(game, this);
return ((StarCompassManaEffect) getEffects().get(0)).getNetMana(game, this);
}
}
class StarCompassManaEffect extends ManaEffect {
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent();
static {
filter.add(new SupertypePredicate("Basic"));
}
@ -135,7 +135,7 @@ class StarCompassManaEffect extends ManaEffect {
if (types.getWhite() > 0) {
choice.getChoices().add("White");
}
if (types.getColorless() > 0) {
if (types.getGeneric() > 0) {
choice.getChoices().add("Colorless");
}
if (types.getAny() > 0) {
@ -172,7 +172,7 @@ class StarCompassManaEffect extends ManaEffect {
mana.setWhite(1);
break;
case "Colorless":
mana.setColorless(1);
mana.setGeneric(1);
break;
}
checkToFirePossibleEvents(mana, game, source);
@ -184,7 +184,7 @@ class StarCompassManaEffect extends ManaEffect {
return true;
}
public List<Mana> getNetMana(Game game, Ability source) {
public List<Mana> getNetMana(Game game, Ability source) {
List<Mana> netManas = new ArrayList<>();
Mana types = getManaTypes(game, source);
if (types.getBlack() > 0) {
@ -202,8 +202,8 @@ class StarCompassManaEffect extends ManaEffect {
if (types.getWhite() > 0) {
netManas.add(new Mana(ColoredManaSymbol.W));
}
if (types.getColorless() > 0) {
netManas.add(new Mana(0,0,0,0,0,1,0));
if (types.getGeneric() > 0) {
netManas.add(new Mana(0, 0, 0, 0, 0, 0, 0, 1));
}
return netManas;
}
@ -215,7 +215,7 @@ class StarCompassManaEffect extends ManaEffect {
Abilities<ManaAbility> manaAbilities = land.getAbilities().getManaAbilities(Zone.BATTLEFIELD);
for (ManaAbility ability : manaAbilities) {
if (!ability.equals(source) && ability.definesMana()) {
for (Mana netMana: ability.getNetMana(game)) {
for (Mana netMana : ability.getNetMana(game)) {
types.add(netMana);
}
}
@ -233,4 +233,4 @@ class StarCompassManaEffect extends ManaEffect {
public StarCompassManaEffect copy() {
return new StarCompassManaEffect(this);
}
}
}

View file

@ -57,7 +57,7 @@ public class CascadeBluffs extends CardImpl {
ability.addCost(new TapSourceCost());
this.addAbility(ability);
ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 1, 0, 0, 0, 0), new ManaCostsImpl("{U/R}"));
ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 1, 0, 0, 0, 0, 0), new ManaCostsImpl("{U/R}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);

View file

@ -59,7 +59,7 @@ public class FetidHeath extends CardImpl {
ability.addCost(new TapSourceCost());
this.addAbility(ability);
ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 1, 1, 0, 0), new ManaCostsImpl("{W/B}"));
ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 1, 1, 0, 0, 0), new ManaCostsImpl("{W/B}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);

View file

@ -57,7 +57,7 @@ public class FloodedGrove extends CardImpl {
ability.addCost(new TapSourceCost());
this.addAbility(ability);
ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 1, 0, 0, 0, 0), new ManaCostsImpl("{G/U}"));
ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 1, 0, 0, 0, 0, 0), new ManaCostsImpl("{G/U}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);

View file

@ -56,7 +56,7 @@ public class RuggedPrairie extends CardImpl {
ability.addCost(new TapSourceCost());
this.addAbility(ability);
ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 1, 0, 0, 0), new ManaCostsImpl("{R/W}"));
ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 1, 0, 0, 0, 0), new ManaCostsImpl("{R/W}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);

View file

@ -57,7 +57,7 @@ public class TwilightMire extends CardImpl {
ability.addCost(new TapSourceCost());
this.addAbility(ability);
ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 0, 1, 0, 0), new ManaCostsImpl("{B/G}"));
ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 0, 1, 0, 0, 0), new ManaCostsImpl("{B/G}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);

View file

@ -52,7 +52,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)));
this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(0, 0, 0, 0, 4, 0, 0, 0)));
}
public CullingTheWeak(final CullingTheWeak card) {

View file

@ -55,10 +55,10 @@ public class Workhorse extends CardImpl {
// Workhorse enters the battlefield with four +1/+1 counters on it.
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, 1, 0)),
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD,
new Mana(new Mana(0, 0, 0, 0, 0, 0, 0, 1)),
new RemoveCountersSourceCost(CounterType.P1P1.createInstance())));
}

View file

@ -54,7 +54,7 @@ public class BasalThrull1 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)), new TapSourceCost());
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 0, 0, 2, 0, 0, 0)), new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
}

View file

@ -108,7 +108,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)), false);
super(Zone.BATTLEFIELD, new AddManaToManaPoolSourceControllerEffect(new Mana(0, 2, 0, 0, 0, 0, 0, 0)), false);
}

View file

@ -48,7 +48,7 @@ public class ChannelTheSuns extends CardImpl {
// Add {W}{U}{B}{R}{G} to your mana pool.
Effect effect = new AddManaToManaPoolSourceControllerEffect(new Mana(1, 1, 1, 1, 1, 0, 0));
Effect effect = new AddManaToManaPoolSourceControllerEffect(new Mana(1, 1, 1, 1, 1, 0, 0, 0));
this.getSpellAbility().addEffect(effect);
}

View file

@ -52,7 +52,7 @@ public class BurningTreeEmissary extends CardImpl {
this.toughness = new MageInt(2);
// When Burning-Tree Emissary enters the battlefield, add {R}{G} to your mana pool.
this.addAbility(new EntersBattlefieldTriggeredAbility(new BasicManaEffect(new Mana(1,1,0,0,0,0,0))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new BasicManaEffect(new Mana(1,1,0,0,0,0,0, 0))));
}
public BurningTreeEmissary(final BurningTreeEmissary card) {

View file

@ -48,7 +48,7 @@ public class GruulSignet extends CardImpl {
public GruulSignet(UUID ownerId) {
super(ownerId, 150, "Gruul Signet", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
this.expansionSetCode = "GPT";
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 0, 0, 0, 0, 0), new GenericManaCost(1));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 0, 0, 0, 0, 0, 0), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -58,7 +58,7 @@ public class IzzetBoilerworks extends CardImpl {
// When Izzet Boilerworks enters the battlefield, return a land you control to its owner's hand.
this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(filter), false));
// {T}: Add {U}{R} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 1, 0, 0, 0, 0), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 1, 0, 0, 0, 0, 0), new TapSourceCost()));
}
public IzzetBoilerworks(final IzzetBoilerworks card) {

View file

@ -48,7 +48,7 @@ public class IzzetSignet extends CardImpl {
public IzzetSignet(UUID ownerId) {
super(ownerId, 152, "Izzet Signet", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
this.expansionSetCode = "GPT";
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 1, 0, 0, 0, 0), new GenericManaCost(1));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 1, 0, 0, 0, 0, 0), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -60,7 +60,7 @@ public class OrzhovBasilica extends CardImpl {
this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(filter), false));
// {T}: Add {W}{B} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 1, 1, 0, 0), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 1, 1, 0, 0, 0), new TapSourceCost()));
}
public OrzhovBasilica(final OrzhovBasilica card) {

View file

@ -48,7 +48,7 @@ public class OrzhovSignet extends CardImpl {
public OrzhovSignet(UUID ownerId) {
super(ownerId, 155, "Orzhov Signet", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
this.expansionSetCode = "GPT";
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 1, 1, 0, 0), new GenericManaCost(1));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 1, 1, 0, 0, 0), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -54,7 +54,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), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 2, 0, 0, 0, 0, 0, 0), new TapSourceCost()));
}
public FyndhornElder(final FyndhornElder card) {

View file

@ -55,7 +55,7 @@ public class AncientSpring extends CardImpl {
// {tap}: Add {U} to your mana pool.
this.addAbility(new BlueManaAbility());
// {tap}, Sacrifice Ancient Spring: Add {W}{B} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 1, 1, 0, 0), new TapSourceCost());
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 1, 1, 0, 0, 0), new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
}

View file

@ -54,7 +54,7 @@ public class CrosissAttendant extends CardImpl {
this.toughness = new MageInt(3);
// {1}, Sacrifice Crosis's Attendant: Add {U}{B}{R} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 1, 0, 1, 0, 0), new ManaCostsImpl("{1}"));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 1, 0, 1, 0, 0, 0), new ManaCostsImpl("{1}"));
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
}

View file

@ -54,7 +54,7 @@ public class DarigaazsAttendant extends CardImpl {
this.toughness = new MageInt(3);
// {1}, Sacrifice Darigaaz's Attendant: Add {B}{R}{G} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 0, 0, 1, 0, 0), new ManaCostsImpl("{1}"));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 0, 0, 1, 0, 0, 0), new ManaCostsImpl("{1}"));
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
}

View file

@ -54,7 +54,7 @@ public class DromarsAttendant extends CardImpl {
this.toughness = new MageInt(3);
// {1}, Sacrifice Dromar's Attendant: Add {W}{U}{B} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 1, 1, 0, 0), new ManaCostsImpl("{1}"));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 1, 1, 0, 0, 0), new ManaCostsImpl("{1}"));
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
}

View file

@ -57,7 +57,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)), new TapSourceCost());
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 1, 0, 0, 1, 0, 0, 0)), new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
}

View file

@ -55,7 +55,7 @@ public class IrrigationDitch extends CardImpl {
// {tap}: Add {W} to your mana pool.
this.addAbility(new WhiteManaAbility());
// {tap}, Sacrifice Irrigation Ditch: Add {G}{U} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 1, 0, 0, 0, 0), new TapSourceCost());
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 1, 0, 0, 0, 0, 0), new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
}

View file

@ -54,7 +54,7 @@ public class RithsAttendant extends CardImpl {
this.toughness = new MageInt(3);
// {1}, Sacrifice Rith's Attendant: Add {R}{G}{W} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 0, 1, 0, 0, 0), new ManaCostsImpl("{1}"));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 0, 1, 0, 0, 0, 0), new ManaCostsImpl("{1}"));
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
}

View file

@ -55,7 +55,7 @@ public class SulfurVent extends CardImpl {
// {tap}: Add {B} to your mana pool.
this.addAbility(new BlackManaAbility());
// {tap}, Sacrifice Sulfur Vent: Add {U}{R} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 1, 0, 0, 0, 0), new TapSourceCost());
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 1, 0, 0, 0, 0, 0), new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
}

View file

@ -55,7 +55,7 @@ public class TinderFarm extends CardImpl {
// {tap}: Add {G} to your mana pool.
this.addAbility(new GreenManaAbility());
// {tap}, Sacrifice Tinder Farm: Add {R}{W} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 1, 0, 0, 0), new TapSourceCost());
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 1, 0, 0, 0, 0), new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
}

View file

@ -54,7 +54,7 @@ public class TrevasAttendant extends CardImpl {
this.toughness = new MageInt(3);
// {1}, Sacrifice Treva's Attendant: Add {G}{W}{U} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 1, 1, 0, 0, 0), new ManaCostsImpl("{1}"));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 1, 1, 0, 0, 0, 0), new ManaCostsImpl("{1}"));
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
}

View file

@ -55,7 +55,7 @@ public class MarduWarshrieker extends CardImpl {
this.toughness = new MageInt(3);
// <em>Raid</em> - When Mardu Warshrieker enters the battlefield, if you attacked with a creature this turn, add {R}{W}{B} to your mana pool.
this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(new Mana(1, 0, 0, 1, 1, 0, 0))), RaidCondition.getInstance(),
this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(new Mana(1, 0, 0, 1, 1, 0, 0, 0))), RaidCondition.getInstance(),
"<i>Raid</i> - When {this} enters the battlefield, if you attacked with a creature this turn, add {R}{W}{B} to your mana pool."),
new PlayerAttackedWatcher());
}

View file

@ -65,7 +65,7 @@ public class RattleclawMystic extends CardImpl {
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}")));
// When Rattleclaw Mystic is turned face up, add {G}{U}{R} to your mana pool.
this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(new Mana(1,1,1,0,0,0,0))));
this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(new Mana(1,1,1,0,0,0,0, 0))));
}

View file

@ -61,7 +61,7 @@ public class WirewoodChanneler extends CardImpl {
this.toughness = new MageInt(2);
// {T}: Add X mana of any one color to your mana pool, where X is the number of Elves on the battlefield.
DynamicManaAbility ability = new DynamicManaAbility(new Mana(0,0,0,0,0,0,1), new PermanentsOnBattlefieldCount(filter), new TapSourceCost(),
DynamicManaAbility ability = new DynamicManaAbility(new Mana(0,0,0,0,0,0,1, 0), new PermanentsOnBattlefieldCount(filter), new TapSourceCost(),
"Add X mana of any one color to your mana pool, where X is the number of Elves on the battlefield", true);
this.addAbility(ability);
}

View file

@ -54,7 +54,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,3,0),new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 0, 0, 0, 0, 3), new TapSourceCost()));
// {3}: Untap Basalt Monolith.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new GenericManaCost(3)));
}

View file

@ -122,7 +122,7 @@ class SoulbrightFlamekinEffect extends OneShotEffect {
}
info.activations++;
if (info.activations == 3) {
controller.getManaPool().addMana(new Mana(8,0,0,0,0,0,0), game, source);
controller.getManaPool().addMana(new Mana(8,0,0,0,0,0,0, 0), game, source);
}
return true;
}

View file

@ -50,7 +50,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)));
this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(0, 0, 0, 0, 3, 0, 0, 0)));
}
public LiturgyOfBlood(final LiturgyOfBlood card) {

View file

@ -113,7 +113,7 @@ class WasteNotCreatureTriggeredAbility extends TriggeredAbilityImpl {
class WasteNotLandTriggeredAbility extends TriggeredAbilityImpl {
WasteNotLandTriggeredAbility() {
super(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 0, 0, 2, 0, 0)), false);
super(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 0, 0, 2, 0, 0, 0)), false);
}
WasteNotLandTriggeredAbility(final WasteNotLandTriggeredAbility ability) {

View file

@ -56,7 +56,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)), new ManaCostsImpl("{B}"));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 0, 0, 3, 0, 0, 0)), new ManaCostsImpl("{B}"));
ability.addCost(new TapSourceCost());
ability.addCost(new DiscardCardCost());
this.addAbility(ability);

View file

@ -60,7 +60,7 @@ public class KyrenToy extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance(1)), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
// {T}, Remove X charge counters from Kyren Toy: Add X mana of {C} to your mana pool, and then add {C} to your mana pool.
ability = new KyrenToyManaAbility();
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance(1)));
@ -75,8 +75,9 @@ public class KyrenToy extends CardImpl {
public KyrenToy copy() {
return new KyrenToy(this);
}
private class KyrenToyManaAbility extends BasicManaAbility {
KyrenToyManaAbility() {
super(new KyrenToyManaEffect());
}
@ -89,7 +90,7 @@ public class KyrenToy extends CardImpl {
public KyrenToyManaAbility copy() {
return new KyrenToyManaAbility(this);
}
}
}
private class KyrenToyManaEffect extends ManaEffect {
@ -110,10 +111,10 @@ public class KyrenToy extends CardImpl {
int numberOfMana = 0;
for (Cost cost : source.getCosts()) {
if (cost instanceof RemoveVariableCountersSourceCost) {
numberOfMana = ((RemoveVariableCountersSourceCost)cost).getAmount();
numberOfMana = ((RemoveVariableCountersSourceCost) cost).getAmount();
}
}
Mana mana = new Mana(0, 0, 0, 0, 0, numberOfMana + 1, 0);
Mana mana = new Mana(0, 0, 0, 0, 0, 0, 0, numberOfMana + 1);
checkToFirePossibleEvents(mana, game, source);
player.getManaPool().addMana(mana, game, source);
return true;
@ -130,5 +131,5 @@ public class KyrenToy extends CardImpl {
public KyrenToyManaEffect copy() {
return new KyrenToyManaEffect(this);
}
}
}
}

View file

@ -72,7 +72,7 @@ class LionsEyeDiamondAbility extends ManaAbility {
public LionsEyeDiamondAbility() {
super(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(3), new SacrificeSourceCost());
this.addCost(new DiscardHandCost());
this.netMana.add(new Mana(0,0,0,0,0,0,3));
this.netMana.add(new Mana(0,0,0,0,0,0,3, 0));
}
public LionsEyeDiamondAbility(Zone zone, Mana mana, Cost cost) {

View file

@ -54,7 +54,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), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 2, 0, 0, 0, 0, 0), new TapSourceCost()));
}

View file

@ -28,13 +28,13 @@
package mage.sets.mirrodin;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.MageInt;
import mage.Mana;
import mage.abilities.common.DiesTriggeredAbility;
import mage.abilities.effects.common.BasicManaEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
/**
*
@ -48,7 +48,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, 3, 0)), false));
this.addAbility(new DiesTriggeredAbility(new BasicManaEffect(new Mana(0, 0, 0, 0, 0, 0, 0, 3)), false));
}
public Cathodion(final Cathodion card) {

View file

@ -56,7 +56,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)));
this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(0, 3, 0, 0, 0, 0, 0, 0)));
}
public Deconstruct(final Deconstruct card) {

View file

@ -44,7 +44,7 @@ public class SeethingSong extends CardImpl {
super(ownerId, 104, "Seething Song", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{R}");
this.expansionSetCode = "MRD";
this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(5, 0, 0, 0, 0, 0, 0)));
this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(5, 0, 0, 0, 0, 0, 0, 0)));
}
public SeethingSong(final SeethingSong card) {

View file

@ -56,7 +56,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)));
this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(0, 1, 0, 0, 0, 0, 0, 0)));
}
public TurnToDust(final TurnToDust card) {

View file

@ -48,7 +48,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)));
this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(3, 0, 0, 0, 0, 0, 0, 0)));
// Splice onto Arcane {1}{R}
this.addAbility(new SpliceOntoArcaneAbility("{1}{R}"));
}

View file

@ -54,7 +54,7 @@ public class GrinningIgnus extends CardImpl {
this.toughness = new MageInt(2);
// {R}, Return Grinning Ignus to its owner's hand: Add {C}{C}{R} to your mana pool. Activate this ability only any time you could cast a sorcery.
Ability ability = new ActivateAsSorceryManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 0, 2, 0), new ManaCostsImpl("{R}"));
Ability ability = new ActivateAsSorceryManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 0, 0, 0, 2), new ManaCostsImpl("{R}"));
ability.addCost(new ReturnToHandFromBattlefieldSourceCost());
this.addAbility(ability);
}

View file

@ -64,7 +64,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), new TapTargetCost(new TargetControlledCreaturePermanent(3, 3, filter, true))));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 3, 0, 0, 0, 0, 0, 0), new TapTargetCost(new TargetControlledCreaturePermanent(3, 3, filter, true))));
}
public HeritageDruid(final HeritageDruid card) {

View file

@ -52,7 +52,7 @@ public class CrystalQuarry extends CardImpl {
// {tap}: Add {C} to your mana pool.
this.addAbility(new ColorlessManaAbility());
// {5}, {tap}: Add {W}{U}{B}{R}{G} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 1, 1, 1, 0, 0), new ManaCostsImpl("{5}"));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 1, 1, 1, 0, 0, 0), new ManaCostsImpl("{5}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -49,7 +49,7 @@ public class DarkwaterCatacombs extends CardImpl {
this.expansionSetCode = "ODY";
// {1}, {tap}: Add {U}{B} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 1, 0, 0), new ManaCostsImpl("{1}"));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 1, 0, 0, 0), new ManaCostsImpl("{1}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -51,7 +51,7 @@ public class DarkwaterEgg extends CardImpl {
this.expansionSetCode = "ODY";
// {2}, {tap}, Sacrifice Darkwater Egg: Add {U}{B} to your mana pool. Draw a card.
ManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 1, 0, 0), new ManaCostsImpl("{2}"));
ManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 1, 0, 0, 0), new ManaCostsImpl("{2}"));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
ability.addEffect(new DrawCardSourceControllerEffect(1));

View file

@ -51,7 +51,7 @@ public class MossfireEgg extends CardImpl {
this.expansionSetCode = "ODY";
// {2}, {tap}, Sacrifice Mossfire Egg: Add {R}{G} to your mana pool. Draw a card.
ManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 0, 0, 0, 0, 0), new ManaCostsImpl("{2}"));
ManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 0, 0, 0, 0, 0, 0), new ManaCostsImpl("{2}"));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
ability.addEffect(new DrawCardSourceControllerEffect(1));

View file

@ -49,7 +49,7 @@ public class MossfireValley extends CardImpl {
this.expansionSetCode = "ODY";
// {1}, {tap}: Add {R}{G} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 0, 0, 0, 0, 0), new ManaCostsImpl("{1}"));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 0, 0, 0, 0, 0, 0), new ManaCostsImpl("{1}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -53,7 +53,7 @@ public class NantukoElder extends CardImpl {
this.toughness = new MageInt(2);
// {tap}: Add {C}{G} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 0, 0, 1,0 ), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 0, 0, 0, 0, 1), new TapSourceCost()));
}

View file

@ -56,7 +56,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)), new DiscardCardCost());
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 0, 0, 3, 0, 0, 0)), new DiscardCardCost());
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
}

View file

@ -51,7 +51,7 @@ public class ShadowbloodEgg extends CardImpl {
this.expansionSetCode = "ODY";
// {2}, {tap}, Sacrifice Shadowblood Egg: Add {B}{R} to your mana pool. Draw a card.
ManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 1, 0, 0), new ManaCostsImpl("{2}"));
ManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 1, 0, 0, 0), new ManaCostsImpl("{2}"));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
ability.addEffect(new DrawCardSourceControllerEffect(1));

View file

@ -49,7 +49,7 @@ public class ShadowbloodRidge extends CardImpl {
this.expansionSetCode = "ODY";
// {1}, {tap}: Add {B}{R} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 1, 0, 0), new ManaCostsImpl("{1}"));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 1, 0, 0, 0), new ManaCostsImpl("{1}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -51,7 +51,7 @@ public class SkycloudEgg extends CardImpl {
this.expansionSetCode = "ODY";
// {2}, {tap}, Sacrifice Skycloud Egg: Add {W}{U} to your mana pool. Draw a card.
ManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 1, 0, 0, 0), new ManaCostsImpl("{2}"));
ManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 1, 0, 0, 0, 0), new ManaCostsImpl("{2}"));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
ability.addEffect(new DrawCardSourceControllerEffect(1));

View file

@ -49,7 +49,7 @@ public class SkycloudExpanse extends CardImpl {
this.expansionSetCode = "ODY";
// {1}, {tap}: Add {W}{U} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 1, 0, 0, 0), new ManaCostsImpl("{1}"));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 1, 0, 0, 0, 0), new ManaCostsImpl("{1}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -51,7 +51,7 @@ public class SungrassEgg extends CardImpl {
this.expansionSetCode = "ODY";
// {2}, {tap}, Sacrifice Sungrass Egg: Add {G}{W} to your mana pool. Draw a card.
ManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 1, 0, 0, 0), new ManaCostsImpl("{2}"));
ManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 1, 0, 0, 0, 0), new ManaCostsImpl("{2}"));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
ability.addEffect(new DrawCardSourceControllerEffect(1));

View file

@ -49,7 +49,7 @@ public class SungrassPrairie extends CardImpl {
this.expansionSetCode = "ODY";
// {1}, {tap}: Add {G}{W} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 1, 0, 0, 0), new ManaCostsImpl("{1}"));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 1, 0, 0, 0, 0), new ManaCostsImpl("{1}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -55,7 +55,7 @@ public class ManaEchoes extends CardImpl {
this.expansionSetCode = "ONS";
// Whenever a creature enters the battlefield, you may add X mana of {C} to your mana pool, where X is the number of creatures you control that share a creature type with it.
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD,
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD,
new ManaEchoesEffect(), new FilterCreaturePermanent("a creature"), true, SetTargetPointer.PERMANENT, ""));
}
@ -70,34 +70,34 @@ public class ManaEchoes extends CardImpl {
}
class ManaEchoesEffect extends OneShotEffect {
public ManaEchoesEffect() {
super(Outcome.Benefit);
this.staticText = "you may add X mana of {C} to your mana pool, where X is the number of creatures you control that share a creature type with it";
}
public ManaEchoesEffect(final ManaEchoesEffect effect) {
super(effect);
}
@Override
public ManaEchoesEffect copy() {
return new ManaEchoesEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Permanent permanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source));
Permanent permanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source));
if (controller != null && permanent != null) {
int foundCreatures = 0;
for (Permanent perm: game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), game)) {
for (Permanent perm : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), game)) {
if (CardUtil.shareSubtypes(permanent, perm)) {
foundCreatures ++;
foundCreatures++;
}
}
if (foundCreatures > 0) {
controller.getManaPool().addMana(new Mana(0,0,0,0,0,foundCreatures,0), game, source);
controller.getManaPool().addMana(new Mana(0, 0, 0, 0, 0, 0, 0, foundCreatures), game, source);
}
return true;
}

View file

@ -54,7 +54,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)), true);
Ability ability = new AttacksTriggeredAbility(new BasicManaEffect(new Mana(2,0,0,0,0,0,0, 0)), true);
this.addAbility(ability);
// {tap}: Add {G} to your mana pool.

View file

@ -61,7 +61,7 @@ public class BorosGarrison extends CardImpl {
this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(filter), false));
// {T}: Add {R}{W} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 1, 0, 0, 0), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 1, 0, 0, 0, 0), new TapSourceCost()));
}
public BorosGarrison(final BorosGarrison card) {

View file

@ -44,7 +44,7 @@ public class DarkRitual extends CardImpl {
super(ownerId, 24, "Dark Ritual", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{B}");
this.expansionSetCode = "HOP";
this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(0, 0, 0, 0, 3, 0, 0)));
this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(0, 0, 0, 0, 3, 0, 0, 0)));
}
public DarkRitual(final DarkRitual card) {

View file

@ -56,7 +56,7 @@ public class GruulTurf extends CardImpl {
this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(filter), false));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 0, 0, 0, 0, 0), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 0, 0, 0, 0, 0, 0), new TapSourceCost()));
}
public GruulTurf(final GruulTurf card) {

View file

@ -114,7 +114,7 @@ class VedalkenEngineerAbility extends ManaAbility {
public VedalkenEngineerAbility(Cost cost, int amount, ConditionalManaBuilder manaBuilder) {
super(Zone.BATTLEFIELD, new VedalkenEngineerEffect(amount, manaBuilder), cost);
this.netMana.add(new Mana(0,0,0,0,0,0, amount));
this.netMana.add(new Mana(0,0,0,0,0,0, amount, 0));
}
public VedalkenEngineerAbility(final VedalkenEngineerAbility ability) {

View file

@ -53,7 +53,7 @@ public class MorgueToad extends CardImpl {
this.toughness = new MageInt(2);
// Sacrifice Morgue Toad: Add {U}{R} to your mana pool.
SimpleManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 1, 0, 0, 0, 0), new SacrificeSourceCost());
SimpleManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 1, 0, 0, 0, 0, 0), new SacrificeSourceCost());
this.addAbility(ability);
}

View file

@ -130,12 +130,12 @@ class AdjustingCostsEffect extends CostModificationEffectImpl {
Mana mana = spellAbility.getManaCostsToPay().getMana();
Player player = game.getPlayer(source.getControllerId());
if (mana.getColorless() > 0 && player != null && player.getLife() < 4) {
int newCount = mana.getColorless() - 6;
if (mana.getGeneric() > 0 && player != null && player.getLife() < 4) {
int newCount = mana.getGeneric() - 6;
if (newCount < 0) {
newCount = 0;
}
mana.setColorless(newCount);
mana.setGeneric(newCount);
spellAbility.getManaCostsToPay().load(mana.toString());
return true;
}

View file

@ -91,12 +91,12 @@ class AvatarOfMightCostReductionEffect extends CostModificationEffectImpl {
public boolean apply(Game game, Ability source, Ability abilityToModify) {
SpellAbility spellAbility = (SpellAbility) abilityToModify;
Mana mana = spellAbility.getManaCostsToPay().getMana();
if (mana.getColorless() > 0) {
int newCount = mana.getColorless() - 6;
if (mana.getGeneric() > 0) {
int newCount = mana.getGeneric() - 6;
if (newCount < 0) {
newCount = 0;
}
mana.setColorless(newCount);
mana.setGeneric(newCount);
spellAbility.getManaCostsToPay().load(mana.toString());
return true;
}

Some files were not shown because too many files have changed in this diff Show more