[J25] Implement Generous Pup

This commit is contained in:
theelk801 2024-11-11 12:03:59 -05:00
parent d7ae7b0e4d
commit afe97b1f8a
3 changed files with 54 additions and 0 deletions

View file

@ -0,0 +1,45 @@
package mage.cards.g;
import mage.MageInt;
import mage.abilities.common.OneOrMoreCountersAddedTriggeredAbility;
import mage.abilities.effects.common.counter.AddCountersAllEffect;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class GenerousPup extends CardImpl {
public GenerousPup(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add(SubType.DOG);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// Whenever one or more +1/+1 counters are put on Generous Pup, put a +1/+1 counter on each other creature you control. This ability triggers only once each turn.
this.addAbility(new OneOrMoreCountersAddedTriggeredAbility(new AddCountersAllEffect(
CounterType.P1P1.createInstance(), StaticFilters.FILTER_OTHER_CONTROLLED_CREATURE
)).setTriggersLimitEachTurn(1));
}
private GenerousPup(final GenerousPup card) {
super(card);
}
@Override
public GenerousPup copy() {
return new GenerousPup(this);
}
}

View file

@ -285,6 +285,7 @@ public final class FoundationsJumpstart extends ExpansionSet {
cards.add(new SetCardInfo("Garruk, Caller of Beasts", 659, Rarity.MYTHIC, mage.cards.g.GarrukCallerOfBeasts.class));
cards.add(new SetCardInfo("Gavony Silversmith", 201, Rarity.COMMON, mage.cards.g.GavonySilversmith.class));
cards.add(new SetCardInfo("Gearseeker Serpent", 314, Rarity.COMMON, mage.cards.g.GearseekerSerpent.class));
cards.add(new SetCardInfo("Generous Pup", 4, Rarity.RARE, mage.cards.g.GenerousPup.class));
cards.add(new SetCardInfo("Ghalta, Primal Hunger", 77, Rarity.RARE, mage.cards.g.GhaltaPrimalHunger.class));
cards.add(new SetCardInfo("Ghirapur Guide", 661, Rarity.UNCOMMON, mage.cards.g.GhirapurGuide.class));
cards.add(new SetCardInfo("Ghitu Encampment", 155, Rarity.UNCOMMON, mage.cards.g.GhituEncampment.class));

View file

@ -619,6 +619,14 @@ public final class StaticFilters {
}
public static final FilterControlledCreaturePermanent FILTER_OTHER_CONTROLLED_CREATURE = new FilterControlledCreaturePermanent("other creature you control");
static {
FILTER_OTHER_CONTROLLED_CREATURE.add(AnotherPredicate.instance);
FILTER_OTHER_CONTROLLED_CREATURE.setLockedFilter(true);
}
public static final FilterControlledCreaturePermanent FILTER_OTHER_CONTROLLED_CREATURES = new FilterControlledCreaturePermanent("other creatures you control");
static {