public VindictiveVampire(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(2); this.toughness = new MageInt(3); // Whenever another creature you control dies, Vindictive Vampire deals 1 damage to each opponent and you gain 1 life. Ability ability = new DiesCreatureTriggeredAbility( new DamagePlayersEffect(1, TargetController.OPPONENT), false, filter, true ); ability.addEffect(new GainLifeEffect(1).concatBy("and")); this.addAbility(ability); }
public IllGottenInheritance(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}"); // At the beginning of your upkeep, Ill-Gotten Inheritance deals 1 damage to each opponent and you gain 1 life. Ability ability = new BeginningOfUpkeepTriggeredAbility( new DamagePlayersEffect(1, TargetController.OPPONENT), TargetController.YOU, false ); ability.addEffect(new GainLifeEffect(1).concatBy("and")); this.addAbility(ability); // {5}{B}, Sacrifice Ill-Gotten Inheritance: It deals 4 damage to target opponent and you gain 4 life. ability = new SimpleActivatedAbility( new DamageTargetEffect(4, "it"), new ManaCostsImpl("{5}{B}") ); ability.addEffect(new GainLifeEffect(4).concatBy("and")); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetOpponent()); this.addAbility(ability); }
public ConsumeSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{1}{B}"); // Spend only black mana on X. this.addAbility(new SimpleStaticAbility( Zone.ALL, new InfoEffect("Spend only black mana on X")).setRuleAtTheTop(true) ); // Consume Spirit deals X damage to any target and you gain X life. this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance)); this.getSpellAbility().addEffect(new GainLifeEffect(ManacostVariableValue.instance).concatBy("and")); VariableCost variableCost = this.getSpellAbility().getManaCostsToPay().getVariableCosts().get(0); if (variableCost instanceof VariableManaCost) { ((VariableManaCost) variableCost).setFilter(filterBlack); } }
public CarrionImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); this.subtype.add(SubType.IMP); this.power = new MageInt(2); this.toughness = new MageInt(3); // Flying this.addAbility(FlyingAbility.getInstance()); // When Carrion Imp enters the battlefield, you may exile target creature card from a graveyard. If you do, you gain 2 life. Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect(), true); ability.addEffect(new GainLifeEffect(2).concatBy("If you do,")); ability.addTarget(new TargetCardInGraveyard(filter)); this.addAbility(ability); }