diff --git a/Mage.Sets/src/mage/cards/t/TakeHeart.java b/Mage.Sets/src/mage/cards/t/TakeHeart.java new file mode 100644 index 0000000000..b57596a363 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TakeHeart.java @@ -0,0 +1,50 @@ +package mage.cards.t; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.permanent.AttackingPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public final class TakeHeart extends CardImpl { + + private static final FilterPermanent filter + = new FilterControlledCreaturePermanent(); + + static { + filter.add(new AttackingPredicate()); + } + + public TakeHeart(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); + + // Target creature gets +2/+2 until end of turn. You gain 1 life for each attacking creature you control. + this.getSpellAbility().addEffect( + new BoostTargetEffect(2, 2, Duration.EndOfTurn) + ); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new GainLifeEffect( + new PermanentsOnBattlefieldCount(filter) + ).setText("You gain 1 life for each attacking creature you control.")); + } + + public TakeHeart(final TakeHeart card) { + super(card); + } + + @Override + public TakeHeart copy() { + return new TakeHeart(this); + } +} diff --git a/Mage.Sets/src/mage/sets/GuildsOfRavnica.java b/Mage.Sets/src/mage/sets/GuildsOfRavnica.java index b8bb6fba94..cc5475f3d5 100644 --- a/Mage.Sets/src/mage/sets/GuildsOfRavnica.java +++ b/Mage.Sets/src/mage/sets/GuildsOfRavnica.java @@ -236,6 +236,7 @@ public final class GuildsOfRavnica extends ExpansionSet { cards.add(new SetCardInfo("Swiftblade Vindicator", 203, Rarity.RARE, mage.cards.s.SwiftbladeVindicator.class)); cards.add(new SetCardInfo("Sworn Companions", 27, Rarity.COMMON, mage.cards.s.SwornCompanions.class)); cards.add(new SetCardInfo("Tajic, Legion's Edge", 204, Rarity.RARE, mage.cards.t.TajicLegionsEdge.class)); + cards.add(new SetCardInfo("Take Heart", 28, Rarity.COMMON, mage.cards.t.TakeHeart.class)); cards.add(new SetCardInfo("Temple Garden", 258, Rarity.RARE, mage.cards.t.TempleGarden.class)); cards.add(new SetCardInfo("Tenth District Guard", 29, Rarity.COMMON, mage.cards.t.TenthDistrictGuard.class)); cards.add(new SetCardInfo("Thought Erasure", 206, Rarity.UNCOMMON, mage.cards.t.ThoughtErasure.class));