mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
Implemented Kaalia, Zenith Seeker
This commit is contained in:
parent
efed7bea34
commit
3ea08e5c6e
2 changed files with 113 additions and 0 deletions
112
Mage.Sets/src/mage/cards/k/KaaliaZenithSeeker.java
Normal file
112
Mage.Sets/src/mage/cards/k/KaaliaZenithSeeker.java
Normal file
|
@ -0,0 +1,112 @@
|
||||||
|
package mage.cards.k;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.abilities.keyword.VigilanceAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.Cards;
|
||||||
|
import mage.cards.CardsImpl;
|
||||||
|
import mage.constants.*;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetCard;
|
||||||
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class KaaliaZenithSeeker extends CardImpl {
|
||||||
|
|
||||||
|
public KaaliaZenithSeeker(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{W}{B}");
|
||||||
|
|
||||||
|
this.addSuperType(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
this.subtype.add(SubType.CLERIC);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// Vigilance
|
||||||
|
this.addAbility(VigilanceAbility.getInstance());
|
||||||
|
|
||||||
|
// When Kaalia, Zenith Seeker enters the battlefield, look at the top six cards of your library. You may reveal an Angel card, a Demon card, and/or a Dragon card from among them and put them into your hand. Put the rest on the bottom of your library in a random order.
|
||||||
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new KaaliaZenithSeekerEffect()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private KaaliaZenithSeeker(final KaaliaZenithSeeker card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KaaliaZenithSeeker copy() {
|
||||||
|
return new KaaliaZenithSeeker(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class KaaliaZenithSeekerEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
private enum CreatureFinder {
|
||||||
|
ANGEL(SubType.ANGEL),
|
||||||
|
DEMON(SubType.DEMON),
|
||||||
|
DRAGON(SubType.DRAGON);
|
||||||
|
|
||||||
|
private final FilterCard filterCard;
|
||||||
|
|
||||||
|
private CreatureFinder(SubType subType) {
|
||||||
|
this.filterCard = new FilterCard("a " + subType.toString() + " card");
|
||||||
|
this.filterCard.add(new SubtypePredicate(subType));
|
||||||
|
}
|
||||||
|
|
||||||
|
private TargetCard getTarget() {
|
||||||
|
return new TargetCardInLibrary(0, 1, filterCard);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
KaaliaZenithSeekerEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "look at the top six cards of your library. " +
|
||||||
|
"You may reveal an Angel card, a Demon card, and/or a Dragon card " +
|
||||||
|
"from among them and put them into your hand. " +
|
||||||
|
"Put the rest on the bottom of your library in a random order.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private KaaliaZenithSeekerEffect(final KaaliaZenithSeekerEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KaaliaZenithSeekerEffect copy() {
|
||||||
|
return new KaaliaZenithSeekerEffect(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, 6));
|
||||||
|
Cards toHand = new CardsImpl();
|
||||||
|
for (CreatureFinder creatureFinder : CreatureFinder.values()) {
|
||||||
|
TargetCard targetCard = creatureFinder.getTarget();
|
||||||
|
if (player.choose(outcome, cards, targetCard, game)) {
|
||||||
|
toHand.addAll(targetCard.getTargets());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cards.removeAll(toHand);
|
||||||
|
player.moveCards(toHand, Zone.HAND, source, game);
|
||||||
|
player.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -50,6 +50,7 @@ public final class CoreSet2020 extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Goblin Ringleader", 141, Rarity.UNCOMMON, mage.cards.g.GoblinRingleader.class));
|
cards.add(new SetCardInfo("Goblin Ringleader", 141, Rarity.UNCOMMON, mage.cards.g.GoblinRingleader.class));
|
||||||
cards.add(new SetCardInfo("Infuriate", 145, Rarity.COMMON, mage.cards.i.Infuriate.class));
|
cards.add(new SetCardInfo("Infuriate", 145, Rarity.COMMON, mage.cards.i.Infuriate.class));
|
||||||
cards.add(new SetCardInfo("Ironroot Warlord", 209, Rarity.UNCOMMON, mage.cards.i.IronrootWarlord.class));
|
cards.add(new SetCardInfo("Ironroot Warlord", 209, Rarity.UNCOMMON, mage.cards.i.IronrootWarlord.class));
|
||||||
|
cards.add(new SetCardInfo("Kaalia, Zenith Seeker", 210, Rarity.MYTHIC, mage.cards.k.KaaliaZenithSeeker.class));
|
||||||
cards.add(new SetCardInfo("Kykar, Wind's Fury", 212, Rarity.MYTHIC, mage.cards.k.KykarWindsFury.class));
|
cards.add(new SetCardInfo("Kykar, Wind's Fury", 212, Rarity.MYTHIC, mage.cards.k.KykarWindsFury.class));
|
||||||
cards.add(new SetCardInfo("Leyline of Sanctity", 26, Rarity.RARE, mage.cards.l.LeylineOfSanctity.class));
|
cards.add(new SetCardInfo("Leyline of Sanctity", 26, Rarity.RARE, mage.cards.l.LeylineOfSanctity.class));
|
||||||
cards.add(new SetCardInfo("Leyline of the Void", 107, Rarity.RARE, mage.cards.l.LeylineOfTheVoid.class));
|
cards.add(new SetCardInfo("Leyline of the Void", 107, Rarity.RARE, mage.cards.l.LeylineOfTheVoid.class));
|
||||||
|
|
Loading…
Reference in a new issue