diff --git a/Mage.Sets/src/mage/cards/l/LeafkinAvenger.java b/Mage.Sets/src/mage/cards/l/LeafkinAvenger.java new file mode 100644 index 0000000000..587e7d4249 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LeafkinAvenger.java @@ -0,0 +1,68 @@ +package mage.cards.l; + +import mage.MageInt; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.mana.DynamicManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.target.common.TargetPlayerOrPlaneswalker; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class LeafkinAvenger extends CardImpl { + + private static final FilterPermanent filter = new FilterCreaturePermanent("creature you control with power 4 or greater"); + + static { + filter.add(new PowerPredicate(ComparisonType.MORE_THAN, 3)); + } + + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter); + private static final DynamicValue xValue2 = new SourcePermanentPowerCount(false); + + public LeafkinAvenger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{G}"); + + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.DRUID); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // {T}: Add {G} for each creature you control with power 4 or greater. + this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), xValue)); + + // {7}{R}: Leafkin Avenger deals damage equal to its power to target player or planeswalker. + Ability ability = new SimpleActivatedAbility( + new DamageTargetEffect(xValue2) + .setText("{this} deals damage equal to its power to target player or planeswalker"), + new ManaCostsImpl("{7}{R}") + ); + ability.addTarget(new TargetPlayerOrPlaneswalker()); + this.addAbility(ability); + } + + private LeafkinAvenger(final LeafkinAvenger card) { + super(card); + } + + @Override + public LeafkinAvenger copy() { + return new LeafkinAvenger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CoreSet2021.java b/Mage.Sets/src/mage/sets/CoreSet2021.java index 91536f727a..a213df1e94 100644 --- a/Mage.Sets/src/mage/sets/CoreSet2021.java +++ b/Mage.Sets/src/mage/sets/CoreSet2021.java @@ -149,6 +149,7 @@ public final class CoreSet2021 extends ExpansionSet { cards.add(new SetCardInfo("Keen Glidemaster", 54, Rarity.COMMON, mage.cards.k.KeenGlidemaster.class)); cards.add(new SetCardInfo("Keral Keep Disciples", 334, Rarity.UNCOMMON, mage.cards.k.KeralKeepDisciples.class)); cards.add(new SetCardInfo("Kitesail Freebooter", 107, Rarity.UNCOMMON, mage.cards.k.KitesailFreebooter.class)); + cards.add(new SetCardInfo("Leafkin Avenger", 220, Rarity.UNCOMMON, mage.cards.l.LeafkinAvenger.class)); cards.add(new SetCardInfo("Legion's Judgment", 24, Rarity.COMMON, mage.cards.l.LegionsJudgment.class)); cards.add(new SetCardInfo("Library Larcenist", 55, Rarity.COMMON, mage.cards.l.LibraryLarcenist.class)); cards.add(new SetCardInfo("Life Goes On", 192, Rarity.COMMON, mage.cards.l.LifeGoesOn.class));