From df75f329286a7a7381c93b1445ce3d510755d241 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 31 May 2019 20:02:51 -0400 Subject: [PATCH] Implemented Sadistic Obsession --- .../src/mage/cards/s/SadisticObsession.java | 57 +++++++++++++++++++ Mage.Sets/src/mage/sets/ModernHorizons.java | 1 + 2 files changed, 58 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SadisticObsession.java diff --git a/Mage.Sets/src/mage/cards/s/SadisticObsession.java b/Mage.Sets/src/mage/cards/s/SadisticObsession.java new file mode 100644 index 0000000000..eef112e504 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SadisticObsession.java @@ -0,0 +1,57 @@ +package mage.cards.s; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.counters.CounterType; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SadisticObsession extends CardImpl { + + public SadisticObsession(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature has "{B}, {T}: Put a -1/-1 counter on target creature." + ability = new SimpleActivatedAbility(new AddCountersTargetEffect( + CounterType.M1M1.createInstance()), new ManaCostsImpl("{B}") + ); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect( + ability, AttachmentType.AURA, Duration.WhileOnBattlefield + ))); + } + + private SadisticObsession(final SadisticObsession card) { + super(card); + } + + @Override + public SadisticObsession copy() { + return new SadisticObsession(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons.java b/Mage.Sets/src/mage/sets/ModernHorizons.java index 4b8dc80c8f..7473296abf 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons.java @@ -167,6 +167,7 @@ public final class ModernHorizons extends ExpansionSet { cards.add(new SetCardInfo("Rhox Veteran", 24, Rarity.COMMON, mage.cards.r.RhoxVeteran.class)); cards.add(new SetCardInfo("Rotwidow Pack", 212, Rarity.UNCOMMON, mage.cards.r.RotwidowPack.class)); cards.add(new SetCardInfo("Ruination Rioter", 213, Rarity.UNCOMMON, mage.cards.r.RuinationRioter.class)); + cards.add(new SetCardInfo("Sadistic Obsession", 105, Rarity.UNCOMMON, mage.cards.s.SadisticObsession.class)); cards.add(new SetCardInfo("Savage Swipe", 178, Rarity.COMMON, mage.cards.s.SavageSwipe.class)); cards.add(new SetCardInfo("Scale Up", 179, Rarity.UNCOMMON, mage.cards.s.ScaleUp.class)); cards.add(new SetCardInfo("Scour All Possibilities", 67, Rarity.COMMON, mage.cards.s.ScourAllPossibilities.class));