mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
[NEO] Implemented Blossom Prancer
This commit is contained in:
parent
d6e6d6b638
commit
7317ba8c00
2 changed files with 100 additions and 0 deletions
99
Mage.Sets/src/mage/cards/b/BlossomPrancer.java
Normal file
99
Mage.Sets/src/mage/cards/b/BlossomPrancer.java
Normal file
|
@ -0,0 +1,99 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
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 BlossomPrancer extends CardImpl {
|
||||
|
||||
public BlossomPrancer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
|
||||
|
||||
this.subtype.add(SubType.SPIRIT);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Reach
|
||||
this.addAbility(ReachAbility.getInstance());
|
||||
|
||||
// When Blossom Prancer enters the battlefield, look at the top five cards of your library. You may reveal a creature or enchantment card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. If you didn't put a card into your hand this way, you gain 4 life.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new BlossomPrancerEffect()));
|
||||
}
|
||||
|
||||
private BlossomPrancer(final BlossomPrancer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlossomPrancer copy() {
|
||||
return new BlossomPrancer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BlossomPrancerEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("creature or enchantment card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
CardType.CREATURE.getPredicate(),
|
||||
CardType.ENCHANTMENT.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
BlossomPrancerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "look at the top five cards of your library. You may reveal a creature or enchantment card from " +
|
||||
"among them and put it into your hand. Put the rest on the bottom of your library in a random order. " +
|
||||
"If you didn't put a card into your hand this way, you gain 4 life";
|
||||
}
|
||||
|
||||
private BlossomPrancerEffect(final BlossomPrancerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlossomPrancerEffect copy() {
|
||||
return new BlossomPrancerEffect(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, 5));
|
||||
TargetCard target = new TargetCardInLibrary(0, 1, filter);
|
||||
player.choose(outcome, cards, target, game);
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
player.revealCards(source, new CardsImpl(card), game);
|
||||
player.moveCards(card, Zone.HAND, source, game);
|
||||
cards.remove(card);
|
||||
player.putCardsOnBottomOfLibrary(card, game, source, false);
|
||||
} else {
|
||||
player.putCardsOnBottomOfLibrary(card, game, source, false);
|
||||
player.gainLife(4, game, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -51,6 +51,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Blade of the Oni", 89, Rarity.MYTHIC, mage.cards.b.BladeOfTheOni.class));
|
||||
cards.add(new SetCardInfo("Blade-Blizzard Kitsune", 5, Rarity.UNCOMMON, mage.cards.b.BladeBlizzardKitsune.class));
|
||||
cards.add(new SetCardInfo("Bloodfell Caves", 264, Rarity.COMMON, mage.cards.b.BloodfellCaves.class));
|
||||
cards.add(new SetCardInfo("Blossom Prancer", 175, Rarity.UNCOMMON, mage.cards.b.BlossomPrancer.class));
|
||||
cards.add(new SetCardInfo("Blossoming Sands", 265, Rarity.COMMON, mage.cards.b.BlossomingSands.class));
|
||||
cards.add(new SetCardInfo("Boon of Boseiju", 176, Rarity.UNCOMMON, mage.cards.b.BoonOfBoseiju.class));
|
||||
cards.add(new SetCardInfo("Born to Drive", 6, Rarity.UNCOMMON, mage.cards.b.BornToDrive.class));
|
||||
|
|
Loading…
Reference in a new issue