mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Refactor: fix raw use of parameterized class ManaCostsImpl - 'Q' cards (#9082)
This commit is contained in:
parent
1050f1e600
commit
cde4e16f7b
13 changed files with 15 additions and 15 deletions
|
@ -27,7 +27,7 @@ public final class QalSismaBehemoth extends CardImpl {
|
|||
this.toughness = new MageInt(5);
|
||||
|
||||
// Qal Sisma Behemoth can't attack or block unless you pay {2}.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackBlockUnlessPaysSourceEffect(new ManaCostsImpl("{2}"), PayCostToAttackBlockEffectImpl.RestrictType.ATTACK_AND_BLOCK)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackBlockUnlessPaysSourceEffect(new ManaCostsImpl<>("{2}"), PayCostToAttackBlockEffectImpl.RestrictType.ATTACK_AND_BLOCK)));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public final class QarsiHighPriest extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// {1}{B}, {t}, Sacrifice another creature: Manifest the top card of your library.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ManifestEffect(1), new ManaCostsImpl("{1}{B}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ManifestEffect(1), new ManaCostsImpl<>("{1}{B}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false)));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -36,7 +36,7 @@ public final class QasaliPridemage extends CardImpl {
|
|||
this.addAbility(new ExaltedAbility());
|
||||
|
||||
// {1}, Sacrifice Qasali Pridemage: Destroy target artifact or enchantment.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl<>("{1}"));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
Target target = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT);
|
||||
ability.addTarget(target);
|
||||
|
|
|
@ -34,7 +34,7 @@ public final class QuakefootCyclops extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Cycling {1}{R}
|
||||
this.addAbility(new CyclingAbility(new ManaCostsImpl("{1}{R}")));
|
||||
this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{1}{R}")));
|
||||
|
||||
// When you cycle Quakefoot Cyclops, target creature can't block this turn.
|
||||
ability = new CycleTriggeredAbility(new CantBlockTargetEffect(Duration.EndOfTurn));
|
||||
|
|
|
@ -23,7 +23,7 @@ public final class QuenchableFire extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(3));
|
||||
// It deals an additional 3 damage to that player or planeswalker at the beginning of your next upkeep step unless that player or that planeswalker’s controller pays {U} before that step.
|
||||
this.getSpellAbility().addEffect(new UnlessPaysDelayedEffect(new ManaCostsImpl("{U}"),
|
||||
this.getSpellAbility().addEffect(new UnlessPaysDelayedEffect(new ManaCostsImpl<>("{U}"),
|
||||
new DamageTargetEffect(3, true, "that player or that planeswalker's controller"), PhaseStep.UPKEEP, false,
|
||||
"It deals an additional 3 damage to that player or planeswalker at the beginning of your next upkeep step unless that player or that planeswalker's controller pays {U} before that step."));
|
||||
}
|
||||
|
|
|
@ -38,21 +38,21 @@ public final class QuestingPhelddagrif extends CardImpl {
|
|||
|
||||
// {G}: Questing Phelddagrif gets +1/+1 until end of turn. Target opponent creates a 1/1 green Hippo creature token.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn),
|
||||
new ManaCostsImpl("{G}"));
|
||||
new ManaCostsImpl<>("{G}"));
|
||||
ability.addEffect(new CreateTokenTargetEffect(new HippoToken()));
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
|
||||
// {W}: Questing Phelddagrif gains protection from black and from red until end of turn. Target opponent gains 2 life.
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(ProtectionAbility.from(ObjectColor.BLACK, ObjectColor.RED),
|
||||
Duration.EndOfTurn), new ManaCostsImpl("{W}"));
|
||||
Duration.EndOfTurn), new ManaCostsImpl<>("{W}"));
|
||||
ability.addEffect(new GainLifeTargetEffect(2));
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
|
||||
// {U}: Questing Phelddagrif gains flying until end of turn. Target opponent may draw a card.
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FlyingAbility.getInstance(),
|
||||
Duration.EndOfTurn), new ManaCostsImpl("{U}"));
|
||||
Duration.EndOfTurn), new ManaCostsImpl<>("{U}"));
|
||||
ability.addEffect(new DrawCardTargetEffect(1, true));
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -54,7 +54,7 @@ public final class QuiGonJinn extends CardImpl {
|
|||
this.addAbility(abitity);
|
||||
|
||||
// Meditate {1}{W}
|
||||
this.addAbility(new MeditateAbility(new ManaCostsImpl("{1}{W}")));
|
||||
this.addAbility(new MeditateAbility(new ManaCostsImpl<>("{1}{W}")));
|
||||
}
|
||||
|
||||
private QuiGonJinn(final QuiGonJinn card) {
|
||||
|
|
|
@ -24,7 +24,7 @@ public final class QuicksilverAmulet extends CardImpl {
|
|||
// {4}, {tap}: You may put a creature card from your hand onto the battlefield.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_CREATURE_A),
|
||||
new ManaCostsImpl("{4}"));
|
||||
new ManaCostsImpl<>("{4}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ public final class QuicksilverElemental extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// {U}: Quicksilver Elemental gains all activated abilities of target creature until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(new QuicksilverElementalEffect(), new ManaCostsImpl("{U}"));
|
||||
Ability ability = new SimpleActivatedAbility(new QuicksilverElementalEffect(), new ManaCostsImpl<>("{U}"));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public final class QuicksilverWall extends CardImpl {
|
|||
this.addAbility(DefenderAbility.getInstance());
|
||||
// {4}: Return Quicksilver Wall to its owner's hand. Any player may activate this ability.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new ReturnToHandSourceEffect(true), new ManaCostsImpl("{4}"));
|
||||
new ReturnToHandSourceEffect(true), new ManaCostsImpl<>("{4}"));
|
||||
ability.setMayActivate(TargetController.ANY);
|
||||
ability.addEffect(new InfoEffect("Any player may activate this ability"));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class QuilledWolf extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// {5}{G}: Quilled Wolf gets +4/+4 until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(4, 4, Duration.EndOfTurn), new ManaCostsImpl("{5}{G}")));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(4, 4, Duration.EndOfTurn), new ManaCostsImpl<>("{5}{G}")));
|
||||
}
|
||||
|
||||
private QuilledWolf(final QuilledWolf card) {
|
||||
|
|
|
@ -33,7 +33,7 @@ public final class Quillspike extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// {BG}, Remove a -1/-1 counter from a creature you control: Quillspike gets +3/+3 until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(3, 3, Duration.EndOfTurn), new ManaCostsImpl("{B/G}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(3, 3, Duration.EndOfTurn), new ManaCostsImpl<>("{B/G}"));
|
||||
TargetPermanent target = new TargetPermanent(1, 1, StaticFilters.FILTER_PERMANENT_CREATURE_CONTROLLED, true);
|
||||
ability.addCost(new RemoveCounterCost(target, CounterType.M1M1));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -35,7 +35,7 @@ public final class QuirionDruid extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// {G}, {T}: Target land becomes a 2/2 green creature that’s still a land. <i>(This effect lasts indefinitely.)</i>
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new QuirionDruidToken(), false, true, Duration.Custom), new ManaCostsImpl("{G}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new QuirionDruidToken(), false, true, Duration.Custom), new ManaCostsImpl<>("{G}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetLandPermanent());
|
||||
this.addAbility(ability);
|
||||
|
|
Loading…
Reference in a new issue