moved ManaSpentToCastWatcher to default watcher list

This commit is contained in:
Evan Kranzler 2021-06-21 09:48:55 -04:00
parent 00df106113
commit 943c67fbca
51 changed files with 27 additions and 98 deletions

View file

@ -9,7 +9,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -32,7 +31,7 @@ public final class ArdenvalePaladin extends CardImpl {
AdamantCondition.WHITE, "<br><i>Adamant</i> &mdash; " + AdamantCondition.WHITE, "<br><i>Adamant</i> &mdash; " +
"If at least three white mana was spent to cast this spell, " + "If at least three white mana was spent to cast this spell, " +
"{this} enters the battlefield with a +1/+1 counter on it.", "" "{this} enters the battlefield with a +1/+1 counter on it.", ""
), new ManaSpentToCastWatcher()); ));
} }
private ArdenvalePaladin(final ArdenvalePaladin card) { private ArdenvalePaladin(final ArdenvalePaladin card) {

View file

@ -13,7 +13,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.constants.SubType; import mage.constants.SubType;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -33,7 +32,7 @@ public final class AzoriusHerald extends CardImpl {
// When Azorius Herald enters the battlefield, you gain 4 life. // When Azorius Herald enters the battlefield, you gain 4 life.
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(4))); this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(4)));
// When Azorius Herald enters the battlefield, sacrifice it unless {U} was spent to cast it. // When Azorius Herald enters the battlefield, sacrifice it unless {U} was spent to cast it.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.U)), false), new ManaSpentToCastWatcher()); this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.U)), false));
} }
private AzoriusHerald(final AzoriusHerald card) { private AzoriusHerald(final AzoriusHerald card) {

View file

@ -20,7 +20,6 @@ import mage.constants.Outcome;
import mage.filter.common.FilterAttackingCreature; import mage.filter.common.FilterAttackingCreature;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -42,7 +41,6 @@ public final class BatwingBrume extends CardImpl {
new BatwingBrumeEffect(), new BatwingBrumeEffect(),
new ManaWasSpentCondition(ColoredManaSymbol.B), "Each player loses 1 life for each attacking creature they control if {B} was spent to cast this spell")); new ManaWasSpentCondition(ColoredManaSymbol.B), "Each player loses 1 life for each attacking creature they control if {B} was spent to cast this spell"));
this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {W}{B} was spent.)</i>")); this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {W}{B} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }

View file

@ -47,7 +47,7 @@ public final class BergStrider extends CardImpl {
Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect()); Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect());
ability.addEffect(new BergStriderEffect()); ability.addEffect(new BergStriderEffect());
ability.addTarget(new TargetPermanent(filter)); ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability, new ManaSpentToCastWatcher()); this.addAbility(ability);
} }
private BergStrider(final BergStrider card) { private BergStrider(final BergStrider card) {

View file

@ -19,7 +19,6 @@ import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -36,7 +35,6 @@ public final class CankerousThirst extends CardImpl {
this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (1th effect -3/-3)"))); this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (1th effect -3/-3)")));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (2nd effect +3/+3)"))); this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (2nd effect +3/+3)")));
this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {B}{G} was spent.)</i>")); this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {B}{G} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }
private CankerousThirst(final CankerousThirst card) { private CankerousThirst(final CankerousThirst card) {

View file

@ -9,7 +9,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -30,7 +29,7 @@ public final class ClockworkServant extends CardImpl {
new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)), new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)),
AdamantCondition.ANY, "<br><i>Adamant</i> &mdash; When {this} enters the battlefield, " + AdamantCondition.ANY, "<br><i>Adamant</i> &mdash; When {this} enters the battlefield, " +
"if at least three mana of the same color was spent to cast it, draw a card." "if at least three mana of the same color was spent to cast it, draw a card."
), new ManaSpentToCastWatcher()); ));
} }
private ClockworkServant(final ClockworkServant card) { private ClockworkServant(final ClockworkServant card) {

View file

@ -16,7 +16,6 @@ import mage.constants.SubType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -39,7 +38,7 @@ public final class CourtHussar extends CardImpl {
new LookLibraryAndPickControllerEffect(StaticValue.get(3), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false), new LookLibraryAndPickControllerEffect(StaticValue.get(3), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false),
false)); false));
// When Court Hussar enters the battlefield, sacrifice it unless {W} was spent to cast it. // When Court Hussar enters the battlefield, sacrifice it unless {W} was spent to cast it.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.W)), false), new ManaSpentToCastWatcher()); this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.W)), false));
} }
private CourtHussar(final CourtHussar card) { private CourtHussar(final CourtHussar card) {

View file

@ -27,7 +27,6 @@ import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import mage.target.Target; import mage.target.Target;
import mage.target.common.TargetCardInGraveyard; import mage.target.common.TargetCardInGraveyard;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -49,7 +48,7 @@ public final class CryptChampion extends CardImpl {
this.addAbility(new EntersBattlefieldTriggeredAbility(new CryptChampionEffect())); this.addAbility(new EntersBattlefieldTriggeredAbility(new CryptChampionEffect()));
// When Crypt Champion enters the battlefield, sacrifice it unless {R} was spent to cast it. // When Crypt Champion enters the battlefield, sacrifice it unless {R} was spent to cast it.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.R)), false), new ManaSpentToCastWatcher()); this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.R)), false));
} }
private CryptChampion(final CryptChampion card) { private CryptChampion(final CryptChampion card) {

View file

@ -12,7 +12,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -33,7 +32,6 @@ public final class DawnglowInfusion extends CardImpl {
new GainLifeEffect(xValue), new GainLifeEffect(xValue),
new ManaWasSpentCondition(ColoredManaSymbol.W), " And X life if {W} was spent to cast it")); new ManaWasSpentCondition(ColoredManaSymbol.W), " And X life if {W} was spent to cast it"));
this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {G}{W} was spent.)</i>")); this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {G}{W} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }

View file

@ -10,7 +10,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -35,7 +34,7 @@ public final class EmberethPaladin extends CardImpl {
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, AdamantCondition.RED, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, AdamantCondition.RED,
"<br><i>Adamant</i> &mdash; If at least three red mana was spent to cast this spell, " + "<br><i>Adamant</i> &mdash; If at least three red mana was spent to cast this spell, " +
"{this} enters the battlefield with a +1/+1 counter on it.", "" "{this} enters the battlefield with a +1/+1 counter on it.", ""
), new ManaSpentToCastWatcher()); ));
} }
private EmberethPaladin(final EmberethPaladin card) { private EmberethPaladin(final EmberethPaladin card) {

View file

@ -12,7 +12,6 @@ import mage.constants.ColoredManaSymbol;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.AbilityPredicate; import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -40,7 +39,6 @@ public final class Firespout extends CardImpl {
this.getSpellAbility().addEffect(new ConditionalOneShotEffect( this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new DamageAllEffect(3, filter2), new DamageAllEffect(3, filter2),
new ManaWasSpentCondition(ColoredManaSymbol.G), "and 3 damage to each creature with flying if {G} was spent to cast it. <i>(Do both if {R}{G} was spent.)</i>")); new ManaWasSpentCondition(ColoredManaSymbol.G), "and 3 damage to each creature with flying if {G} was spent to cast it. <i>(Do both if {R}{G} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }
private Firespout(final Firespout card) { private Firespout(final Firespout card) {

View file

@ -10,7 +10,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.game.permanent.token.FoodToken; import mage.game.permanent.token.FoodToken;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -32,7 +31,6 @@ public final class ForebodingFruit extends CardImpl {
new CreateTokenEffect(new FoodToken()), AdamantCondition.BLACK, "<br><i>Adamant</i> &mdash; " + new CreateTokenEffect(new FoodToken()), AdamantCondition.BLACK, "<br><i>Adamant</i> &mdash; " +
"If at least three black mana was spent to cast this spell, create a Food token." "If at least three black mana was spent to cast this spell, create a Food token."
)); ));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }
private ForebodingFruit(final ForebodingFruit card) { private ForebodingFruit(final ForebodingFruit card) {

View file

@ -17,7 +17,6 @@ import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.game.permanent.token.QuandrixToken; import mage.game.permanent.token.QuandrixToken;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -32,7 +31,7 @@ public final class FractalHarness extends CardImpl {
this.subtype.add(SubType.EQUIPMENT); this.subtype.add(SubType.EQUIPMENT);
// When Fractal Harness enters the battlefield, create a 0/0 green and blue Fractal creature token. Put X +1/+1 counters on it and attach Fractal Harness to it. // When Fractal Harness enters the battlefield, create a 0/0 green and blue Fractal creature token. Put X +1/+1 counters on it and attach Fractal Harness to it.
this.addAbility(new EntersBattlefieldTriggeredAbility(new FractalHarnessTokenEffect()), new ManaSpentToCastWatcher()); this.addAbility(new EntersBattlefieldTriggeredAbility(new FractalHarnessTokenEffect()));
// Whenever equipped creature attacks, double the number of +1/+1 counters on it. // Whenever equipped creature attacks, double the number of +1/+1 counters on it.
this.addAbility(new AttacksAttachedTriggeredAbility( this.addAbility(new AttacksAttachedTriggeredAbility(

View file

@ -19,7 +19,6 @@ import mage.filter.FilterSpell;
import mage.filter.common.FilterNonlandPermanent; import mage.filter.common.FilterNonlandPermanent;
import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.ColorPredicate;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -50,7 +49,7 @@ public final class GadwickTheWizened extends CardImpl {
// When Gadwick, the Wizened enters the battlefield, draw X cards. // When Gadwick, the Wizened enters the battlefield, draw X cards.
this.addAbility(new EntersBattlefieldTriggeredAbility( this.addAbility(new EntersBattlefieldTriggeredAbility(
new DrawCardSourceControllerEffect(ManacostVariableValue.instance) new DrawCardSourceControllerEffect(ManacostVariableValue.instance)
), new ManaSpentToCastWatcher()); ));
// Whenever you cast a blue spell, tap target nonland permanent an opponent controls. // Whenever you cast a blue spell, tap target nonland permanent an opponent controls.
Ability ability = new SpellCastControllerTriggeredAbility(new TapTargetEffect(), filter, false); Ability ability = new SpellCastControllerTriggeredAbility(new TapTargetEffect(), filter, false);

View file

@ -10,7 +10,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -32,7 +31,7 @@ public final class GarenbrigPaladin extends CardImpl {
CounterType.P1P1.createInstance()), AdamantCondition.GREEN, CounterType.P1P1.createInstance()), AdamantCondition.GREEN,
"<br><i>Adamant</i> &mdash; If at least three green mana was spent to cast this spell, " + "<br><i>Adamant</i> &mdash; If at least three green mana was spent to cast this spell, " +
"{this} enters the battlefield with a +1/+1 counter on it.", "" "{this} enters the battlefield with a +1/+1 counter on it.", ""
), new ManaSpentToCastWatcher()); ));
// Garenbrig Paladin can't be blocked by creatures with power 2 or less. // Garenbrig Paladin can't be blocked by creatures with power 2 or less.
this.addAbility(new DauntAbility()); this.addAbility(new DauntAbility());

View file

@ -14,7 +14,6 @@ import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.constants.Duration; import mage.constants.Duration;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -31,7 +30,7 @@ public final class GruulScrapper extends CardImpl {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
//When Gruul Scrapper enters the battlefield, if Red was spent to cast Gruul Scrapper, it gains haste until end of turn. //When Gruul Scrapper enters the battlefield, if Red was spent to cast Gruul Scrapper, it gains haste until end of turn.
this.addAbility(new EntersBattlefieldTriggeredAbility(new ConditionalContinuousEffect(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new ManaWasSpentCondition(ColoredManaSymbol.R), " if {R} was spent to cast this spell, it gains haste until end of turn")), new ManaSpentToCastWatcher()); this.addAbility(new EntersBattlefieldTriggeredAbility(new ConditionalContinuousEffect(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new ManaWasSpentCondition(ColoredManaSymbol.R), " if {R} was spent to cast this spell, it gains haste until end of turn")));
} }

View file

@ -9,7 +9,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -31,7 +30,7 @@ public final class HengeWalker extends CardImpl {
AdamantCondition.ANY, "<br><i>Adamant</i> &mdash; " + AdamantCondition.ANY, "<br><i>Adamant</i> &mdash; " +
"If at least three mana of the same color was spent to cast this spell, " + "If at least three mana of the same color was spent to cast this spell, " +
"{this} enters the battlefield with a +1/+1 counter on it.", "" "{this} enters the battlefield with a +1/+1 counter on it.", ""
), new ManaSpentToCastWatcher()); ));
} }
private HengeWalker(final HengeWalker card) { private HengeWalker(final HengeWalker card) {

View file

@ -17,7 +17,6 @@ import mage.constants.Duration;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.AbilityPredicate; import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -49,7 +48,6 @@ public final class InvertTheSkies extends CardImpl {
"and creatures you control gain flying until end of turn if {U} was spent to cast it")); "and creatures you control gain flying until end of turn if {U} was spent to cast it"));
this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {G}{U} was spent.)</i>")); this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {G}{U} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }

View file

@ -10,7 +10,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -36,7 +35,7 @@ public final class LocthwainPaladin extends CardImpl {
AdamantCondition.BLACK, "<br><i>Adamant</i> &mdash; " + AdamantCondition.BLACK, "<br><i>Adamant</i> &mdash; " +
"If at least three black mana was spent to cast this spell, " + "If at least three black mana was spent to cast this spell, " +
"{this} enters the battlefield with a +1/+1 counter on it.", "" "{this} enters the battlefield with a +1/+1 counter on it.", ""
), new ManaSpentToCastWatcher()); ));
} }
private LocthwainPaladin(final LocthwainPaladin card) { private LocthwainPaladin(final LocthwainPaladin card) {

View file

@ -20,7 +20,6 @@ import mage.constants.Outcome;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -44,7 +43,6 @@ public final class Moonhold extends CardImpl {
new LockedInCondition(new ManaWasSpentCondition(ColoredManaSymbol.W)))); new LockedInCondition(new ManaWasSpentCondition(ColoredManaSymbol.W))));
this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addTarget(new TargetPlayer());
this.getSpellAbility().addEffect(new InfoEffect(" <i>(Do both if {R}{W} was spent.)</i>")); this.getSpellAbility().addEffect(new InfoEffect(" <i>(Do both if {R}{W} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }
private Moonhold(final Moonhold card) { private Moonhold(final Moonhold card) {

View file

@ -17,7 +17,6 @@ import mage.players.Player;
import mage.target.TargetCard; import mage.target.TargetCard;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -32,7 +31,6 @@ public final class MythosOfBrokkos extends CardImpl {
// If {U}{B} was spent to cast Mythos of Brokkos, search your library for a card, put that card into your graveyard, then shuffle your library. // If {U}{B} was spent to cast Mythos of Brokkos, search your library for a card, put that card into your graveyard, then shuffle your library.
// Return up to two permanent cards from your graveyard to your hand. // Return up to two permanent cards from your graveyard to your hand.
this.getSpellAbility().addEffect(new MythosOfBrokkosEffect()); this.getSpellAbility().addEffect(new MythosOfBrokkosEffect());
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }
private MythosOfBrokkos(final MythosOfBrokkos card) { private MythosOfBrokkos(final MythosOfBrokkos card) {

View file

@ -18,7 +18,6 @@ import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -33,7 +32,6 @@ public final class MythosOfIlluna extends CardImpl {
// Create a token that's a copy of target permanent. If {R}{G} was spent to cast this spell, instead create a token that's a copy of that permanent, except the token has "When this permanent enters the battlefield, if it's a creature, it fights up to one target creature you don't control." // Create a token that's a copy of target permanent. If {R}{G} was spent to cast this spell, instead create a token that's a copy of that permanent, except the token has "When this permanent enters the battlefield, if it's a creature, it fights up to one target creature you don't control."
this.getSpellAbility().addEffect(new MythosOfIllunaEffect()); this.getSpellAbility().addEffect(new MythosOfIllunaEffect());
this.getSpellAbility().addTarget(new TargetPermanent()); this.getSpellAbility().addTarget(new TargetPermanent());
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }
private MythosOfIlluna(final MythosOfIlluna card) { private MythosOfIlluna(final MythosOfIlluna card) {

View file

@ -13,7 +13,6 @@ import mage.constants.Outcome;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.common.TargetNonlandPermanent; import mage.target.common.TargetNonlandPermanent;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -28,7 +27,6 @@ public final class MythosOfNethroi extends CardImpl {
// Destroy target nonland permanent if it's a creature or if {G}{W} was spent to cast this spell. // Destroy target nonland permanent if it's a creature or if {G}{W} was spent to cast this spell.
this.getSpellAbility().addEffect(new MythosOfNethroiEffect()); this.getSpellAbility().addEffect(new MythosOfNethroiEffect());
this.getSpellAbility().addTarget(new TargetNonlandPermanent()); this.getSpellAbility().addTarget(new TargetNonlandPermanent());
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }
private MythosOfNethroi(final MythosOfNethroi card) { private MythosOfNethroi(final MythosOfNethroi card) {

View file

@ -18,7 +18,6 @@ import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -33,7 +32,6 @@ public class MythosOfSnapdax extends CardImpl {
// Each player chooses an artifact, a creature, an enchantment, and a planeswalker from among the nonland permanents they control, then sacrifices the rest. If {B}{R} was spent to cast this spell, you choose the permanents for each player instead. // Each player chooses an artifact, a creature, an enchantment, and a planeswalker from among the nonland permanents they control, then sacrifices the rest. If {B}{R} was spent to cast this spell, you choose the permanents for each player instead.
this.getSpellAbility().addEffect(new MythosOfSnapdaxEffect()); this.getSpellAbility().addEffect(new MythosOfSnapdaxEffect());
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }
private MythosOfSnapdax(final MythosOfSnapdax card) { private MythosOfSnapdax(final MythosOfSnapdax card) {

View file

@ -17,7 +17,6 @@ import mage.constants.Outcome;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.common.TargetCreatureOrPlaneswalkerAmount; import mage.target.common.TargetCreatureOrPlaneswalkerAmount;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -44,7 +43,6 @@ public final class MythosOfVadrok extends CardImpl {
"until your next turn, those permanents can't attack or block " + "until your next turn, those permanents can't attack or block " +
"and their activated abilities can't be activated." "and their activated abilities can't be activated."
)); ));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }
private MythosOfVadrok(final MythosOfVadrok card) { private MythosOfVadrok(final MythosOfVadrok card) {

View file

@ -30,7 +30,6 @@ import mage.game.permanent.token.ShardToken;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
import mage.watchers.common.CardsDrawnThisTurnWatcher; import mage.watchers.common.CardsDrawnThisTurnWatcher;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.Objects; import java.util.Objects;
import java.util.UUID; import java.util.UUID;
@ -58,7 +57,7 @@ public final class NikoAris extends CardImpl {
// When Niko Aris enters the battlefield, create X Shard tokens. // When Niko Aris enters the battlefield, create X Shard tokens.
this.addAbility(new EntersBattlefieldTriggeredAbility( this.addAbility(new EntersBattlefieldTriggeredAbility(
new CreateTokenEffect(new ShardToken(), ManacostVariableValue.instance) new CreateTokenEffect(new ShardToken(), ManacostVariableValue.instance)
), new ManaSpentToCastWatcher()); ));
// +1: Up to one target creature you control can't be blocked this turn. Whenever that creature deals damage this turn, return it to its owner's hand. // +1: Up to one target creature you control can't be blocked this turn. Whenever that creature deals damage this turn, return it to its owner's hand.
Ability ability = new LoyaltyAbility(new CantBeBlockedTargetEffect(Duration.EndOfTurn), 1); Ability ability = new LoyaltyAbility(new CantBeBlockedTargetEffect(Duration.EndOfTurn), 1);

View file

@ -14,7 +14,6 @@ import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -33,8 +32,7 @@ public final class OgreSavant extends CardImpl {
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(),false); TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(),false);
ability.addTarget(new TargetCreaturePermanent()); ability.addTarget(new TargetCreaturePermanent());
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.U), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.U),
"if {U} was spent to cast this spell, return target creature to its owner's hand."), "if {U} was spent to cast this spell, return target creature to its owner's hand."));
new ManaSpentToCastWatcher());
} }
private OgreSavant(final OgreSavant card) { private OgreSavant(final OgreSavant card) {

View file

@ -12,7 +12,6 @@ import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import mage.target.Target; import mage.target.Target;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -36,7 +35,6 @@ public final class OnceAndFuture extends CardImpl {
target.setTargetTag(2); target.setTargetTag(2);
this.getSpellAbility().addTarget(target); this.getSpellAbility().addTarget(target);
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }
private OnceAndFuture(final OnceAndFuture card) { private OnceAndFuture(final OnceAndFuture card) {

View file

@ -18,7 +18,6 @@ import mage.game.permanent.Permanent;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -35,7 +34,6 @@ public final class Outmuscle extends CardImpl {
this.getSpellAbility().addEffect(new OutmuscleEffect()); this.getSpellAbility().addEffect(new OutmuscleEffect());
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL)); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }
private Outmuscle(final Outmuscle card) { private Outmuscle(final Outmuscle card) {

View file

@ -14,7 +14,6 @@ import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.game.permanent.token.PatagiaViperSnakeToken; import mage.game.permanent.token.PatagiaViperSnakeToken;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -36,7 +35,7 @@ public final class PatagiaViper extends CardImpl {
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new PatagiaViperSnakeToken(), 2), false)); this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new PatagiaViperSnakeToken(), 2), false));
// When Patagia Viper enters the battlefield, sacrifice it unless {U} was spent to cast it. // When Patagia Viper enters the battlefield, sacrifice it unless {U} was spent to cast it.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.U)), false), new ManaSpentToCastWatcher()); this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.U)), false));
} }
private PatagiaViper(final PatagiaViper card) { private PatagiaViper(final PatagiaViper card) {

View file

@ -16,7 +16,6 @@ import mage.constants.SubType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.constants.Duration; import mage.constants.Duration;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -38,7 +37,7 @@ public final class Plaxmanta extends CardImpl {
new GainAbilityControlledEffect(ShroudAbility.getInstance(), Duration.EndOfTurn, FILTER_PERMANENT_CREATURES))); new GainAbilityControlledEffect(ShroudAbility.getInstance(), Duration.EndOfTurn, FILTER_PERMANENT_CREATURES)));
// When Plaxmanta enters the battlefield, sacrifice it unless {G} was spent to cast it. // When Plaxmanta enters the battlefield, sacrifice it unless {G} was spent to cast it.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.G)), false), new ManaSpentToCastWatcher()); this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.G)), false));
} }
private Plaxmanta(final Plaxmanta card) { private Plaxmanta(final Plaxmanta card) {

View file

@ -34,7 +34,7 @@ public final class RadiantEpicure extends CardImpl {
// Converge When Radiant Epicure enters the battlefield, each opponent loses X life and you gain X life, where X is the number of colors of mana spent to cast this spell. // Converge When Radiant Epicure enters the battlefield, each opponent loses X life and you gain X life, where X is the number of colors of mana spent to cast this spell.
this.addAbility(new EntersBattlefieldTriggeredAbility( this.addAbility(new EntersBattlefieldTriggeredAbility(
new RadiantEpicureEffect(), false, "<i>Converge</i> &mdash; " new RadiantEpicureEffect(), false, "<i>Converge</i> &mdash; "
), new ManaSpentToCastWatcher()); ));
} }
private RadiantEpicure(final RadiantEpicure card) { private RadiantEpicure(final RadiantEpicure card) {

View file

@ -11,7 +11,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.game.permanent.token.HumanToken; import mage.game.permanent.token.HumanToken;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -35,7 +34,6 @@ public final class RallyForTheThrone extends CardImpl {
"If at least three white mana was spent to cast this spell, " + "If at least three white mana was spent to cast this spell, " +
"you gain 1 life for each creature you control." "you gain 1 life for each creature you control."
)); ));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }
private RallyForTheThrone(final RallyForTheThrone card) { private RallyForTheThrone(final RallyForTheThrone card) {

View file

@ -12,7 +12,6 @@ import mage.constants.ColoredManaSymbol;
import mage.filter.common.FilterCreatureSpell; import mage.filter.common.FilterCreatureSpell;
import mage.game.permanent.token.KithkinSoldierToken; import mage.game.permanent.token.KithkinSoldierToken;
import mage.target.TargetSpell; import mage.target.TargetSpell;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -36,7 +35,6 @@ public final class RepelIntruders extends CardImpl {
new ManaWasSpentCondition(ColoredManaSymbol.U), " Counter up to one target creature spell if {U} was spent to cast this spell")); new ManaWasSpentCondition(ColoredManaSymbol.U), " Counter up to one target creature spell if {U} was spent to cast this spell"));
this.getSpellAbility().addTarget(target); this.getSpellAbility().addTarget(target);
this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {W}{U} was spent.)</i>")); this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {W}{U} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }

View file

@ -15,7 +15,6 @@ import mage.constants.SubType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.constants.Duration; import mage.constants.Duration;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -33,7 +32,7 @@ public final class RevenantPatriarch extends CardImpl {
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new SkipCombatStepEffect(Duration.OneUse).setText("target player skips their next combat phase."), false); TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new SkipCombatStepEffect(Duration.OneUse).setText("target player skips their next combat phase."), false);
ability.addTarget(new TargetPlayer()); ability.addTarget(new TargetPlayer());
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.W), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.W),
"if {W} was spent to cast it, target player skips their next combat phase."), new ManaSpentToCastWatcher()); "if {W} was spent to cast it, target player skips their next combat phase."));
// Revenant Patriarch can't block. // Revenant Patriarch can't block.
this.addAbility(new CantBlockAbility()); this.addAbility(new CantBlockAbility());
} }

View file

@ -21,7 +21,6 @@ import mage.target.Target;
import mage.target.TargetCard; import mage.target.TargetCard;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -47,7 +46,6 @@ public final class RiversGrasp extends CardImpl {
this.getSpellAbility().addTarget(targetPlayer); this.getSpellAbility().addTarget(targetPlayer);
this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {U}{B} was spent.)</i>")); this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {U}{B} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }
private RiversGrasp(final RiversGrasp card) { private RiversGrasp(final RiversGrasp card) {

View file

@ -8,7 +8,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -30,7 +29,6 @@ public final class SearingBarrage extends CardImpl {
"<br><i>Adamant</i> &mdash; If at least three red mana was spent to cast this spell, " + "<br><i>Adamant</i> &mdash; If at least three red mana was spent to cast this spell, " +
"{this} deals 3 damage to that creature's controller." "{this} deals 3 damage to that creature's controller."
)); ));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }
private SearingBarrage(final SearingBarrage card) { private SearingBarrage(final SearingBarrage card) {

View file

@ -15,7 +15,6 @@ import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -36,7 +35,7 @@ public final class ShriekingGrotesque extends CardImpl {
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1), false); TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1), false);
ability.addTarget(new TargetPlayer()); ability.addTarget(new TargetPlayer());
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.B), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.B),
"if {B} was spent to cast this spell, target player discards a card."), new ManaSpentToCastWatcher()); "if {B} was spent to cast this spell, target player discards a card."));
} }
private ShriekingGrotesque(final ShriekingGrotesque card) { private ShriekingGrotesque(final ShriekingGrotesque card) {

View file

@ -15,7 +15,6 @@ import mage.constants.Outcome;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -38,7 +37,6 @@ public final class SilverflameRitual extends CardImpl {
"<br><i>Adamant</i> &mdash; If at least three white mana was spent to cast this spell, " + "<br><i>Adamant</i> &mdash; If at least three white mana was spent to cast this spell, " +
"creatures you control gain vigilance until end of turn." "creatures you control gain vigilance until end of turn."
)); ));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }
private SilverflameRitual(final SilverflameRitual card) { private SilverflameRitual(final SilverflameRitual card) {

View file

@ -7,7 +7,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.target.common.TargetAnyTarget; import mage.target.common.TargetAnyTarget;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -28,7 +27,6 @@ public final class SlayingFire extends CardImpl {
"it deals 4 damage instead." "it deals 4 damage instead."
)); ));
this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addTarget(new TargetAnyTarget());
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }
private SlayingFire(final SlayingFire card) { private SlayingFire(final SlayingFire card) {

View file

@ -26,7 +26,6 @@ import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -50,7 +49,7 @@ public final class SquealingDevil extends CardImpl {
this.addAbility(ability); this.addAbility(ability);
// When Squealing Devil enters the battlefield, sacrifice it unless {B} was spent to cast it. // When Squealing Devil enters the battlefield, sacrifice it unless {B} was spent to cast it.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.B)), false), new ManaSpentToCastWatcher()); this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.B)), false));
} }

View file

@ -14,7 +14,6 @@ import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.target.common.TargetAnyTarget; import mage.target.common.TargetAnyTarget;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -32,8 +31,7 @@ public final class SteamcoreWeird extends CardImpl {
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it")); TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it"));
ability.addTarget(new TargetAnyTarget()); ability.addTarget(new TargetAnyTarget());
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.R), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.R),
"if {R} was spent to cast this spell, it deals 2 damage to any target."), "if {R} was spent to cast this spell, it deals 2 damage to any target."));
new ManaSpentToCastWatcher());
} }
private SteamcoreWeird(final SteamcoreWeird card) { private SteamcoreWeird(final SteamcoreWeird card) {

View file

@ -21,7 +21,6 @@ import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.TargetAmount; import mage.target.TargetAmount;
import mage.target.common.TargetCreatureOrPlaneswalkerAmount; import mage.target.common.TargetCreatureOrPlaneswalkerAmount;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -38,7 +37,7 @@ public final class StumpsquallHydra extends CardImpl {
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// When Stumpsquall Hydra enters the battlefield, distribute X +1/+1 counters among it and any number of commanders. // When Stumpsquall Hydra enters the battlefield, distribute X +1/+1 counters among it and any number of commanders.
this.addAbility(new EntersBattlefieldTriggeredAbility(new StumpsquallHydraEffect()), new ManaSpentToCastWatcher()); this.addAbility(new EntersBattlefieldTriggeredAbility(new StumpsquallHydraEffect()));
} }
private StumpsquallHydra(final StumpsquallHydra card) { private StumpsquallHydra(final StumpsquallHydra card) {

View file

@ -14,7 +14,6 @@ import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.target.common.TargetArtifactPermanent; import mage.target.common.TargetArtifactPermanent;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -36,7 +35,7 @@ public final class TinStreetHooligan extends CardImpl {
new ManaWasSpentCondition(ColoredManaSymbol.G), new ManaWasSpentCondition(ColoredManaSymbol.G),
"When {this} enters the battlefield, if {G} was spent to cast Tin Street Hooligan, destroy target artifact."); "When {this} enters the battlefield, if {G} was spent to cast Tin Street Hooligan, destroy target artifact.");
ability.addTarget(new TargetArtifactPermanent()); ability.addTarget(new TargetArtifactPermanent());
this.addAbility(ability, new ManaSpentToCastWatcher()); this.addAbility(ability);
} }
private TinStreetHooligan(final TinStreetHooligan card) { private TinStreetHooligan(final TinStreetHooligan card) {

View file

@ -26,7 +26,6 @@ import mage.players.Player;
import mage.target.Target; import mage.target.Target;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -51,7 +50,6 @@ public final class TorrentOfSouls extends CardImpl {
this.getSpellAbility().addTarget(targetPlayer); this.getSpellAbility().addTarget(targetPlayer);
this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {B}{R} was spent.)</i>")); this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {B}{R} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }

View file

@ -10,7 +10,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.game.permanent.token.FoodToken; import mage.game.permanent.token.FoodToken;
import mage.target.common.TargetNonlandPermanent; import mage.target.common.TargetNonlandPermanent;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -33,7 +32,6 @@ public final class TurnIntoAPumpkin extends CardImpl {
"<br><i>Adamant</i> &mdash; If at least three blue mana " + "<br><i>Adamant</i> &mdash; If at least three blue mana " +
"was spent to cast this spell, create a Food token." "was spent to cast this spell, create a Food token."
)); ));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }
private TurnIntoAPumpkin(final TurnIntoAPumpkin card) { private TurnIntoAPumpkin(final TurnIntoAPumpkin card) {

View file

@ -7,7 +7,6 @@ import mage.abilities.effects.keyword.ScryEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -27,7 +26,6 @@ public final class UnexplainedVision extends CardImpl {
new ScryEffect(3), AdamantCondition.BLUE, "<br><i>Adamant</i> &mdash; " + new ScryEffect(3), AdamantCondition.BLUE, "<br><i>Adamant</i> &mdash; " +
"If at least three blue mana was spent to cast this spell, scry 3." "If at least three blue mana was spent to cast this spell, scry 3."
)); ));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }
private UnexplainedVision(final UnexplainedVision card) { private UnexplainedVision(final UnexplainedVision card) {

View file

@ -13,7 +13,6 @@ import mage.constants.ColoredManaSymbol;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.watchers.common.ManaSpentToCastWatcher;
/** /**
* *
@ -41,7 +40,6 @@ public final class UnnervingAssault extends CardImpl {
new BoostAllEffect(1, 0, Duration.EndOfTurn, filter2, false), new BoostAllEffect(1, 0, Duration.EndOfTurn, filter2, false),
new ManaWasSpentCondition(ColoredManaSymbol.R), " and creatures you control get +1/+0 until end of turn if {R} was spent to cast it")); new ManaWasSpentCondition(ColoredManaSymbol.R), " and creatures you control get +1/+0 until end of turn if {R} was spent to cast it"));
this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {U}{R} was spent.)</i>")); this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {U}{R} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
} }

View file

@ -10,7 +10,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID; import java.util.UUID;
@ -36,7 +35,7 @@ public final class VantressPaladin extends CardImpl {
AdamantCondition.BLUE, "<br><i>Adamant</i> &mdash; " + AdamantCondition.BLUE, "<br><i>Adamant</i> &mdash; " +
"If at least three blue mana was spent to cast this spell, " + "If at least three blue mana was spent to cast this spell, " +
"{this} enters the battlefield with a +1/+1 counter on it.", "" "{this} enters the battlefield with a +1/+1 counter on it.", ""
), new ManaSpentToCastWatcher()); ));
} }
private VantressPaladin(final VantressPaladin card) { private VantressPaladin(final VantressPaladin card) {

View file

@ -1142,6 +1142,7 @@ public abstract class GameImpl implements Game, Serializable {
getState().addWatcher(new AttackedThisTurnWatcher()); getState().addWatcher(new AttackedThisTurnWatcher());
getState().addWatcher(new PlayersAttackedThisTurnWatcher()); getState().addWatcher(new PlayersAttackedThisTurnWatcher());
getState().addWatcher(new CardsDrawnThisTurnWatcher()); getState().addWatcher(new CardsDrawnThisTurnWatcher());
getState().addWatcher(new ManaSpentToCastWatcher());
} }
public void initPlayerDefaultWatchers(UUID playerId) { public void initPlayerDefaultWatchers(UUID playerId) {

View file

@ -11,6 +11,7 @@ import mage.watchers.Watcher;
/** /**
* Watcher saves the mana that was spent to cast a spell * Watcher saves the mana that was spent to cast a spell
* automatically added in each game
* *
* @author LevelX2 * @author LevelX2
*/ */