From fb9b69ae9a875b390e79b0cfe8cf118070add203 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 9 Jan 2019 12:31:53 -0500 Subject: [PATCH] Implemented Bedeck // Bedazzle --- .../src/mage/cards/b/BedeckBedazzle.java | 83 +++++++++++++++++++ .../src/mage/sets/RavnicaAllegiance.java | 1 + 2 files changed, 84 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BedeckBedazzle.java diff --git a/Mage.Sets/src/mage/cards/b/BedeckBedazzle.java b/Mage.Sets/src/mage/cards/b/BedeckBedazzle.java new file mode 100644 index 0000000000..272627c856 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BedeckBedazzle.java @@ -0,0 +1,83 @@ +package mage.cards.b; + +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardSetInfo; +import mage.cards.SplitCard; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SpellAbilityType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetLandPermanent; +import mage.target.common.TargetOpponentOrPlaneswalker; +import mage.target.targetpointer.FixedTarget; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class BedeckBedazzle extends SplitCard { + + public BedeckBedazzle(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B/R}{B/R}", "{4}{B}{R}", SpellAbilityType.SPLIT); + + // Bedeck + // Target creature gets +3/-3 until end of turn. + this.getLeftHalfCard().getSpellAbility().addEffect( + new BoostTargetEffect(3, -3, Duration.EndOfTurn) + ); + this.getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Bedazzle + // Destroy target nonbasic land. Bedazzle deals 2 damage to target opponent or planeswalker. + this.getRightHalfCard().getSpellAbility().addEffect(new BedazzleEffect()); + this.getRightHalfCard().getSpellAbility().addTarget(new TargetLandPermanent()); + this.getSpellAbility().addTarget(new TargetOpponentOrPlaneswalker()); + } + + private BedeckBedazzle(final BedeckBedazzle card) { + super(card); + } + + @Override + public BedeckBedazzle copy() { + return new BedeckBedazzle(this); + } +} + +class BedazzleEffect extends OneShotEffect { + + BedazzleEffect() { + super(Outcome.Benefit); + staticText = "Destroy target nonbasic land. {this} deals 2 damage to target opponent or planeswalker."; + } + + private BedazzleEffect(final BedazzleEffect effect) { + super(effect); + } + + @Override + public BedazzleEffect copy() { + return new BedazzleEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + permanent.destroy(source.getSourceId(), game, false); + } + Effect effect = new DamageTargetEffect(new StaticValue(2), true, "", true); + effect.setTargetPointer(new FixedTarget(source.getTargets().get(0).getFirstTarget(), game)); + effect.apply(game, source); + return true; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java index 670de0fd1f..e03072c9e9 100644 --- a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java +++ b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java @@ -46,6 +46,7 @@ public final class RavnicaAllegiance extends ExpansionSet { cards.add(new SetCardInfo("Azorius Skyguard", 155, Rarity.UNCOMMON, mage.cards.a.AzoriusSkyguard.class)); cards.add(new SetCardInfo("Bankrupt in Blood", 62, Rarity.UNCOMMON, mage.cards.b.BankruptInBlood.class)); cards.add(new SetCardInfo("Basilica Bell-Haunt", 156, Rarity.UNCOMMON, mage.cards.b.BasilicaBellHaunt.class)); + cards.add(new SetCardInfo("Bedeck // Bedazzle", 221, Rarity.RARE, mage.cards.b.BedeckBedazzle.class)); cards.add(new SetCardInfo("Bedevil", 157, Rarity.RARE, mage.cards.b.Bedevil.class)); cards.add(new SetCardInfo("Benthic Biomancer", 32, Rarity.RARE, mage.cards.b.BenthicBiomancer.class)); cards.add(new SetCardInfo("Biogenic Upgrade", 123, Rarity.UNCOMMON, mage.cards.b.BiogenicUpgrade.class));