From 37c7573acdcf3557d0d4cfef0e1684b66f4085f6 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 29 Jan 2022 10:17:34 -0500 Subject: [PATCH] [NEO] Implemented Leech Gauntlet --- Mage.Sets/src/mage/cards/l/LeechGauntlet.java | 49 +++++++++++++++++++ .../src/mage/sets/KamigawaNeonDynasty.java | 7 +++ .../abilities/keyword/ReconfigureAbility.java | 36 ++++++++++++++ Utils/keywords.txt | 1 + 4 files changed, 93 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/l/LeechGauntlet.java create mode 100644 Mage/src/main/java/mage/abilities/keyword/ReconfigureAbility.java diff --git a/Mage.Sets/src/mage/cards/l/LeechGauntlet.java b/Mage.Sets/src/mage/cards/l/LeechGauntlet.java new file mode 100644 index 0000000000..a377d4ca59 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LeechGauntlet.java @@ -0,0 +1,49 @@ +package mage.cards.l; + +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.LifelinkAbility; +import mage.abilities.keyword.ReconfigureAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class LeechGauntlet extends CardImpl { + + public LeechGauntlet(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.EQUIPMENT); + this.subtype.add(SubType.LEECH); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Lifelink + this.addAbility(LifelinkAbility.getInstance()); + + // Equipped creature has lifelink. + this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect( + LifelinkAbility.getInstance(), AttachmentType.EQUIPMENT + ))); + + // Reconfigure {4} + this.addAbility(new ReconfigureAbility("{4}")); + } + + private LeechGauntlet(final LeechGauntlet card) { + super(card); + } + + @Override + public LeechGauntlet copy() { + return new LeechGauntlet(this); + } +} diff --git a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java index ff661e5f39..f3c92254a1 100644 --- a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java +++ b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java @@ -4,11 +4,15 @@ import mage.cards.ExpansionSet; import mage.constants.Rarity; import mage.constants.SetType; +import java.util.Arrays; +import java.util.List; + /** * @author TheElk801 */ public final class KamigawaNeonDynasty extends ExpansionSet { + private static final List unfinished = Arrays.asList("Bronzeplate Boar", "Leech Gauntlet", "Lizard Blades", "Simian Sling", "The Reality Chip"); private static final KamigawaNeonDynasty instance = new KamigawaNeonDynasty(); public static KamigawaNeonDynasty getInstance() { @@ -34,6 +38,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet { cards.add(new SetCardInfo("Island", 295, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Jukai Naturalist", 225, Rarity.UNCOMMON, mage.cards.j.JukaiNaturalist.class)); cards.add(new SetCardInfo("Kaito Shizuki", 226, Rarity.MYTHIC, mage.cards.k.KaitoShizuki.class)); + cards.add(new SetCardInfo("Leech Gauntlet", 106, Rarity.UNCOMMON, mage.cards.l.LeechGauntlet.class)); cards.add(new SetCardInfo("Mountain", 299, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Nameless Conqueror", 162, Rarity.COMMON, mage.cards.n.NamelessConqueror.class)); cards.add(new SetCardInfo("Plains", 293, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS)); @@ -44,5 +49,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet { cards.add(new SetCardInfo("The Shattered States Era", 162, Rarity.COMMON, mage.cards.t.TheShatteredStatesEra.class)); cards.add(new SetCardInfo("Unstoppable Ogre", 169, Rarity.COMMON, mage.cards.u.UnstoppableOgre.class)); cards.add(new SetCardInfo("Vector Glider", 66, Rarity.COMMON, mage.cards.v.VectorGlider.class)); + + cards.removeIf(setCardInfo -> unfinished.contains(setCardInfo.getName())); // remove when mechanic is fully implemented } } diff --git a/Mage/src/main/java/mage/abilities/keyword/ReconfigureAbility.java b/Mage/src/main/java/mage/abilities/keyword/ReconfigureAbility.java new file mode 100644 index 0000000000..15cfaa9a39 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/keyword/ReconfigureAbility.java @@ -0,0 +1,36 @@ +package mage.abilities.keyword; + +import mage.abilities.ActivatedAbilityImpl; +import mage.constants.Zone; + +/** + * @author TheElk801 + */ +public class ReconfigureAbility extends ActivatedAbilityImpl { + + private final String manaString; + + public ReconfigureAbility(String manaString) { + super(Zone.BATTLEFIELD, null); + this.manaString = manaString; + // TODO: Implement this + } + + private ReconfigureAbility(final ReconfigureAbility ability) { + super(ability); + this.manaString = ability.manaString; + } + + @Override + public ReconfigureAbility copy() { + return new ReconfigureAbility(this); + } + + @Override + public String getRule() { + return "Reconfigure " + manaString + " (" + manaString + + ": Attach to target creature you control; " + + "or unattach from a creature. Reconfigure only as a sorcery. " + + "While attached, this isn’t a creature.)"; + } +} diff --git a/Utils/keywords.txt b/Utils/keywords.txt index b8c8431753..610bd3b762 100644 --- a/Utils/keywords.txt +++ b/Utils/keywords.txt @@ -88,6 +88,7 @@ Provoke|new| Prowess|new| Reach|instance| Rebound|new| +Reconfigure|manaString| Renown|number| Replicate|card, manaString| Riot|new|