[MID] Implemented Voldaren Ambusher

This commit is contained in:
Evan Kranzler 2021-09-06 21:02:07 -04:00
parent 93b8dd5a0b
commit 91bfef8680
2 changed files with 60 additions and 0 deletions

View file

@ -0,0 +1,59 @@
package mage.cards.v;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.OpponentsLostLifeCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.abilities.hint.common.OpponentsLostLifeHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import mage.target.common.TargetCreatureOrPlaneswalker;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class VoldarenAmbusher extends CardImpl {
private static final DynamicValue xValue
= new PermanentsOnBattlefieldCount(new FilterControlledPermanent(SubType.VAMPIRE));
private static final Hint hint = new ValueHint("Vampires you control", xValue);
public VoldarenAmbusher(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
this.subtype.add(SubType.VAMPIRE);
this.subtype.add(SubType.ARCHER);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// When Voldaren Ambusher enters the battlefield, if an opponent lost life this turn, it deals X damage to up to one target creature or planeswalker, where X is the number of Vampires you control.
Ability ability = new ConditionalInterveningIfTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(xValue)),
OpponentsLostLifeCondition.instance, "When {this} enters the battlefield, " +
"if an opponent lost life this turn, it deals X damage to up to one target " +
"creature or planeswalker, where X is the number of Vampires you control."
);
ability.addTarget(new TargetCreatureOrPlaneswalker(0, 1));
this.addAbility(ability.addHint(OpponentsLostLifeHint.instance).addHint(hint));
}
private VoldarenAmbusher(final VoldarenAmbusher card) {
super(card);
}
@Override
public VoldarenAmbusher copy() {
return new VoldarenAmbusher(this);
}
}

View file

@ -102,6 +102,7 @@ public final class InnistradMidnightHunt extends ExpansionSet {
cards.add(new SetCardInfo("Vampire Socialite", 249, Rarity.UNCOMMON, mage.cards.v.VampireSocialite.class));
cards.add(new SetCardInfo("Village Reavers", 165, Rarity.UNCOMMON, mage.cards.v.VillageReavers.class));
cards.add(new SetCardInfo("Village Watch", 165, Rarity.UNCOMMON, mage.cards.v.VillageWatch.class));
cards.add(new SetCardInfo("Voldaren Ambusher", 166, Rarity.UNCOMMON, mage.cards.v.VoldarenAmbusher.class));
cards.add(new SetCardInfo("Wrenn and Seven", 208, Rarity.MYTHIC, mage.cards.w.WrennAndSeven.class));
cards.removeIf(setCardInfo -> unfinished.contains(setCardInfo.getName())); // remove when mechanic is fully implemented