From 60e47a88fe1f6285cf6943422068eca023a79148 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Fri, 23 Feb 2024 10:00:38 -0500 Subject: [PATCH] [PIP] Implement Brotherhood Outcast --- .../src/mage/cards/b/BrotherhoodOutcast.java | 65 +++++++++++++++++++ Mage.Sets/src/mage/sets/Fallout.java | 1 + 2 files changed, 66 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BrotherhoodOutcast.java diff --git a/Mage.Sets/src/mage/cards/b/BrotherhoodOutcast.java b/Mage.Sets/src/mage/cards/b/BrotherhoodOutcast.java new file mode 100644 index 00000000000..71c3772f137 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BrotherhoodOutcast.java @@ -0,0 +1,65 @@ +package mage.cards.b; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ManaValuePredicate; +import mage.target.common.TargetCardInYourGraveyard; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class BrotherhoodOutcast extends CardImpl { + + private static final FilterCard filter = new FilterCard("Aura or Equipment card with mana value 3 or less from your graveyard"); + + static { + filter.add(Predicates.or( + SubType.AURA.getPredicate(), + SubType.EQUIPMENT.getPredicate() + )); + filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4)); + } + + public BrotherhoodOutcast(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // When Brotherhood Outcast enters the battlefield, choose one -- + // * Return target Aura or Equipment card with mana value 3 or less from your graveyard to the battlefield. + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + + // * Put a shield counter on target creature. + ability.addMode(new Mode(new AddCountersTargetEffect(CounterType.SHIELD.createInstance())) + .addTarget(new TargetCreaturePermanent())); + this.addAbility(ability); + } + + private BrotherhoodOutcast(final BrotherhoodOutcast card) { + super(card); + } + + @Override + public BrotherhoodOutcast copy() { + return new BrotherhoodOutcast(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Fallout.java b/Mage.Sets/src/mage/sets/Fallout.java index d88ae7dece1..33824b6b5bc 100644 --- a/Mage.Sets/src/mage/sets/Fallout.java +++ b/Mage.Sets/src/mage/sets/Fallout.java @@ -40,6 +40,7 @@ public final class Fallout extends ExpansionSet { cards.add(new SetCardInfo("Boomer Scrapper", 95, Rarity.RARE, mage.cards.b.BoomerScrapper.class)); cards.add(new SetCardInfo("Brass Knuckles", 227, Rarity.UNCOMMON, mage.cards.b.BrassKnuckles.class)); cards.add(new SetCardInfo("Break Down", 74, Rarity.UNCOMMON, mage.cards.b.BreakDown.class)); + cards.add(new SetCardInfo("Brotherhood Outcast", 12, Rarity.UNCOMMON, mage.cards.b.BrotherhoodOutcast.class)); cards.add(new SetCardInfo("Buried Ruin", 254, Rarity.UNCOMMON, mage.cards.b.BuriedRuin.class)); cards.add(new SetCardInfo("Canopy Vista", 255, Rarity.RARE, mage.cards.c.CanopyVista.class)); cards.add(new SetCardInfo("Canyon Slough", 256, Rarity.RARE, mage.cards.c.CanyonSlough.class));