mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[SNC] Implemented Cabaretti Courtyard
This commit is contained in:
parent
b4a5ac8c0d
commit
6263198b72
2 changed files with 58 additions and 0 deletions
57
Mage.Sets/src/mage/cards/c/CabarettiCourtyard.java
Normal file
57
Mage.Sets/src/mage/cards/c/CabarettiCourtyard.java
Normal file
|
@ -0,0 +1,57 @@
|
|||
package mage.cards.c;
|
||||
|
||||
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 CabarettiCourtyard extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("a basic Mountain, Forest, or Plains card");
|
||||
|
||||
static {
|
||||
filter.add(SuperType.BASIC.getPredicate());
|
||||
filter.add(Predicates.or(
|
||||
SubType.MOUNTAIN.getPredicate(),
|
||||
SubType.FOREST.getPredicate(),
|
||||
SubType.PLAINS.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
public CabarettiCourtyard(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
// When Cabaretti Courtyard enters the battlefield, sacrifice it. When you do, search your library for a basic Mountain, Forest, or Plains 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 CabarettiCourtyard(final CabarettiCourtyard card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CabarettiCourtyard copy() {
|
||||
return new CabarettiCourtyard(this);
|
||||
}
|
||||
}
|
|
@ -41,6 +41,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Buy Your Silence", 6, Rarity.COMMON, mage.cards.b.BuyYourSilence.class));
|
||||
cards.add(new SetCardInfo("Cabaretti Ascendency", 172, Rarity.RARE, mage.cards.c.CabarettiAscendency.class));
|
||||
cards.add(new SetCardInfo("Cabaretti Charm", 173, Rarity.UNCOMMON, mage.cards.c.CabarettiCharm.class));
|
||||
cards.add(new SetCardInfo("Cabaretti Courtyard", 249, Rarity.COMMON, mage.cards.c.CabarettiCourtyard.class));
|
||||
cards.add(new SetCardInfo("Celebrity Fencer", 7, Rarity.COMMON, mage.cards.c.CelebrityFencer.class));
|
||||
cards.add(new SetCardInfo("Cemetery Tampering", 69, Rarity.RARE, mage.cards.c.CemeteryTampering.class));
|
||||
cards.add(new SetCardInfo("Ceremonial Groundbreaker", 175, Rarity.UNCOMMON, mage.cards.c.CeremonialGroundbreaker.class));
|
||||
|
|
Loading…
Reference in a new issue