From aa722516277b16c867cc0b1f83c947da61d4dbe6 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 6 Jan 2020 18:51:06 -0500 Subject: [PATCH] Implemented Archon of Sun's Grace --- .../src/mage/cards/a/ArchonOfSunsGrace.java | 61 +++++++++++++++++++ .../src/mage/sets/TherosBeyondDeath.java | 1 + .../game/permanent/token/PegasusToken2.java | 30 +++++++++ 3 files changed, 92 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/ArchonOfSunsGrace.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/PegasusToken2.java diff --git a/Mage.Sets/src/mage/cards/a/ArchonOfSunsGrace.java b/Mage.Sets/src/mage/cards/a/ArchonOfSunsGrace.java new file mode 100644 index 0000000000..965cbe6ba1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/ArchonOfSunsGrace.java @@ -0,0 +1,61 @@ +package mage.cards.a; + +import mage.MageInt; +import mage.abilities.abilityword.ConstellationAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.permanent.token.PegasusToken2; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ArchonOfSunsGrace extends CardImpl { + + private static final FilterPermanent filter + = new FilterCreaturePermanent(SubType.PEGASUS, "Pegasus creatures"); + + public ArchonOfSunsGrace(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); + + this.subtype.add(SubType.ARCHON); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Lifelink + this.addAbility(LifelinkAbility.getInstance()); + + // Pegasus creatures you control have lifelink. + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( + LifelinkAbility.getInstance(), Duration.WhileOnBattlefield, filter + ))); + + // Constellation—Whenever an enchantment enters the battlefield under your control, create a 2/2 white Pegasus creature token with flying. + this.addAbility(new ConstellationAbility( + new CreateTokenEffect(new PegasusToken2()), false, false + )); + } + + private ArchonOfSunsGrace(final ArchonOfSunsGrace card) { + super(card); + } + + @Override + public ArchonOfSunsGrace copy() { + return new ArchonOfSunsGrace(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java index 9057c47353..24914820a8 100644 --- a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java +++ b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java @@ -30,6 +30,7 @@ public final class TherosBeyondDeath extends ExpansionSet { cards.add(new SetCardInfo("Aphemia, the Cacophony", 84, Rarity.RARE, mage.cards.a.AphemiaTheCacophony.class)); cards.add(new SetCardInfo("Arasta of the Endless Web", 165, Rarity.RARE, mage.cards.a.ArastaOfTheEndlessWeb.class)); cards.add(new SetCardInfo("Archon of Falling Stars", 2, Rarity.UNCOMMON, mage.cards.a.ArchonOfFallingStars.class)); + cards.add(new SetCardInfo("Archon of Sun's Grace", 3, Rarity.RARE, mage.cards.a.ArchonOfSunsGrace.class)); cards.add(new SetCardInfo("Arena Trickster", 126, Rarity.COMMON, mage.cards.a.ArenaTrickster.class)); cards.add(new SetCardInfo("Ashiok's Erasure", 43, Rarity.RARE, mage.cards.a.AshioksErasure.class)); cards.add(new SetCardInfo("Ashiok, Nightmare Muse", 208, Rarity.MYTHIC, mage.cards.a.AshiokNightmareMuse.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/PegasusToken2.java b/Mage/src/main/java/mage/game/permanent/token/PegasusToken2.java new file mode 100644 index 0000000000..5994c79f74 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/PegasusToken2.java @@ -0,0 +1,30 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author TheElk801 + */ +public final class PegasusToken2 extends TokenImpl { + + public PegasusToken2() { + super("Pegasus", "2/2 white Pegasus creature token with flying"); + this.cardType.add(CardType.CREATURE); + this.color.setWhite(true); + this.subtype.add(SubType.PEGASUS); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + this.addAbility(FlyingAbility.getInstance()); + } + + private PegasusToken2(final PegasusToken2 token) { + super(token); + } + + public PegasusToken2 copy() { + return new PegasusToken2(this); + } +}