[STX] Implemented Culmination of Studies

This commit is contained in:
Evan Kranzler 2021-03-30 21:08:06 -04:00
parent a929b86a59
commit f6dabece21
3 changed files with 97 additions and 0 deletions

View file

@ -0,0 +1,95 @@
package mage.cards.c;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamagePlayersEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.game.permanent.token.TreasureToken;
import mage.players.Player;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CulminationOfStudies extends CardImpl {
public CulminationOfStudies(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{U}{R}");
// Exile the top X cards of your library. For each land card exiled this way, create a Treasure token. For each blue card exiled this way, draw a card. For each red card exiled this way, Culmination of Studies deals 1 damage to each opponent.
this.getSpellAbility().addEffect(new CulminationOfStudiesEffect());
}
private CulminationOfStudies(final CulminationOfStudies card) {
super(card);
}
@Override
public CulminationOfStudies copy() {
return new CulminationOfStudies(this);
}
}
class CulminationOfStudiesEffect extends OneShotEffect {
private static final FilterCard filterBlue = new FilterCard();
private static final FilterCard filterRed = new FilterCard();
static {
filterBlue.add(new ColorPredicate(ObjectColor.BLUE));
filterRed.add(new ColorPredicate(ObjectColor.RED));
}
CulminationOfStudiesEffect() {
super(Outcome.Benefit);
staticText = "exile the top X cards of your library. For each land card exiled this way, " +
"create a Treasure token. For each blue card exiled this way, draw a card. " +
"For each red card exiled this way, {this} deals 1 damage to each opponent";
}
private CulminationOfStudiesEffect(final CulminationOfStudiesEffect effect) {
super(effect);
}
@Override
public CulminationOfStudiesEffect copy() {
return new CulminationOfStudiesEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, source.getManaCostsToPay().getX()));
player.moveCards(cards, Zone.EXILED, source, game);
cards.removeIf(uuid -> game.getState().getZone(uuid) != Zone.EXILED);
int landCards = cards.count(StaticFilters.FILTER_CARD_LAND, game);
int blueCards = cards.count(filterBlue, game);
int redCards = cards.count(filterRed, game);
if (landCards > 0) {
new TreasureToken().putOntoBattlefield(landCards, game, source, source.getControllerId());
}
if (blueCards > 0) {
player.drawCards(blueCards, source, game);
}
if (redCards > 0) {
new DamagePlayersEffect(redCards, TargetController.OPPONENT).apply(game, source);
}
return true;
}
}

View file

@ -39,6 +39,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet {
cards.add(new SetCardInfo("Bury in Books", 39, Rarity.COMMON, mage.cards.b.BuryInBooks.class));
cards.add(new SetCardInfo("Campus Guide", 252, Rarity.COMMON, mage.cards.c.CampusGuide.class));
cards.add(new SetCardInfo("Combat Professor", 11, Rarity.COMMON, mage.cards.c.CombatProfessor.class));
cards.add(new SetCardInfo("Culmination of Studies", 173, Rarity.RARE, mage.cards.c.CulminationOfStudies.class));
cards.add(new SetCardInfo("Dragonsguard Elite", 127, Rarity.RARE, mage.cards.d.DragonsguardElite.class));
cards.add(new SetCardInfo("Dueling Coach", 15, Rarity.UNCOMMON, mage.cards.d.DuelingCoach.class));
cards.add(new SetCardInfo("Eager First-Year", 16, Rarity.COMMON, mage.cards.e.EagerFirstYear.class));

View file

@ -40644,6 +40644,7 @@ Lisette, Dean of the Root|Strixhaven: School of Mages|161|R|{2}{G}{G}|Legendary
Valentin, Dean of the Vein|Strixhaven: School of Mages|161|R|{B}|Legendary Creature - Vampire Warlock|1|1|Menace, lifelink$If a nontoken creature an opponent controls would die, exile it instead. When you do, you may pay {2}. If you do, create a 1/1 black and green Pest creature token with "When this creature dies, you gain 1 life."|
Blade Historian|Strixhaven: School of Mages|165|R|{R/W}{R/W}{R/W}{R/W}|Creature - Human Cleric|2|3|Attacking creatures you control have double strike.|
Creative Outburst|Strixhaven: School of Mages|171|U|{3}{U}{U}{R}{R}|Instant|||Creative Outburst deals 5 damage to any target. Look at the top five cards of your library. Put one of them into your hand and the rest on he bottom of your library in a random order.${u/r}{u/r}, Discard Creative Outburst: Create a Treasure token.|
Culmination of Studies|Strixhaven: School of Mages|173|R|{X}{U}{R}|Sorcery|||Exile the top X cards of your library. For each land card exiled this way, create a Treasure token. For each blue card exiled this way, draw a card. For each red card exiled this way, Culmination of Studies deals 1 damage to each opponent.|
Hofri Ghostforge|Strixhaven: School of Mages|192|M|{3}{R}{W}|Legendary Creature - Dwarf Cleric|4|5|Spirits you control get +1/+1 and have trample and haste.$Whenever another nontoken creature you control dies, exile it. If you do, create a token that's a copy of that creature, except it's a Spirit in addition to its other types and it has "When this creature leaves the battlefield, return the exiled card to your graveyard."|
Kasmina, Enigma Sage|Strixhaven: School of Mages|196|M|{1}{G}{U}|Legendary Planeswalker - Kasmina|2|Each other planeswalker you control has the loyalty abilities of Kasmina, Enigma Sage.$+2: Scry 1.$X: Create a 0/0 green and blue Fractal creature token. Put X +1/+1 counters on it.$8: Search your library for an instant or sorcery card that shares a color with this planeswalker, exile that card, then shuffle. You may cast that card without paying its mana cost.|
Lorehold Apprentice|Strixhaven: School of Mages|198|U|{R}{W}|Creature - Human Cleric|2|2|Magecraft — Whenever you cast or copy an instant or sorcery spell, until end of turn, Spirit creatures you control gain "{T}: This creature deals 1 damage to each opponent."|