From fee29616bf72bf1bb9543b1b5f15b1806d92e494 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Tue, 9 Apr 2024 15:06:38 -0400 Subject: [PATCH] [PIP] Implement Charisma Bobblehead --- .../src/mage/cards/c/CharismaBobblehead.java | 56 +++++++++++++++++++ Mage.Sets/src/mage/sets/Fallout.java | 1 + 2 files changed, 57 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CharismaBobblehead.java diff --git a/Mage.Sets/src/mage/cards/c/CharismaBobblehead.java b/Mage.Sets/src/mage/cards/c/CharismaBobblehead.java new file mode 100644 index 00000000000..08ccdc7fc98 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CharismaBobblehead.java @@ -0,0 +1,56 @@ +package mage.cards.c; + +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +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.CreateTokenEffect; +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 mage.game.permanent.token.SoldierToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class CharismaBobblehead 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 CharismaBobblehead(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()); + + // {4}, {T}: Create X 1/1 white Soldier creature tokens, where X is the number of Bobbleheads you control. Activate only as a sorcery. + Ability ability = new ActivateAsSorceryActivatedAbility( + new CreateTokenEffect(new SoldierToken(), xValue), new GenericManaCost(4) + ); + ability.addCost(new TapSourceCost()); + this.addAbility(ability.addHint(hint)); + } + + private CharismaBobblehead(final CharismaBobblehead card) { + super(card); + } + + @Override + public CharismaBobblehead copy() { + return new CharismaBobblehead(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Fallout.java b/Mage.Sets/src/mage/sets/Fallout.java index 8d72f943307..0c2263e5bf4 100644 --- a/Mage.Sets/src/mage/sets/Fallout.java +++ b/Mage.Sets/src/mage/sets/Fallout.java @@ -83,6 +83,7 @@ public final class Fallout extends ExpansionSet { cards.add(new SetCardInfo("Cathedral Acolyte", 75, Rarity.UNCOMMON, mage.cards.c.CathedralAcolyte.class)); cards.add(new SetCardInfo("Champion's Helm", 228, Rarity.RARE, mage.cards.c.ChampionsHelm.class)); cards.add(new SetCardInfo("Chaos Warp", 189, Rarity.RARE, mage.cards.c.ChaosWarp.class)); + cards.add(new SetCardInfo("Charisma Bobblehead", 130, Rarity.UNCOMMON, mage.cards.c.CharismaBobblehead.class)); cards.add(new SetCardInfo("Cinder Glade", 257, Rarity.RARE, mage.cards.c.CinderGlade.class)); cards.add(new SetCardInfo("Clifftop Retreat", 258, Rarity.RARE, mage.cards.c.ClifftopRetreat.class)); cards.add(new SetCardInfo("Colonel Autumn", 98, Rarity.RARE, mage.cards.c.ColonelAutumn.class, NON_FULL_USE_VARIOUS));