From 7603a6477bfb617495e901b05c28189f03657a2f Mon Sep 17 00:00:00 2001 From: theelk801 Date: Wed, 21 Feb 2024 12:39:24 -0500 Subject: [PATCH] [PIP] Implement Hancock, Ghoulish Mayor --- .../mage/cards/h/HancockGhoulishMayor.java | 63 +++++++++++++++++++ Mage.Sets/src/mage/sets/Fallout.java | 1 + 2 files changed, 64 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/h/HancockGhoulishMayor.java diff --git a/Mage.Sets/src/mage/cards/h/HancockGhoulishMayor.java b/Mage.Sets/src/mage/cards/h/HancockGhoulishMayor.java new file mode 100644 index 00000000000..556eb608e64 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HancockGhoulishMayor.java @@ -0,0 +1,63 @@ +package mage.cards.h; + +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.CountersSourceCount; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.keyword.UndyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class HancockGhoulishMayor extends CardImpl { + + private static final DynamicValue xValue = new CountersSourceCount(null); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + static { + filter.add(Predicates.or( + SubType.ZOMBIE.getPredicate(), + SubType.MUTANT.getPredicate() + )); + } + + public HancockGhoulishMayor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.MUTANT); + this.subtype.add(SubType.ADVISOR); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Each other creature you control that's a Zombie or Mutant gets +X/+X, where X is the number of counters on Hancock, Ghoulish Mayor. + this.addAbility(new SimpleStaticAbility(new BoostControlledEffect( + xValue, xValue, Duration.WhileOnBattlefield, filter, true + ).setText("each other creature you control that's a Zombie or Mutant " + + "gets +X/+X, where X is the number of counters on {this}"))); + + // Undying + this.addAbility(new UndyingAbility()); + } + + private HancockGhoulishMayor(final HancockGhoulishMayor card) { + super(card); + } + + @Override + public HancockGhoulishMayor copy() { + return new HancockGhoulishMayor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Fallout.java b/Mage.Sets/src/mage/sets/Fallout.java index 563de59a797..ece04f8892f 100644 --- a/Mage.Sets/src/mage/sets/Fallout.java +++ b/Mage.Sets/src/mage/sets/Fallout.java @@ -33,6 +33,7 @@ public final class Fallout extends ExpansionSet { cards.add(new SetCardInfo("Forest", 853, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Gary Clone", 16, Rarity.UNCOMMON, mage.cards.g.GaryClone.class)); cards.add(new SetCardInfo("Guardian Project", 199, Rarity.RARE, mage.cards.g.GuardianProject.class)); + cards.add(new SetCardInfo("Hancock, Ghoulish Mayor", 45, Rarity.RARE, mage.cards.h.HancockGhoulishMayor.class)); cards.add(new SetCardInfo("Heroic Intervention", 202, Rarity.RARE, mage.cards.h.HeroicIntervention.class)); cards.add(new SetCardInfo("Intelligence Bobblehead", 134, Rarity.UNCOMMON, mage.cards.i.IntelligenceBobblehead.class)); cards.add(new SetCardInfo("Island", 847, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));