mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 22:12:03 -08:00
Refactor: fix raw use of parameterized class ManaCostsImpl - 'Z' cards (#9091)
This commit is contained in:
parent
3ae5f4979d
commit
7d5958ddc8
23 changed files with 24 additions and 24 deletions
|
|
@ -25,7 +25,7 @@ public final class ZagothCrystal extends CardImpl {
|
|||
this.addAbility(new BlueManaAbility());
|
||||
|
||||
// Cycling {2}
|
||||
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
||||
this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}")));
|
||||
}
|
||||
|
||||
private ZagothCrystal(final ZagothCrystal card) {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public final class ZahidDjinnOfTheLamp extends CardImpl {
|
|||
this.toughness = new MageInt(6);
|
||||
|
||||
// You may pay {3}{U} and tap an untapped artifact you control rather than pay this spell's mana cost.
|
||||
AlternativeCostSourceAbility alternativeCostSourceAbility = new AlternativeCostSourceAbility(new ManaCostsImpl("{3}{U}"), null,
|
||||
AlternativeCostSourceAbility alternativeCostSourceAbility = new AlternativeCostSourceAbility(new ManaCostsImpl<>("{3}{U}"), null,
|
||||
"You may pay {3}{U} and tap an untapped artifact you control rather than pay this spell's mana cost.");
|
||||
FilterControlledArtifactPermanent filter = new FilterControlledArtifactPermanent("untapped artifact you control");
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
|
|
|
|||
|
|
@ -32,10 +32,10 @@ public final class ZameckGuildmage extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// {G}{U}: This turn, each creature you control enters the battlefield with an additional +1/+1 counter on it.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ZameckGuildmageEntersBattlefieldEffect(), new ManaCostsImpl("{G}{U}")));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ZameckGuildmageEntersBattlefieldEffect(), new ManaCostsImpl<>("{G}{U}")));
|
||||
|
||||
// {G}{U}, Remove a +1/+1 counter from a creature you control: Draw a card.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{G}{U}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{G}{U}"));
|
||||
ability.addCost(new RemoveCounterCost(new TargetControlledCreaturePermanent(), CounterType.P1P1));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public final class ZanikevLocust extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// Scavenge {2}{B}{B} ({2}{B}{B}, Exile this card from your graveyard: Put a number of +1/+1 counters equal to this card's power on target creature. Scavenge only as a sorcery.)
|
||||
this.addAbility(new ScavengeAbility(new ManaCostsImpl("{2}{B}{B}")));
|
||||
this.addAbility(new ScavengeAbility(new ManaCostsImpl<>("{2}{B}{B}")));
|
||||
}
|
||||
|
||||
private ZanikevLocust(final ZanikevLocust card) {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public final class ZarichiTiger extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// 1{W}, {T}: You gain 2 life.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), new ManaCostsImpl("{1}{W}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), new ManaCostsImpl<>("{1}{W}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public final class ZealotOfTheGodPharaoh extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// {4}{R}: Zealot of the God-Pharaoh deals 2 damage to target opponent.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{4}{R}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl<>("{4}{R}"));
|
||||
ability.addTarget(new TargetOpponentOrPlaneswalker());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public final class ZealousInquisitor extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// {1}{W}: The next 1 damage that would be dealt to Zealous Inquisitor this turn is dealt to target creature instead.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, ONE_USAGE_ABSOLUTE), new ManaCostsImpl("{1}{W}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, ONE_USAGE_ABSOLUTE), new ManaCostsImpl<>("{1}{W}"));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public final class ZedruuTheGreathearted extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// {R}{W}{U}: Target opponent gains control of target permanent you control.
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ZedruuTheGreatheartedEffect(), new ManaCostsImpl("{U}{R}{W}"));
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ZedruuTheGreatheartedEffect(), new ManaCostsImpl<>("{U}{R}{W}"));
|
||||
ability.addTarget(new TargetOpponent());
|
||||
ability.addTarget(new TargetControlledPermanent());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public final class ZelyonSword extends CardImpl {
|
|||
// {3}, {tap}: Target creature gets +2/+0 for as long as Zelyon Sword remains tapped.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
|
||||
new BoostTargetEffect(2, 0, Duration.Custom), SourceTappedCondition.TAPPED,
|
||||
"target creature gets +2/+0 for as long as {this} remains tapped"), new ManaCostsImpl("{3}"));
|
||||
"target creature gets +2/+0 for as long as {this} remains tapped"), new ManaCostsImpl<>("{3}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public final class ZephyrCharge extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}");
|
||||
|
||||
// {1}{U}: Target creature gains flying until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}{U}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl<>("{1}{U}"));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public final class ZephyrScribe extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// {U}, {T}: Draw a card, then discard a card.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawDiscardControllerEffect(1,1), new ManaCostsImpl("{U}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawDiscardControllerEffect(1,1), new ManaCostsImpl<>("{U}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public final class ZerapaMinotaur extends CardImpl {
|
|||
this.addAbility(FirstStrikeAbility.getInstance());
|
||||
// {2}: Zerapa Minotaur loses first strike until end of turn. Any player may activate this ability.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseAbilitySourceEffect(
|
||||
FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{2}"));
|
||||
FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl<>("{2}"));
|
||||
ability.setMayActivate(TargetController.ANY);
|
||||
ability.addEffect(new InfoEffect("Any player may activate this ability"));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public final class ZhalfirinCommander extends CardImpl {
|
|||
// Flanking
|
||||
this.addAbility(new FlankingAbility());
|
||||
// {1}{W}{W}: Target Knight creature gets +1/+1 until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{1}{W}{W}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl<>("{1}{W}{W}"));
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public final class ZhalfirinCrusader extends CardImpl {
|
|||
this.addAbility(new FlankingAbility());
|
||||
|
||||
// {1}{W}: The next 1 damage that would be dealt to Zhalfirin Crusader this turn is dealt to any target instead.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, ONE_USAGE_ABSOLUTE), new ManaCostsImpl("{1}{W}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, ONE_USAGE_ABSOLUTE), new ManaCostsImpl<>("{1}{W}"));
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public final class ZhalfirinKnight extends CardImpl {
|
|||
// Flanking
|
||||
this.addAbility(new FlankingAbility());
|
||||
// {W}{W}: Zhalfirin Knight gains first strike until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{W}{W}")));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl<>("{W}{W}")));
|
||||
}
|
||||
|
||||
private ZhalfirinKnight(final ZhalfirinKnight card) {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public final class ZirilanOfTheClaw extends CardImpl {
|
|||
|
||||
// {1}{R}{R}, {tap}: Search your library for a Dragon permanent card and put that card onto the battlefield. Then shuffle your library.
|
||||
// That Dragon gains haste until end of turn. Exile it at the beginning of the next end step.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ZirilanOfTheClawEffect(), new ManaCostsImpl("{1}{R}{R}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ZirilanOfTheClawEffect(), new ManaCostsImpl<>("{1}{R}{R}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public final class ZoeticCavern extends CardImpl {
|
|||
// {T}: Add {C}.
|
||||
this.addAbility(new ColorlessManaAbility());
|
||||
// Morph {2}
|
||||
this.addAbility(new MorphAbility(new ManaCostsImpl("{2}")));
|
||||
this.addAbility(new MorphAbility(new ManaCostsImpl<>("{2}")));
|
||||
}
|
||||
|
||||
private ZoeticCavern(final ZoeticCavern card) {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public final class ZofShade extends CardImpl {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl("{2}{B}")));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl<>("{2}{B}")));
|
||||
}
|
||||
|
||||
private ZofShade(final ZofShade card) {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public final class ZombieMaster extends CardImpl {
|
|||
effect.setText("Other Zombie creatures have swampwalk. <i>(They can't be blocked as long as defending player controls a Swamp.)</i>");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
// Other Zombies have "{B}: Regenerate this permanent."
|
||||
effect = new GainAbilityAllEffect(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{B}")), Duration.WhileOnBattlefield, filter, true);
|
||||
effect = new GainAbilityAllEffect(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl<>("{B}")), Duration.WhileOnBattlefield, filter, true);
|
||||
effect.setText("Other Zombies have \"{B}: Regenerate this permanent.\"");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public final class ZombieMusher extends CardImpl {
|
|||
this.addAbility(new LandwalkAbility(filter));
|
||||
|
||||
// {snow}: Regenerate Zombie Musher.
|
||||
this.addAbility(new SimpleActivatedAbility(new RegenerateSourceEffect(), new ManaCostsImpl("{S}")));
|
||||
this.addAbility(new SimpleActivatedAbility(new RegenerateSourceEffect(), new ManaCostsImpl<>("{S}")));
|
||||
}
|
||||
|
||||
private ZombieMusher(final ZombieMusher card) {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public final class Zoologist extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// {3}{G}, {tap}: Reveal the top card of your library. If it's a creature card, put it onto the battlefield. Otherwise, put it into your graveyard.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ZoologistEffect(), new ManaCostsImpl("{3}{G}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ZoologistEffect(), new ManaCostsImpl<>("{3}{G}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public final class ZulaportEnforcer extends LevelerCard {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
this.addAbility(new LevelUpAbility(new ManaCostsImpl("{4}")));
|
||||
this.addAbility(new LevelUpAbility(new ManaCostsImpl<>("{4}")));
|
||||
|
||||
// LEVEL 1-2: 3/3
|
||||
// LEVEL 3+: 5/5
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public final class ZuranEnchanter extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// {2}{B}, {T}: Target player discards a card. Activate this ability only during your turn.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1), new ManaCostsImpl("{2}{B}"), MyTurnCondition.instance);
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1), new ManaCostsImpl<>("{2}{B}"), MyTurnCondition.instance);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetPlayer());
|
||||
ability.addHint(MyTurnHint.instance);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue