From e97e889562bc509c78554fa04a7db6429bd5b484 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 9 Jan 2020 12:51:04 -0500 Subject: [PATCH] Implemented Alseid of Life's Beauty --- .../src/mage/cards/a/AlseidOfLifesBounty.java | 64 +++++++++++++++++++ .../src/mage/sets/TherosBeyondDeath.java | 1 + 2 files changed, 65 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/AlseidOfLifesBounty.java diff --git a/Mage.Sets/src/mage/cards/a/AlseidOfLifesBounty.java b/Mage.Sets/src/mage/cards/a/AlseidOfLifesBounty.java new file mode 100644 index 00000000000..21fec30bd3c --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AlseidOfLifesBounty.java @@ -0,0 +1,64 @@ +package mage.cards.a; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.GainProtectionFromColorTargetEffect; +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.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class AlseidOfLifesBounty extends CardImpl { + + private static final FilterPermanent filter + = new FilterControlledPermanent("creature or enchantment you control"); + + static { + filter.add(Predicates.or( + CardType.CREATURE.getPredicate(), + CardType.ENCHANTMENT.getPredicate() + )); + } + + public AlseidOfLifesBounty(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.NYMPH); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Lifelink + this.addAbility(LifelinkAbility.getInstance()); + + // {1}, Sacrifice Alseid of Life's Bounty: Target creature or enchantment you control gains protection from the color of your choice until end of turn. + Ability ability = new SimpleActivatedAbility( + new GainProtectionFromColorTargetEffect(Duration.EndOfTurn), new GenericManaCost(1) + ); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + private AlseidOfLifesBounty(final AlseidOfLifesBounty card) { + super(card); + } + + @Override + public AlseidOfLifesBounty copy() { + return new AlseidOfLifesBounty(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java index d59a6301cb2..e844caa0344 100644 --- a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java +++ b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java @@ -27,6 +27,7 @@ public final class TherosBeyondDeath extends ExpansionSet { this.maxCardNumberInBooster = 254; cards.add(new SetCardInfo("Allure of the Unknown", 207, Rarity.RARE, mage.cards.a.AllureOfTheUnknown.class)); + cards.add(new SetCardInfo("Alseid of Life's Bounty", 1, Rarity.UNCOMMON, mage.cards.a.AlseidOfLifesBounty.class)); cards.add(new SetCardInfo("Altar of the Pantheon", 231, Rarity.COMMON, mage.cards.a.AltarOfThePantheon.class)); cards.add(new SetCardInfo("Anax, Hardened in the Forge", 125, Rarity.UNCOMMON, mage.cards.a.AnaxHardenedInTheForge.class)); cards.add(new SetCardInfo("Aphemia, the Cacophony", 84, Rarity.RARE, mage.cards.a.AphemiaTheCacophony.class));