added Mind Games and Mind Peel

master
beholder 2011-10-29 12:44:57 +02:00
parent fa08d1b40a
commit a218576ec2
3 changed files with 138 additions and 0 deletions

View File

@ -17694,3 +17694,25 @@ color=b
converted=1
cost={B}
timing=token
>Mind Games
url=http://magiccards.info/sh/en/38.html
image=http://magiccards.info/scans/en/sh/38.jpg
value=2
rarity=C
type=Instant
color=u
converted=1
cost={U}
timing=tapping
>Mind Peel
url=http://magiccards.info/sh/en/13.html
image=http://magiccards.info/scans/en/sh/13.jpg
value=2
rarity=U
type=Sorcery
color=b
converted=1
cost={B}
timing=removal

View File

@ -0,0 +1,60 @@
package magic.card;
import magic.model.MagicGame;
import magic.model.MagicLocationType;
import magic.model.MagicManaCost;
import magic.model.MagicPayedCost;
import magic.model.MagicPermanent;
import magic.model.action.MagicMoveCardAction;
import magic.model.action.MagicPermanentAction;
import magic.model.action.MagicTapAction;
import magic.model.choice.MagicBuybackChoice;
import magic.model.choice.MagicTargetChoice;
import magic.model.event.MagicEvent;
import magic.model.event.MagicSpellCardEvent;
import magic.model.stack.MagicCardOnStack;
import magic.model.target.MagicTapTargetPicker;
public class Mind_Games {
public static final MagicSpellCardEvent E = new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack.getCard(),
cardOnStack.getController(),
new MagicBuybackChoice(
MagicTargetChoice.NEG_TARGET_ARTIFACT_OR_CREATURE_OR_LAND,
MagicManaCost.TWO_BLUE),
new MagicTapTargetPicker(true,false),
new Object[]{cardOnStack},
this,
"Tap target artifact, creature, or land$. " +
"If the buyback cost was payed$, return " +
cardOnStack + " to its owner's hand as it resolves.");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] data,
final Object[] choiceResults) {
final MagicCardOnStack cardOnStack = (MagicCardOnStack)data[0];
event.processTargetPermanent(game,choiceResults,0,new MagicPermanentAction() {
public void doAction(final MagicPermanent permanent) {
if (!permanent.isTapped()) {
game.doAction(new MagicTapAction(permanent,true));
}
}
});
if (MagicBuybackChoice.isYesChoice(choiceResults[1])) {
game.doAction(new MagicMoveCardAction(
cardOnStack.getCard(),
MagicLocationType.Stack,
MagicLocationType.OwnersHand));
} else {
game.doAction(new MagicMoveCardAction(cardOnStack));
}
}
};
}

View File

@ -0,0 +1,56 @@
package magic.card;
import magic.model.MagicGame;
import magic.model.MagicLocationType;
import magic.model.MagicManaCost;
import magic.model.MagicPayedCost;
import magic.model.MagicPlayer;
import magic.model.action.MagicMoveCardAction;
import magic.model.action.MagicPlayerAction;
import magic.model.choice.MagicBuybackChoice;
import magic.model.choice.MagicTargetChoice;
import magic.model.event.MagicDiscardEvent;
import magic.model.event.MagicEvent;
import magic.model.event.MagicSpellCardEvent;
import magic.model.stack.MagicCardOnStack;
public class Mind_Peel {
public static final MagicSpellCardEvent E = new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack.getCard(),
cardOnStack.getController(),
new MagicBuybackChoice(
MagicTargetChoice.NEG_TARGET_PLAYER,
MagicManaCost.TWO_BLACK_BLACK),
new Object[]{cardOnStack},
this,
"Target player$ discards a card. " +
"If the buyback cost was payed$, return " +
cardOnStack + " to its owner's hand as it resolves.");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] data,
final Object[] choiceResults) {
final MagicCardOnStack cardOnStack = (MagicCardOnStack)data[0];
event.processTargetPlayer(game,choiceResults,0,new MagicPlayerAction() {
public void doAction(final MagicPlayer player) {
game.addEvent(new MagicDiscardEvent(cardOnStack.getCard(),player,1,false));
}
});
if (MagicBuybackChoice.isYesChoice(choiceResults[1])) {
game.doAction(new MagicMoveCardAction(
cardOnStack.getCard(),
MagicLocationType.Stack,
MagicLocationType.OwnersHand));
} else {
game.doAction(new MagicMoveCardAction(cardOnStack));
}
}
};
}