mirror of
https://github.com/correl/mage.git
synced 2025-01-11 19:13:02 +00:00
[MID] Implemented Florian, Voldaren Scion
This commit is contained in:
parent
8b50f24afb
commit
c7c0c479ad
2 changed files with 103 additions and 0 deletions
102
Mage.Sets/src/mage/cards/f/FlorianVoldarenScion.java
Normal file
102
Mage.Sets/src/mage/cards/f/FlorianVoldarenScion.java
Normal file
|
@ -0,0 +1,102 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfPostCombatMainTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect;
|
||||
import mage.cards.*;
|
||||
import mage.constants.*;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.watchers.common.PlayerLostLifeWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class FlorianVoldarenScion extends CardImpl {
|
||||
|
||||
public FlorianVoldarenScion(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.VAMPIRE);
|
||||
this.subtype.add(SubType.NOBLE);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// First strike
|
||||
this.addAbility(FirstStrikeAbility.getInstance());
|
||||
|
||||
// At the beginning of your postcombat main phase, look at the top X cards of your library, where X is the total amount of life your opponents lost this turn.
|
||||
// Exile one of those cards and put the rest on the bottom of your library in a random order. You may play the exiled card this turn.
|
||||
this.addAbility(new BeginningOfPostCombatMainTriggeredAbility(new FlorianVoldarenScionEffect(), TargetController.YOU, false));
|
||||
}
|
||||
|
||||
private FlorianVoldarenScion(final FlorianVoldarenScion card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FlorianVoldarenScion copy() {
|
||||
return new FlorianVoldarenScion(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FlorianVoldarenScionEffect extends OneShotEffect {
|
||||
|
||||
public FlorianVoldarenScionEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "look at the top X cards of your library, where X is the total amount of life your opponents lost this turn. "
|
||||
+ "Exile one of those cards and put the rest on the bottom of your library in a random order. You may play the exiled card this turn";
|
||||
}
|
||||
|
||||
private FlorianVoldarenScionEffect(final FlorianVoldarenScionEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FlorianVoldarenScionEffect copy() {
|
||||
return new FlorianVoldarenScionEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
PlayerLostLifeWatcher watcher = game.getState().getWatcher(PlayerLostLifeWatcher.class);
|
||||
if (controller != null && watcher != null) {
|
||||
int lifeLost = watcher.getAllOppLifeLost(controller.getId(), game);
|
||||
if (lifeLost > 0) {
|
||||
Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, lifeLost));
|
||||
int numCards = cards.size();
|
||||
if (numCards > 0) {
|
||||
controller.lookAtCards(source, null, cards, game);
|
||||
Card selectedCard;
|
||||
if (numCards == 1) {
|
||||
selectedCard = game.getCard(cards.iterator().next());
|
||||
} else {
|
||||
TargetCard target = new TargetCard(Zone.LIBRARY, StaticFilters.FILTER_CARD);
|
||||
controller.chooseTarget(outcome, cards, target, source, game);
|
||||
selectedCard = game.getCard(target.getFirstTarget());
|
||||
}
|
||||
if (selectedCard != null) {
|
||||
cards.remove(selectedCard);
|
||||
PlayFromNotOwnHandZoneTargetEffect.exileAndPlayFromExile(
|
||||
game, source, selectedCard, TargetController.YOU, Duration.EndOfTurn, false, false, false
|
||||
);
|
||||
}
|
||||
if (!cards.isEmpty()) {
|
||||
controller.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -141,6 +141,7 @@ public final class InnistradMidnightHunt extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Flare of Faith", 19, Rarity.COMMON, mage.cards.f.FlareOfFaith.class));
|
||||
cards.add(new SetCardInfo("Fleshtaker", 222, Rarity.UNCOMMON, mage.cards.f.Fleshtaker.class));
|
||||
cards.add(new SetCardInfo("Flip the Switch", 54, Rarity.COMMON, mage.cards.f.FlipTheSwitch.class));
|
||||
cards.add(new SetCardInfo("Florian, Voldaren Scion", 223, Rarity.RARE, mage.cards.f.FlorianVoldarenScion.class));
|
||||
cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Foul Play", 101, Rarity.UNCOMMON, mage.cards.f.FoulPlay.class));
|
||||
cards.add(new SetCardInfo("Frenzied Trapbreaker", 190, Rarity.UNCOMMON, mage.cards.f.FrenziedTrapbreaker.class));
|
||||
|
|
Loading…
Reference in a new issue