public DarkProphecy(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}{B}{B}"); // Whenever a creature you control dies, you draw a card and you lose 1 life. Effect effect = new DrawCardSourceControllerEffect(1, "you"); Ability ability = new DiesCreatureTriggeredAbility(effect, false, filter); effect = new LoseLifeSourceControllerEffect(1); ability.addEffect(effect.concatBy("and")); this.addAbility(ability); }
public BalefulForce(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}{B}"); this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(7); this.toughness = new MageInt(7); // At the beginning of each upkeep, you draw a card and you lose 1 life. Ability ability = new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(1, "you"), TargetController.ANY, false); Effect effect = new LoseLifeSourceControllerEffect(1); ability.addEffect(effect.concatBy("and")); this.addAbility(ability); }
/** * Emblem with "Whenever a creature attacks you, it gets +5/+5 and gains * trample until end of turn." */ public GarrukApexPredatorEmblem() { setName("Emblem Garruk"); Effect effect = new BoostTargetEffect(-1, 0, Duration.EndOfTurn); effect.setText("it gets -1/-0"); Ability ability = new AttackedByCreatureTriggeredAbility(Zone.COMMAND, effect, false, SetTargetPointer.PERMANENT); effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); ability.addEffect(effect.concatBy("and")); this.getAbilities().add(ability); } }
public DuskLegionZealot(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); this.subtype.add(SubType.VAMPIRE); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); // When Dusk Legion Zealot enters the battlefield, you draw a card and you lose 1 life. Effect drawEffect = new DrawCardSourceControllerEffect(1, "you"); Ability ability = new EntersBattlefieldTriggeredAbility(drawEffect); Effect lifeEffect = new LoseLifeSourceControllerEffect(1); ability.addEffect(lifeEffect.concatBy("and")); this.addAbility(ability); }
public FretworkColony(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); // Fretwork Colony can't block. this.addAbility(new CantBlockAbility()); // At the beginning of your upkeep, put a +1/+1 counter on Fretwork Colony and you lose 1 life. Ability ability = new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), TargetController.YOU, false); Effect effect = new LoseLifeSourceControllerEffect(1); ability.addEffect(effect.concatBy("and")); this.addAbility(ability); }
public MetalspinnersPuzzleknot(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); // When Metalspinner's Puzzleknot enters the battlefield, you draw a card and you lose 1 life. Effect drawEffect = new DrawCardSourceControllerEffect(1, "you"); Ability ability = new EntersBattlefieldTriggeredAbility(drawEffect); Effect lifeEffect = new LoseLifeSourceControllerEffect(1); ability.addEffect(lifeEffect.concatBy("and")); this.addAbility(ability); // {2}{B}, Sacrifice Metalspinner's Puzzleknot: You draw a card and you lose 1 life. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, drawEffect, new ManaCostsImpl<>("{2}{B}")); ability.addCost(new SacrificeSourceCost()); ability.addEffect(lifeEffect); this.addAbility(ability); }
public MidnightEntourage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); this.subtype.add(SubType.AETHERBORN); this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(3); // Other Aetherborn you control get +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, true))); // Whenever Midnight Entourage or another Aetherborn you control dies, you draw a card and you lose 1 life. Ability ability = new DiesThisOrAnotherCreatureTriggeredAbility(new DrawCardSourceControllerEffect(1, "you"), false, filter); Effect effect = new LoseLifeSourceControllerEffect(1); ability.addEffect(effect.concatBy("and")); this.addAbility(ability); }
public GlintSleeveSiphoner(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); // Menace this.addAbility(new MenaceAbility()); // Whenever Glint-Sleeve Siphoner enters the battlefield or attacks, you get {E}. this.addAbility(new EntersBattlefieldOrAttacksSourceTriggeredAbility(new GetEnergyCountersControllerEffect(1))); // At the beginning of your upkeep, you may pay {E}{E}. If you do, draw a card and you lose 1 life. DoIfCostPaid doIfCostPaidEffect = new DoIfCostPaid(new DrawCardSourceControllerEffect(1), new PayEnergyCost(2)); Effect effect = new LoseLifeSourceControllerEffect(1); doIfCostPaidEffect.addEffect(effect.concatBy("and")); this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, doIfCostPaidEffect, TargetController.YOU, false, false, "At the beginning of your upkeep, ")); }
public ObNixilisReignited(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{B}{B}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.NIXILIS); this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(5)); // +1: You draw a card and you lose 1 life. Effect effect = new DrawCardSourceControllerEffect(1, "you"); LoyaltyAbility ability1 = new LoyaltyAbility(effect, 1); effect = new LoseLifeSourceControllerEffect(1); ability1.addEffect(effect.concatBy("and")); this.addAbility(ability1); // -3: Destroy target creature. LoyaltyAbility ability2 = new LoyaltyAbility(new DestroyTargetEffect(), -3); ability2.addTarget(new TargetCreaturePermanent()); this.addAbility(ability2); // -8: Target opponent gets an emblem with "Whenever a player draws a card, you lose 2 life." effect = new GetEmblemTargetPlayerEffect(new ObNixilisReignitedEmblem()); LoyaltyAbility ability3 = new LoyaltyAbility(effect, -8); ability3.addTarget(new TargetOpponent()); this.addAbility(ability3); }
public Cryptbreaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); // {1}{B}, {T}, Discard a card: Create a 2/2 black Zombie creature token. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ZombieToken()), new ManaCostsImpl("{1}{B}")); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardCardCost()); this.addAbility(ability); // Tap three untapped Zombies you control: You draw a card and you lose 1 life. Effect effect = new DrawCardSourceControllerEffect(1, "you"); ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapTargetCost(new TargetControlledCreaturePermanent(3, 3, filter, true))); effect = new LoseLifeSourceControllerEffect(1); ability.addEffect(effect.concatBy("and")); this.addAbility(ability); }
public DivinersWand(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.ARTIFACT}, "{3}"); this.subtype.add(SubType.WIZARD); this.subtype.add(SubType.EQUIPMENT); // Whenever a Wizard creature enters the battlefield, you may attach Diviner's Wand to it. this.addAbility(new EntersBattlefieldAllTriggeredAbility( Zone.BATTLEFIELD, new AttachEffect(Outcome.Detriment, "attach {source} to it"), filter, true, SetTargetPointer.PERMANENT, null)); // Equip {3} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3))); // Equipped creature has "Whenever you draw a card, this creature gets +1/+1 and gains flying until end of turn" and "{4}: Draw a card." // new abilities Ability newBoost = new DrawCardControllerTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false); newBoost.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn).concatBy("and")); Ability newDraw = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(4)); // gain new abilities Effect effectBoost = new GainAbilityAttachedEffect(newBoost, AttachmentType.EQUIPMENT) .setText("Equipped creature has \"Whenever you draw a card, this creature gets +1/+1 and gains flying until end of turn\""); Effect effectDraw = new GainAbilityAttachedEffect(newDraw, AttachmentType.EQUIPMENT) .setText("\"{4}: Draw a card.\""); // total ability Ability totalAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, effectBoost); totalAbility.addEffect(effectDraw.concatBy("and")); this.addAbility(totalAbility); }
mode.addTarget(new TargetPlayer(1, 1, false, filterLoseLife).withChooseHint("loses 2 life")); effect = new GainLifeEffect(2); mode.addEffect(effect.concatBy("and")); this.getSpellAbility().addMode(mode);