mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 12:19:59 -08:00
[ECL] Implement Bloodline Bidding
This commit is contained in:
parent
8098321373
commit
187c81f21f
2 changed files with 86 additions and 0 deletions
82
Mage.Sets/src/mage/cards/b/BloodlineBidding.java
Normal file
82
Mage.Sets/src/mage/cards/b/BloodlineBidding.java
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.ConvokeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceCreatureType;
|
||||
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 mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class BloodlineBidding extends CardImpl {
|
||||
|
||||
public BloodlineBidding(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{6}{B}{B}");
|
||||
|
||||
// Convoke
|
||||
this.addAbility(new ConvokeAbility());
|
||||
|
||||
// Choose a creature type. Return all creature cards of the chosen type from your graveyard to the battlefield.
|
||||
this.getSpellAbility().addEffect(new BloodlineBiddingEffect());
|
||||
}
|
||||
|
||||
private BloodlineBidding(final BloodlineBidding card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BloodlineBidding copy() {
|
||||
return new BloodlineBidding(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BloodlineBiddingEffect extends OneShotEffect {
|
||||
|
||||
BloodlineBiddingEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "choose a creature type. Return all creature cards " +
|
||||
"of the chosen type from your graveyard to the battlefield";
|
||||
}
|
||||
|
||||
private BloodlineBiddingEffect(final BloodlineBiddingEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BloodlineBiddingEffect copy() {
|
||||
return new BloodlineBiddingEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
Choice choice = new ChoiceCreatureType(game, source);
|
||||
player.choose(outcome, choice, game);
|
||||
SubType subType = SubType.fromString(choice.getChoice());
|
||||
if (subType == null) {
|
||||
return false;
|
||||
}
|
||||
game.informPlayers(CardUtil.getSourceLogName(game, source) + ": " + player.getLogName() + " chooses " + subType);
|
||||
Cards cards = new CardsImpl(player.getGraveyard().getCards(game));
|
||||
cards.removeIf(uuid -> !game.getCard(uuid).isCreature(game));
|
||||
cards.removeIf(uuid -> !game.getCard(uuid).hasSubtype(subType, game));
|
||||
return !cards.isEmpty() && player.moveCards(cards, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
}
|
||||
|
|
@ -35,6 +35,10 @@ public final class LorwynEclipsed extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Blood Crypt", "349b", Rarity.RARE, mage.cards.b.BloodCrypt.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Blood Crypt", 262, Rarity.RARE, mage.cards.b.BloodCrypt.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Blood Crypt", 349, Rarity.RARE, mage.cards.b.BloodCrypt.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Bloodline Bidding", 359, Rarity.RARE, mage.cards.b.BloodlineBidding.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Bloodline Bidding", 385, Rarity.MYTHIC, mage.cards.b.BloodlineBidding.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Bloodline Bidding", 395, Rarity.MYTHIC, mage.cards.b.BloodlineBidding.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Bloodline Bidding", 91, Rarity.RARE, mage.cards.b.BloodlineBidding.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Bloom Tender", 166, Rarity.MYTHIC, mage.cards.b.BloomTender.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Bloom Tender", 324, Rarity.MYTHIC, mage.cards.b.BloomTender.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Bloom Tender", 390, Rarity.MYTHIC, mage.cards.b.BloomTender.class, NON_FULL_USE_VARIOUS));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue