From 820f99e51c446f772fea765de345595e69b8573a Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 7 May 2021 07:21:27 -0400 Subject: [PATCH] [MH2] Implemented Diamond Lion --- Mage.Sets/src/mage/cards/d/DiamondLion.java | 82 ++++++++++++++++++++ Mage.Sets/src/mage/sets/ModernHorizons2.java | 1 + 2 files changed, 83 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DiamondLion.java diff --git a/Mage.Sets/src/mage/cards/d/DiamondLion.java b/Mage.Sets/src/mage/cards/d/DiamondLion.java new file mode 100644 index 0000000000..17e04e94b3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DiamondLion.java @@ -0,0 +1,82 @@ +package mage.cards.d; + +import mage.MageInt; +import mage.Mana; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.DiscardHandCost; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.mana.AddManaOfAnyColorEffect; +import mage.abilities.effects.mana.BasicManaEffect; +import mage.abilities.mana.ActivatedManaAbilityImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class DiamondLion extends CardImpl { + + public DiamondLion(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); + + this.subtype.add(SubType.CAT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {T}, Discard your hand, Sacrifice Diamond Lion: Add three mana of any one color. Activate only as an instant. + this.addAbility(new DiamondLionAbility()); + } + + private DiamondLion(final DiamondLion card) { + super(card); + } + + @Override + public DiamondLion copy() { + return new DiamondLion(this); + } +} + +class DiamondLionAbility extends ActivatedManaAbilityImpl { + + public DiamondLionAbility() { + super(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(3), new DiscardHandCost()); + this.addCost(new SacrificeSourceCost()); + this.netMana.add(new Mana(0, 0, 0, 0, 0, 0, 3, 0)); + } + + public DiamondLionAbility(Zone zone, Mana mana, Cost cost) { + super(zone, new BasicManaEffect(mana), cost); + + } + + public DiamondLionAbility(final DiamondLionAbility ability) { + super(ability); + } + + @Override + public ActivationStatus canActivate(UUID playerId, Game game) { + Player player = game.getPlayer(playerId); + if (player != null && !player.isInPayManaMode()) { + return super.canActivate(playerId, game); + } + return ActivationStatus.getFalse(); + } + + @Override + public DiamondLionAbility copy() { + return new DiamondLionAbility(this); + } + + @Override + public String getRule() { + return super.getRule() + " Activate only as an instant."; + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons2.java b/Mage.Sets/src/mage/sets/ModernHorizons2.java index 393ccf62b5..6a4f8398bd 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons2.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons2.java @@ -30,6 +30,7 @@ public final class ModernHorizons2 extends ExpansionSet { cards.add(new SetCardInfo("Arid Mesa", 244, Rarity.RARE, mage.cards.a.AridMesa.class)); cards.add(new SetCardInfo("Brainstone", 223, Rarity.UNCOMMON, mage.cards.b.Brainstone.class)); cards.add(new SetCardInfo("Counterspell", 267, Rarity.UNCOMMON, mage.cards.c.Counterspell.class)); + cards.add(new SetCardInfo("Diamond Lion", 225, Rarity.RARE, mage.cards.d.DiamondLion.class)); cards.add(new SetCardInfo("Marsh Flats", 248, Rarity.RARE, mage.cards.m.MarshFlats.class)); cards.add(new SetCardInfo("Misty Rainforest", 250, Rarity.RARE, mage.cards.m.MistyRainforest.class)); cards.add(new SetCardInfo("Sanctum Prelate", 491, Rarity.MYTHIC, mage.cards.s.SanctumPrelate.class));