public Caltrops(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); // Whenever a creature attacks, Caltrops deals 1 damage to it. Effect effect = new DamageTargetEffect(1); effect.setText("{this} deals 1 damage to it"); this.addAbility(new AttacksAllTriggeredAbility(effect, false, StaticFilters.FILTER_PERMANENT_CREATURE, SetTargetPointer.PERMANENT, false)); }
public BriarPatch(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}{G}"); // Whenever a creature attacks you, it gets -1/-0 until end of turn. Effect effect = new BoostTargetEffect(-1, 0, Duration.EndOfTurn); effect.setText("it gets -1/-0"); Ability ability = new AttackedByCreatureTriggeredAbility(Zone.BATTLEFIELD, effect, false, SetTargetPointer.PERMANENT); addAbility(ability); }
public DistortingWake(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{U}{U}{U}"); // Return X target nonland permanents to their owners' hands. Effect effect = new ReturnToHandTargetEffect(); effect.setText("Return X target nonland permanents to their owners' hands"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().setTargetAdjuster(DistortingWakeAdjuster.instance); }
public Disallow(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}{U}"); // Counter target spell, activated ability, or triggered ability. Effect effect = new CounterTargetEffect(); effect.setText("Counter target spell, activated ability, or triggered ability"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetStackObject()); }
public BerserkMurlodont(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); // Whenever a Beast becomes blocked, it gets +1/+1 until end of turn for each creature blocking it. BlockedCreatureCount value = new BlockedCreatureCount(); Effect effect = new BoostSourceEffect(value, value, Duration.EndOfTurn, true); effect.setText("it gets +1/+1 until end of turn for each creature blocking it"); this.addAbility(new BecomesBlockedAllTriggeredAbility(effect, false, filter, false)); }
public CallTheScions(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}"); // Devoid this.addAbility(new DevoidAbility(this.color)); // Create two 1/1 colorless Eldrazi Scion creature tokens. They have "Sacrifice this creature: add {C}." Effect effect = new CreateTokenEffect(new EldraziScionToken(), 2); effect.setText("create two 1/1 colorless Eldrazi Scion creature tokens. They have \"Sacrifice this creature: Add {C}.\""); this.getSpellAbility().addEffect(effect); }
public BearerOfTheHeavens(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{7}{R}"); this.subtype.add(SubType.GIANT); this.power = new MageInt(10); this.toughness = new MageInt(10); // When Bearer of the Heavens dies, destroy all permanents at the beginning of the next end step. DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new DestroyAllEffect(StaticFilters.FILTER_PERMANENT)); Effect effect = new CreateDelayedTriggeredAbilityEffect(delayedAbility); effect.setText("destroy all permanents at the beginning of the next end step"); this.addAbility(new DiesTriggeredAbility(effect, false)); }
public DivineOffering(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); // Destroy target artifact. You gain life equal to its converted mana cost. this.getSpellAbility().addEffect(new DestroyTargetEffect()); Effect effect = new GainLifeEffect(TargetConvertedManaCost.instance); effect.setText("You gain life equal to its converted mana cost"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetArtifactPermanent()); }
public ChandraTorchOfDefianceEmblem() { this.setName("Emblem Chandra"); Effect effect = new DamageTargetEffect(5); effect.setText("this emblem deals 5 damage to any target"); Ability ability = new SpellCastControllerTriggeredAbility(Zone.COMMAND, effect, new FilterSpell("a spell"), false, false); ability.addTarget(new TargetAnyTarget()); getAbilities().add(ability); } }
public ChandrasOutrage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}{R}"); // Chandra's Outrage deals 4 damage to target creature and 2 damage to that creature's controller. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); Effect effect = new DamageTargetControllerEffect(2); effect.setText("and 2 damage to that creature's controller"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); }
public CoordinatedAssault(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); // Up to two target creatures each get +1/+0 and gain first strike until end of turn. Effect effect = new BoostTargetEffect(1,0, Duration.EndOfTurn); effect.setText("Up to two target creatures each get +1/+0"); this.getSpellAbility().addEffect(effect); effect = new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, "and gain first strike until end of turn"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent(0,2)); }
public BottledCloister(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); // At the beginning of each opponent's upkeep, exile all cards from your hand face down. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new BottledCloisterExileEffect(), TargetController.OPPONENT, false)); // At the beginning of your upkeep, return all cards you own exiled with Bottled Cloister to your hand, then draw a card. Ability ability = new BeginningOfUpkeepTriggeredAbility(new BottledCloisterReturnEffect(), TargetController.YOU, false); Effect effect = new DrawCardSourceControllerEffect(1); effect.setText(", then draw a card"); ability.addEffect(effect); this.addAbility(ability); }
public CeruleanSphinx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); this.subtype.add(SubType.SPHINX); this.power = new MageInt(5); this.toughness = new MageInt(5); // Flying this.addAbility(FlyingAbility.getInstance()); // {U}: Cerulean Sphinx's owner shuffles it into their library. Effect effect = new ShuffleIntoLibrarySourceEffect(); effect.setText("{this}'s owner shuffles it into their library."); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{U}"))); }
public BreakThroughTheLine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); // {R}: Target creature with power 2 or less gains haste until end of turn and can't be blocked this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{R}")); Effect effect = new CantBeBlockedTargetEffect(Duration.EndOfTurn); effect.setText("and can't be blocked this turn"); ability.addEffect(effect); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); }
public Cloudform(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}{U}"); // When Cloudform enters the battlefield, it becomes an Aura with enchant creature. Manifest the top card of your library and attach Cloudform to it. this.addAbility(new EntersBattlefieldTriggeredAbility(new BecomesAuraAttachToManifestSourceEffect())); // Enchanted creature has flying and hexproof. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield)); Effect effect = new GainAbilityAttachedEffect(HexproofAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield); effect.setText("and hexproof"); ability.addEffect(effect); this.addAbility(ability); }
public EliminateTheCompetition(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}"); // As an additional cost to cast Eliminate the Competition, sacrifice X creatures. this.getSpellAbility().addCost(new SacrificeXTargetCost(new FilterControlledCreaturePermanent("creatures"), true)); // Destroy X target creatures. Effect effect = new DestroyTargetEffect(); effect.setText("Destroy X target creatures"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().setTargetAdjuster(EliminateTheCompetitionAdjuster.instance); }
public CallForUnity(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}{W}"); // <i>Revolt</i> — At the beginning of your end step, if a permanent you controlled left the battlefield this turn, put a unity counter on Call for Unity. TriggeredAbility ability = new BeginningOfYourEndStepTriggeredAbility(new AddCountersSourceEffect(CounterType.UNITY.createInstance(), true), false); this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, RevoltCondition.instance, ruleText), new RevoltWatcher()); // Creatures you control get +1/+1 for each unity counter on Call for Unity. Effect effect = new BoostControlledEffect(new CountersSourceCount(CounterType.UNITY), new CountersSourceCount(CounterType.UNITY), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE, false); effect.setText("Creatures you control get +1/+1 for each unity counter on {this}"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); }
public DrownInFilth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{B}{G}"); // Choose target creature. Put the top four cards of your library into your graveyard, then that creature gets -1/-1 until end of turn for each land card in your graveyard. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); Effect effect = new PutTopCardOfLibraryIntoGraveControllerEffect(4); effect.setText("Choose target creature. Put the top four cards of your library into your graveyard"); this.getSpellAbility().addEffect(effect); DynamicValue landCards = new SignInversionDynamicValue(new CardsInControllerGraveyardCount(new FilterLandCard())); this.getSpellAbility().addEffect(new BoostTargetEffect(landCards, landCards, Duration.EndOfTurn)); }
public DownhillCharge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); // You may sacrifice a Mountain rather than pay Downhill Charge's mana cost. this.addAbility(new AlternativeCostSourceAbility(new SacrificeTargetCost(new TargetControlledPermanent(filter)))); // Target creature gets +X/+0 until end of turn, where X is the number of Mountains you control. Effect effect = new BoostTargetEffect(new PermanentsOnBattlefieldCount(filter), new StaticValue(0), Duration.EndOfTurn, true); effect.setText("Target creature gets +X/+0 until end of turn, where X is the number of Mountains you control."); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); }
public DragonMask(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); // {3}, {tap}: Target creature you control gets +2/+2 until end of turn. Return it to its owner's hand at the beginning of the next end step. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 2, Duration.EndOfTurn), new GenericManaCost(3)); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetControlledCreaturePermanent()); Effect returnEffect = new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnToHandTargetEffect())); returnEffect.setText("Return it to its owner's hand at the beginning of the next end step"); ability.addEffect(returnEffect); this.addAbility(ability); }