mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
* Lord of the Void - Fixed card move handling.
This commit is contained in:
parent
af793c30fe
commit
7f105fb123
1 changed files with 14 additions and 22 deletions
|
@ -29,10 +29,6 @@
|
|||
package mage.sets.gatecrash;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
|
@ -42,6 +38,10 @@ import mage.cards.Card;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
@ -58,7 +58,6 @@ public class LordOfTheVoid extends CardImpl {
|
|||
this.expansionSetCode = "GTC";
|
||||
this.subtype.add("Demon");
|
||||
|
||||
|
||||
this.power = new MageInt(7);
|
||||
this.toughness = new MageInt(7);
|
||||
|
||||
|
@ -79,11 +78,10 @@ public class LordOfTheVoid extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
class LordOfTheVoidEffect extends OneShotEffect {
|
||||
|
||||
public LordOfTheVoidEffect() {
|
||||
super(Outcome.PutCardInPlay);
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "exile the top seven cards of that player's library, then put a creature card from among them onto the battlefield under your control";
|
||||
}
|
||||
|
||||
|
@ -105,20 +103,14 @@ class LordOfTheVoidEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
Cards cards = new CardsImpl();
|
||||
int max = Math.min(player.getLibrary().size(), 7);
|
||||
for(int i = 0; i < max; i++){
|
||||
Card card = player.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
card.moveToExile(null, "", source.getSourceId(), game);
|
||||
cards.add(card);
|
||||
}
|
||||
}
|
||||
cards.addAll(player.getLibrary().getTopCards(game, 7));
|
||||
controller.moveCards(cards, Zone.EXILED, source, game);
|
||||
if (cards.getCards(new FilterCreatureCard(), game).size() > 0) {
|
||||
TargetCard target = new TargetCard(Zone.EXILED, new FilterCreatureCard());
|
||||
if(controller.chooseTarget(Outcome.PutCreatureInPlay, cards, target, source, game)){
|
||||
if (controller.chooseTarget(outcome, cards, target, source, game)) {
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
card.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), source.getControllerId());
|
||||
controller.moveCards(cards.getCards(game), Zone.BATTLEFIELD, source, game, false, false, false, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue