[PIP] Implement Charisma Bobblehead

This commit is contained in:
theelk801 2024-04-09 15:06:38 -04:00
parent 5a94341e24
commit fee29616bf
2 changed files with 57 additions and 0 deletions

View file

@ -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);
}
}

View file

@ -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));