@Override public CardsInAllGraveyardsCount copy() { return new CardsInAllGraveyardsCount(this); }
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 Magnivore(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); this.subtype.add(SubType.LHURGOYF); this.power = new MageInt(0); this.toughness = new MageInt(0); // Haste this.addAbility(HasteAbility.getInstance()); // Magnivore's power and toughness are each equal to the number of sorcery cards in all graveyards. this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CardsInAllGraveyardsCount(filter), Duration.EndOfGame))); }
public InvigoratingFalls(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}{G}"); // You gain life equal to the number of creature cards in all graveyards. Effect effect = new GainLifeEffect(new CardsInAllGraveyardsCount(new FilterCreatureCard())); effect.setText("You gain life equal to the number of creature cards in all graveyards."); this.getSpellAbility().addEffect(effect); }
@Override public boolean applies(Ability abilityToModify, Ability source, Game game) { return abilityToModify.getSourceId().equals(source.getSourceId()) && (abilityToModify instanceof SpellAbility) && new CardsInAllGraveyardsCount(new FilterCreatureCard()).calculate(game, source, this) >= 10; }
public AccumulatedKnowledge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); // Draw a card, then draw cards equal to the number of cards named Accumulated Knowledge in all graveyards. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); Effect effect = new DrawCardSourceControllerEffect(new CardsInAllGraveyardsCount(filter)); effect.setText(", then draw cards equal to the number of cards named {source} in all graveyards"); this.getSpellAbility().addEffect(effect); }
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 SlagFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(0); this.toughness = new MageInt(0); this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CardsInAllGraveyardsCount(new FilterArtifactCard("artifacts")), Duration.EndOfGame))); }
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 LifeBurst(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); // Target player gains 4 life, then gains 4 life for each card named Life Burst in each graveyard. this.getSpellAbility().addEffect(new GainLifeTargetEffect(4)); Effect effect = new GainLifeTargetEffect(new MultipliedValue(new CardsInAllGraveyardsCount(filter), 4)); effect.setText(", then gains 4 life for each card named {source} in each graveyard"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetPlayer()); }
public Terravore(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); this.subtype.add(SubType.LHURGOYF); this.power = new MageInt(0); this.toughness = new MageInt(0); // Trample this.addAbility(TrampleAbility.getInstance()); // Terravore's power and toughness are each equal to the number of land cards in all graveyards. this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect( new CardsInAllGraveyardsCount(new FilterLandCard("land cards")), Duration.EndOfGame))); }
public Mortivore(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); this.subtype.add(SubType.LHURGOYF); this.power = new MageInt(0); this.toughness = new MageInt(0); this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CardsInAllGraveyardsCount(new FilterCreatureCard("creature cards")), Duration.EndOfGame))); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ColoredManaCost(ColoredManaSymbol.B))); }
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 UndergrowthScavenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); this.subtype.add(SubType.FUNGUS); this.subtype.add(SubType.HORROR); this.power = new MageInt(0); this.toughness = new MageInt(0); // Undergrowth Scavenger enters the battlefield with a number of +1/+1 counters on it equal to the number of creature cards in all graveyards. Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new CardsInAllGraveyardsCount(new FilterCreatureCard()), true); effect.setText("with a number of +1/+1 counters on it equal to the number of creature cards in all graveyards"); this.addAbility(new EntersBattlefieldAbility(effect)); }
public SoundTheCallToken() { super("Wolf", "1/1 green Wolf creature token. It has \"This creature gets +1/+1 for each card named Sound the Call in each graveyard.\""); cardType.add(CardType.CREATURE); color.setGreen(true); subtype.add(SubType.WOLF); power = new MageInt(1); toughness = new MageInt(1); DynamicValue value = new CardsInAllGraveyardsCount(filter); this.addAbility(new SimpleStaticAbility( Zone.BATTLEFIELD, new BoostSourceEffect(value, value, Duration.WhileOnBattlefield) .setText("This creature gets +1/+1 for each card named Sound the Call in each graveyard.") )); }
public AcademyElite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(0); // Academy Elite enters the battlefield with X +1/+1 counters on it, where X is the number of instant and // sorcery cards in all graveyards. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(), new CardsInAllGraveyardsCount(new FilterInstantOrSorceryCard()), false), "with X +1/+1 counters on it, where X is the number of instant and sorcery cards in all graveyards")); // {2}{U}, Remove a +1/+1 counter from Academy Elite: Draw a card, then discard a card. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawDiscardControllerEffect(1, 1, false), new ManaCostsImpl("{2}{U}")); ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1))); this.addAbility(ability); }
public Cantivore(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); this.subtype.add(SubType.LHURGOYF); this.power = new MageInt(0); this.toughness = new MageInt(0); // Vigilance this.addAbility(VigilanceAbility.getInstance()); // Cantivore's power and toughness are each equal to the number of enchantment cards in all graveyards. DynamicValue value = (new CardsInAllGraveyardsCount(filter)); this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value , Duration.EndOfGame))); }
public Cognivore(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{U}{U}"); this.subtype.add(SubType.LHURGOYF); this.power = new MageInt(0); this.toughness = new MageInt(0); // Flying this.addAbility(FlyingAbility.getInstance()); // Cognivore's power and toughness are each equal to the number of instant cards in all graveyards. DynamicValue value = (new CardsInAllGraveyardsCount(filter)); this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value, Duration.EndOfGame))); }
public Bonehoard(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); this.subtype.add(SubType.EQUIPMENT); // Living weapon (When this Equipment enters the battlefield, create a 0/0 black Germ creature token, then attach this to it.) this.addAbility(new LivingWeaponAbility()); // Equipped creature gets +X/+X, where X is the number of creature cards in all graveyards. CardsInAllGraveyardsCount value = new CardsInAllGraveyardsCount(new FilterCreatureCard()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(value, value))); // Equip {2} this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2))); }
public ExoskeletalArmor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature gets +X/+X, where X is the number of creature cards in all graveyards. CardsInAllGraveyardsCount count = new CardsInAllGraveyardsCount(new FilterCreatureCard()); Effect effect = new BoostEnchantedEffect(count, count, Duration.WhileOnBattlefield); effect.setText("Enchanted creature gets +X/+X, where X is the number of creature cards in all graveyards"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); }