mirror of
https://github.com/correl/mage.git
synced 2024-11-25 03:00:11 +00:00
fixed various instances of mana costs which don't include braces
This commit is contained in:
parent
d0b90379f6
commit
0f1375ca60
34 changed files with 38 additions and 38 deletions
|
@ -22,7 +22,7 @@ public final class AncestralVision extends CardImpl {
|
||||||
this.color.setBlue(true);
|
this.color.setBlue(true);
|
||||||
|
|
||||||
// Suspend 4-{U}
|
// Suspend 4-{U}
|
||||||
this.addAbility(new SuspendAbility(4, new ManaCostsImpl("U"), this));
|
this.addAbility(new SuspendAbility(4, new ManaCostsImpl<>("{U}"), this));
|
||||||
// Target player draws three cards.
|
// Target player draws three cards.
|
||||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||||
this.getSpellAbility().addEffect(new DrawCardTargetEffect(3));
|
this.getSpellAbility().addEffect(new DrawCardTargetEffect(3));
|
||||||
|
|
|
@ -28,7 +28,7 @@ import java.util.UUID;
|
||||||
public class BlessedDefiance extends CardImpl {
|
public class BlessedDefiance extends CardImpl {
|
||||||
|
|
||||||
public BlessedDefiance(UUID ownerId, CardSetInfo setInfo) {
|
public BlessedDefiance(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "W");
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}");
|
||||||
|
|
||||||
// Target creature you control gets +2/+0 and gains lifelink until end of turn. When that creature dies this turn, create a 1/1 white Spirit creature token with flying.
|
// Target creature you control gets +2/+0 and gains lifelink until end of turn. When that creature dies this turn, create a 1/1 white Spirit creature token with flying.
|
||||||
this.getSpellAbility().addEffect(new BoostTargetEffect(2, 0)
|
this.getSpellAbility().addEffect(new BoostTargetEffect(2, 0)
|
||||||
|
|
|
@ -30,7 +30,7 @@ public final class CircleOfProtectionArtifacts extends CardImpl {
|
||||||
|
|
||||||
// {2}: The next time an artifact source of your choice would deal damage to you this turn, prevent that damage.
|
// {2}: The next time an artifact source of your choice would deal damage to you this turn, prevent that damage.
|
||||||
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("2")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{2}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private CircleOfProtectionArtifacts(final CircleOfProtectionArtifacts card) {
|
private CircleOfProtectionArtifacts(final CircleOfProtectionArtifacts card) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ public final class CircleOfProtectionBlack extends CardImpl {
|
||||||
|
|
||||||
// {1}: The next time a black source of your choice would deal damage to you this turn, prevent that damage.
|
// {1}: The next time a black source of your choice would deal damage to you this turn, prevent that damage.
|
||||||
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{1}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private CircleOfProtectionBlack(final CircleOfProtectionBlack card) {
|
private CircleOfProtectionBlack(final CircleOfProtectionBlack card) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ public final class CircleOfProtectionBlue extends CardImpl {
|
||||||
|
|
||||||
// {1}: The next time a blue source of your choice would deal damage to you this turn, prevent that damage.
|
// {1}: The next time a blue source of your choice would deal damage to you this turn, prevent that damage.
|
||||||
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{1}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private CircleOfProtectionBlue(final CircleOfProtectionBlue card) {
|
private CircleOfProtectionBlue(final CircleOfProtectionBlue card) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ public final class CircleOfProtectionGreen extends CardImpl {
|
||||||
|
|
||||||
// {1}: The next time a green source of your choice would deal damage to you this turn, prevent that damage.
|
// {1}: The next time a green source of your choice would deal damage to you this turn, prevent that damage.
|
||||||
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{1}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private CircleOfProtectionGreen(final CircleOfProtectionGreen card) {
|
private CircleOfProtectionGreen(final CircleOfProtectionGreen card) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ public final class CircleOfProtectionRed extends CardImpl {
|
||||||
|
|
||||||
// {1}: The next time a red source of your choice would deal damage to you this turn, prevent that damage.
|
// {1}: The next time a red source of your choice would deal damage to you this turn, prevent that damage.
|
||||||
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{1}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private CircleOfProtectionRed(final CircleOfProtectionRed card) {
|
private CircleOfProtectionRed(final CircleOfProtectionRed card) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ public final class CircleOfProtectionShadow extends CardImpl {
|
||||||
// {1}: The next time a creature of your choice with shadow would deal damage to you this turn, prevent that damage.
|
// {1}: The next time a creature of your choice with shadow would deal damage to you this turn, prevent that damage.
|
||||||
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
||||||
effect.setText("The next time a creature of your choice with shadow would deal damage to you this turn, prevent that damage");
|
effect.setText("The next time a creature of your choice with shadow would deal damage to you this turn, prevent that damage");
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{1}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private CircleOfProtectionShadow(final CircleOfProtectionShadow card) {
|
private CircleOfProtectionShadow(final CircleOfProtectionShadow card) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ public final class CircleOfProtectionWhite extends CardImpl {
|
||||||
|
|
||||||
// {1}: The next time a white source of your choice would deal damage to you this turn, prevent that damage.
|
// {1}: The next time a white source of your choice would deal damage to you this turn, prevent that damage.
|
||||||
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{1}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private CircleOfProtectionWhite(final CircleOfProtectionWhite card) {
|
private CircleOfProtectionWhite(final CircleOfProtectionWhite card) {
|
||||||
|
|
|
@ -41,7 +41,7 @@ public final class Conviction extends CardImpl {
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 3, Duration.WhileOnBattlefield)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 3, Duration.WhileOnBattlefield)));
|
||||||
|
|
||||||
// {W}: Return Conviction to its owner's hand.
|
// {W}: Return Conviction to its owner's hand.
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("W")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl<>("{W}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Conviction(final Conviction card) {
|
private Conviction(final Conviction card) {
|
||||||
|
|
|
@ -31,7 +31,7 @@ public final class DungeonShade extends CardImpl {
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// {B}: Dungeon Shade gets +1/+1 until end of turn.
|
// {B}: Dungeon 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}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private DungeonShade(final DungeonShade card) {
|
private DungeonShade(final DungeonShade card) {
|
||||||
|
|
|
@ -24,7 +24,7 @@ public final class ElementalAugury extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{B}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{B}{R}");
|
||||||
|
|
||||||
// {3}: Look at the top three cards of target player's library, then put them back in any order.
|
// {3}: Look at the top three cards of target player's library, then put them back in any order.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ElementalAuguryEffect(), new ManaCostsImpl("3"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ElementalAuguryEffect(), new ManaCostsImpl<>("{3}"));
|
||||||
ability.addTarget(new TargetPlayer());
|
ability.addTarget(new TargetPlayer());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ public final class FlowstoneBlade extends CardImpl {
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// {R}: Enchanted creature gets +1/-1 until end of turn.
|
// {R}: Enchanted creature gets +1/-1 until end of turn.
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl("R")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl<>("{R}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private FlowstoneBlade(final FlowstoneBlade card) {
|
private FlowstoneBlade(final FlowstoneBlade card) {
|
||||||
|
|
|
@ -30,7 +30,7 @@ public final class GaeasWill extends CardImpl {
|
||||||
this.color.setGreen(true);
|
this.color.setGreen(true);
|
||||||
|
|
||||||
// Suspend 4—{G}
|
// Suspend 4—{G}
|
||||||
this.addAbility(new SuspendAbility(4, new ManaCostsImpl<>("G"), this));
|
this.addAbility(new SuspendAbility(4, new ManaCostsImpl<>("{G}"), this));
|
||||||
|
|
||||||
// Until end of turn, you may play land cards and cast spells from your graveyard.
|
// Until end of turn, you may play land cards and cast spells from your graveyard.
|
||||||
this.getSpellAbility().addEffect(new GaeasWillGraveyardEffect());
|
this.getSpellAbility().addEffect(new GaeasWillGraveyardEffect());
|
||||||
|
|
|
@ -25,7 +25,7 @@ public final class GnarledEffigy extends CardImpl {
|
||||||
// {4}, {tap}: Put a -1/-1 counter on target creature.
|
// {4}, {tap}: Put a -1/-1 counter on target creature.
|
||||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||||
new AddCountersTargetEffect(CounterType.M1M1.createInstance()),
|
new AddCountersTargetEffect(CounterType.M1M1.createInstance()),
|
||||||
new ManaCostsImpl("4"));
|
new ManaCostsImpl<>("{4}"));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
@ -50,7 +50,7 @@ public final class Imprison extends CardImpl {
|
||||||
this.addAbility(new ImprisonTriggeredAbility());
|
this.addAbility(new ImprisonTriggeredAbility());
|
||||||
|
|
||||||
// Whenever enchanted creature attacks or blocks, you may pay {1}. If you do, tap the creature, remove it from combat, and creatures it was blocking that had become blocked by only that creature this combat become unblocked. If you don't, destroy Imprison.
|
// Whenever enchanted creature attacks or blocks, you may pay {1}. If you do, tap the creature, remove it from combat, and creatures it was blocking that had become blocked by only that creature this combat become unblocked. If you don't, destroy Imprison.
|
||||||
this.addAbility(new AttacksOrBlocksAttachedTriggeredAbility(new DoIfCostPaid(new ImprisonUnblockEffect(), new DestroySourceEffect(), new ManaCostsImpl("1")), AttachmentType.AURA));
|
this.addAbility(new AttacksOrBlocksAttachedTriggeredAbility(new DoIfCostPaid(new ImprisonUnblockEffect(), new DestroySourceEffect(), new ManaCostsImpl<>("{1}")), AttachmentType.AURA));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Imprison(final Imprison card) {
|
private Imprison(final Imprison card) {
|
||||||
|
@ -66,7 +66,7 @@ public final class Imprison extends CardImpl {
|
||||||
class ImprisonTriggeredAbility extends TriggeredAbilityImpl {
|
class ImprisonTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
ImprisonTriggeredAbility() {
|
ImprisonTriggeredAbility() {
|
||||||
super(Zone.BATTLEFIELD, new DoIfCostPaid(new CounterTargetEffect().setText("counter that ability"), new DestroySourceEffect(), new ManaCostsImpl("1")));
|
super(Zone.BATTLEFIELD, new DoIfCostPaid(new CounterTargetEffect().setText("counter that ability"), new DestroySourceEffect(), new ManaCostsImpl<>("{1}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
ImprisonTriggeredAbility(final ImprisonTriggeredAbility ability) {
|
ImprisonTriggeredAbility(final ImprisonTriggeredAbility ability) {
|
||||||
|
|
|
@ -58,7 +58,7 @@ public final class JabbaTheHutt extends CardImpl {
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// {R},{T}: Create a tapped 4/4 red Hunter creature token. It fights another target creature an opponent control with a bounty counter on it. Activate this ability only any time you could cast a sorcery.
|
// {R},{T}: Create a tapped 4/4 red Hunter creature token. It fights another target creature an opponent control with a bounty counter on it. Activate this ability only any time you could cast a sorcery.
|
||||||
ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new JabbaTheHuttEffect(), new ManaCostsImpl("R"));
|
ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new JabbaTheHuttEffect(), new ManaCostsImpl<>("{R}"));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addTarget(new TargetOpponentsCreaturePermanent(filter));
|
ability.addTarget(new TargetOpponentsCreaturePermanent(filter));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
@ -30,7 +30,7 @@ public final class KillerWhale extends CardImpl {
|
||||||
this.addAbility(new SimpleActivatedAbility(
|
this.addAbility(new SimpleActivatedAbility(
|
||||||
Zone.BATTLEFIELD,
|
Zone.BATTLEFIELD,
|
||||||
new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn),
|
new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn),
|
||||||
new ManaCostsImpl("U")));
|
new ManaCostsImpl<>("{U}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private KillerWhale(final KillerWhale card) {
|
private KillerWhale(final KillerWhale card) {
|
||||||
|
|
|
@ -17,7 +17,7 @@ import mage.constants.TargetController;
|
||||||
public final class RuinCrab extends CardImpl {
|
public final class RuinCrab extends CardImpl {
|
||||||
|
|
||||||
public RuinCrab(UUID ownerId, CardSetInfo setInfo) {
|
public RuinCrab(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "U");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}");
|
||||||
|
|
||||||
this.subtype.add(SubType.CRAB);
|
this.subtype.add(SubType.CRAB);
|
||||||
this.power = new MageInt(0);
|
this.power = new MageInt(0);
|
||||||
|
|
|
@ -31,7 +31,7 @@ public final class RuneOfProtectionArtifacts extends CardImpl {
|
||||||
|
|
||||||
// {W}: The next time an artifact source of your choice would deal damage to you this turn, prevent that damage.
|
// {W}: The next time an artifact source of your choice would deal damage to you this turn, prevent that damage.
|
||||||
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("W")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{W}")));
|
||||||
// Cycling {2} ({2}, Discard this card: Draw a card.)
|
// Cycling {2} ({2}, Discard this card: Draw a card.)
|
||||||
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public final class RuneOfProtectionBlack extends CardImpl {
|
||||||
|
|
||||||
// {W}: The next time a black source of your choice would deal damage to you this turn, prevent that damage.
|
// {W}: The next time a black source of your choice would deal damage to you this turn, prevent that damage.
|
||||||
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("W")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{W}")));
|
||||||
// Cycling {2} ({2}, Discard this card: Draw a card.)
|
// Cycling {2} ({2}, Discard this card: Draw a card.)
|
||||||
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public final class RuneOfProtectionBlue extends CardImpl {
|
||||||
|
|
||||||
// {W}: The next time a blue source of your choice would deal damage to you this turn, prevent that damage.
|
// {W}: The next time a blue source of your choice would deal damage to you this turn, prevent that damage.
|
||||||
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("W")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{W}")));
|
||||||
// Cycling {2} ({2}, Discard this card: Draw a card.)
|
// Cycling {2} ({2}, Discard this card: Draw a card.)
|
||||||
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public final class RuneOfProtectionGreen extends CardImpl {
|
||||||
|
|
||||||
// {W}: The next time a green source of your choice would deal damage to you this turn, prevent that damage.
|
// {W}: The next time a green source of your choice would deal damage to you this turn, prevent that damage.
|
||||||
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("W")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{W}")));
|
||||||
// Cycling {2} ({2}, Discard this card: Draw a card.)
|
// Cycling {2} ({2}, Discard this card: Draw a card.)
|
||||||
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public final class RuneOfProtectionLands extends CardImpl {
|
||||||
|
|
||||||
// {W}: The next time a land source of your choice would deal damage to you this turn, prevent that damage.
|
// {W}: The next time a land source of your choice would deal damage to you this turn, prevent that damage.
|
||||||
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("W")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{W}")));
|
||||||
// Cycling {2} ({2}, Discard this card: Draw a card.)
|
// Cycling {2} ({2}, Discard this card: Draw a card.)
|
||||||
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public final class RuneOfProtectionRed extends CardImpl {
|
||||||
|
|
||||||
// {W}: The next time a red source of your choice would deal damage to you this turn, prevent that damage.
|
// {W}: The next time a red source of your choice would deal damage to you this turn, prevent that damage.
|
||||||
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("W")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{W}")));
|
||||||
// Cycling {2} ({2}, Discard this card: Draw a card.)
|
// Cycling {2} ({2}, Discard this card: Draw a card.)
|
||||||
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public final class RuneOfProtectionWhite extends CardImpl {
|
||||||
|
|
||||||
// {W}: The next time a white source of your choice would deal damage to you this turn, prevent that damage.
|
// {W}: The next time a white source of your choice would deal damage to you this turn, prevent that damage.
|
||||||
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("W")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{W}")));
|
||||||
// Cycling {2} ({2}, Discard this card: Draw a card.)
|
// Cycling {2} ({2}, Discard this card: Draw a card.)
|
||||||
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ public final class Soothsaying extends CardImpl {
|
||||||
// {X}: Look at the top X cards of your library, then put them back in any order.
|
// {X}: Look at the top X cards of your library, then put them back in any order.
|
||||||
Effect effect = new LookLibraryControllerEffect(ManacostVariableValue.REGULAR);
|
Effect effect = new LookLibraryControllerEffect(ManacostVariableValue.REGULAR);
|
||||||
effect.setText("Look at the top X cards of your library, then put them back in any order");
|
effect.setText("Look at the top X cards of your library, then put them back in any order");
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("X")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{X}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Soothsaying(final Soothsaying card) {
|
private Soothsaying(final Soothsaying card) {
|
||||||
|
|
|
@ -92,7 +92,7 @@ class ThelonsCurseEffect extends OneShotEffect {
|
||||||
while (player.canRespond() && countBattlefield > 0 && player.chooseUse(Outcome.AIDontUseIt, "Pay {U} and untap a tapped blue creature under your control?", source, game)) {
|
while (player.canRespond() && countBattlefield > 0 && player.chooseUse(Outcome.AIDontUseIt, "Pay {U} and untap a tapped blue creature under your control?", source, game)) {
|
||||||
Target tappedCreatureTarget = new TargetControlledCreaturePermanent(1, 1, filter, true);
|
Target tappedCreatureTarget = new TargetControlledCreaturePermanent(1, 1, filter, true);
|
||||||
if (player.choose(Outcome.Detriment, tappedCreatureTarget, source.getSourceId(), game)) {
|
if (player.choose(Outcome.Detriment, tappedCreatureTarget, source.getSourceId(), game)) {
|
||||||
Cost cost = new ManaCostsImpl("U");
|
Cost cost = new ManaCostsImpl<>("{U}");
|
||||||
Permanent tappedCreature = game.getPermanent(tappedCreatureTarget.getFirstTarget());
|
Permanent tappedCreature = game.getPermanent(tappedCreatureTarget.getFirstTarget());
|
||||||
|
|
||||||
if (cost.pay(source, game, source, player.getId(), false)) {
|
if (cost.pay(source, game, source, player.getId(), false)) {
|
||||||
|
|
|
@ -40,7 +40,7 @@ public final class Torture extends CardImpl {
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// {1}{B}: Put a -1/-1 counter on enchanted creature.
|
// {1}{B}: Put a -1/-1 counter on enchanted creature.
|
||||||
//this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersAttachedEffect(CounterType.M1M1.createInstance(), rule), new ManaCostsImpl("[1}{B}")));
|
//this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersAttachedEffect(CounterType.M1M1.createInstance(), rule), new ManaCostsImpl<>("{[1}{B}}")));
|
||||||
this.addAbility(new SimpleActivatedAbility(
|
this.addAbility(new SimpleActivatedAbility(
|
||||||
Zone.BATTLEFIELD,
|
Zone.BATTLEFIELD,
|
||||||
new AddCountersAttachedEffect(CounterType.M1M1.createInstance(),"enchanted creature"),
|
new AddCountersAttachedEffect(CounterType.M1M1.createInstance(),"enchanted creature"),
|
||||||
|
|
|
@ -23,7 +23,7 @@ public final class TripNoose extends CardImpl {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
|
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
|
||||||
|
|
||||||
// {2}, {tap}: Tap target creature.
|
// {2}, {tap}: Tap target creature.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl("2"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl<>("{2}"));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
@ -41,7 +41,7 @@ public final class WallOfMulch extends CardImpl {
|
||||||
// Defender
|
// Defender
|
||||||
this.addAbility(DefenderAbility.getInstance());
|
this.addAbility(DefenderAbility.getInstance());
|
||||||
// {G}, Sacrifice a Wall: Draw a card.
|
// {G}, Sacrifice a Wall: Draw a card.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl("G"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{G}"));
|
||||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
|
|
@ -231,7 +231,7 @@ public class TargetPriorityTest extends CardTestPlayerBaseAI {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test_targetAmount_NormalCase() {
|
public void test_targetAmount_NormalCase() {
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.ALL, new DamageMultiEffect(3), new ManaCostsImpl("R"));
|
Ability ability = new SimpleActivatedAbility(Zone.ALL, new DamageMultiEffect(3), new ManaCostsImpl<>("{R}"));
|
||||||
ability.addTarget(new TargetCreaturePermanentAmount(3));
|
ability.addTarget(new TargetCreaturePermanentAmount(3));
|
||||||
addCustomCardWithAbility("damage 3", playerA, ability);
|
addCustomCardWithAbility("damage 3", playerA, ability);
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||||
|
@ -258,7 +258,7 @@ public class TargetPriorityTest extends CardTestPlayerBaseAI {
|
||||||
@Test
|
@Test
|
||||||
public void test_targetAmount_BadCase() {
|
public void test_targetAmount_BadCase() {
|
||||||
// choose targets as enters battlefield (e.g. can't be canceled)
|
// choose targets as enters battlefield (e.g. can't be canceled)
|
||||||
SpellAbility spell = new SpellAbility(new ManaCostsImpl("R"), "damage 3", Zone.HAND);
|
SpellAbility spell = new SpellAbility(new ManaCostsImpl<>("{R}"), "damage 3", Zone.HAND);
|
||||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DamageMultiEffect(3));
|
Ability ability = new EntersBattlefieldTriggeredAbility(new DamageMultiEffect(3));
|
||||||
ability.addTarget(new TargetCreaturePermanentAmount(3));
|
ability.addTarget(new TargetCreaturePermanentAmount(3));
|
||||||
addCustomCardWithSpell(playerA, spell, ability, CardType.ENCHANTMENT);
|
addCustomCardWithSpell(playerA, spell, ability, CardType.ENCHANTMENT);
|
||||||
|
@ -293,7 +293,7 @@ public class TargetPriorityTest extends CardTestPlayerBaseAI {
|
||||||
public void test_targetAmount_Performance() {
|
public void test_targetAmount_Performance() {
|
||||||
int cardsMultiplier = 3;
|
int cardsMultiplier = 3;
|
||||||
|
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.ALL, new DamageMultiEffect(3), new ManaCostsImpl("R"));
|
Ability ability = new SimpleActivatedAbility(Zone.ALL, new DamageMultiEffect(3), new ManaCostsImpl<>("{R}"));
|
||||||
ability.addTarget(new TargetCreaturePermanentAmount(3));
|
ability.addTarget(new TargetCreaturePermanentAmount(3));
|
||||||
addCustomCardWithAbility("damage 3", playerA, ability);
|
addCustomCardWithAbility("damage 3", playerA, ability);
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class CommanderAffinityTest extends CardTestCommanderDuelBase {
|
||||||
public void test_Gained_Affinity() {
|
public void test_Gained_Affinity() {
|
||||||
// bug: Mycosynth Golem did not allow my commander, Karn, Silver Golem, to cost 0 even though I had 7+ artifacts on the board.
|
// bug: Mycosynth Golem did not allow my commander, Karn, Silver Golem, to cost 0 even though I had 7+ artifacts on the board.
|
||||||
|
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.ALL, new CreateTokenEffect(new ArtifactWallToken(), 7), new ManaCostsImpl("R"));
|
Ability ability = new SimpleActivatedAbility(Zone.ALL, new CreateTokenEffect(new ArtifactWallToken(), 7), new ManaCostsImpl<>("{R}"));
|
||||||
addCustomCardWithAbility("generate tokens", playerA, ability);
|
addCustomCardWithAbility("generate tokens", playerA, ability);
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||||
//
|
//
|
||||||
|
|
|
@ -439,8 +439,8 @@ public class ManaCostsImpl<T extends ManaCost> extends ArrayList<T> implements M
|
||||||
if (mana == null || mana.isEmpty()) {
|
if (mana == null || mana.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mana.startsWith("{") != mana.endsWith("}")) {
|
if (!mana.startsWith("{") || !mana.endsWith("}")) {
|
||||||
throw new IllegalArgumentException("mana costs should be surrounded by braces on both sides or not at all");
|
throw new IllegalArgumentException("mana costs should start and end with braces");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!extractMonoHybridGenericValue && costsCache.containsKey(mana)) {
|
if (!extractMonoHybridGenericValue && costsCache.containsKey(mana)) {
|
||||||
|
|
Loading…
Reference in a new issue