remove added cards from incomplete

master
melvinzhang 2016-07-17 18:28:50 +08:00
parent 4fedbacee4
commit ff202f4064
6 changed files with 0 additions and 132 deletions

View File

@ -1,51 +0,0 @@
def TakeTwo = {
final MagicGame game, final MagicEvent event ->
event.processChosenCards(game, {
final MagicCard chosen ->
final MagicPlayer player = event.getPlayer();
final MagicCardList top = new MagicCardList(player.getLibrary().getCardsFromTop(7));
for (final MagicCard card : top) {
if (card == chosen) {
game.doAction(new ShiftCardAction(
card,
MagicLocationType.OwnersLibrary,
MagicLocationType.OwnersHand
));
game.logAppendMessage(player, "A card is put into ${player.getName()}'s hand.");
} else {
game.doAction(new ShiftCardAction(
card,
MagicLocationType.OwnersLibrary,
MagicLocationType.Graveyard
));
}
}
});
}
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
this,
"PN looks at the top seven cards of his or her library. " +
"PN puts two of them into his or her hand and the rest into his or her graveyard."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicCardList topCards = event.getPlayer().getLibrary().getCardsFromTop(7);
game.addEvent(new MagicEvent(
event.getSource(),
new MagicFromCardListChoice(topCards, 2),
MagicGraveyardTargetPicker.ReturnToHand,
TakeTwo,
""
));
}
}
]
//Only processes the first card chosen

View File

@ -1,9 +0,0 @@
name=Ancestral Memories
image=http://mtgimage.com/card/ancestral%20memories.jpg
value=3.360
rarity=R
type=Sorcery
cost={2}{U}{U}{U}
timing=removal
requires_groovy_code
oracle=Look at the top seven cards of your library. Put two of them into your hand and the rest into your graveyard.

View File

@ -1,29 +0,0 @@
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
new MagicFromCardListChoice(cardOnStack.getController().getLibrary(), 3, false),
this,
"PN searches his or her library for three cards, exiles them, then shuffles his or her library..\$"+
"PN draws a card at the beginning of the next turn's upkeep."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processChosenCards(game, {
MagicCard card ->
game.doAction(new MagicRemoveCardAction(card,MagicLocationType.OwnersLibrary));
game.doAction(new MagicMoveCardAction(card,MagicLocationType.OwnersLibrary,MagicLocationType.Exile));
});
game.doAction(new MagicShuffleLibraryAction(event.getPlayer()));
game.doAction(new MagicAddTriggerAction(
MagicAtUpkeepTrigger.YouDraw(
event.getSource(),
event.getPlayer()
)
));
}
}
]

View File

@ -1,9 +0,0 @@
name=Foresight
image=http://mtgimage.com/card/foresight.jpg
value=3.507
rarity=C
type=Sorcery
cost={1}{U}
timing=main
requires_groovy_code
oracle=Search your library for three cards, exile them, then shuffle your library. Draw a card at the beginning of the next turn's upkeep.

View File

@ -1,25 +0,0 @@
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicColorChoice.ALL_INSTANCE,
MagicTargetChoice.TARGET_CREATURE_YOU_CONTROL,
this,
"Choose a color\$. " +
"Target creature\$ PN controls gains protection from the chosen color until end of turn."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicColor color = event.getChosenColor();
final MagicAbility protection = color.getProtectionAbility();
event.processTarget(game, {
final MagicTarget target ->
game.doAction(new MagicGainAbilityAction(target, protection));
game.addEvent(new MagicScryEvent(event));
});
}
}
]

View File

@ -1,9 +0,0 @@
name=Gods Willing
image=http://mtgimage.com/card/gods%20willing.jpg
value=2.500
rarity=C
type=Instant
cost={W}
timing=pump
requires_groovy_code
oracle=Target creature you control gains protection from the color of your choice until end of turn. Scry 1.