[SNC] Implemented Brokers Hideout

This commit is contained in:
Evan Kranzler 2022-04-16 08:46:25 -04:00
parent 34a01b1c2b
commit 52bf847d86
2 changed files with 59 additions and 0 deletions

View file

@ -0,0 +1,58 @@
package mage.cards.b;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.effects.common.DoWhenCostPaid;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BrokersHideout extends CardImpl {
private static final FilterCard filter = new FilterCard("a basic Forest, Plains, or Island card");
static {
filter.add(SuperType.BASIC.getPredicate());
filter.add(Predicates.or(
SubType.FOREST.getPredicate(),
SubType.PLAINS.getPredicate(),
SubType.ISLAND.getPredicate()
));
}
public BrokersHideout(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// When Brokers Hideout enters the battlefield, sacrifice it. When you do, search your library for a basic Forest, Plains, or Island card, put it onto the battlefield tapped, then shuffle and you gain 1 life.
ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(new SearchLibraryPutInPlayEffect(
new TargetCardInLibrary(filter), true, true
), false);
ability.addEffect(new GainLifeEffect(1).concatBy("and"));
this.addAbility(new EntersBattlefieldTriggeredAbility(new DoWhenCostPaid(
ability, new SacrificeSourceCost(), null, false
)));
}
private BrokersHideout(final BrokersHideout card) {
super(card);
}
@Override
public BrokersHideout copy() {
return new BrokersHideout(this);
}
}

View file

@ -50,6 +50,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
cards.add(new SetCardInfo("Broken Wings", 136, Rarity.COMMON, mage.cards.b.BrokenWings.class));
cards.add(new SetCardInfo("Brokers Ascendancy", 170, Rarity.RARE, mage.cards.b.BrokersAscendancy.class));
cards.add(new SetCardInfo("Brokers Charm", 171, Rarity.UNCOMMON, mage.cards.b.BrokersCharm.class));
cards.add(new SetCardInfo("Brokers Hideout", 248, Rarity.COMMON, mage.cards.b.BrokersHideout.class));
cards.add(new SetCardInfo("Brokers Initiate", 5, Rarity.COMMON, mage.cards.b.BrokersInitiate.class));
cards.add(new SetCardInfo("Buy Your Silence", 6, Rarity.COMMON, mage.cards.b.BuyYourSilence.class));
cards.add(new SetCardInfo("Cabaretti Ascendancy", 172, Rarity.RARE, mage.cards.c.CabarettiAscendancy.class));