mirror of
https://github.com/correl/mage.git
synced 2025-01-14 03:00:10 +00:00
[CLB] Implemented Summon Undead
This commit is contained in:
parent
aafbc5b4c7
commit
cce4e9588d
2 changed files with 77 additions and 0 deletions
76
Mage.Sets/src/mage/cards/s/SummonUndead.java
Normal file
76
Mage.Sets/src/mage/cards/s/SummonUndead.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SummonUndead extends CardImpl {
|
||||
|
||||
public SummonUndead(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}");
|
||||
|
||||
// You may mill three cards. Then return a creature card from your graveyard to the battlefield.
|
||||
this.getSpellAbility().addEffect(new SummonUndeadEffect());
|
||||
}
|
||||
|
||||
private SummonUndead(final SummonUndead card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SummonUndead copy() {
|
||||
return new SummonUndead(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SummonUndeadEffect extends OneShotEffect {
|
||||
|
||||
SummonUndeadEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "you may mill three cards. Then return a creature card from your graveyard to the battlefield";
|
||||
}
|
||||
|
||||
private SummonUndeadEffect(final SummonUndeadEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SummonUndeadEffect copy() {
|
||||
return new SummonUndeadEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
if (player.chooseUse(outcome, "Mill three cards?", source, game)) {
|
||||
player.millCards(3, source, game);
|
||||
}
|
||||
if (player.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game) < 1) {
|
||||
return true;
|
||||
}
|
||||
TargetCard target = new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE);
|
||||
target.setNotTarget(true);
|
||||
player.choose(outcome, target, source, game);
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
player.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -71,6 +71,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sky Diamond", 337, Rarity.COMMON, mage.cards.s.SkyDiamond.class));
|
||||
cards.add(new SetCardInfo("Spire Garden", 361, Rarity.RARE, mage.cards.s.SpireGarden.class));
|
||||
cards.add(new SetCardInfo("Stirge", 150, Rarity.COMMON, mage.cards.s.Stirge.class));
|
||||
cards.add(new SetCardInfo("Summon Undead", 151, Rarity.COMMON, mage.cards.s.SummonUndead.class));
|
||||
cards.add(new SetCardInfo("Swamp", 459, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Swiftfoot Boots", 339, Rarity.UNCOMMON, mage.cards.s.SwiftfootBoots.class));
|
||||
cards.add(new SetCardInfo("Tymora's Invoker", 101, Rarity.COMMON, mage.cards.t.TymorasInvoker.class));
|
||||
|
|
Loading…
Reference in a new issue