diff --git a/resources/magic/data/cards2.txt b/resources/magic/data/cards2.txt index 93cdbb888a..59bc8771f7 100644 --- a/resources/magic/data/cards2.txt +++ b/resources/magic/data/cards2.txt @@ -4739,3 +4739,27 @@ pt=2/3 ability=defender static=opponent timing=artifact + +>Orchard Spirit +image=http://magiccards.info/scans/en/isd/198.jpg +value=2 +rarity=C +type=Creature +subtype=Spirit +color=g +converted=3 +cost={2}{G} +pt=2/2 +ability=can't be blocked except by creatures with flying +timing=main + +>Paraselene +image=http://magiccards.info/scans/en/isd/26.jpg +value=2 +removal=2 +rarity=U +type=Sorcery +color=w +converted=3 +cost={2}{W} +timing=removal diff --git a/src/magic/card/Paraselene.java b/src/magic/card/Paraselene.java new file mode 100644 index 0000000000..1f8240f863 --- /dev/null +++ b/src/magic/card/Paraselene.java @@ -0,0 +1,50 @@ +package magic.card; + +import magic.model.MagicGame; +import magic.model.MagicPayedCost; +import magic.model.MagicPermanent; +import magic.model.MagicPlayer; +import magic.model.action.MagicChangeLifeAction; +import magic.model.action.MagicDestroyAction; +import magic.model.action.MagicMoveCardAction; +import magic.model.event.MagicEvent; +import magic.model.event.MagicSpellCardEvent; +import magic.model.stack.MagicCardOnStack; +import magic.model.target.MagicTarget; +import magic.model.target.MagicTargetFilter; + +import java.util.Collection; + +public class Paraselene { + public static final MagicSpellCardEvent S = new MagicSpellCardEvent() { + @Override + public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) { + return new MagicEvent( + cardOnStack.getCard(), + cardOnStack.getController(), + new Object[]{cardOnStack}, + this, + "Destroy all enchantments. You gain 1 life " + + "for each enchantment destroyed this way."); + } + @Override + public void executeEvent( + final MagicGame game, + final MagicEvent event, + final Object[] data, + final Object[] choiceResults) { + final MagicCardOnStack cardOnStack = (MagicCardOnStack)data[0]; + final MagicPlayer player = cardOnStack.getController(); + game.doAction(new MagicMoveCardAction(cardOnStack)); + final Collection targets = + game.filterTargets(player,MagicTargetFilter.TARGET_ENCHANTMENT); + for (final MagicTarget target : targets) { + game.doAction(new MagicDestroyAction((MagicPermanent)target)); + } + if (targets.size() > 0) { + game.doAction(new MagicChangeLifeAction(player,targets.size())); + } + + } + }; +}