implemented and tested Centaur Nurterer and Contentious Plan

This commit is contained in:
Antoni 2019-04-17 19:40:09 -04:00
commit d280db4c11
9 changed files with 336 additions and 4 deletions

View file

@ -34,7 +34,7 @@ public final class AshiokDreamRender extends CardImpl {
this.addAbility(new SimpleStaticAbility(new AshiokDreamRenderEffect()));
// -1: Target player puts the top four cards of their library into their graveyard. Then exile each opponent's graveyard.
Ability ability = new LoyaltyAbility(new PutTopCardOfLibraryIntoGraveTargetEffect(2), -1);
Ability ability = new LoyaltyAbility(new PutTopCardOfLibraryIntoGraveTargetEffect(4), -1);
ability.addEffect(new ExileGraveyardAllPlayersEffect(StaticFilters.FILTER_CARD, TargetController.OPPONENT).setText("Then exile each opponent's graveyard."));
this.addAbility(ability);
}

View file

@ -0,0 +1,109 @@
package mage.cards.b;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.Costs;
import mage.abilities.costs.CostsImpl;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.AsThoughEffectImpl;
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
import mage.abilities.effects.common.continuous.LookAtTopCardOfLibraryAnyTimeEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/**
* @author jeffwadsworth
*/
public final class BolassCitadel extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("nonland permanents");
static {
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
}
public BolassCitadel(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}{B}{B}{B}");
this.addSuperType(SuperType.LEGENDARY);
// You may look at the top card of your library any time.
this.addAbility(new SimpleStaticAbility(new LookAtTopCardOfLibraryAnyTimeEffect()));
// You may play the top card of your library. If you cast a spell this way, pay life equal to its converted mana cost rather than pay its mana cost.
this.addAbility(new SimpleStaticAbility(new BolassCitadelPlayTheTopCardEffect()));
// {T}, Sacrifice ten nonland permanents: Each opponent loses 10 life.
Ability ability = new SimpleActivatedAbility(new LoseLifeOpponentsEffect(10), new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(
10, 10, filter, true
)));
this.addAbility(ability);
}
private BolassCitadel(final BolassCitadel card) {
super(card);
}
@Override
public BolassCitadel copy() {
return new BolassCitadel(this);
}
}
class BolassCitadelPlayTheTopCardEffect extends AsThoughEffectImpl {
BolassCitadelPlayTheTopCardEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE,
Duration.WhileOnBattlefield, Outcome.AIDontUseIt); // AI will need help with this
staticText = "You may play the top card of your library. If you cast a spell this way, " +
"pay life equal to its converted mana cost rather than pay its mana cost.";
}
private BolassCitadelPlayTheTopCardEffect(final BolassCitadelPlayTheTopCardEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
return true;
}
@Override
public BolassCitadelPlayTheTopCardEffect copy() {
return new BolassCitadelPlayTheTopCardEffect(this);
}
@Override
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
Card cardOnTop = game.getCard(objectId);
if (cardOnTop != null
&& affectedControllerId.equals(source.getControllerId())
&& cardOnTop.isOwnedBy(source.getControllerId())
|| cardOnTop.isLand()) {
Player controller = game.getPlayer(cardOnTop.getOwnerId());
if (controller != null
&& cardOnTop.equals(controller.getLibrary().getFromTop(game))) {
PayLifeCost cost = new PayLifeCost(cardOnTop.getManaCost().convertedManaCost());
Costs costs = new CostsImpl();
costs.add(cost);
controller.setCastSourceIdWithAlternateMana(cardOnTop.getId(), null, costs);
return true;
}
}
return false;
}
}

View file

@ -0,0 +1,79 @@
package mage.cards.c;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.*;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInGraveyard;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CommandTheDreadhorde extends CardImpl {
private static final FilterCard filter = new FilterCard("creature and/or planeswalker cards in graveyards");
static {
filter.add(Predicates.or(
new CardTypePredicate(CardType.PLANESWALKER),
new CardTypePredicate(CardType.CREATURE)
));
}
public CommandTheDreadhorde(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}{B}");
// Choose any number of target creature and/or planeswalker cards in graveyards. Command the Dreadhorde deals damage to you equal to the total converted mana cost of those cards. Put them onto the battlefield under your control.
this.getSpellAbility().addEffect(new CommandTheDreadhordeEffect());
this.getSpellAbility().addTarget(new TargetCardInGraveyard(0, Integer.MAX_VALUE, filter));
}
private CommandTheDreadhorde(final CommandTheDreadhorde card) {
super(card);
}
@Override
public CommandTheDreadhorde copy() {
return new CommandTheDreadhorde(this);
}
}
class CommandTheDreadhordeEffect extends OneShotEffect {
CommandTheDreadhordeEffect() {
super(Outcome.Benefit);
staticText = "Choose any number of target creature and/or planeswalker cards in graveyards. " +
"{this} deals damage to you equal to the total converted mana cost of those cards. " +
"Put them onto the battlefield under your control.";
}
private CommandTheDreadhordeEffect(final CommandTheDreadhordeEffect effect) {
super(effect);
}
@Override
public CommandTheDreadhordeEffect copy() {
return new CommandTheDreadhordeEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Cards cards = new CardsImpl(source.getTargets().get(0).getTargets());
int damage = cards.getCards(game).stream().mapToInt(Card::getConvertedManaCost).sum();
player.damage(damage, source.getSourceId(), game);
return player.moveCards(cards, Zone.BATTLEFIELD, source, game);
}
}

View file

@ -0,0 +1,67 @@
package mage.cards.f;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.game.Game;
import mage.game.permanent.token.AngelVigilanceToken;
import mage.game.permanent.token.SoldierVigilanceToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class FinaleOfGlory extends CardImpl {
public FinaleOfGlory(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{W}{W}");
// Create X 2/2 white Soldier creature tokens with vigilance. If X is 10 or more, also create X 4/4 white Angel creature tokens with flying and vigilance.
this.getSpellAbility().addEffect(new FinaleOfGloryEffect());
}
private FinaleOfGlory(final FinaleOfGlory card) {
super(card);
}
@Override
public FinaleOfGlory copy() {
return new FinaleOfGlory(this);
}
}
class FinaleOfGloryEffect extends OneShotEffect {
FinaleOfGloryEffect() {
super(Outcome.Benefit);
staticText = "Create X 2/2 white Soldier creature tokens with vigilance. " +
"If X is 10 or more, also create X 4/4 white Angel creature tokens with flying and vigilance.";
}
private FinaleOfGloryEffect(final FinaleOfGloryEffect effect) {
super(effect);
}
@Override
public FinaleOfGloryEffect copy() {
return new FinaleOfGloryEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
int xValue = source.getManaCostsToPay().getX();
if (xValue == 0) {
return false;
}
new CreateTokenEffect(new SoldierVigilanceToken(), xValue).apply(game, source);
if (xValue >= 10) {
new CreateTokenEffect(new AngelVigilanceToken(), xValue).apply(game, source);
}
return true;
}
}

View file

@ -0,0 +1,32 @@
package mage.cards.s;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.common.TargetPlayerOrPlaneswalker;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SarkhansCatharsis extends CardImpl {
public SarkhansCatharsis(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{R}");
// Sarkhan's Catharsis deals 5 damage to target player or planeswalker.
this.getSpellAbility().addEffect(new DamageTargetEffect(5));
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
}
private SarkhansCatharsis(final SarkhansCatharsis card) {
super(card);
}
@Override
public SarkhansCatharsis copy() {
return new SarkhansCatharsis(this);
}
}

View file

@ -49,7 +49,7 @@ public final class StormTheCitadel extends CardImpl {
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(
ability, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE
).setText("and gain \"Whenever this creature deals combat damage to a creature or planeswalker, " +
).setText("and gain \"Whenever this creature deals combat damage to a player or planeswalker, " +
"destroy target artifact or enchantment defending player controls.\""
));
}

View file

@ -42,6 +42,7 @@ public final class WarOfTheSpark extends ExpansionSet {
cards.add(new SetCardInfo("Blast Zone", 244, Rarity.RARE, mage.cards.b.BlastZone.class));
cards.add(new SetCardInfo("Blindblast", 114, Rarity.COMMON, mage.cards.b.Blindblast.class));
cards.add(new SetCardInfo("Bloom Hulk", 154, Rarity.COMMON, mage.cards.b.BloomHulk.class));
cards.add(new SetCardInfo("Bolas's Citadel", 79, Rarity.RARE, mage.cards.b.BolassCitadel.class));
cards.add(new SetCardInfo("Bolt Bend", 115, Rarity.UNCOMMON, mage.cards.b.BoltBend.class));
cards.add(new SetCardInfo("Bond of Discipline", 6, Rarity.UNCOMMON, mage.cards.b.BondOfDiscipline.class));
cards.add(new SetCardInfo("Bond of Flourishing", 155, Rarity.UNCOMMON, mage.cards.b.BondOfFlourishing.class));
@ -57,6 +58,7 @@ public final class WarOfTheSpark extends ExpansionSet {
cards.add(new SetCardInfo("Chandra's Pyrohelix", 120, Rarity.COMMON, mage.cards.c.ChandrasPyrohelix.class));
cards.add(new SetCardInfo("Chandra's Triumph", 121, Rarity.UNCOMMON, mage.cards.c.ChandrasTriumph.class));
cards.add(new SetCardInfo("Chandra, Fire Artisan", 119, Rarity.RARE, mage.cards.c.ChandraFireArtisan.class));
cards.add(new SetCardInfo("Command the Dreadhorde", 82, Rarity.RARE, mage.cards.c.CommandTheDreadhorde.class));
cards.add(new SetCardInfo("Commence the Endgame", 45, Rarity.RARE, mage.cards.c.CommenceTheEndgame.class));
cards.add(new SetCardInfo("Contentious Plan", 46, Rarity.COMMON, mage.cards.c.ContentiousPlan.class));
cards.add(new SetCardInfo("Courage in Crisis", 158, Rarity.COMMON, mage.cards.c.CourageInCrisis.class));
@ -87,6 +89,7 @@ public final class WarOfTheSpark extends ExpansionSet {
cards.add(new SetCardInfo("Evolution Sage", 159, Rarity.UNCOMMON, mage.cards.e.EvolutionSage.class));
cards.add(new SetCardInfo("Fblthp, the Lost", 50, Rarity.RARE, mage.cards.f.FblthpTheLost.class));
cards.add(new SetCardInfo("Feather, the Redeemed", 197, Rarity.RARE, mage.cards.f.FeatherTheRedeemed.class));
cards.add(new SetCardInfo("Finale of Glory", 12, Rarity.MYTHIC, mage.cards.f.FinaleOfGlory.class));
cards.add(new SetCardInfo("Finale of Revelation", 51, Rarity.MYTHIC, mage.cards.f.FinaleOfRevelation.class));
cards.add(new SetCardInfo("Firemind Vessel", 237, Rarity.UNCOMMON, mage.cards.f.FiremindVessel.class));
cards.add(new SetCardInfo("Flux Channeler", 52, Rarity.UNCOMMON, mage.cards.f.FluxChanneler.class));
@ -196,6 +199,7 @@ public final class WarOfTheSpark extends ExpansionSet {
cards.add(new SetCardInfo("Saheeli, Sublime Artificer", 234, Rarity.UNCOMMON, mage.cards.s.SaheeliSublimeArtificer.class));
cards.add(new SetCardInfo("Samut's Sprint", 142, Rarity.COMMON, mage.cards.s.SamutsSprint.class));
cards.add(new SetCardInfo("Samut, Tyrant Smasher", 235, Rarity.UNCOMMON, mage.cards.s.SamutTyrantSmasher.class));
cards.add(new SetCardInfo("Sarkhan's Catharsis", 144, Rarity.COMMON, mage.cards.s.SarkhansCatharsis.class));
cards.add(new SetCardInfo("Shriekdiver", 103, Rarity.COMMON, mage.cards.s.Shriekdiver.class));
cards.add(new SetCardInfo("Silent Submersible", 66, Rarity.RARE, mage.cards.s.SilentSubmersible.class));
cards.add(new SetCardInfo("Single Combat", 30, Rarity.RARE, mage.cards.s.SingleCombat.class));