From f27e0740d2c732524f97fb02e6c728e1938e01f5 Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Wed, 23 Aug 2023 15:30:25 +0200 Subject: [PATCH] [WOE] Implement Archon of the Wild Rose (#10947) * adding Errata's PR predicate * [WOE] Implement Archon of the Wild Rose --------- Co-authored-by: Evan Kranzler --- .../src/mage/cards/a/ArchonOfTheWildRose.java | 61 +++++++++++++++++++ Mage.Sets/src/mage/sets/WildsOfEldraine.java | 1 + .../EnchantedBySourceControllerPredicate.java | 2 +- 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/cards/a/ArchonOfTheWildRose.java diff --git a/Mage.Sets/src/mage/cards/a/ArchonOfTheWildRose.java b/Mage.Sets/src/mage/cards/a/ArchonOfTheWildRose.java new file mode 100644 index 00000000000..ef6b294a740 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/ArchonOfTheWildRose.java @@ -0,0 +1,61 @@ +package mage.cards.a; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.effects.common.continuous.SetBasePowerToughnessAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.filter.predicate.permanent.EnchantedBySourceControllerPredicate; + +import java.util.UUID; + +/** + * + * @author Susucr + */ +public final class ArchonOfTheWildRose extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = + new FilterControlledCreaturePermanent("other creatures you control that are enchanted by Auras you control"); + + static { + filter.add(AnotherPredicate.instance); + filter.add(EnchantedBySourceControllerPredicate.instance); + } + + public ArchonOfTheWildRose(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); + + this.subtype.add(SubType.ARCHON); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Other creatures you control that are enchanted by Auras you control have base power and toughness 4/4 and have flying. + Ability ability = new SimpleStaticAbility( + new SetBasePowerToughnessAllEffect(4, 4, Duration.WhileOnBattlefield, filter, true) + ); + ability.addEffect(new GainAbilityAllEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield, filter) + .setText("and have flying")); + this.addAbility(ability); + } + + private ArchonOfTheWildRose(final ArchonOfTheWildRose card) { + super(card); + } + + @Override + public ArchonOfTheWildRose copy() { + return new ArchonOfTheWildRose(this); + } +} diff --git a/Mage.Sets/src/mage/sets/WildsOfEldraine.java b/Mage.Sets/src/mage/sets/WildsOfEldraine.java index bb0f424ad2a..d9d15f6eaa8 100644 --- a/Mage.Sets/src/mage/sets/WildsOfEldraine.java +++ b/Mage.Sets/src/mage/sets/WildsOfEldraine.java @@ -23,6 +23,7 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("A Tale for the Ages", 34, Rarity.RARE, mage.cards.a.ATaleForTheAges.class)); cards.add(new SetCardInfo("Agatha of the Vile Cauldron", 199, Rarity.MYTHIC, mage.cards.a.AgathaOfTheVileCauldron.class)); cards.add(new SetCardInfo("Agatha's Champion", 160, Rarity.UNCOMMON, mage.cards.a.AgathasChampion.class)); + cards.add(new SetCardInfo("Archon of the Wild Rose", 1, Rarity.RARE, mage.cards.a.ArchonOfTheWildRose.class)); cards.add(new SetCardInfo("Armory Mice", 3, Rarity.COMMON, mage.cards.a.ArmoryMice.class)); cards.add(new SetCardInfo("Ash, Party Crasher", 201, Rarity.UNCOMMON, mage.cards.a.AshPartyCrasher.class)); cards.add(new SetCardInfo("Ashiok's Reaper", 79, Rarity.UNCOMMON, mage.cards.a.AshioksReaper.class)); diff --git a/Mage/src/main/java/mage/filter/predicate/permanent/EnchantedBySourceControllerPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/EnchantedBySourceControllerPredicate.java index 2707e942ab7..435f1e1124b 100644 --- a/Mage/src/main/java/mage/filter/predicate/permanent/EnchantedBySourceControllerPredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/permanent/EnchantedBySourceControllerPredicate.java @@ -12,7 +12,7 @@ import java.util.Objects; * @author Xanderhall */ public enum EnchantedBySourceControllerPredicate implements ObjectSourcePlayerPredicate { -instance; + instance; @Override public boolean apply(ObjectSourcePlayer input, Game game) {