From 18935970f796ed124b1a74f242addc6c9e52775d Mon Sep 17 00:00:00 2001 From: theelk801 Date: Thu, 19 Oct 2023 20:22:33 -0400 Subject: [PATCH] [PIP] Implement Intelligence Bobblehead --- .../mage/cards/i/IntelligenceBobblehead.java | 53 +++++++++++++++++++ Mage.Sets/src/mage/sets/Fallout.java | 1 + .../src/main/java/mage/constants/SubType.java | 1 + 3 files changed, 55 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/i/IntelligenceBobblehead.java diff --git a/Mage.Sets/src/mage/cards/i/IntelligenceBobblehead.java b/Mage.Sets/src/mage/cards/i/IntelligenceBobblehead.java new file mode 100644 index 00000000000..7dabbc08d0e --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/IntelligenceBobblehead.java @@ -0,0 +1,53 @@ +package mage.cards.i; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.abilities.mana.AnyColorManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterControlledPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class IntelligenceBobblehead extends CardImpl { + + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount( + new FilterControlledPermanent(SubType.BOBBLEHEAD, "Bobbleheads you control"), null + ); + private static final Hint hint = new ValueHint("Bobbleheads you control", xValue); + + public IntelligenceBobblehead(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + this.subtype.add(SubType.BOBBLEHEAD); + + // {T}: Add one mana of any color. + this.addAbility(new AnyColorManaAbility()); + + // {5}, {T}: Draw X cards, where X is the number of Bobbleheads you control. + Ability ability = new SimpleActivatedAbility(new DrawCardSourceControllerEffect(xValue), new GenericManaCost(5)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability.addHint(hint)); + } + + private IntelligenceBobblehead(final IntelligenceBobblehead card) { + super(card); + } + + @Override + public IntelligenceBobblehead copy() { + return new IntelligenceBobblehead(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Fallout.java b/Mage.Sets/src/mage/sets/Fallout.java index abee561751c..f2ad17440b2 100644 --- a/Mage.Sets/src/mage/sets/Fallout.java +++ b/Mage.Sets/src/mage/sets/Fallout.java @@ -24,6 +24,7 @@ public final class Fallout extends ExpansionSet { cards.add(new SetCardInfo("Dr. Madison Li", 3, Rarity.MYTHIC, mage.cards.d.DrMadisonLi.class)); cards.add(new SetCardInfo("Forest", 325, 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("Intelligence Bobblehead", 134, Rarity.UNCOMMON, mage.cards.i.IntelligenceBobblehead.class)); cards.add(new SetCardInfo("Island", 319, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mountain", 323, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Plains", 317, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index 41e2e95c1d4..53a9d340bb8 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -47,6 +47,7 @@ public enum SubType { SHRINE("Shrine", SubTypeSet.EnchantmentType), // 205.3g: Artifacts have their own unique set of subtypes; these subtypes are called artifact types. BLOOD("Blood", SubTypeSet.ArtifactType), + BOBBLEHEAD("Bobblehead", SubTypeSet.ArtifactType), CLUE("Clue", SubTypeSet.ArtifactType), CONTRAPTION("Contraption", SubTypeSet.ArtifactType), EQUIPMENT("Equipment", SubTypeSet.ArtifactType),