public MassAppeal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{U}"); // Draw a card for each Human you control. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(filter))); }
@Override public ManaCosts getManaCostToPay(GameEvent event, Ability source, Game game) { Permanent sourceObject = game.getPermanent(source.getSourceId()); if (sourceObject != null) { int payment = new PermanentsOnBattlefieldCount(filter).calculate(game, source, this); if (payment > 0) { return new ManaCostsImpl<>("{" + payment + '}'); } } return null; }
public PowerstoneShard(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); // {T}: Add {C} for each artifact you control named Powerstone Shard. this.addAbility(new DynamicManaAbility(Mana.ColorlessMana(1), new PermanentsOnBattlefieldCount(filter))); }
@Override public boolean apply(Game game, Ability source) { int islandCount = new PermanentsOnBattlefieldCount(filter2).calculate(game, source, this); islandCount = Math.floorDiv(islandCount, 2); return new DamageAllEffect(islandCount, filter).apply(game, source); } }
public ThroneOfTheGodPharaoh(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); addSuperType(SuperType.LEGENDARY); // At the beginning of your end step, each opponent loses life equal to the number of tapped creatures you control. this.addAbility(new BeginningOfEndStepTriggeredAbility(new LoseLifeOpponentsEffect(new PermanentsOnBattlefieldCount(filter)), TargetController.YOU, false)); }
@Override public boolean apply(Game game, Ability source) { Permanent creature = game.getPermanent(source.getFirstTarget()); if (creature == null || creature.getPower().getValue() > new PermanentsOnBattlefieldCount(filter).calculate(game, source, this)) { return false; } return new ReturnToHandTargetEffect().apply(game, source); } }
public YavimayaKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}"); this.subtype.add(SubType.KAVU); this.power = new MageInt(0); this.toughness = new MageInt(0); // Yavimaya Kavu's power is equal to the number of red creatures on the battlefield. this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerSourceEffect(new PermanentsOnBattlefieldCount(filterRedCreature), Duration.EndOfGame))); // Yavimaya Kavu's toughness is equal to the number of green creatures on the battlefield. this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetToughnessSourceEffect(new PermanentsOnBattlefieldCount(filterGreenCreature), Duration.EndOfGame))); }
public HondenOfCleansingFire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.SHRINE); // At the beginning of your upkeep, you gain 2 life for each Shrine you control. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter, 2)), TargetController.YOU, false)); }
public TreefolkSeedlings(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(2); this.toughness = new MageInt(0); // Treefolk Seedlings's toughness is equal to the number of Forests you control. this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetToughnessSourceEffect(new PermanentsOnBattlefieldCount(filterLands), Duration.EndOfGame))); }
public DakmorSorceress(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(4); // Dakmor Sorceress's power is equal to the number of Swamps you control. this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.EndOfGame))); }
public DragonscaleGeneral(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); // At the beginning of your end step, bolster X, where X is the number of tapped creatures you control. this.addAbility(new BeginningOfEndStepTriggeredAbility(new BolsterEffect(new PermanentsOnBattlefieldCount(filter)), TargetController.YOU, false)); }
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 ArmorcraftJudge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); this.subtype.add(SubType.ELF); this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(3); this.toughness = new MageInt(3); // When Armorcraft Judge enters the battlefield, draw a card for each creature you control with a +1/+1 counter on it. this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(filter)))); }
public HondenOfNightsReach(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.SHRINE); // At the beginning of your upkeep, target opponent discards a card for each Shrine you control. Ability ability = new BeginningOfUpkeepTriggeredAbility(new DiscardTargetEffect(new PermanentsOnBattlefieldCount(filter)), TargetController.YOU, false); ability.addTarget(new TargetOpponent()); this.addAbility(ability); }
public ConfrontTheUnknown(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); // Investigate, then target creature gets +1/+1 until end of turn for each Clue you control. Effect effect = new InvestigateEffect(); effect.setText("Investigate"); getSpellAbility().addEffect(effect); effect = new BoostTargetEffect(new PermanentsOnBattlefieldCount(filter), new PermanentsOnBattlefieldCount(filter), Duration.EndOfTurn, true); effect.setText(", then target creature gets +1/+1 until end of turn for each Clue you control. <i>(To investigate, " + "create a colorless Clue artifact token with \"{2}, Sacrifice this artifact: Draw a card.\")</i>"); getSpellAbility().addEffect(effect); getSpellAbility().addTarget(new TargetCreaturePermanent()); }
public GoldnightRedeemer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); this.addAbility(FlyingAbility.getInstance()); // When Goldnight Redeemer enters the battlefield, you gain 2 life for each other creature you control. this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter, 2)), false)); }
public RiotControl(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}"); // Gain 1 life for each creature your opponents control. Prevent all damage that would be dealt to you this turn. this.getSpellAbility().addEffect(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter))); this.getSpellAbility().addEffect(new PreventDamageToControllerEffect(Duration.EndOfTurn)); }
public ElvishPromenade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.SORCERY},"{3}{G}"); this.subtype.add(SubType.ELF); this.getSpellAbility().addEffect(new CreateTokenEffect(new ElfToken(), new PermanentsOnBattlefieldCount(filter))); }
public Wellwisher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); // {tap}: You gain 1 life for each Elf on the battlefield. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(new PermanentsOnBattlefieldCount(filter)), new TapSourceCost())); }
public KrovikanMist(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); this.subtype.add(SubType.ILLUSION); this.power = new MageInt(0); this.toughness = new MageInt(0); // Flying this.addAbility(FlyingAbility.getInstance()); // Krovikan Mist's power and toughness are each equal to the number of Illusions on the battlefield. this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(illusionsFilter), Duration.EndOfGame))); }