From b2891e90cf288d921fbe0860efe5eefeba5e0ff6 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Thu, 18 Jul 2024 21:07:58 -0400 Subject: [PATCH] [BLB] Implement Scrapshooter --- Mage.Sets/src/mage/cards/s/Scrapshooter.java | 67 ++++++++++++++++++++ Mage.Sets/src/mage/sets/Bloomburrow.java | 1 + 2 files changed, 68 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/Scrapshooter.java diff --git a/Mage.Sets/src/mage/cards/s/Scrapshooter.java b/Mage.Sets/src/mage/cards/s/Scrapshooter.java new file mode 100644 index 00000000000..ff8ecce344d --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/Scrapshooter.java @@ -0,0 +1,67 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.GiftWasPromisedCondition; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.GiftAbility; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.GiftType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class Scrapshooter extends CardImpl { + + private static final FilterPermanent filter + = new FilterArtifactOrEnchantmentPermanent("artifact or enchantment an opponent controls"); + + static { + filter.add(TargetController.OPPONENT.getControllerPredicate()); + } + + public Scrapshooter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + + this.subtype.add(SubType.RACCOON); + this.subtype.add(SubType.ARCHER); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Gift a card + this.addAbility(new GiftAbility(this, GiftType.CARD)); + + // Reach + this.addAbility(ReachAbility.getInstance()); + + // When Scrapshooter enters, if the gift was promised, destroy target artifact or enchantment an opponent controls. + Ability ability = new ConditionalInterveningIfTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect()), + GiftWasPromisedCondition.TRUE, "When {this} enters, if the gift was promised, " + + "destroy target artifact or enchantment an opponent controls." + ); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + private Scrapshooter(final Scrapshooter card) { + super(card); + } + + @Override + public Scrapshooter copy() { + return new Scrapshooter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Bloomburrow.java b/Mage.Sets/src/mage/sets/Bloomburrow.java index b7e61f2aa14..8488f711882 100644 --- a/Mage.Sets/src/mage/sets/Bloomburrow.java +++ b/Mage.Sets/src/mage/sets/Bloomburrow.java @@ -161,6 +161,7 @@ public final class Bloomburrow extends ExpansionSet { cards.add(new SetCardInfo("Savor", 109, Rarity.COMMON, mage.cards.s.Savor.class)); cards.add(new SetCardInfo("Scales of Shale", 110, Rarity.COMMON, mage.cards.s.ScalesOfShale.class)); cards.add(new SetCardInfo("Scavenger's Talent", 111, Rarity.RARE, mage.cards.s.ScavengersTalent.class)); + cards.add(new SetCardInfo("Scrapshooter", 191, Rarity.RARE, mage.cards.s.Scrapshooter.class)); cards.add(new SetCardInfo("Seasoned Warrenguard", 30, Rarity.UNCOMMON, mage.cards.s.SeasonedWarrenguard.class)); cards.add(new SetCardInfo("Seedglaive Mentor", 231, Rarity.UNCOMMON, mage.cards.s.SeedglaiveMentor.class)); cards.add(new SetCardInfo("Seedpod Squire", 232, Rarity.COMMON, mage.cards.s.SeedpodSquire.class));