@Override public IntPlusDynamicValue copy() { return new IntPlusDynamicValue(this); }
DamiaSageOfStoneTriggeredAbility() { super(new DrawCardSourceControllerEffect(new IntPlusDynamicValue(7, new MultipliedValue(CardsInControllerHandCount.instance, -1))), TargetController.YOU, false); }
public CratersClaws(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}"); // Crater's Claws deals X damage to any target. // <i>Ferocious</i> — Crater's Claws deals X plus 2 damage to that creature or player instead if you control a creature with power 4 or greater. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DamageTargetEffect(new IntPlusDynamicValue(2, ManacostVariableValue.instance)), new DamageTargetEffect(ManacostVariableValue.instance), FerociousCondition.instance, "{this} deals X damage to any target." + "<br><i>Ferocious</i> — {this} deals X plus 2 damage to that permanent or player instead if you control a creature with power 4 or greater")); this.getSpellAbility().addTarget(new TargetAnyTarget()); }
public TheBattleOfGeonosis(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{R}{R}"); // The Battle of Geonosis deals X + 1 damage to each opponent and each creature your opponents control. Effect effect = new DamagePlayersEffect(Outcome.Damage, new IntPlusDynamicValue(1, ManacostVariableValue.instance), TargetController.OPPONENT); effect.setText("The Battle of Geonosis deals X plus 1 damage to each opponent"); this.getSpellAbility().addEffect(effect); effect = new DamageAllEffect(new IntPlusDynamicValue(1, ManacostVariableValue.instance), new FilterOpponentsCreaturePermanent()); effect.setText("and each creature your opponents control"); this.getSpellAbility().addEffect(effect); // Creatures you control get +X/+0 until end of turn. this.getSpellAbility().addEffect(new BoostControlledEffect(ManacostVariableValue.instance, new StaticValue(0), Duration.EndOfTurn)); }
public GaeasAvenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(1); this.toughness = new MageInt(1); // Gaea's Avenger's power and toughness are each equal to 1 plus the number of artifacts your opponents control. SetPowerToughnessSourceEffect effect = new SetPowerToughnessSourceEffect(new IntPlusDynamicValue(1, new PermanentsOnBattlefieldCount(filter)), Duration.EndOfGame); this.addAbility(new SimpleStaticAbility(Zone.ALL, effect)); }
public MeteorShower(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{R}"); // Meteor Shower deals X plus 1 damage divided as you choose among any number of target creatures and/or players. DynamicValue xValue = new IntPlusDynamicValue(1, ManacostVariableValue.instance); this.getSpellAbility().addEffect(new DamageMultiEffect(xValue)); this.getSpellAbility().addTarget(new TargetAnyTargetAmount(xValue)); }
public RuneSnag(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); // Counter target spell unless its controller pays {2} plus an additional {2} for each card named Rune Snag in each graveyard. Effect effect = new CounterUnlessPaysEffect(new IntPlusDynamicValue(2, new MultipliedValue(new CardsInAllGraveyardsCount(filter), 2))); effect.setText("Counter target spell unless its controller pays {2} plus an additional {2} for each card named Rune Snag in each graveyard"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetSpell()); }
public WeldingSparks(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); // Welding Sparks deals X damage to target creature, where X is 3 plus the number of artifacts you control. Effect effect = new DamageTargetEffect(new IntPlusDynamicValue(3, new PermanentsOnBattlefieldCount(new FilterControlledArtifactPermanent("artifacts you control")))); effect.setText("{this} deals X damage to target creature, where X is 3 plus the number of artifacts you control"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); }
public KjeldoranWarCry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); // Creatures you control get +X/+X until end of turn, where X is 1 plus the number of cards named Kjeldoran War Cry in all graveyards. IntPlusDynamicValue value = new IntPlusDynamicValue(1, new CardsInAllGraveyardsCount(filter)); Effect effect = new BoostControlledEffect(value, value, Duration.EndOfTurn, new FilterCreaturePermanent("creatures"), false, true); effect.setText("Creatures you control get +X/+X until end of turn, where X is 1 plus the number of cards named {source} in all graveyards"); this.getSpellAbility().addEffect(effect); }
public MindBurst(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}"); // Target player discards X cards, where X is one plus the number of cards named Mind Burst in all graveyards. DynamicValue numberOfCardsNamedMindBurst = new IntPlusDynamicValue(1, new CardsInAllGraveyardsCount(filter)); Effect effect = new DiscardTargetEffect(numberOfCardsNamedMindBurst); effect.setText("Target player discards X cards, where X is one plus the number of cards named Mind Burst in all graveyards."); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetPlayer()); }
public AysenCrusader(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); // Aysen Crusader's power and toughness are each equal to 2 plus the number of Soldiers and Warriors you control. DynamicValue value = new IntPlusDynamicValue(2, new PermanentsOnBattlefieldCount(filter)); this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value, Duration.EndOfGame))); }
public RedManaBattery(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // {2}, {tap}: Put a charge counter on Red Mana Battery. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.STORAGE.createInstance(1)), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); // {tap}, Remove any number of charge counters from Red Mana Battery: Add {R}, then add an additional {R} for each charge counter removed this way. ability = new DynamicManaAbility( Mana.RedMana(1), new IntPlusDynamicValue(1, RemovedCountersForCostValue.instance), new TapSourceCost(), "Add {R}, then add {R} for each charge counter removed this way", true, new CountersSourceCount(CounterType.CHARGE)); ability.addCost(new RemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance(), "Remove any number of charge counters from {this}")); this.addAbility(ability); }
public BlueManaBattery(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // {2}, {tap}: Put a charge counter on Blue Mana Battery. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.STORAGE.createInstance(1)), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); // {tap}, Remove any number of charge counters from Blue Mana Battery: Add {U}, then add an additional {U} for each charge counter removed this way. ability = new DynamicManaAbility( Mana.BlueMana(1), new IntPlusDynamicValue(1, RemovedCountersForCostValue.instance), new TapSourceCost(), "Add {U}, then add {U} for each charge counter removed this way", true, new CountersSourceCount(CounterType.CHARGE)); ability.addCost(new RemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance(), "Remove any number of charge counters from {this}")); this.addAbility(ability); }
public WhiteManaBattery(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // {2}, {tap}: Put a charge counter on White Mana Battery. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.STORAGE.createInstance(1)), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); // {tap}, Remove any number of charge counters from White Mana Battery: Add {W}, then add an additional {W} for each charge counter removed this way. ability = new DynamicManaAbility( Mana.WhiteMana(1), new IntPlusDynamicValue(1, RemovedCountersForCostValue.instance), new TapSourceCost(), "Add {W}, then add {W} for each charge counter removed this way", true, new CountersSourceCount(CounterType.CHARGE)); ability.addCost(new RemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance(), "Remove any number of charge counters from {this}")); this.addAbility(ability); }
public GreenManaBattery(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // {2}, {tap}: Put a charge counter on Green Mana Battery. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.STORAGE.createInstance(1)), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); // {tap}, Remove any number of charge counters from Green Mana Battery: Add {G}, then add an additional {G} for each charge counter removed this way. ability = new DynamicManaAbility( Mana.GreenMana(1), new IntPlusDynamicValue(1, RemovedCountersForCostValue.instance), new TapSourceCost(), "Add {G}, then add {G} for each charge counter removed this way", true, new CountersSourceCount(CounterType.CHARGE)); ability.addCost(new RemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance(), "Remove any number of charge counters from {this}")); this.addAbility(ability); }
public BlackManaBattery(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // {2}, {tap}: Put a charge counter on Black Mana Battery. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.STORAGE.createInstance(1)), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); // {tap}, Remove any number of charge counters from Black Mana Battery: Add {B}, then add an additional {B} for each charge counter removed this way. ability = new DynamicManaAbility( Mana.BlackMana(1), new IntPlusDynamicValue(1, RemovedCountersForCostValue.instance), new TapSourceCost(), "Add {B}, then add {B} for each charge counter removed this way", true, new CountersSourceCount(CounterType.CHARGE)); ability.addCost(new RemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance(), "Remove any number of charge counters from {this}")); this.addAbility(ability); }
public FeastOfFlesh(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{B}"); // Feast of Flesh deals X damage to target creature and you gain X life, where X is 1 plus the number of cards named Feast of Flesh in all graveyards. IntPlusDynamicValue value = new IntPlusDynamicValue(1, new CardsInAllGraveyardsCount(filter)); Effect effect1 = new DamageTargetEffect(value); effect1.setText("Feast of Flesh deals X damage to target creature"); Effect effect2 = new GainLifeEffect(value); effect2.setText("and you gain X life, where X is 1 plus the number of cards named {source} in all graveyards"); this.getSpellAbility().addEffect(effect1); this.getSpellAbility().addEffect(effect2); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); }
public AllosaurusRider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); this.subtype.add(SubType.ELF); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(0); this.toughness = new MageInt(0); // You may exile two green cards from your hand rather than pay Allosaurus Rider's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(2, filter)))); // Allosaurus Rider's power and toughness are each equal to 1 plus the number of lands you control. DynamicValue onePlusControlledLands = new IntPlusDynamicValue(1, new PermanentsOnBattlefieldCount(new FilterControlledLandPermanent("lands you control"))); this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(onePlusControlledLands, Duration.EndOfGame))); }