mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 07:22:03 -08:00
Fix remaining raw unparameterized usages of ManaCostImpl
This commit is contained in:
parent
4806626ba0
commit
882afbf8b5
37 changed files with 84 additions and 76 deletions
|
|
@ -73,7 +73,7 @@ public class ConditionalAsThoughTest extends CardTestPlayerBase {
|
|||
Ability ability = new SimpleActivatedAbility(
|
||||
Zone.ALL,
|
||||
new InfoEffect("test"),
|
||||
new ManaCostsImpl("{R}")
|
||||
new ManaCostsImpl<>("{R}")
|
||||
);
|
||||
ability.addTarget(new TargetCardInLibrary());
|
||||
}
|
||||
|
|
@ -94,7 +94,7 @@ public class ConditionalAsThoughTest extends CardTestPlayerBase {
|
|||
0
|
||||
)
|
||||
).setText("allow target cast"),
|
||||
new ManaCostsImpl("{R}")
|
||||
new ManaCostsImpl<>("{R}")
|
||||
);
|
||||
ability.addTarget(new TargetCardInOpponentsGraveyard(StaticFilters.FILTER_CARD));
|
||||
addCustomCardWithAbility("play any opponent hand", playerA, ability);
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ public class SparkDoubleTest extends CardTestPlayerBase {
|
|||
|
||||
@Test
|
||||
public void test_CopyOfSparksCopy_ByAbility() {
|
||||
Ability ability = new SimpleActivatedAbility(new CreateTokenCopyTargetEffect(), new ManaCostsImpl(""));
|
||||
Ability ability = new SimpleActivatedAbility(new CreateTokenCopyTargetEffect(), new ManaCostsImpl<>(""));
|
||||
ability.addTarget(new TargetPermanent());
|
||||
addCustomCardWithAbility("copy", playerA, ability);
|
||||
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ public class ManaPoolTest extends CardTestPlayerBase {
|
|||
public void test_ConditionalMana_OneXSpell() {
|
||||
addCustomCardWithAbility("add 10", playerA, new SimpleActivatedAbility(Zone.ALL,
|
||||
new AddConditionalManaEffect(Mana.RedMana(10), new InstantOrSorcerySpellManaBuilder()),
|
||||
new ManaCostsImpl("")));
|
||||
new ManaCostsImpl<>("")));
|
||||
addCard(Zone.HAND, playerA, "Volcanic Geyser"); // {X}{R}{R}
|
||||
|
||||
// make mana
|
||||
|
|
@ -197,7 +197,7 @@ public class ManaPoolTest extends CardTestPlayerBase {
|
|||
public void test_ConditionalMana_MultipleXSpell() {
|
||||
addCustomCardWithAbility("add 10", playerA, new SimpleActivatedAbility(Zone.ALL,
|
||||
new AddConditionalManaEffect(Mana.RedMana(10), new InstantOrSorcerySpellManaBuilder()),
|
||||
new ManaCostsImpl("")));
|
||||
new ManaCostsImpl<>("")));
|
||||
addCard(Zone.HAND, playerA, "Volcanic Geyser", 2); // {X}{R}{R}
|
||||
|
||||
// make mana
|
||||
|
|
@ -229,7 +229,7 @@ public class ManaPoolTest extends CardTestPlayerBase {
|
|||
public void test_MultipleMana_OneXAbility() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4);
|
||||
//
|
||||
Ability ability = new SimpleActivatedAbility(Zone.ALL, new DamageTargetEffect(ManacostVariableValue.REGULAR), new ManaCostsImpl("{X}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.ALL, new DamageTargetEffect(ManacostVariableValue.REGULAR), new ManaCostsImpl<>("{X}"));
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
addCustomCardWithAbility("damage X", playerA, ability);
|
||||
|
||||
|
|
@ -259,9 +259,9 @@ public class ManaPoolTest extends CardTestPlayerBase {
|
|||
public void test_ConditionalMana_OneXAbility() {
|
||||
addCustomCardWithAbility("add 10", playerA, new SimpleActivatedAbility(Zone.ALL,
|
||||
new AddConditionalManaEffect(Mana.RedMana(10), new SimpleActivatedAbilityManaBuilder()),
|
||||
new ManaCostsImpl("")));
|
||||
new ManaCostsImpl<>("")));
|
||||
//
|
||||
Ability ability = new SimpleActivatedAbility(Zone.ALL, new DamageTargetEffect(ManacostVariableValue.REGULAR), new ManaCostsImpl("{X}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.ALL, new DamageTargetEffect(ManacostVariableValue.REGULAR), new ManaCostsImpl<>("{X}"));
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
addCustomCardWithAbility("damage X", playerA, ability);
|
||||
|
||||
|
|
@ -289,12 +289,12 @@ public class ManaPoolTest extends CardTestPlayerBase {
|
|||
addCard(Zone.HAND, playerA, "Lightning Bolt"); // {R}
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1 + 3 + 1);
|
||||
//
|
||||
Ability ability = new SimpleActivatedAbility(Zone.ALL, new DamageTargetEffect(ManacostVariableValue.REGULAR), new ManaCostsImpl(""));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.ALL, new DamageTargetEffect(ManacostVariableValue.REGULAR), new ManaCostsImpl<>(""));
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
addCustomCardWithAbility("damage X", playerA, ability);
|
||||
//
|
||||
// {X}: Counter target spell
|
||||
ability = new SimpleActivatedAbility(Zone.ALL, new CounterUnlessPaysEffect(ManacostVariableValue.REGULAR), new ManaCostsImpl("{X}"));
|
||||
ability = new SimpleActivatedAbility(Zone.ALL, new CounterUnlessPaysEffect(ManacostVariableValue.REGULAR), new ManaCostsImpl<>("{X}"));
|
||||
ability.addTarget(new TargetSpell());
|
||||
addCustomCardWithAbility("counter until pay X", playerB, ability);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 3);
|
||||
|
|
@ -336,14 +336,14 @@ public class ManaPoolTest extends CardTestPlayerBase {
|
|||
//
|
||||
addCustomCardWithAbility("add 10", playerA, new SimpleManaAbility(Zone.ALL,
|
||||
new AddConditionalManaEffect(Mana.RedMana(10), new SimpleActivatedAbilityManaBuilder()),
|
||||
new ManaCostsImpl("")));
|
||||
new ManaCostsImpl<>("")));
|
||||
//
|
||||
Ability ability = new SimpleActivatedAbility(Zone.ALL, new DamageTargetEffect(ManacostVariableValue.REGULAR), new ManaCostsImpl(""));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.ALL, new DamageTargetEffect(ManacostVariableValue.REGULAR), new ManaCostsImpl<>(""));
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
addCustomCardWithAbility("damage X", playerA, ability);
|
||||
//
|
||||
// {X}: Counter target spell
|
||||
ability = new SimpleActivatedAbility(Zone.ALL, new CounterUnlessPaysEffect(ManacostVariableValue.REGULAR), new ManaCostsImpl("{X}"));
|
||||
ability = new SimpleActivatedAbility(Zone.ALL, new CounterUnlessPaysEffect(ManacostVariableValue.REGULAR), new ManaCostsImpl<>("{X}"));
|
||||
ability.addTarget(new TargetSpell());
|
||||
addCustomCardWithAbility("counter until pay X", playerB, ability);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 3);
|
||||
|
|
|
|||
|
|
@ -487,7 +487,7 @@ public abstract class MageTestPlayerBase {
|
|||
* @param damageAmount
|
||||
*/
|
||||
protected void addCustomEffect_TargetDamage(TestPlayer controller, int damageAmount) {
|
||||
Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(damageAmount).setText("target damage " + damageAmount), new ManaCostsImpl(""));
|
||||
Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(damageAmount).setText("target damage " + damageAmount), new ManaCostsImpl<>(""));
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
addCustomCardWithAbility(
|
||||
"target damage " + damageAmount + " for " + controller.getName(),
|
||||
|
|
@ -502,7 +502,7 @@ public abstract class MageTestPlayerBase {
|
|||
* @param controller
|
||||
*/
|
||||
protected void addCustomEffect_DestroyTarget(TestPlayer controller) {
|
||||
Ability ability = new SimpleActivatedAbility(new DestroyTargetEffect().setText("target destroy"), new ManaCostsImpl(""));
|
||||
Ability ability = new SimpleActivatedAbility(new DestroyTargetEffect().setText("target destroy"), new ManaCostsImpl<>(""));
|
||||
ability.addTarget(new TargetPermanent());
|
||||
addCustomCardWithAbility(
|
||||
"target destroy for " + controller.getName(),
|
||||
|
|
@ -518,7 +518,7 @@ public abstract class MageTestPlayerBase {
|
|||
*/
|
||||
protected void addCustomEffect_ReturnFromAnyToHand(TestPlayer controller) {
|
||||
// graveyard
|
||||
Ability ability = new SimpleActivatedAbility(new ReturnFromGraveyardToHandTargetEffect().setText("return from graveyard"), new ManaCostsImpl(""));
|
||||
Ability ability = new SimpleActivatedAbility(new ReturnFromGraveyardToHandTargetEffect().setText("return from graveyard"), new ManaCostsImpl<>(""));
|
||||
ability.addTarget(new TargetCardInGraveyard(StaticFilters.FILTER_CARD));
|
||||
addCustomCardWithAbility(
|
||||
"return from graveyard for " + controller.getName(),
|
||||
|
|
@ -527,7 +527,7 @@ public abstract class MageTestPlayerBase {
|
|||
);
|
||||
|
||||
// exile
|
||||
ability = new SimpleActivatedAbility(new ReturnFromExileEffect(Zone.HAND).setText("return from exile"), new ManaCostsImpl(""));
|
||||
ability = new SimpleActivatedAbility(new ReturnFromExileEffect(Zone.HAND).setText("return from exile"), new ManaCostsImpl<>(""));
|
||||
ability.addTarget(new TargetCardInExile(StaticFilters.FILTER_CARD));
|
||||
addCustomCardWithAbility(
|
||||
"return from exile for " + controller.getName(),
|
||||
|
|
@ -536,7 +536,7 @@ public abstract class MageTestPlayerBase {
|
|||
);
|
||||
|
||||
// library
|
||||
ability = new SimpleActivatedAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD)).setText("return from library"), new ManaCostsImpl(""));
|
||||
ability = new SimpleActivatedAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD)).setText("return from library"), new ManaCostsImpl<>(""));
|
||||
addCustomCardWithAbility(
|
||||
"return from library for " + controller.getName(),
|
||||
controller,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue