From c718888764bb2161784c5226502fe6e098d686bb Mon Sep 17 00:00:00 2001 From: muppet Date: Fri, 10 Jun 2016 21:02:20 +0800 Subject: [PATCH] add incomplete 'Chandra, Flamecaller' --- incomplete/Chandra__Flamecaller.groovy | 44 ++++++++++++++++++++++++++ incomplete/Chandra__Flamecaller.txt | 12 +++++++ 2 files changed, 56 insertions(+) create mode 100644 incomplete/Chandra__Flamecaller.groovy create mode 100644 incomplete/Chandra__Flamecaller.txt diff --git a/incomplete/Chandra__Flamecaller.groovy b/incomplete/Chandra__Flamecaller.groovy new file mode 100644 index 0000000000..2f229005e1 --- /dev/null +++ b/incomplete/Chandra__Flamecaller.groovy @@ -0,0 +1,44 @@ +def ABILITY2 = MagicRuleEventAction.create("Put two 3/1 red Elemental creature tokens with haste onto the battlefield. Exile them at the beginning of the next end step."); + +[ + new MagicPlaneswalkerActivation(+1) { + @Override + public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) { + return ABILITY2.getEvent(source); + } + }, + new MagicPlaneswalkerActivation(0) { + @Override + public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) { + return new MagicEvent( + source, + this, + "PN discards all the cards in his or her hand, then draws that many cards +1." + ); + } + @Override + public void executeEvent(final MagicGame game, final MagicEvent event) { + final MagicPlayer player = event.getPlayer() + final int amount = event.getPlayer().getHandSize(); + game.logAppendValue(player, amount); + game.addEvent(new MagicDiscardHandEvent(event.getSource())); + game.addEvent(new MagicDrawEvent(event.getSource(), player, amount+1)); + } + }, + new MagicPlaneswalkerActivation(-3) { + @Override + public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) { + return new MagicEvent( + source, + this, + "SN deals 3 damage to each creature." + ); + } + @Override + public void executeEvent(final MagicGame game, final MagicEvent event) { + CREATURE.filter(event) each { + game.doAction(new DealDamageAction(event.getSource(), it ,3)); + } + } + } +] \ No newline at end of file diff --git a/incomplete/Chandra__Flamecaller.txt b/incomplete/Chandra__Flamecaller.txt new file mode 100644 index 0000000000..98ab4f0dc2 --- /dev/null +++ b/incomplete/Chandra__Flamecaller.txt @@ -0,0 +1,12 @@ +name=Chandra, Flamecaller +image=http://magiccards.info/scans/en/ogw/104.jpg +image_updated=2016-02-29 +value=2.500 +rarity=M +type=Planeswalker +subtype=Chandra +cost={4}{R}{R} +loyalty=4 +timing=main +requires_groovy_code +oracle=+1: Put two 3/1 red Elemental creature tokens with haste onto the battlefield. Exile them at the beginning of the next end step.\n0: Discard all the cards in your hand, then draw that many cards plus one.\n−X: Chandra, Flamecaller deals X damage to each creature.