From 80178431a9d4d2c68fc7c4dbb2205edf9f5332f2 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Wed, 18 Jan 2023 19:41:17 -0500 Subject: [PATCH] [ONC] Implement Glistening Sphere --- .../src/mage/cards/g/GlisteningSphere.java | 51 +++++++++++++++++++ .../sets/PhyrexiaAllWillBeOneCommander.java | 2 + 2 files changed, 53 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GlisteningSphere.java diff --git a/Mage.Sets/src/mage/cards/g/GlisteningSphere.java b/Mage.Sets/src/mage/cards/g/GlisteningSphere.java new file mode 100644 index 00000000000..b4435affc9a --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GlisteningSphere.java @@ -0,0 +1,51 @@ +package mage.cards.g; + +import java.util.UUID; + +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.CorruptedCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.counter.ProliferateEffect; +import mage.abilities.effects.mana.AddManaOfAnyColorEffect; +import mage.abilities.mana.ActivateIfConditionManaAbility; +import mage.abilities.mana.AnyColorManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * @author TheElk801 + */ +public final class GlisteningSphere extends CardImpl { + + public GlisteningSphere(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + // Glistening Sphere enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // When Glistening Sphere enters the battlefield, proliferate. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ProliferateEffect())); + + // {T}: Add one mana of any color. + this.addAbility(new AnyColorManaAbility()); + + // Corrupted -- {T}: Add three mana of any one color. Activate only if an opponent has three or more poison counters. + this.addAbility(new ActivateIfConditionManaAbility( + Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(3), + new TapSourceCost(), CorruptedCondition.instance + ).setAbilityWord(AbilityWord.CORRUPTED).addHint(CorruptedCondition.getHint())); + } + + private GlisteningSphere(final GlisteningSphere card) { + super(card); + } + + @Override + public GlisteningSphere copy() { + return new GlisteningSphere(this); + } +} diff --git a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOneCommander.java b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOneCommander.java index 6a1a0724650..162c567fe86 100644 --- a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOneCommander.java +++ b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOneCommander.java @@ -18,5 +18,7 @@ public final class PhyrexiaAllWillBeOneCommander extends ExpansionSet { private PhyrexiaAllWillBeOneCommander() { super("Phyrexia: All Will Be One Commander", "ONC", ExpansionSet.buildDate(2023, 1, 10), SetType.SUPPLEMENTAL); this.hasBasicLands = false; + + cards.add(new SetCardInfo("Glistening Sphere", 20, Rarity.RARE, mage.cards.g.GlisteningSphere.class)); } }