mirror of
https://github.com/correl/mage.git
synced 2024-11-24 19:19:56 +00:00
[40K] Implement Triumph of Saint Katherine (closes #10125)
This commit is contained in:
parent
fd10d7f536
commit
1cb737537e
2 changed files with 92 additions and 0 deletions
91
Mage.Sets/src/mage/cards/t/TriumphOfSaintKatherine.java
Normal file
91
Mage.Sets/src/mage/cards/t/TriumphOfSaintKatherine.java
Normal file
|
@ -0,0 +1,91 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.abilities.keyword.MiracleAbility;
|
||||
import mage.cards.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TriumphOfSaintKatherine extends CardImpl {
|
||||
|
||||
public TriumphOfSaintKatherine(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WARRIOR);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Lifelink
|
||||
this.addAbility(LifelinkAbility.getInstance());
|
||||
|
||||
// Praesidium Protectiva -- When Triumph of Saint Katherine dies, exile it and the top six cards of your library in a face-down pile. If you do, shuffle that pile and put it back on top of your library.
|
||||
this.addAbility(new DiesSourceTriggeredAbility(new TriumphOfSaintKatherineEffect()).withFlavorWord("Praesidium Protectiva"));
|
||||
|
||||
// Miracle {1}{W}
|
||||
this.addAbility(new MiracleAbility("{1}{W}"));
|
||||
}
|
||||
|
||||
private TriumphOfSaintKatherine(final TriumphOfSaintKatherine card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TriumphOfSaintKatherine copy() {
|
||||
return new TriumphOfSaintKatherine(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TriumphOfSaintKatherineEffect extends OneShotEffect {
|
||||
|
||||
TriumphOfSaintKatherineEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "exile it and the top six cards of your library in a face-down pile. " +
|
||||
"If you do, shuffle that pile and put it back on top of your library";
|
||||
}
|
||||
|
||||
private TriumphOfSaintKatherineEffect(final TriumphOfSaintKatherineEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TriumphOfSaintKatherineEffect copy() {
|
||||
return new TriumphOfSaintKatherineEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Card card = game.getCard(source.getSourceId());
|
||||
if (player == null || card == null) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl();
|
||||
if (card.getZoneChangeCounter(game) == source.getSourceObjectZoneChangeCounter()) {
|
||||
cards.add(card);
|
||||
}
|
||||
cards.addAll(player.getLibrary().getTopCards(game, 6));
|
||||
if (cards.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
player.moveCards(cards, Zone.EXILED, source, game);
|
||||
cards.getCards(game)
|
||||
.stream()
|
||||
.forEach(c -> c.setFaceDown(true, game));
|
||||
player.putCardsOnTopOfLibrary(cards, game, source, false);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -277,6 +277,7 @@ public final class Warhammer40000 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Trazyn the Infinite", 65, Rarity.RARE, mage.cards.t.TrazynTheInfinite.class));
|
||||
cards.add(new SetCardInfo("Triarch Praetorian", 66, Rarity.UNCOMMON, mage.cards.t.TriarchPraetorian.class));
|
||||
cards.add(new SetCardInfo("Triarch Stalker", 67, Rarity.RARE, mage.cards.t.TriarchStalker.class));
|
||||
cards.add(new SetCardInfo("Triumph of Saint Katherine", 17, Rarity.RARE, mage.cards.t.TriumphOfSaintKatherine.class));
|
||||
cards.add(new SetCardInfo("Trygon Prime", 143, Rarity.UNCOMMON, mage.cards.t.TrygonPrime.class));
|
||||
cards.add(new SetCardInfo("Tyranid Harridan", 144, Rarity.RARE, mage.cards.t.TyranidHarridan.class));
|
||||
cards.add(new SetCardInfo("Tyranid Invasion", 102, Rarity.UNCOMMON, mage.cards.t.TyranidInvasion.class));
|
||||
|
|
Loading…
Reference in a new issue