From 487d8b57c207c2e74962fe03bf1e682aea508ad1 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 7 Sep 2020 11:22:12 -0400 Subject: [PATCH] [ZNR] Implemented Skyclave Pickaxe --- .../src/mage/cards/s/SkyclavePickAxe.java | 84 +++++++++++++++++++ Mage.Sets/src/mage/sets/ZendikarRising.java | 1 + 2 files changed, 85 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SkyclavePickAxe.java diff --git a/Mage.Sets/src/mage/cards/s/SkyclavePickAxe.java b/Mage.Sets/src/mage/cards/s/SkyclavePickAxe.java new file mode 100644 index 00000000000..3e342f51883 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SkyclavePickAxe.java @@ -0,0 +1,84 @@ +package mage.cards.s; + +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.LandfallAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.keyword.EquipAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SkyclavePickAxe extends CardImpl { + + public SkyclavePickAxe(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{G}"); + + this.subtype.add(SubType.EQUIPMENT); + + // Skyclave Pick-Axe enters the battlefield, attach it to target creature you control. + Ability ability = new EntersBattlefieldTriggeredAbility(new AttachEffect( + Outcome.BoostCreature, "attach it to target creature you control" + ), false); + ability.addTarget(new TargetControlledCreaturePermanent()); + this.addAbility(ability); + + // Landfall — Whenever a land enters the battlefield under your control, equipped creature gets +2/+2 until end of turn. + this.addAbility(new LandfallAbility(new SkyclavePickAxeEffect())); + + // Equip {2}{G} + this.addAbility(new EquipAbility(Outcome.BoostCreature, new ManaCostsImpl<>("{2}{W}{W}"))); + } + + private SkyclavePickAxe(final SkyclavePickAxe card) { + super(card); + } + + @Override + public SkyclavePickAxe copy() { + return new SkyclavePickAxe(this); + } +} + +class SkyclavePickAxeEffect extends OneShotEffect { + + SkyclavePickAxeEffect() { + super(Outcome.Benefit); + staticText = "equipped creature gets +2/+2 until end of turn"; + } + + private SkyclavePickAxeEffect(final SkyclavePickAxeEffect effect) { + super(effect); + } + + @Override + public SkyclavePickAxeEffect copy() { + return new SkyclavePickAxeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (permanent == null) { + return false; + } + game.addEffect(new BoostTargetEffect(2, 2).setTargetPointer( + new FixedTarget(game.getPermanent(permanent.getAttachedTo()), game) + ), source); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/ZendikarRising.java b/Mage.Sets/src/mage/sets/ZendikarRising.java index 4d6f6e0d240..e87a0bd20c4 100644 --- a/Mage.Sets/src/mage/sets/ZendikarRising.java +++ b/Mage.Sets/src/mage/sets/ZendikarRising.java @@ -225,6 +225,7 @@ public final class ZendikarRising extends ExpansionSet { cards.add(new SetCardInfo("Skyclave Basilica", 40, Rarity.UNCOMMON, mage.cards.s.SkyclaveBasilica.class)); cards.add(new SetCardInfo("Skyclave Cleric", 40, Rarity.UNCOMMON, mage.cards.s.SkyclaveCleric.class)); cards.add(new SetCardInfo("Skyclave Geopede", 163, Rarity.UNCOMMON, mage.cards.s.SkyclaveGeopede.class)); + cards.add(new SetCardInfo("Skyclave Pick-Axe", 204, Rarity.UNCOMMON, mage.cards.s.SkyclavePickAxe.class)); cards.add(new SetCardInfo("Sneaking Guide", 164, Rarity.COMMON, mage.cards.s.SneakingGuide.class)); cards.add(new SetCardInfo("Song-Mad Ruins", 165, Rarity.UNCOMMON, mage.cards.s.SongMadRuins.class)); cards.add(new SetCardInfo("Song-Mad Treachery", 165, Rarity.UNCOMMON, mage.cards.s.SongMadTreachery.class));