diff --git a/Mage.Sets/src/mage/cards/m/MaskOfTheJadecrafter.java b/Mage.Sets/src/mage/cards/m/MaskOfTheJadecrafter.java new file mode 100644 index 0000000000..30f037ed55 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MaskOfTheJadecrafter.java @@ -0,0 +1,69 @@ +package mage.cards.m; + +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.UnearthAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.token.GolemXXToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MaskOfTheJadecrafter extends CardImpl { + + public MaskOfTheJadecrafter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + // {X}, {T}, Sacrifice Mask of the Jadecrafter: Create an X/X colorless Golem artifact creature token. Activate only as a sorcery. + Ability ability = new ActivateAsSorceryActivatedAbility( + new MaskOfTheJadecrafterEffect(), new ManaCostsImpl<>("{X}") + ); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + + // Unearth {2}{G} + this.addAbility(new UnearthAbility(new ManaCostsImpl<>("{2}{G}"))); + } + + private MaskOfTheJadecrafter(final MaskOfTheJadecrafter card) { + super(card); + } + + @Override + public MaskOfTheJadecrafter copy() { + return new MaskOfTheJadecrafter(this); + } +} + +class MaskOfTheJadecrafterEffect extends OneShotEffect { + + MaskOfTheJadecrafterEffect() { + super(Outcome.Benefit); + staticText = "create an X/X colorless Golem artifact creature token"; + } + + private MaskOfTheJadecrafterEffect(final MaskOfTheJadecrafterEffect effect) { + super(effect); + } + + @Override + public MaskOfTheJadecrafterEffect copy() { + return new MaskOfTheJadecrafterEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return new GolemXXToken(source.getManaCostsToPay().getX()).putOntoBattlefield(1, game, source); + } +} diff --git a/Mage.Sets/src/mage/sets/TheBrothersWar.java b/Mage.Sets/src/mage/sets/TheBrothersWar.java index 6b50596bf4..683c83ac61 100644 --- a/Mage.Sets/src/mage/sets/TheBrothersWar.java +++ b/Mage.Sets/src/mage/sets/TheBrothersWar.java @@ -153,6 +153,7 @@ public final class TheBrothersWar extends ExpansionSet { cards.add(new SetCardInfo("Loran's Escape", 14, Rarity.COMMON, mage.cards.l.LoransEscape.class)); cards.add(new SetCardInfo("Loran, Disciple of History", 13, Rarity.UNCOMMON, mage.cards.l.LoranDiscipleOfHistory.class)); cards.add(new SetCardInfo("Machine Over Matter", 57, Rarity.COMMON, mage.cards.m.MachineOverMatter.class)); + cards.add(new SetCardInfo("Mask of the Jadecrafter", 201, Rarity.UNCOMMON, mage.cards.m.MaskOfTheJadecrafter.class)); cards.add(new SetCardInfo("Mass Production", 15, Rarity.UNCOMMON, mage.cards.m.MassProduction.class)); cards.add(new SetCardInfo("Mechanized Warfare", 139, Rarity.RARE, mage.cards.m.MechanizedWarfare.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mechanized Warfare", 338, Rarity.RARE, mage.cards.m.MechanizedWarfare.class, NON_FULL_USE_VARIOUS)); diff --git a/Mage/src/main/java/mage/game/permanent/token/GolemXXToken.java b/Mage/src/main/java/mage/game/permanent/token/GolemXXToken.java new file mode 100644 index 0000000000..932ae63e33 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/GolemXXToken.java @@ -0,0 +1,32 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.Arrays; + +/** + * @author TheElk801 + */ +public final class GolemXXToken extends TokenImpl { + + public GolemXXToken(int xValue) { + super("Golem Token", "X/X colorless Golem artifact creature token"); + cardType.add(CardType.ARTIFACT); + cardType.add(CardType.CREATURE); + subtype.add(SubType.GOLEM); + power = new MageInt(xValue); + toughness = new MageInt(xValue); + + availableImageSetCodes = Arrays.asList("BRO"); + } + + public GolemXXToken(final GolemXXToken token) { + super(token); + } + + public GolemXXToken copy() { + return new GolemXXToken(this); + } +}