From afe37f097dc30e3ca0dd2fb55dcf670c05f60827 Mon Sep 17 00:00:00 2001 From: beholder Date: Sat, 8 Oct 2011 20:19:22 +0200 Subject: [PATCH] added Hunding Gjornersen and Marhault Elsdragon --- resources/magic/data/cards.txt | 24 ++++++++++++++ src/magic/card/Hunding_Gjornersen.java | 43 ++++++++++++++++++++++++++ src/magic/card/Marhault_Elsdragon.java | 43 ++++++++++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 src/magic/card/Hunding_Gjornersen.java create mode 100644 src/magic/card/Marhault_Elsdragon.java diff --git a/resources/magic/data/cards.txt b/resources/magic/data/cards.txt index 4b41d36746..4e35e9d098 100644 --- a/resources/magic/data/cards.txt +++ b/resources/magic/data/cards.txt @@ -12905,3 +12905,27 @@ converted=3 cost={3} pt=2/2 timing=main + +>Hunding Gjornersen +image=http://magiccards.info/scans/en/me3/152.jpg +value=4 +rarity=R +type=Legendary,Creature +subtype=Human,Warrior +color=wu +converted=6 +cost={3}{W}{U}{U} +pt=5/4 +timing=main + +>Marhault Elsdragon +image=http://magiccards.info/scans/en/ch/114.jpg +value=4 +rarity=R +type=Legendary,Creature +subtype=Elf,Warrior +color=rg +converted=6 +cost={3}{R}{R}{G} +pt=4/6 +timing=main diff --git a/src/magic/card/Hunding_Gjornersen.java b/src/magic/card/Hunding_Gjornersen.java new file mode 100644 index 0000000000..219b050073 --- /dev/null +++ b/src/magic/card/Hunding_Gjornersen.java @@ -0,0 +1,43 @@ +package magic.card; + +import magic.model.MagicGame; +import magic.model.MagicPermanent; +import magic.model.MagicPermanentList; +import magic.model.MagicPlayer; +import magic.model.action.MagicChangeTurnPTAction; +import magic.model.event.MagicEvent; +import magic.model.trigger.MagicWhenBecomesBlockedTrigger; + +public class Hunding_Gjornersen { + public static final MagicWhenBecomesBlockedTrigger T = new MagicWhenBecomesBlockedTrigger() { + @Override + public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) { + final MagicPlayer player = permanent.getController(); + if (creature == permanent) { + final MagicPermanentList plist = permanent.getBlockingCreatures(); + final int amount = 1 * (plist.size() - 1); + if (amount > 0) { + return new MagicEvent( + permanent, + player, + new Object[]{permanent,amount}, + this, + permanent + " gets +" + amount + "/+" + amount + " until end of turn."); + } + } + return MagicEvent.NONE; + } + + @Override + public void executeEvent( + final MagicGame game, + final MagicEvent event, + final Object data[], + final Object[] choiceResults) { + game.doAction(new MagicChangeTurnPTAction( + (MagicPermanent)data[0], + (Integer)data[1], + (Integer)data[1])); + } + }; +} diff --git a/src/magic/card/Marhault_Elsdragon.java b/src/magic/card/Marhault_Elsdragon.java new file mode 100644 index 0000000000..a9be5fa1eb --- /dev/null +++ b/src/magic/card/Marhault_Elsdragon.java @@ -0,0 +1,43 @@ +package magic.card; + +import magic.model.MagicGame; +import magic.model.MagicPermanent; +import magic.model.MagicPermanentList; +import magic.model.MagicPlayer; +import magic.model.action.MagicChangeTurnPTAction; +import magic.model.event.MagicEvent; +import magic.model.trigger.MagicWhenBecomesBlockedTrigger; + +public class Marhault_Elsdragon { + public static final MagicWhenBecomesBlockedTrigger T = new MagicWhenBecomesBlockedTrigger() { + @Override + public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) { + final MagicPlayer player = permanent.getController(); + if (creature == permanent) { + final MagicPermanentList plist = permanent.getBlockingCreatures(); + final int amount = 1 * (plist.size() - 1); + if (amount > 0) { + return new MagicEvent( + permanent, + player, + new Object[]{permanent,amount}, + this, + permanent + " gets +" + amount + "/+" + amount + " until end of turn."); + } + } + return MagicEvent.NONE; + } + + @Override + public void executeEvent( + final MagicGame game, + final MagicEvent event, + final Object data[], + final Object[] choiceResults) { + game.doAction(new MagicChangeTurnPTAction( + (MagicPermanent)data[0], + (Integer)data[1], + (Integer)data[1])); + } + }; +}