From 22e9f47b7e080d6501c9657967c1c3dc0fafd307 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 5 Feb 2022 10:29:24 -0500 Subject: [PATCH] [NEO] Implemented Clawing Torment --- .../src/mage/cards/c/ClawingTorment.java | 68 +++++++++++++++++++ .../src/mage/sets/KamigawaNeonDynasty.java | 1 + 2 files changed, 69 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/ClawingTorment.java diff --git a/Mage.Sets/src/mage/cards/c/ClawingTorment.java b/Mage.Sets/src/mage/cards/c/ClawingTorment.java new file mode 100644 index 0000000000..8260d6ab7a --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ClawingTorment.java @@ -0,0 +1,68 @@ +package mage.cards.c; + +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.AttachedToMatchesFilterCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.effects.common.combat.CantBlockAttachedEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.StaticFilters; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ClawingTorment extends CardImpl { + + private static final Condition condition = new AttachedToMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_CREATURE); + + public ClawingTorment(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}"); + + this.subtype.add(SubType.AURA); + + // Enchant artifact creature + TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + + // As long as enchanted permanent is a creature, it gets -1/-1 and can't block. + Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect( + new BoostEnchantedEffect(-1, -1), condition, + "as long as enchanted permanent is a creature, it gets -1/-1" + )); + ability.addEffect(new ConditionalContinuousEffect( + new CantBlockAttachedEffect(AttachmentType.AURA), condition, "and can't block" + )); + this.addAbility(ability); + + // Enchanted permanent has "At the beginning of your upkeep, you lose 1 life." + this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect( + new BeginningOfUpkeepTriggeredAbility( + new LoseLifeSourceControllerEffect(1), TargetController.YOU, false + ), AttachmentType.AURA, Duration.WhileOnBattlefield, + "enchanted permanent has \"At the beginning of your upkeep, you lose 1 life.\"" + ))); + } + + private ClawingTorment(final ClawingTorment card) { + super(card); + } + + @Override + public ClawingTorment copy() { + return new ClawingTorment(this); + } +} diff --git a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java index f9f05a11e6..41b57fcd9d 100644 --- a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java +++ b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java @@ -58,6 +58,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet { cards.add(new SetCardInfo("Brute Suit", 241, Rarity.COMMON, mage.cards.b.BruteSuit.class)); cards.add(new SetCardInfo("Careful Cultivation", 178, Rarity.COMMON, mage.cards.c.CarefulCultivation.class)); cards.add(new SetCardInfo("Circuit Mender", 242, Rarity.UNCOMMON, mage.cards.c.CircuitMender.class)); + cards.add(new SetCardInfo("Clawing Torment", 91, Rarity.COMMON, mage.cards.c.ClawingTorment.class)); cards.add(new SetCardInfo("Coiling Stalker", 179, Rarity.COMMON, mage.cards.c.CoilingStalker.class)); cards.add(new SetCardInfo("Colossal Skyturtle", 216, Rarity.UNCOMMON, mage.cards.c.ColossalSkyturtle.class)); cards.add(new SetCardInfo("Covert Technician", 49, Rarity.UNCOMMON, mage.cards.c.CovertTechnician.class));