Implemented Warden of the Woods

This commit is contained in:
Evan Kranzler 2020-06-10 20:38:43 -04:00
parent 7cf52ce136
commit eab57783ed
3 changed files with 54 additions and 1 deletions

View file

@ -0,0 +1,48 @@
package mage.cards.w;
import mage.MageInt;
import mage.abilities.common.BecomesTargetTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SetTargetPointer;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class WardenOfTheWoods extends CardImpl {
public WardenOfTheWoods(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
this.subtype.add(SubType.TREEFOLK);
this.power = new MageInt(5);
this.toughness = new MageInt(7);
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// Whenever Warden of the Woods becomes the target of a spell or ability an opponent controls, you may draw two cards.
this.addAbility(new BecomesTargetTriggeredAbility(
new DrawCardSourceControllerEffect(2),
StaticFilters.FILTER_SPELL_OR_ABILITY_OPPONENTS,
SetTargetPointer.NONE, true
));
}
private WardenOfTheWoods(final WardenOfTheWoods card) {
super(card);
}
@Override
public WardenOfTheWoods copy() {
return new WardenOfTheWoods(this);
}
}

View file

@ -133,6 +133,7 @@ public final class CoreSet2021 extends ExpansionSet {
cards.add(new SetCardInfo("Valorous Steed", 42, Rarity.COMMON, mage.cards.v.ValorousSteed.class));
cards.add(new SetCardInfo("Village Rites", 126, Rarity.COMMON, mage.cards.v.VillageRites.class));
cards.add(new SetCardInfo("Vito, Thorn of the Dusk Rose", 127, Rarity.RARE, mage.cards.v.VitoThornOfTheDuskRose.class));
cards.add(new SetCardInfo("Warden of the Woods", 213, Rarity.UNCOMMON, mage.cards.w.WardenOfTheWoods.class));
cards.add(new SetCardInfo("Wildwood Patrol", 339, Rarity.COMMON, mage.cards.w.WildwoodPatrol.class));
}
}

View file

@ -28,7 +28,11 @@ public class BecomesTargetTriggeredAbility extends TriggeredAbilityImpl {
}
public BecomesTargetTriggeredAbility(Effect effect, FilterStackObject filter, SetTargetPointer setTargetPointer) {
super(Zone.BATTLEFIELD, effect);
this(effect, filter, setTargetPointer, false);
}
public BecomesTargetTriggeredAbility(Effect effect, FilterStackObject filter, SetTargetPointer setTargetPointer, boolean optional) {
super(Zone.BATTLEFIELD, effect, optional);
this.filter = filter.copy();
this.setTargetPointer = setTargetPointer;
}