added Orchard Spirit and Paraselene

master
beholder 2011-09-29 16:18:42 +02:00
parent 79e8965276
commit dbb44ea959
2 changed files with 74 additions and 0 deletions

View File

@ -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

View File

@ -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<MagicTarget> 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()));
}
}
};
}