Refactor: Fix raw use of parameterized class 'ManaCostsImpl' - g cards (#9056)

This commit is contained in:
DeepCrimson 2022-06-06 05:39:27 -07:00 committed by GitHub
parent 5ba17d94fb
commit fd11013d0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
190 changed files with 201 additions and 201 deletions

View file

@ -35,7 +35,7 @@ public final class GalvanicAlchemist extends CardImpl {
this.addAbility(new SoulbondAbility()); this.addAbility(new SoulbondAbility());
// As long as Galvanic Alchemist is paired with another creature, each of those creatures has "{2}{U}: Untap this creature." // As long as Galvanic Alchemist is paired with another creature, each of those creatures has "{2}{U}: Untap this creature."
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new ManaCostsImpl("{2}{U}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new ManaCostsImpl<>("{2}{U}"));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityPairedEffect(ability, ruleText))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityPairedEffect(ability, ruleText)));
} }

View file

@ -30,7 +30,7 @@ public final class GargoyleCastle extends CardImpl {
Ability ability = new SimpleActivatedAbility( Ability ability = new SimpleActivatedAbility(
Zone.BATTLEFIELD, Zone.BATTLEFIELD,
new CreateTokenEffect(new GargoyleToken()), new CreateTokenEffect(new GargoyleToken()),
new ManaCostsImpl("{5}")); new ManaCostsImpl<>("{5}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());
this.addAbility(ability); this.addAbility(ability);

View file

@ -30,7 +30,7 @@ public final class GatesOfIstfell extends CardImpl {
this.addAbility(new WhiteManaAbility()); this.addAbility(new WhiteManaAbility());
// {2}{W}{U}{U}, {T}, Sacrifice Gates of Istfell: You gain 2 life and draw two cards. // {2}{W}{U}{U}, {T}, Sacrifice Gates of Istfell: You gain 2 life and draw two cards.
Ability ability = new SimpleActivatedAbility(new GainLifeEffect(2), new ManaCostsImpl("{2}{W}{U}{U}")); Ability ability = new SimpleActivatedAbility(new GainLifeEffect(2), new ManaCostsImpl<>("{2}{W}{U}{U}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());
ability.addEffect(new DrawCardSourceControllerEffect(2).concatBy("and")); ability.addEffect(new DrawCardSourceControllerEffect(2).concatBy("and"));

View file

@ -37,7 +37,7 @@ public final class GatewayShade extends CardImpl {
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// {B}: Gateway Shade gets +1/+1 until end of turn. // {B}: Gateway Shade gets +1/+1 until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1,1, Duration.EndOfTurn),new ManaCostsImpl("{B}"))); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1,1, Duration.EndOfTurn),new ManaCostsImpl<>("{B}")));
// Tap an untapped Gate you control: Gateway Shade gets +2/+2 until end of turn. // Tap an untapped Gate you control: Gateway Shade gets +2/+2 until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2,2, Duration.EndOfTurn),new TapTargetCost(new TargetControlledPermanent(1,1,filter, true)))); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2,2, Duration.EndOfTurn),new TapTargetCost(new TargetControlledPermanent(1,1,filter, true))));

View file

@ -34,7 +34,7 @@ public final class GauntletsOfChaos extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExchangeControlTargetEffect(Duration.EndOfGame, Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExchangeControlTargetEffect(Duration.EndOfGame,
"exchange control of target artifact, creature, or land you control and target permanent an opponent controls that shares one of those types with it." "exchange control of target artifact, creature, or land you control and target permanent an opponent controls that shares one of those types with it."
+ " If those permanents are exchanged this way, destroy all Auras attached to them", false, true, true), + " If those permanents are exchanged this way, destroy all Auras attached to them", false, true, true),
new ManaCostsImpl("{5}") new ManaCostsImpl<>("{5}")
); );
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());
ability.addTarget(new GauntletsOfChaosFirstTarget()); ability.addTarget(new GauntletsOfChaosFirstTarget());

View file

@ -47,7 +47,7 @@ public final class GauntletsOfLight extends CardImpl {
// Enchanted creature has "{2}{W}: Untap this creature." // Enchanted creature has "{2}{W}: Untap this creature."
this.addAbility(new SimpleStaticAbility( this.addAbility(new SimpleStaticAbility(
new GainAbilityAttachedEffect(new SimpleActivatedAbility( new GainAbilityAttachedEffect(new SimpleActivatedAbility(
new UntapSourceEffect().setText("Untap this creature"), new ManaCostsImpl("{2}{W}") new UntapSourceEffect().setText("Untap this creature"), new ManaCostsImpl<>("{2}{W}")
), AttachmentType.AURA) ), AttachmentType.AURA)
)); ));
} }

View file

@ -23,7 +23,7 @@ public final class GavonyTownship extends CardImpl {
this.addAbility(new ColorlessManaAbility()); this.addAbility(new ColorlessManaAbility());
// {2}{G}{W}, {T}: Put a +1/+1 counter on each creature you control. // {2}{G}{W}, {T}: Put a +1/+1 counter on each creature you control.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersAllEffect(CounterType.P1P1.createInstance(), StaticFilters.FILTER_PERMANENT_CREATURE_CONTROLLED), new ManaCostsImpl("{2}{G}{W}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersAllEffect(CounterType.P1P1.createInstance(), StaticFilters.FILTER_PERMANENT_CREATURE_CONTROLLED), new ManaCostsImpl<>("{2}{G}{W}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -41,7 +41,7 @@ public final class GazeOfJustice extends CardImpl {
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// Flashback {5}{W} // Flashback {5}{W}
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{5}{W}"))); this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{5}{W}")));
} }
private GazeOfJustice(final GazeOfJustice card) { private GazeOfJustice(final GazeOfJustice card) {

View file

@ -25,7 +25,7 @@ public final class Geistflame extends CardImpl {
this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addTarget(new TargetAnyTarget());
// Flashback {3}{R} // Flashback {3}{R}
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{3}{R}"))); this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{3}{R}")));
} }
private Geistflame(final Geistflame card) { private Geistflame(final Geistflame card) {

View file

@ -40,7 +40,7 @@ public final class GelidShackles extends CardImpl {
// {snow}: Enchanted creature gains defender until end of turn. // {snow}: Enchanted creature gains defender until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(DefenderAbility.getInstance(), this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(DefenderAbility.getInstance(),
AttachmentType.AURA, Duration.EndOfTurn), new ManaCostsImpl("{S}"))); AttachmentType.AURA, Duration.EndOfTurn), new ManaCostsImpl<>("{S}")));
} }
private GelidShackles(final GelidShackles card) { private GelidShackles(final GelidShackles card) {

View file

@ -38,7 +38,7 @@ public final class GempalmAvenger extends CardImpl {
this.toughness = new MageInt(5); this.toughness = new MageInt(5);
// Cycling {2}{W} // Cycling {2}{W}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}{W}"))); this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}{W}")));
// When you cycle Gempalm Avenger, Soldier creatures get +1/+1 and gain first strike until end of turn. // When you cycle Gempalm Avenger, Soldier creatures get +1/+1 and gain first strike until end of turn.
Ability ability = new CycleTriggeredAbility( Ability ability = new CycleTriggeredAbility(

View file

@ -35,7 +35,7 @@ public final class GempalmIncinerator extends CardImpl {
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// Cycling {1}{R} // Cycling {1}{R}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{1}{R}"))); this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{1}{R}")));
// When you cycle Gempalm Incinerator, you may have it deal X damage to target creature, where X is the number of Goblins on the battlefield. // When you cycle Gempalm Incinerator, you may have it deal X damage to target creature, where X is the number of Goblins on the battlefield.
Ability ability = new CycleTriggeredAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter)),true); Ability ability = new CycleTriggeredAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter)),true);
ability.addTarget(new TargetCreaturePermanent()); ability.addTarget(new TargetCreaturePermanent());

View file

@ -36,7 +36,7 @@ public final class GempalmPolluter extends CardImpl {
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// Cycling {B}{B} // Cycling {B}{B}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{B}{B}"))); this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{B}{B}")));
// When you cycle Gempalm Polluter, you may have target player lose life equal to the number of Zombies on the battlefield. // When you cycle Gempalm Polluter, you may have target player lose life equal to the number of Zombies on the battlefield.
Effect effect = new LoseLifeTargetEffect(new PermanentsOnBattlefieldCount(filter)); Effect effect = new LoseLifeTargetEffect(new PermanentsOnBattlefieldCount(filter));

View file

@ -37,7 +37,7 @@ public final class GempalmSorcerer extends CardImpl {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// Cycling {2}{U} // Cycling {2}{U}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}{U}"))); this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}{U}")));
// When you cycle Gempalm Sorcerer, Wizard creatures gain flying until end of turn. // When you cycle Gempalm Sorcerer, Wizard creatures gain flying until end of turn.
Ability ability = new CycleTriggeredAbility(new GainAbilityAllEffect(FlyingAbility.getInstance(), Duration.EndOfTurn, filter)); Ability ability = new CycleTriggeredAbility(new GainAbilityAllEffect(FlyingAbility.getInstance(), Duration.EndOfTurn, filter));

View file

@ -34,7 +34,7 @@ public final class GempalmStrider extends CardImpl {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// Cycling {2}{G}{G} // Cycling {2}{G}{G}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}{G}{G}"))); this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}{G}{G}")));
// When you cycle Gempalm Strider, Elf creatures get +2/+2 until end of turn. // When you cycle Gempalm Strider, Elf creatures get +2/+2 until end of turn.
this.addAbility(new CycleTriggeredAbility(new BoostAllEffect(2,2,Duration.EndOfTurn, filter, false))); this.addAbility(new CycleTriggeredAbility(new BoostAllEffect(2,2,Duration.EndOfTurn, filter, false)));
} }

View file

@ -24,7 +24,7 @@ public final class GemstoneArray extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}");
// {2}: Put a charge counter on Gemstone Array. // {2}: Put a charge counter on Gemstone Array.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance(1)), new ManaCostsImpl("{2}"))); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance(1)), new ManaCostsImpl<>("{2}")));
// Remove a charge counter from Gemstone Array: Add one mana of any color. // Remove a charge counter from Gemstone Array: Add one mana of any color.
this.addAbility(new AnyColorManaAbility(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(1)), this.addAbility(new AnyColorManaAbility(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(1)),
new CountersSourceCount(CounterType.CHARGE), false)); new CountersSourceCount(CounterType.CHARGE), false));

View file

@ -41,7 +41,7 @@ public final class GeneralHux extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new BoostSourceEffect(1, 1, Duration.EndOfTurn) new BoostSourceEffect(1, 1, Duration.EndOfTurn)
.setText("This creature gets +1/+1 until end of turn"), .setText("This creature gets +1/+1 until end of turn"),
new ManaCostsImpl("{B}")); new ManaCostsImpl<>("{B}"));
Effect effect = new GainAbilitySourceEffect(ability, Duration.EndOfTurn); Effect effect = new GainAbilitySourceEffect(ability, Duration.EndOfTurn);
effect.setText("until end of turn, target creature gains"); effect.setText("until end of turn, target creature gains");
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, effect, filter, false)); this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, effect, filter, false));

View file

@ -51,7 +51,7 @@ public final class GeneralTazri extends CardImpl {
this.addAbility(new SimpleActivatedAbility( this.addAbility(new SimpleActivatedAbility(
Zone.BATTLEFIELD, Zone.BATTLEFIELD,
effect, effect,
new ManaCostsImpl("{W}{U}{B}{R}{G}"))); new ManaCostsImpl<>("{W}{U}{B}{R}{G}")));
} }

View file

@ -46,7 +46,7 @@ public final class GeneralsEnforcer extends CardImpl {
))); )));
// {2}{W}{B}: Exile target card from a graveyard. If it was a creature card, create a 1/1 white Human Soldier creature token. // {2}{W}{B}: Exile target card from a graveyard. If it was a creature card, create a 1/1 white Human Soldier creature token.
Ability ability = new SimpleActivatedAbility(new GeneralsEnforcerEffect(), new ManaCostsImpl("{2}{W}{B}")); Ability ability = new SimpleActivatedAbility(new GeneralsEnforcerEffect(), new ManaCostsImpl<>("{2}{W}{B}"));
ability.addTarget(new TargetCardInGraveyard()); ability.addTarget(new TargetCardInGraveyard());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -32,7 +32,7 @@ public final class Genesis extends CardImpl {
// At the beginning of your upkeep, if Genesis is in your graveyard, you may pay {2}{G}. If you do, return target creature card from your graveyard to your hand. // At the beginning of your upkeep, if Genesis is in your graveyard, you may pay {2}{G}. If you do, return target creature card from your graveyard to your hand.
Ability ability = new BeginningOfUpkeepTriggeredAbility( Ability ability = new BeginningOfUpkeepTriggeredAbility(
Zone.GRAVEYARD, new DoIfCostPaid(new ReturnFromGraveyardToHandTargetEffect(), new ManaCostsImpl("{2}{G}")), TargetController.YOU, false, false); Zone.GRAVEYARD, new DoIfCostPaid(new ReturnFromGraveyardToHandTargetEffect(), new ManaCostsImpl<>("{2}{G}")), TargetController.YOU, false, false);
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -67,7 +67,7 @@ public final class GenjuOfTheFens extends CardImpl {
subtype.add(SubType.SPIRIT); subtype.add(SubType.SPIRIT);
power = new MageInt(2); power = new MageInt(2);
toughness = new MageInt(2); toughness = new MageInt(2);
addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{B}"))); addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl<>("{B}")));
} }
public SpiritToken(final SpiritToken token) { public SpiritToken(final SpiritToken token) {

View file

@ -47,7 +47,7 @@ public final class GeralfsMasterpiece extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
// {3}{U}, Discard three cards: Return Geralf's Masterpiece from your graveyard to the battlefield tapped. // {3}{U}, Discard three cards: Return Geralf's Masterpiece from your graveyard to the battlefield tapped.
Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true), new ManaCostsImpl("{3}{U}")); Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true), new ManaCostsImpl<>("{3}{U}"));
ability.addCost(new DiscardTargetCost(new TargetCardInHand(3, new FilterCard("three cards")))); ability.addCost(new DiscardTargetCost(new TargetCardInHand(3, new FilterCard("three cards"))));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -40,7 +40,7 @@ public final class GerrardCapashen extends CardImpl {
// {3}{W}: Tap target creature. Activate this ability only if {this} is attacking. // {3}{W}: Tap target creature. Activate this ability only if {this} is attacking.
Ability ability2 = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), Ability ability2 = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(),
new ManaCostsImpl("{3}{W}"), SourceAttackingCondition.instance); new ManaCostsImpl<>("{3}{W}"), SourceAttackingCondition.instance);
ability2.addTarget(new TargetCreaturePermanent()); ability2.addTarget(new TargetCreaturePermanent());
this.addAbility(ability2); this.addAbility(ability2);
} }

View file

@ -21,7 +21,7 @@ public final class GerrardsBattleCry extends CardImpl {
public GerrardsBattleCry(UUID ownerId, CardSetInfo setInfo) { public GerrardsBattleCry(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}");
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false), new ManaCostsImpl("{2}{W}"))); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false), new ManaCostsImpl<>("{2}{W}")));
} }
private GerrardsBattleCry(final GerrardsBattleCry card) { private GerrardsBattleCry(final GerrardsBattleCry card) {

View file

@ -46,7 +46,7 @@ public final class GethLordOfTheVault extends CardImpl {
this.addAbility(IntimidateAbility.getInstance()); this.addAbility(IntimidateAbility.getInstance());
// {X}{B}: Put target artifact or creature card with converted mana cost X from an opponent's graveyard onto the battlefield under your control tapped. // {X}{B}: Put target artifact or creature card with converted mana cost X from an opponent's graveyard onto the battlefield under your control tapped.
// Then that player puts the top X cards of their library into their graveyard. // Then that player puts the top X cards of their library into their graveyard.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GethLordOfTheVaultEffect(), new ManaCostsImpl("{X}{B}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GethLordOfTheVaultEffect(), new ManaCostsImpl<>("{X}{B}"));
ability.setTargetAdjuster(XCMCGraveyardAdjuster.instance); ability.setTargetAdjuster(XCMCGraveyardAdjuster.instance);
ability.addTarget(new TargetCardInGraveyard(filter)); ability.addTarget(new TargetCardInGraveyard(filter));
this.addAbility(ability); this.addAbility(ability);

View file

@ -82,7 +82,7 @@ class GhastlyConscriptionEffect extends OneShotEffect {
if (card.isCreature(game)) { if (card.isCreature(game)) {
manaCosts = card.getSpellAbility().getManaCosts(); manaCosts = card.getSpellAbility().getManaCosts();
if (manaCosts == null) { if (manaCosts == null) {
manaCosts = new ManaCostsImpl("{0}"); manaCosts = new ManaCostsImpl<>("{0}");
} }
} }
MageObjectReference objectReference = new MageObjectReference(card.getId(), card.getZoneChangeCounter(game) + 1, game); MageObjectReference objectReference = new MageObjectReference(card.getId(), card.getZoneChangeCounter(game) + 1, game);

View file

@ -52,7 +52,7 @@ public final class GhastlyRemains extends CardImpl {
class GhastlyRemainsTriggeredAbility extends BeginningOfUpkeepTriggeredAbility { class GhastlyRemainsTriggeredAbility extends BeginningOfUpkeepTriggeredAbility {
public GhastlyRemainsTriggeredAbility() { public GhastlyRemainsTriggeredAbility() {
super(Zone.GRAVEYARD, new DoIfCostPaid(new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl("{B}{B}{B}")), TargetController.YOU, false); super(Zone.GRAVEYARD, new DoIfCostPaid(new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl<>("{B}{B}{B}")), TargetController.YOU, false);
} }
public GhastlyRemainsTriggeredAbility(GhastlyRemainsTriggeredAbility ability) { public GhastlyRemainsTriggeredAbility(GhastlyRemainsTriggeredAbility ability) {

View file

@ -42,7 +42,7 @@ public final class GhenArcanumWeaver extends CardImpl {
// {R}{W}{B}, {T}, Sacrifice an enchantment: Return target enchantment card from your graveyard to the battlefield. // {R}{W}{B}, {T}, Sacrifice an enchantment: Return target enchantment card from your graveyard to the battlefield.
Ability ability = new SimpleActivatedAbility( Ability ability = new SimpleActivatedAbility(
new ReturnFromGraveyardToBattlefieldTargetEffect(), new ManaCostsImpl("{R}{W}{B}") new ReturnFromGraveyardToBattlefieldTargetEffect(), new ManaCostsImpl<>("{R}{W}{B}")
); );
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));

View file

@ -30,7 +30,7 @@ public final class GhituEncampment extends CardImpl {
this.addAbility(new RedManaAbility()); this.addAbility(new RedManaAbility());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
new BecomesCreatureSourceEffect(new GhituEncampmentToken(), "land", Duration.EndOfTurn), new BecomesCreatureSourceEffect(new GhituEncampmentToken(), "land", Duration.EndOfTurn),
new ManaCostsImpl("{1}{R}"))); new ManaCostsImpl<>("{1}{R}")));
} }
private GhituEncampment(final GhituEncampment card) { private GhituEncampment(final GhituEncampment card) {

View file

@ -25,7 +25,7 @@ public final class GhituFire extends CardImpl {
Effect effect = new DamageTargetEffect(ManacostVariableValue.REGULAR); Effect effect = new DamageTargetEffect(ManacostVariableValue.REGULAR);
// You may cast Ghitu Fire as though it had flash if you pay {2} more to cast it. // You may cast Ghitu Fire as though it had flash if you pay {2} more to cast it.
Ability ability = new PayMoreToCastAsThoughtItHadFlashAbility(this, new ManaCostsImpl("{2}")); Ability ability = new PayMoreToCastAsThoughtItHadFlashAbility(this, new ManaCostsImpl<>("{2}"));
ability.addEffect(effect); ability.addEffect(effect);
ability.addTarget(new TargetAnyTarget()); ability.addTarget(new TargetAnyTarget());
ability.setRuleAtTheTop(true); ability.setRuleAtTheTop(true);

View file

@ -41,7 +41,7 @@ public final class GhituFirebreathing extends CardImpl {
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 0, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.R))); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 0, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.R)));
// {R}: Return Ghitu Firebreathing to its owner's hand. // {R}: Return Ghitu Firebreathing to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{R}"))); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl<>("{R}")));
} }
private GhituFirebreathing(final GhituFirebreathing card) { private GhituFirebreathing(final GhituFirebreathing card) {

View file

@ -24,7 +24,7 @@ public final class GhituWarCry extends CardImpl {
// {R}: Target creature gets +1/+0 until end of turn. // {R}: Target creature gets +1/+0 until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl<>("{R}"));
ability.addTarget(new TargetCreaturePermanent()); ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -28,7 +28,7 @@ public final class GhorClanBloodscale extends CardImpl {
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
this.addAbility(FirstStrikeAbility.getInstance()); this.addAbility(FirstStrikeAbility.getInstance());
this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl("{3}{G}"))); this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl<>("{3}{G}")));
} }
private GhorClanBloodscale(final GhorClanBloodscale card) { private GhorClanBloodscale(final GhorClanBloodscale card) {

View file

@ -31,7 +31,7 @@ public final class GhostLitNourisher extends CardImpl {
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// {2}{G}, {tap}: Target creature gets +2/+2 until end of turn. // {2}{G}, {tap}: Target creature gets +2/+2 until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl("{2}{G}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl<>("{2}{G}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent()); ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability); this.addAbility(ability);

View file

@ -30,7 +30,7 @@ public final class GhostLitRaider extends CardImpl {
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// {2}{R}, {tap}: Ghost-Lit Raider deals 2 damage to target creature. // {2}{R}, {tap}: Ghost-Lit Raider deals 2 damage to target creature.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}{R}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl<>("{2}{R}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent()); ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability); this.addAbility(ability);

View file

@ -29,7 +29,7 @@ public final class GhostLitRedeemer extends CardImpl {
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// {W}, {tap}: You gain 2 life. // {W}, {tap}: You gain 2 life.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), new ManaCostsImpl("{W}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), new ManaCostsImpl<>("{W}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
this.addAbility(ability); this.addAbility(ability);
// Channel - {1}{W}, Discard Ghost-Lit Redeemer: You gain 4 life. // Channel - {1}{W}, Discard Ghost-Lit Redeemer: You gain 4 life.

View file

@ -31,7 +31,7 @@ public final class GhostLitStalker extends CardImpl {
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// {4}{B}, {tap}: Target player discards two cards. Activate this ability only any time you could cast a sorcery. // {4}{B}, {tap}: Target player discards two cards. Activate this ability only any time you could cast a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(2),new ManaCostsImpl("{4}{B}")); Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(2),new ManaCostsImpl<>("{4}{B}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addTarget(new TargetPlayer()); ability.addTarget(new TargetPlayer());
this.addAbility(ability); this.addAbility(ability);

View file

@ -30,12 +30,12 @@ public final class GhostLitWarder extends CardImpl {
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// {3}{U}, {tap}: Counter target spell unless its controller pays {2}. // {3}{U}, {tap}: Counter target spell unless its controller pays {2}.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new ManaCostsImpl("{2}")), new ManaCostsImpl("{3}{U}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new ManaCostsImpl<>("{2}")), new ManaCostsImpl<>("{3}{U}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addTarget(new TargetSpell()); ability.addTarget(new TargetSpell());
this.addAbility(ability); this.addAbility(ability);
// Channel - {3}{U}, Discard Ghost-Lit Warder: Counter target spell unless its controller pays {4}. // Channel - {3}{U}, Discard Ghost-Lit Warder: Counter target spell unless its controller pays {4}.
Ability ability2 = new ChannelAbility("{3}{U}", new CounterUnlessPaysEffect(new ManaCostsImpl("{4}"))); Ability ability2 = new ChannelAbility("{3}{U}", new CounterUnlessPaysEffect(new ManaCostsImpl<>("{4}")));
ability2.addTarget(new TargetSpell()); ability2.addTarget(new TargetSpell());
this.addAbility(ability2); this.addAbility(ability2);

View file

@ -30,7 +30,7 @@ public final class GhostShip extends CardImpl {
// Flying // Flying
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// {U}{U}{U}: Regenerate Ghost Ship. // {U}{U}{U}: Regenerate Ghost Ship.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{U}{U}{U}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl<>("{U}{U}{U}"));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -31,7 +31,7 @@ public final class GhostTactician extends CardImpl {
// {W}, {T}, Discard a card: Creatures you control get +1/+0 until end of turn. // {W}, {T}, Discard a card: Creatures you control get +1/+0 until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new BoostControlledEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{W}")); new BoostControlledEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl<>("{W}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addCost(new DiscardCardCost()); ability.addCost(new DiscardCardCost());
this.addAbility(ability); this.addAbility(ability);

View file

@ -46,7 +46,7 @@ public final class GhosthelmCourier extends CardImpl {
// {2}{U}, {tap}: Target Wizard creature gets +2/+2 and has shroud for as long as Ghosthelm Courier remains tapped. // {2}{U}, {tap}: Target Wizard creature gets +2/+2 and has shroud for as long as Ghosthelm Courier remains tapped.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostTargetEffect(2, 2, Duration.Custom), SourceTappedCondition.TAPPED, new BoostTargetEffect(2, 2, Duration.Custom), SourceTappedCondition.TAPPED,
"target Wizard creature gets +2/+2"), new ManaCostsImpl("{2}{U}")); "target Wizard creature gets +2/+2"), new ManaCostsImpl<>("{2}{U}"));
ability.addEffect(new ConditionalContinuousEffect(new GainAbilityTargetEffect(ShroudAbility.getInstance(), ability.addEffect(new ConditionalContinuousEffect(new GainAbilityTargetEffect(ShroudAbility.getInstance(),
Duration.Custom), SourceTappedCondition.TAPPED,"and has shroud for as long as {this} remains tapped")); Duration.Custom), SourceTappedCondition.TAPPED,"and has shroud for as long as {this} remains tapped"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());

View file

@ -27,7 +27,7 @@ public final class GhostlyChangeling extends CardImpl {
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
this.addAbility(new ChangelingAbility()); this.addAbility(new ChangelingAbility());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{1}{B}"))); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl<>("{1}{B}")));
} }
private GhostlyChangeling(final GhostlyChangeling card) { private GhostlyChangeling(final GhostlyChangeling card) {

View file

@ -20,7 +20,7 @@ public final class GhostlyPrison extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}");
// Creatures can't attack you unless their controller pays {2} for each creature they control that's attacking you // Creatures can't attack you unless their controller pays {2} for each creature they control that's attacking you
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouUnlessPayManaAllEffect(new ManaCostsImpl("{2}")))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouUnlessPayManaAllEffect(new ManaCostsImpl<>("{2}"))));
} }

View file

@ -44,7 +44,7 @@ public final class GhoulcallerGisa extends CardImpl {
zombie.setTokenType(2); zombie.setTokenType(2);
Effect effect = new CreateTokenEffect(zombie, xValue); Effect effect = new CreateTokenEffect(zombie, xValue);
effect.setText("create X 2/2 black Zombie creature tokens, where X is the sacrificed creature's power"); effect.setText("create X 2/2 black Zombie creature tokens, where X is the sacrificed creature's power");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{B}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{B}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE))); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
this.addAbility(ability); this.addAbility(ability);

View file

@ -30,7 +30,7 @@ public final class GhoulcallersAccomplice extends CardImpl {
// {3}{B}, Exile Ghoulcaller's Accomplice from your graveyard: Create a 2/2 black Zombie creature token. // {3}{B}, Exile Ghoulcaller's Accomplice from your graveyard: Create a 2/2 black Zombie creature token.
// Activate this ability only any time you could cast a sorcery. // Activate this ability only any time you could cast a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.GRAVEYARD, new CreateTokenEffect(new ZombieToken()), new ManaCostsImpl("{3}{B}")); Ability ability = new ActivateAsSorceryActivatedAbility(Zone.GRAVEYARD, new CreateTokenEffect(new ZombieToken()), new ManaCostsImpl<>("{3}{B}"));
ability.addCost(new ExileSourceFromGraveCost()); ability.addCost(new ExileSourceFromGraveCost());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -30,7 +30,7 @@ public final class Ghoulsteed extends CardImpl {
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
// {2}{B}, Discard two cards: Return Ghouldsteed from your graveyard to the battlefield tapped. // {2}{B}, Discard two cards: Return Ghouldsteed from your graveyard to the battlefield tapped.
Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true), new ManaCostsImpl("{2}{B}")); Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true), new ManaCostsImpl<>("{2}{B}"));
ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards")))); ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards"))));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -39,7 +39,7 @@ public final class GiantAlbatross extends CardImpl {
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// When Giant Albatross dies, you may pay {1}{U}. If you do, for each creature that dealt damage to Giant Albatross this turn, destroy that creature unless its controller pays 2 life. A creature destroyed this way can't be regenerated. // When Giant Albatross dies, you may pay {1}{U}. If you do, for each creature that dealt damage to Giant Albatross this turn, destroy that creature unless its controller pays 2 life. A creature destroyed this way can't be regenerated.
Ability ability = new DiesSourceTriggeredAbility(new DoIfCostPaid(new GiantAlbatrossEffect(), new ManaCostsImpl("{1}{U}"))); Ability ability = new DiesSourceTriggeredAbility(new DoIfCostPaid(new GiantAlbatrossEffect(), new ManaCostsImpl<>("{1}{U}")));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -32,7 +32,7 @@ public final class GiantCaterpillar extends CardImpl {
// {G}, Sacrifice Giant Caterpillar: Create a 1/1 green Insect creature token with flying named Butterfly at the beginning of the next end step. // {G}, Sacrifice Giant Caterpillar: Create a 1/1 green Insect creature token with flying named Butterfly at the beginning of the next end step.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateDelayedTriggeredAbilityEffect( Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateDelayedTriggeredAbilityEffect(
new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new CreateTokenEffect(new ButterflyToken()))), new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new CreateTokenEffect(new ButterflyToken()))),
new ManaCostsImpl("{G}")); new ManaCostsImpl<>("{G}"));
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,7 +27,7 @@ public final class GiantDustwasp extends CardImpl {
// Flying // Flying
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// Suspend 4-{1}{G} // Suspend 4-{1}{G}
this.addAbility(new SuspendAbility(4, new ManaCostsImpl("{1}{G}"), this)); this.addAbility(new SuspendAbility(4, new ManaCostsImpl<>("{1}{G}"), this));
} }
private GiantDustwasp(final GiantDustwasp card) { private GiantDustwasp(final GiantDustwasp card) {

View file

@ -40,7 +40,7 @@ public final class GiantKiller extends AdventureCard {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// {1}{W}, {T}: Tap target creature. // {1}{W}, {T}: Tap target creature.
Ability ability = new SimpleActivatedAbility(new TapTargetEffect(), new ManaCostsImpl("{1}{W}")); Ability ability = new SimpleActivatedAbility(new TapTargetEffect(), new ManaCostsImpl<>("{1}{W}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent()); ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability); this.addAbility(ability);

View file

@ -37,7 +37,7 @@ public final class GiantSlug extends CardImpl {
// {5}: At the beginning of your next upkeep, choose a basic land type. Giant Slug gains landwalk of the chosen type until the end of that turn. // {5}: At the beginning of your next upkeep, choose a basic land type. Giant Slug gains landwalk of the chosen type until the end of that turn.
this.addAbility(new SimpleActivatedAbility(new CreateDelayedTriggeredAbilityEffect( this.addAbility(new SimpleActivatedAbility(new CreateDelayedTriggeredAbilityEffect(
new AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(new GiantSlugEffect()) new AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(new GiantSlugEffect())
), new ManaCostsImpl("{5}"))); ), new ManaCostsImpl<>("{5}")));
} }
private GiantSlug(final GiantSlug card) { private GiantSlug(final GiantSlug card) {

View file

@ -40,7 +40,7 @@ public final class GiantTrapDoorSpider extends CardImpl {
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// {1}{R}{G}, {tap}: Exile Giant Trap Door Spider and target creature without flying that's attacking you. // {1}{R}{G}, {tap}: Exile Giant Trap Door Spider and target creature without flying that's attacking you.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileSourceEffect(), new ManaCostsImpl("{1}{R}{G}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileSourceEffect(), new ManaCostsImpl<>("{1}{R}{G}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addEffect(new ExileTargetEffect().setText("and target creature without flying that's attacking you")); ability.addEffect(new ExileTargetEffect().setText("and target creature without flying that's attacking you"));
ability.addTarget(new TargetCreaturePermanent(filter)); ability.addTarget(new TargetCreaturePermanent(filter));

View file

@ -40,7 +40,7 @@ public final class GideonsCompany extends CardImpl {
// {3}{W}: Put a loyalty counter on target Gideon planeswalker. // {3}{W}: Put a loyalty counter on target Gideon planeswalker.
Ability ability = new SimpleActivatedAbility( Ability ability = new SimpleActivatedAbility(
new AddCountersTargetEffect(CounterType.LOYALTY.createInstance()), new ManaCostsImpl("{3}{W}") new AddCountersTargetEffect(CounterType.LOYALTY.createInstance()), new ManaCostsImpl<>("{3}{W}")
); );
ability.addTarget(new TargetPermanent(filter)); ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability); this.addAbility(ability);

View file

@ -37,7 +37,7 @@ public final class GiftedInitiate extends CardImpl {
this.addAbility(ability); this.addAbility(ability);
// Meditate {1}{W} // Meditate {1}{W}
this.addAbility(new MeditateAbility(new ManaCostsImpl("{1}{W}"))); this.addAbility(new MeditateAbility(new ManaCostsImpl<>("{1}{W}")));
} }
private GiftedInitiate(final GiftedInitiate card) { private GiftedInitiate(final GiftedInitiate card) {

View file

@ -59,7 +59,7 @@ class GigantoplasmCopyApplier extends CopyApplier {
DynamicValue variableMana = ManacostVariableValue.REGULAR; DynamicValue variableMana = ManacostVariableValue.REGULAR;
Effect effect = new SetPowerToughnessSourceEffect(variableMana, Duration.WhileOnBattlefield, SubLayer.SetPT_7b); Effect effect = new SetPowerToughnessSourceEffect(variableMana, Duration.WhileOnBattlefield, SubLayer.SetPT_7b);
effect.setText("This creature has base power and toughness X/X"); effect.setText("This creature has base power and toughness X/X");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{X}"));
blueprint.getAbilities().add(ability); blueprint.getAbilities().add(ability);
return true; return true;
} }

View file

@ -48,7 +48,7 @@ public final class GildedGoose extends CardImpl {
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new FoodToken()), false)); this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new FoodToken()), false));
// {1}{G}, {T}: Create a Food token. // {1}{G}, {T}: Create a Food token.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new FoodToken()), new ManaCostsImpl("{1}{G}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new FoodToken()), new ManaCostsImpl<>("{1}{G}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
this.addAbility(ability); this.addAbility(ability);

View file

@ -25,7 +25,7 @@ public final class GildedLight extends CardImpl {
this.getSpellAbility().addEffect(new GainAbilityControllerEffect(ShroudAbility.getInstance(), Duration.EndOfTurn)); this.getSpellAbility().addEffect(new GainAbilityControllerEffect(ShroudAbility.getInstance(), Duration.EndOfTurn));
// Cycling {2} // Cycling {2}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}")));
} }
private GildedLight(final GildedLight card) { private GildedLight(final GildedLight card) {

View file

@ -33,7 +33,7 @@ public final class GilderBairn extends CardImpl {
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// {2}{GU}, {untap}: For each counter on target permanent, put another of those counters on that permanent. // {2}{GU}, {untap}: For each counter on target permanent, put another of those counters on that permanent.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GilderBairnEffect(), new ManaCostsImpl("{2}{G/U}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GilderBairnEffect(), new ManaCostsImpl<>("{2}{G/U}"));
ability.addCost(new UntapSourceCost()); ability.addCost(new UntapSourceCost());
ability.addTarget(new TargetPermanent()); ability.addTarget(new TargetPermanent());
this.addAbility(ability); this.addAbility(ability);

View file

@ -29,7 +29,7 @@ public final class GiltLeafSeer extends CardImpl {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// {G}, {tap}: Look at the top two cards of your library, then put them back in any order. // {G}, {tap}: Look at the top two cards of your library, then put them back in any order.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(2), new ManaCostsImpl("{G}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(2), new ManaCostsImpl<>("{G}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -23,7 +23,7 @@ public final class GisasBidding extends CardImpl {
this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken(), 2)); this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken(), 2));
// Madness {2}{B} // Madness {2}{B}
this.addAbility(new MadnessAbility(new ManaCostsImpl("{2}{B}"))); this.addAbility(new MadnessAbility(new ManaCostsImpl<>("{2}{B}")));
} }
private GisasBidding(final GisasBidding card) { private GisasBidding(final GisasBidding card) {

View file

@ -45,7 +45,7 @@ public final class GlacialPlating extends CardImpl {
this.addAbility(ability); this.addAbility(ability);
// Cumulative upkeep {snow} // Cumulative upkeep {snow}
this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{S}"))); this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl<>("{S}")));
// Enchanted creature gets +3/+3 for each age counter on Glacial Plating. // Enchanted creature gets +3/+3 for each age counter on Glacial Plating.
DynamicValue boostValue = new MultipliedValue(new CountersSourceCount(CounterType.AGE), 3); DynamicValue boostValue = new MultipliedValue(new CountersSourceCount(CounterType.AGE), 3);

View file

@ -24,7 +24,7 @@ public final class GlacialStalker extends CardImpl {
this.toughness = new MageInt(5); this.toughness = new MageInt(5);
// Morph {4}{U} // Morph {4}{U}
this.addAbility(new MorphAbility(new ManaCostsImpl("{4}{U}"))); this.addAbility(new MorphAbility(new ManaCostsImpl<>("{4}{U}")));
} }
private GlacialStalker(final GlacialStalker card) { private GlacialStalker(final GlacialStalker card) {

View file

@ -30,7 +30,7 @@ public final class Glaciers extends CardImpl {
// At the beginning of your upkeep, sacrifice Glaciers unless you pay {W}{U}. // At the beginning of your upkeep, sacrifice Glaciers unless you pay {W}{U}.
this.addAbility(new BeginningOfUpkeepTriggeredAbility( this.addAbility(new BeginningOfUpkeepTriggeredAbility(
new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{W}{U}")), TargetController.YOU, false)); new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl<>("{W}{U}")), TargetController.YOU, false));
// All Mountains are Plains. // All Mountains are Plains.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GlaciersEffect())); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GlaciersEffect()));

View file

@ -35,7 +35,7 @@ public final class GladeWatcher extends CardImpl {
Ability ability = new ActivateIfConditionActivatedAbility( Ability ability = new ActivateIfConditionActivatedAbility(
Zone.BATTLEFIELD, Zone.BATTLEFIELD,
new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn), new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn),
new ManaCostsImpl("{G}"), new ManaCostsImpl<>("{G}"),
FormidableCondition.instance); FormidableCondition.instance);
ability.setAbilityWord(AbilityWord.FORMIDABLE); ability.setAbilityWord(AbilityWord.FORMIDABLE);
this.addAbility(ability); this.addAbility(ability);

View file

@ -38,7 +38,7 @@ public final class Glarecaster extends CardImpl {
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// {5}{W}: The next time damage would be dealt to Glarecaster and/or you this turn, that damage is dealt to any target instead. // {5}{W}: The next time damage would be dealt to Glarecaster and/or you this turn, that damage is dealt to any target instead.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GlarecasterEffect(), new ManaCostsImpl("{5}{W}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GlarecasterEffect(), new ManaCostsImpl<>("{5}{W}"));
ability.addTarget(new TargetAnyTarget()); ability.addTarget(new TargetAnyTarget());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,7 +27,7 @@ public final class GlassAsp extends CardImpl {
// Whenever Glass Asp deals combat damage to a player, that player loses 2 life at the beginning of their next draw step unless they pay {2} before that step. // Whenever Glass Asp deals combat damage to a player, that player loses 2 life at the beginning of their next draw step unless they pay {2} before that step.
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new UnlessPaysDelayedEffect( this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new UnlessPaysDelayedEffect(
new ManaCostsImpl("{2}"), new LoseLifeTargetEffect(2), PhaseStep.DRAW, true, new ManaCostsImpl<>("{2}"), new LoseLifeTargetEffect(2), PhaseStep.DRAW, true,
"that player loses 2 life at the beginning of their next draw step unless they pay {2} before that step."), "that player loses 2 life at the beginning of their next draw step unless they pay {2} before that step."),
false, true)); false, true));
} }

View file

@ -45,7 +45,7 @@ public final class GlassdustHulk extends CardImpl {
ability.addEffect(new CantBeBlockedSourceEffect(Duration.EndOfTurn)); ability.addEffect(new CantBeBlockedSourceEffect(Duration.EndOfTurn));
this.addAbility(ability); this.addAbility(ability);
this.addAbility(new CyclingAbility(new ManaCostsImpl("{W/U}"))); this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{W/U}")));
} }
private GlassdustHulk(final GlassdustHulk card) { private GlassdustHulk(final GlassdustHulk card) {

View file

@ -50,7 +50,7 @@ public final class GleamOfAuthority extends CardImpl {
// Enchanted creature has vigilance and "{W}, {T}: Bloster 1." // Enchanted creature has vigilance and "{W}, {T}: Bloster 1."
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA)); ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA));
Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BolsterEffect(1), new ManaCostsImpl("{W}")); Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BolsterEffect(1), new ManaCostsImpl<>("{W}"));
gainedAbility.addCost(new TapSourceCost()); gainedAbility.addCost(new TapSourceCost());
ability.addEffect(new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA).setText("and \"{W}, {T}: Bloster 1.\"")); ability.addEffect(new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA).setText("and \"{W}, {T}: Bloster 1.\""));
this.addAbility(ability); this.addAbility(ability);

View file

@ -25,7 +25,7 @@ public final class GleamOfResistance extends CardImpl {
this.getSpellAbility().addEffect(new BoostControlledEffect(1, 2, Duration.EndOfTurn)); this.getSpellAbility().addEffect(new BoostControlledEffect(1, 2, Duration.EndOfTurn));
this.getSpellAbility().addEffect(new UntapAllControllerEffect(StaticFilters.FILTER_PERMANENT_CREATURE, "Untap those creatures")); this.getSpellAbility().addEffect(new UntapAllControllerEffect(StaticFilters.FILTER_PERMANENT_CREATURE, "Untap those creatures"));
// Basic landcycling {1}{W}({1}{W}, Discard this card: Search your library for a basic land card, reveal it, and put it into your hand. Then shuffle your library.) // Basic landcycling {1}{W}({1}{W}, Discard this card: Search your library for a basic land card, reveal it, and put it into your hand. Then shuffle your library.)
this.addAbility(new BasicLandcyclingAbility(new ManaCostsImpl("{1}{W}"))); this.addAbility(new BasicLandcyclingAbility(new ManaCostsImpl<>("{1}{W}")));
} }
private GleamOfResistance(final GleamOfResistance card) { private GleamOfResistance(final GleamOfResistance card) {

View file

@ -35,7 +35,7 @@ public final class GlenElendraArchmage extends CardImpl {
// Flying // Flying
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// {U}, Sacrifice Glen Elendra Archmage: Counter target noncreature spell. // {U}, Sacrifice Glen Elendra Archmage: Counter target noncreature spell.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new ManaCostsImpl("{U}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new ManaCostsImpl<>("{U}"));
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_NON_CREATURE)); ability.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_NON_CREATURE));
this.addAbility(ability); this.addAbility(ability);

View file

@ -29,7 +29,7 @@ public final class Glimmerbell extends CardImpl {
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// {1}{U}: Untap Glimmerbell. // {1}{U}: Untap Glimmerbell.
this.addAbility(new SimpleActivatedAbility(new UntapSourceEffect(), new ManaCostsImpl("{1}{U}"))); this.addAbility(new SimpleActivatedAbility(new UntapSourceEffect(), new ManaCostsImpl<>("{1}{U}")));
} }
private Glimmerbell(final Glimmerbell card) { private Glimmerbell(final Glimmerbell card) {

View file

@ -31,7 +31,7 @@ public final class GlimmeringAngel extends CardImpl {
// Flying // Flying
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// {U}: Glimmering Angel gains shroud until end of turn. // {U}: Glimmering Angel gains shroud until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(ShroudAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{U}"))); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(ShroudAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl<>("{U}")));
} }
private GlimmeringAngel(final GlimmeringAngel card) { private GlimmeringAngel(final GlimmeringAngel card) {

View file

@ -43,7 +43,7 @@ public final class GlintHornBuccaneer extends CardImpl {
// {1}{R}, Discard a card: Draw a card. Activate this ability only if Glint-Horn Buccaneer is attacking. // {1}{R}, Discard a card: Draw a card. Activate this ability only if Glint-Horn Buccaneer is attacking.
Ability ability = new ConditionalActivatedAbility( Ability ability = new ConditionalActivatedAbility(
Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1),
new ManaCostsImpl("{1}{R}"), SourceAttackingCondition.instance new ManaCostsImpl<>("{1}{R}"), SourceAttackingCondition.instance
); );
ability.addCost(new DiscardCardCost()); ability.addCost(new DiscardCardCost());
this.addAbility(ability); this.addAbility(ability);

View file

@ -34,7 +34,7 @@ public final class GlintwingInvoker extends CardImpl {
// {7}{U}: Glintwing Invoker gets +3/+3 and gains flying until end of turn. // {7}{U}: Glintwing Invoker gets +3/+3 and gains flying until end of turn.
Effect effect = new BoostSourceEffect(3, 3, Duration.EndOfTurn); Effect effect = new BoostSourceEffect(3, 3, Duration.EndOfTurn);
effect.setText("{this} gets +3/+3"); effect.setText("{this} gets +3/+3");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{7}{U}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{7}{U}"));
effect = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn); effect = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn);
effect.setText("and gains flying until end of turn"); effect.setText("and gains flying until end of turn");
ability.addEffect(effect); ability.addEffect(effect);

View file

@ -32,7 +32,7 @@ public final class GlitteringLion extends CardImpl {
// Prevent all damage that would be dealt to Glittering Lion. // Prevent all damage that would be dealt to Glittering Lion.
this.addAbility(GlitteringLionAbility.getInstance()); this.addAbility(GlitteringLionAbility.getInstance());
// {3}: Until end of turn, Glittering Lion loses "Prevent all damage that would be dealt to Glittering Lion." Any player may activate this ability. // {3}: Until end of turn, Glittering Lion loses "Prevent all damage that would be dealt to Glittering Lion." Any player may activate this ability.
SimpleActivatedAbility ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseAbilitySourceEffect(GlitteringLionAbility.getInstance(), Duration.EndOfTurn).setText("Until end of turn, {this} loses \"Prevent all damage that would be dealt to {this}.\" Any player may activate this ability"), new ManaCostsImpl("{3}")); SimpleActivatedAbility ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseAbilitySourceEffect(GlitteringLionAbility.getInstance(), Duration.EndOfTurn).setText("Until end of turn, {this} loses \"Prevent all damage that would be dealt to {this}.\" Any player may activate this ability"), new ManaCostsImpl<>("{3}"));
ability2.setMayActivate(TargetController.ANY); ability2.setMayActivate(TargetController.ANY);
this.addAbility(ability2); this.addAbility(ability2);
} }

View file

@ -33,7 +33,7 @@ public final class GlitteringLynx extends CardImpl {
// Prevent all damage that would be dealt to Glittering Lynx. // Prevent all damage that would be dealt to Glittering Lynx.
this.addAbility(GlitteringLynxAbility.getInstance()); this.addAbility(GlitteringLynxAbility.getInstance());
// {2}: Until end of turn, Glittering Lynx loses "Prevent all damage that would be dealt to Glittering Lynx." Any player may activate this ability. // {2}: Until end of turn, Glittering Lynx loses "Prevent all damage that would be dealt to Glittering Lynx." Any player may activate this ability.
SimpleActivatedAbility ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseAbilitySourceEffect(GlitteringLynxAbility.getInstance(), Duration.EndOfTurn).setText("Until end of turn, {this} loses \"Prevent all damage that would be dealt to {this}.\""), new ManaCostsImpl("{2}")); SimpleActivatedAbility ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseAbilitySourceEffect(GlitteringLynxAbility.getInstance(), Duration.EndOfTurn).setText("Until end of turn, {this} loses \"Prevent all damage that would be dealt to {this}.\""), new ManaCostsImpl<>("{2}"));
ability2.setMayActivate(TargetController.ANY); ability2.setMayActivate(TargetController.ANY);
ability2.addEffect(new InfoEffect("Any player may activate this ability")); ability2.addEffect(new InfoEffect("Any player may activate this ability"));
this.addAbility(ability2); this.addAbility(ability2);

View file

@ -33,7 +33,7 @@ public final class Glory extends CardImpl {
// {2}{W}: Choose a color. Creatures you control gain protection from the chosen color until end of turn. Activate this ability only if Glory is in your graveyard. // {2}{W}: Choose a color. Creatures you control gain protection from the chosen color until end of turn. Activate this ability only if Glory is in your graveyard.
Effect effect = new GainProtectionFromColorAllEffect(Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURES); Effect effect = new GainProtectionFromColorAllEffect(Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURES);
effect.setText("Choose a color. Creatures you control gain protection from the chosen color until end of turn. Activate only if {this} is in your graveyard."); effect.setText("Choose a color. Creatures you control gain protection from the chosen color until end of turn. Activate only if {this} is in your graveyard.");
this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, effect, new ManaCostsImpl("{2}{W}"))); this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, effect, new ManaCostsImpl<>("{2}{W}")));
} }
private Glory(final Glory card) { private Glory(final Glory card) {

View file

@ -53,7 +53,7 @@ public final class GluttonousTroll extends CardImpl {
// {1}{G}, Sacrifice another nonland permanent: Gluttonous Troll gets +2/+2 until end of turn. // {1}{G}, Sacrifice another nonland permanent: Gluttonous Troll gets +2/+2 until end of turn.
Ability ability = new SimpleActivatedAbility( Ability ability = new SimpleActivatedAbility(
new BoostSourceEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl("{1}{G}") new BoostSourceEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl<>("{1}{G}")
); );
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
this.addAbility(ability); this.addAbility(ability);

View file

@ -40,7 +40,7 @@ public final class GlyphKeeper extends CardImpl {
this.addAbility(new GlyphKeeperAbility(), new NumberOfTimesPermanentTargetedATurnWatcher()); this.addAbility(new GlyphKeeperAbility(), new NumberOfTimesPermanentTargetedATurnWatcher());
// Embalm {5}{U}{U} // Embalm {5}{U}{U}
this.addAbility(new EmbalmAbility(new ManaCostsImpl("{5}{U}{U}"), this)); this.addAbility(new EmbalmAbility(new ManaCostsImpl<>("{5}{U}{U}"), this));
} }

View file

@ -26,7 +26,7 @@ public final class GnawToTheBone extends CardImpl {
this.getSpellAbility().addEffect(new GainLifeEffect(value)); this.getSpellAbility().addEffect(new GainLifeEffect(value));
// Flashback {2}{G} // Flashback {2}{G}
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{2}{G}"))); this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{2}{G}")));
} }
private GnawToTheBone(final GnawToTheBone card) { private GnawToTheBone(final GnawToTheBone card) {

View file

@ -32,7 +32,7 @@ public final class GnawingZombie extends CardImpl {
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// {1}{B}, Sacrifice a creature: Target player loses 1 life and you gain 1 life. // {1}{B}, Sacrifice a creature: Target player loses 1 life and you gain 1 life.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(1), new ManaCostsImpl("{1}{B}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(1), new ManaCostsImpl<>("{1}{B}"));
ability.addEffect(new GainLifeEffect(1)); ability.addEffect(new GainLifeEffect(1));
ability.addTarget(new TargetPlayer()); ability.addTarget(new TargetPlayer());
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));

View file

@ -33,7 +33,7 @@ public final class GnottvoldSlumbermound extends CardImpl {
// {3}{R}{G}{G}, {T}, Sacrifice Gnottvold Slumbermound: Destroy target land. Create a 4/4 green Troll Warrior creature token with trample. // {3}{R}{G}{G}, {T}, Sacrifice Gnottvold Slumbermound: Destroy target land. Create a 4/4 green Troll Warrior creature token with trample.
Ability ability = new SimpleActivatedAbility( Ability ability = new SimpleActivatedAbility(
new DestroyTargetEffect().setText("destroy target land."), new ManaCostsImpl("{3}{R}{G}{G}") new DestroyTargetEffect().setText("destroy target land."), new ManaCostsImpl<>("{3}{R}{G}{G}")
); );
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());

View file

@ -26,7 +26,7 @@ public final class GoForBlood extends CardImpl {
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL)); this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
// Cycling {1} // Cycling {1}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{1}"))); this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{1}")));
} }
private GoForBlood(final GoForBlood card) { private GoForBlood(final GoForBlood card) {

View file

@ -31,7 +31,7 @@ public final class GobblingOoze extends CardImpl {
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// {G}, Sacrifice another creature: Put a +1/+1 counter on Gobbling Ooze. // {G}, Sacrifice another creature: Put a +1/+1 counter on Gobbling Ooze.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), new ManaCostsImpl("{G}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), new ManaCostsImpl<>("{G}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false))); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false)));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -35,7 +35,7 @@ public final class GobhobblerRats extends CardImpl {
// Hellbent - As long as you have no cards in hand, Gobhobbler Rats gets +1/+0 and has "{B}: Regenerate Gobhobbler Rats." // Hellbent - As long as you have no cards in hand, Gobhobbler Rats gets +1/+0 and has "{B}: Regenerate Gobhobbler Rats."
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostSourceEffect(1,0, Duration.WhileOnBattlefield), HellbentCondition.instance, "<i>Hellbent</i> &mdash; As long as you have no cards in hand, {this} gets +1/+0")); new BoostSourceEffect(1,0, Duration.WhileOnBattlefield), HellbentCondition.instance, "<i>Hellbent</i> &mdash; As long as you have no cards in hand, {this} gets +1/+0"));
Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{B}")); Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl<>("{B}"));
ability.addEffect(new ConditionalContinuousEffect( ability.addEffect(new ConditionalContinuousEffect(
new GainAbilitySourceEffect(gainedAbility, Duration.WhileOnBattlefield), HellbentCondition.instance, "and has \"{B}: Regenerate {this}.\"")); new GainAbilitySourceEffect(gainedAbility, Duration.WhileOnBattlefield), HellbentCondition.instance, "and has \"{B}: Regenerate {this}.\""));
this.addAbility(ability); this.addAbility(ability);

View file

@ -34,7 +34,7 @@ public final class GoblinArchaeologist extends CardImpl {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// {R}, {T]: Flip a coin. If you win the flip, destroy target artifact and untap Goblin Archaeologist. If you lose the flip, sacrifice Goblin Archaeologist. // {R}, {T]: Flip a coin. If you win the flip, destroy target artifact and untap Goblin Archaeologist. If you lose the flip, sacrifice Goblin Archaeologist.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GoblinArchaeologistEffect(),new ManaCostsImpl("{R}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GoblinArchaeologistEffect(),new ManaCostsImpl<>("{R}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addTarget(new TargetArtifactPermanent()); ability.addTarget(new TargetArtifactPermanent());
this.addAbility(ability); this.addAbility(ability);

View file

@ -32,7 +32,7 @@ public final class GoblinBalloonBrigade extends CardImpl {
// {R}: Goblin Balloon Brigade gains flying until end of turn. // {R}: Goblin Balloon Brigade gains flying until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
new GainAbilitySourceEffect(FlyingAbility.getInstance(), new GainAbilitySourceEffect(FlyingAbility.getInstance(),
Duration.EndOfTurn), new ManaCostsImpl("{R}"))); Duration.EndOfTurn), new ManaCostsImpl<>("{R}")));
} }
private GoblinBalloonBrigade(final GoblinBalloonBrigade card) { private GoblinBalloonBrigade(final GoblinBalloonBrigade card) {

View file

@ -34,7 +34,7 @@ public final class GoblinBanneret extends CardImpl {
this.addAbility(new SimpleActivatedAbility( this.addAbility(new SimpleActivatedAbility(
Zone.BATTLEFIELD, Zone.BATTLEFIELD,
new BoostSourceEffect(2, 0, Duration.EndOfTurn), new BoostSourceEffect(2, 0, Duration.EndOfTurn),
new ManaCostsImpl("{1}{R}") new ManaCostsImpl<>("{1}{R}")
)); ));
} }

View file

@ -43,7 +43,7 @@ public final class GoblinBirdGrabber extends CardImpl {
// {R}: Goblin Bird-Grabber gains flying until end of turn. Activate this ability only if you control a creature with flying. // {R}: Goblin Bird-Grabber gains flying until end of turn. Activate this ability only if you control a creature with flying.
this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect( this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(
FlyingAbility.getInstance(), Duration.EndOfTurn FlyingAbility.getInstance(), Duration.EndOfTurn
), new ManaCostsImpl("{R}"), condition)); ), new ManaCostsImpl<>("{R}"), condition));
} }
private GoblinBirdGrabber(final GoblinBirdGrabber card) { private GoblinBirdGrabber(final GoblinBirdGrabber card) {

View file

@ -35,7 +35,7 @@ public final class GoblinBurrows extends CardImpl {
// {tap}: Add {C}. // {tap}: Add {C}.
this.addAbility(new ColorlessManaAbility()); this.addAbility(new ColorlessManaAbility());
// {1}{R}, {tap}: Target Goblin creature gets +2/+0 until end of turn. // {1}{R}, {tap}: Target Goblin creature gets +2/+0 until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2,0, Duration.EndOfTurn), new ManaCostsImpl("{1}{R}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2,0, Duration.EndOfTurn), new ManaCostsImpl<>("{1}{R}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent(filter)); ability.addTarget(new TargetCreaturePermanent(filter));
this.addAbility(ability); this.addAbility(ability);

View file

@ -23,7 +23,7 @@ public final class GoblinCannon extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}");
// {2}: Goblin Cannon deals 1 damage to any target. Sacrifice Goblin Cannon. // {2}: Goblin Cannon deals 1 damage to any target. Sacrifice Goblin Cannon.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{2}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl<>("{2}"));
ability.addTarget(new TargetAnyTarget()); ability.addTarget(new TargetAnyTarget());
ability.addEffect(new SacrificeSourceEffect()); ability.addEffect(new SacrificeSourceEffect());
this.addAbility(ability); this.addAbility(ability);

View file

@ -27,7 +27,7 @@ public final class GoblinCharbelcher extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
// {3}, {tap}: Reveal cards from the top of your library until you reveal a land card. Goblin Charbelcher deals damage equal to the number of nonland cards revealed this way to any target. If the revealed land card was a Mountain, Goblin Charbelcher deals double that damage instead. Put the revealed cards on the bottom of your library in any order. // {3}, {tap}: Reveal cards from the top of your library until you reveal a land card. Goblin Charbelcher deals damage equal to the number of nonland cards revealed this way to any target. If the revealed land card was a Mountain, Goblin Charbelcher deals double that damage instead. Put the revealed cards on the bottom of your library in any order.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GoblinCharbelcherEffect(), new ManaCostsImpl("{3}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GoblinCharbelcherEffect(), new ManaCostsImpl<>("{3}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addTarget(new TargetAnyTarget()); ability.addTarget(new TargetAnyTarget());
this.addAbility(ability); this.addAbility(ability);

View file

@ -35,7 +35,7 @@ public final class GoblinDirigible extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepSourceEffect())); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepSourceEffect()));
// At the beginning of your upkeep, you may pay {4}. If you do, untap Goblin Dirigible. // At the beginning of your upkeep, you may pay {4}. If you do, untap Goblin Dirigible.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DoIfCostPaid( this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DoIfCostPaid(
new UntapSourceEffect(), new ManaCostsImpl("{4}")), TargetController.YOU, false)); new UntapSourceEffect(), new ManaCostsImpl<>("{4}")), TargetController.YOU, false));
} }
private GoblinDirigible(final GoblinDirigible card) { private GoblinDirigible(final GoblinDirigible card) {

View file

@ -35,7 +35,7 @@ public final class GoblinDynamo extends CardImpl {
this.addAbility(ability); this.addAbility(ability);
//{X}{R}, {T}, Sacrifice Goblin Dynamo: Goblin Dynamo deals X damage to any target. //{X}{R}, {T}, Sacrifice Goblin Dynamo: Goblin Dynamo deals X damage to any target.
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,new DamageTargetEffect(ManacostVariableValue.REGULAR), new ManaCostsImpl("{X}{R}")); ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,new DamageTargetEffect(ManacostVariableValue.REGULAR), new ManaCostsImpl<>("{X}{R}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addTarget(new TargetAnyTarget()); ability.addTarget(new TargetAnyTarget());
this.addAbility(ability); this.addAbility(ability);

View file

@ -53,7 +53,7 @@ public final class GoblinEngineer extends CardImpl {
// {R}, {T}, Sacrifice an artifact: Return target artifact card with converted mana cost 3 or less from your graveyard to the battlefield. // {R}, {T}, Sacrifice an artifact: Return target artifact card with converted mana cost 3 or less from your graveyard to the battlefield.
Ability ability = new SimpleActivatedAbility( Ability ability = new SimpleActivatedAbility(
new ReturnFromGraveyardToBattlefieldTargetEffect(), new ManaCostsImpl("{R}") new ReturnFromGraveyardToBattlefieldTargetEffect(), new ManaCostsImpl<>("{R}")
); );
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));

View file

@ -31,7 +31,7 @@ public final class GoblinFestival extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}");
// {2}: Goblin Festival deals 1 damage to any target. Flip a coin. If you lose the flip, choose one of your opponents. That player gains control of Goblin Festival. // {2}: Goblin Festival deals 1 damage to any target. Flip a coin. If you lose the flip, choose one of your opponents. That player gains control of Goblin Festival.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{2}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl<>("{2}"));
ability.addTarget(new TargetAnyTarget()); ability.addTarget(new TargetAnyTarget());
ability.addEffect(new GoblinFestivalChangeControlEffect()); ability.addEffect(new GoblinFestivalChangeControlEffect());
this.addAbility(ability); this.addAbility(ability);

View file

@ -37,7 +37,7 @@ public final class GoblinFireFiend extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MustBeBlockedByAtLeastOneSourceEffect(Duration.WhileOnBattlefield))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MustBeBlockedByAtLeastOneSourceEffect(Duration.WhileOnBattlefield)));
//{R}: Goblin Fire Fiend gets +1/+0 until end of turn. //{R}: Goblin Fire Fiend gets +1/+0 until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl<>("{R}")));
} }
private GoblinFireFiend(final GoblinFireFiend card) { private GoblinFireFiend(final GoblinFireFiend card) {

View file

@ -43,7 +43,7 @@ public final class GoblinFlotilla extends CardImpl {
"Blocks or Blocked by Goblin Flotilla"), "Blocks or Blocked by Goblin Flotilla"),
false), false),
Duration.EndOfCombat), Duration.EndOfCombat),
new ManaCostsImpl("{R}"), new ManaCostsImpl<>("{R}"),
"Pay Goblin Flotilla combat effect?" "Pay Goblin Flotilla combat effect?"
); );
effect.setText("unless you pay {R}, whenever {this} blocks or becomes blocked by a creature this combat, that creature gains first strike until end of turn."); effect.setText("unless you pay {R}, whenever {this} blocks or becomes blocked by a creature this combat, that creature gains first strike until end of turn.");

View file

@ -39,7 +39,7 @@ public final class GoblinGoliath extends CardImpl {
this.addAbility(new EntersBattlefieldTriggeredAbility(effect)); this.addAbility(new EntersBattlefieldTriggeredAbility(effect));
// {3}{R}, {T}: If a source you control would deal damage to an opponent this turn, it deals double that damage to that player instead. // {3}{R}, {T}: If a source you control would deal damage to an opponent this turn, it deals double that damage to that player instead.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GoblinGoliathDamageEffect(), new ManaCostsImpl("{3}{R}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GoblinGoliathDamageEffect(), new ManaCostsImpl<>("{3}{R}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -37,7 +37,7 @@ public final class GoblinKites extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}");
// {R}: Target creature you control with toughness 2 or less gains flying until end of turn. Flip a coin at the beginning of the next end step. If you lose the flip, sacrifice that creature. // {R}: Target creature you control with toughness 2 or less gains flying until end of turn. Flip a coin at the beginning of the next end step. If you lose the flip, sacrifice that creature.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{R}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl<>("{R}"));
ability.addTarget(new TargetCreaturePermanent(filter)); ability.addTarget(new TargetCreaturePermanent(filter));
ability.addEffect(new GainAbilityTargetEffect(new BeginningOfEndStepTriggeredAbility(new GoblinKitesEffect(), TargetController.NEXT, false), Duration.EndOfTurn)); ability.addEffect(new GainAbilityTargetEffect(new BeginningOfEndStepTriggeredAbility(new GoblinKitesEffect(), TargetController.NEXT, false), Duration.EndOfTurn));
this.addAbility(ability); this.addAbility(ability);

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