From cabcda6458dcd908c42ac04940612dd6f17a32f8 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sun, 31 Oct 2021 18:29:57 -0400 Subject: [PATCH] [VOW] Implemented Packsong Pup --- Mage.Sets/src/mage/cards/p/PacksongPup.java | 75 +++++++++++++++++++ .../src/mage/sets/InnistradCrimsonVow.java | 1 + 2 files changed, 76 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/p/PacksongPup.java diff --git a/Mage.Sets/src/mage/cards/p/PacksongPup.java b/Mage.Sets/src/mage/cards/p/PacksongPup.java new file mode 100644 index 0000000000..d1910fd094 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PacksongPup.java @@ -0,0 +1,75 @@ +package mage.cards.p; + +import mage.MageInt; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.common.DiesSourceTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.hint.ConditionHint; +import mage.abilities.hint.Hint; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AnotherPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PacksongPup extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledPermanent(); + + static { + filter.add(AnotherPredicate.instance); + filter.add(Predicates.or( + SubType.WEREWOLF.getPredicate(), + SubType.WOLF.getPredicate() + )); + } + + private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter); + private static final Hint hint = new ConditionHint(condition, "You control another Wolf or Werewolf"); + private static final DynamicValue xValue = new SourcePermanentPowerCount(); + + public PacksongPup(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.WOLF); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // At the beginning of combat on your turn, if you control another Wolf or Werewolf, put a +1/+1 counter on Packsong Pup. + this.addAbility(new ConditionalInterveningIfTriggeredAbility( + new BeginningOfCombatTriggeredAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance()), + TargetController.YOU, false + ), condition, "At the beginning of combat on your turn," + + " if you control another Wolf or Werewolf, put a +1/+1 counter on {this}" + ).addHint(hint)); + + // When Packsong Pup dies, you gain life equal to its power. + this.addAbility(new DiesSourceTriggeredAbility(new GainLifeEffect(xValue).setText("you gain life equal to its power"))); + } + + private PacksongPup(final PacksongPup card) { + super(card); + } + + @Override + public PacksongPup copy() { + return new PacksongPup(this); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java index 6bb2660a14..316044efe4 100644 --- a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java +++ b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java @@ -64,6 +64,7 @@ public final class InnistradCrimsonVow extends ExpansionSet { cards.add(new SetCardInfo("Mountain", 274, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Olivia, Crimson Bride", 245, Rarity.MYTHIC, mage.cards.o.OliviaCrimsonBride.class)); cards.add(new SetCardInfo("Overcharged Amalgam", 71, Rarity.RARE, mage.cards.o.OverchargedAmalgam.class)); + cards.add(new SetCardInfo("Packsong Pup", 213, Rarity.UNCOMMON, mage.cards.p.PacksongPup.class)); cards.add(new SetCardInfo("Path of Peril", 124, Rarity.RARE, mage.cards.p.PathOfPeril.class)); cards.add(new SetCardInfo("Plains", 268, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Rending Flame", 175, Rarity.UNCOMMON, mage.cards.r.RendingFlame.class));