added Disentomb

master
beholder 2011-08-27 08:28:12 +02:00
parent 3e0c4db56c
commit 0e2ff2c074
2 changed files with 50 additions and 0 deletions

View File

@ -1921,6 +1921,16 @@ converted=2
cost={1}{B}
timing=removal
>Disentomb
image=http://magiccards.info/scans/en/m12/93.jpg
value=2
rarity=C
type=Sorcery
color=b
converted=1
cost={B}
timing=draw
>Double Cleave
image=http://magiccards.info/scans/en/pch/100.jpg
value=2

View File

@ -0,0 +1,40 @@
package magic.card;
import magic.model.*;
import magic.model.action.MagicMoveCardAction;
import magic.model.action.MagicRemoveCardAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.event.MagicEvent;
import magic.model.event.MagicSpellCardEvent;
import magic.model.stack.MagicCardOnStack;
import magic.model.target.MagicGraveyardTargetPicker;
public class Disentomb {
public static final MagicSpellCardEvent S =new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
final MagicPlayer player=cardOnStack.getController();
return new MagicEvent(
cardOnStack.getCard(),
player,
MagicTargetChoice.TARGET_CREATURE_CARD_FROM_GRAVEYARD,
MagicGraveyardTargetPicker.getInstance(),
new Object[]{cardOnStack,player},
this,
"Return target creature card$ from your graveyard to your hand.");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] data,
final Object[] choiceResults) {
game.doAction(new MagicMoveCardAction((MagicCardOnStack)data[0]));
final MagicCard targetCard=event.getTarget(game,choiceResults,0);
if (targetCard!=null) {
game.doAction(new MagicRemoveCardAction(targetCard,MagicLocationType.Graveyard));
game.doAction(new MagicMoveCardAction(targetCard,MagicLocationType.Graveyard,MagicLocationType.OwnersHand));
}
}
};
}