diff --git a/resources/magic/data/cards2.txt b/resources/magic/data/cards2.txt index dd54558fb5..50effb9120 100644 --- a/resources/magic/data/cards2.txt +++ b/resources/magic/data/cards2.txt @@ -4536,6 +4536,29 @@ pt=1/1 ability=hexproof timing=main +>Make a Wish +image=http://magiccards.info/scans/en/isd/192.jpg +value=3 +rarity=U +type=Sorcery +color=g +converted=4 +cost={3}{G} +timing=draw + +>Manor Skeleton +image=http://magiccards.info/scans/en/isd/106.jpg +value=1 +rarity=C +type=Creature +subtype=Skeleton +color=b +converted=2 +cost={1}{B} +pt=1/1 +ability=haste +timing=fmain + >Morkrut Banshee image=http://magiccards.info/scans/en/isd/110.jpg value=4 diff --git a/src/magic/card/Make_a_Wish.java b/src/magic/card/Make_a_Wish.java new file mode 100644 index 0000000000..c61f7fc0f8 --- /dev/null +++ b/src/magic/card/Make_a_Wish.java @@ -0,0 +1,48 @@ +package magic.card; + +import magic.model.MagicCard; +import magic.model.MagicCardList; +import magic.model.MagicGame; +import magic.model.MagicLocationType; +import magic.model.MagicPayedCost; +import magic.model.MagicPlayer; +import magic.model.action.MagicMoveCardAction; +import magic.model.action.MagicRemoveCardAction; +import magic.model.event.MagicEvent; +import magic.model.event.MagicSpellCardEvent; +import magic.model.stack.MagicCardOnStack; + +public class Make_a_Wish { + 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, + new Object[]{player,cardOnStack}, + this, + "Return two cards at random from your graveyard to your hand."); + } + @Override + public void executeEvent( + final MagicGame game, + final MagicEvent event, + final Object[] data, + final Object[] choiceResults) { + final MagicPlayer player = (MagicPlayer)data[0]; + final MagicCardOnStack cardOnStack = (MagicCardOnStack)data[1]; + final MagicCardList cards = player.getGraveyard(); + int actualAmount = Math.min(cards.size(),2); + for (;actualAmount>0;actualAmount--) { + final magic.MersenneTwisterFast rng = + new magic.MersenneTwisterFast(cardOnStack.getId() + player.getId()); + final int index = rng.nextInt(cards.size()); + final MagicCard card = cards.get(index); + game.doAction(new MagicRemoveCardAction(card,MagicLocationType.Graveyard)); + game.doAction(new MagicMoveCardAction(card,MagicLocationType.Graveyard,MagicLocationType.OwnersHand)); + } + game.doAction(new MagicMoveCardAction(cardOnStack)); + } + }; +} diff --git a/src/magic/card/Manor_Skeleton.java b/src/magic/card/Manor_Skeleton.java new file mode 100644 index 0000000000..803c671672 --- /dev/null +++ b/src/magic/card/Manor_Skeleton.java @@ -0,0 +1,9 @@ +package magic.card; + +import magic.model.MagicManaCost; +import magic.model.event.MagicPermanentActivation; +import magic.model.event.MagicRegenerationActivation; + +public class Manor_Skeleton { + public static final MagicPermanentActivation A = new MagicRegenerationActivation(MagicManaCost.ONE_BLACK); +}