From 459e9f52fd79a180738621c79ca4382b3ea0c12d Mon Sep 17 00:00:00 2001 From: beholder Date: Tue, 11 Oct 2011 11:10:08 +0200 Subject: [PATCH] added Slith Strider and Snorting Gahr --- resources/magic/data/cards.txt | 26 +++++++++++++ src/magic/card/Slith_Strider.java | 62 +++++++++++++++++++++++++++++++ src/magic/card/Snorting_Gahr.java | 8 ++++ 3 files changed, 96 insertions(+) create mode 100644 src/magic/card/Slith_Strider.java create mode 100644 src/magic/card/Snorting_Gahr.java diff --git a/resources/magic/data/cards.txt b/resources/magic/data/cards.txt index f5008659fc..553152946b 100644 --- a/resources/magic/data/cards.txt +++ b/resources/magic/data/cards.txt @@ -14874,3 +14874,29 @@ cost={2}{R}{R} pt=4/4 ability=wither timing=main + +>Slith Strider +url=http://magiccards.info/mi/en/50.html +image=http://magiccards.info/scans/en/mi/50.jpg +value=2 +rarity=U +type=Creature +subtype=Slith +color=u +converted=3 +cost={1}{U}{U} +pt=1/1 +timing=main + +>Snorting Gahr +url=http://magiccards.info/mm/en/272.html +image=http://magiccards.info/scans/en/mm/272.jpg +value=3 +rarity=C +type=Creature +subtype=Rhino,Beast +color=g +converted=4 +cost={2}{G}{G} +pt=3/3 +timing=main diff --git a/src/magic/card/Slith_Strider.java b/src/magic/card/Slith_Strider.java new file mode 100644 index 0000000000..25bd1b783f --- /dev/null +++ b/src/magic/card/Slith_Strider.java @@ -0,0 +1,62 @@ +package magic.card; + +import magic.model.MagicCounterType; +import magic.model.MagicDamage; +import magic.model.MagicGame; +import magic.model.MagicPermanent; +import magic.model.MagicPlayer; +import magic.model.action.MagicChangeCountersAction; +import magic.model.action.MagicDrawAction; +import magic.model.event.MagicEvent; +import magic.model.trigger.MagicWhenBecomesBlockedTrigger; +import magic.model.trigger.MagicWhenDamageIsDealtTrigger; + +public class Slith_Strider { + public static final MagicWhenBecomesBlockedTrigger T1 = new MagicWhenBecomesBlockedTrigger() { + @Override + public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent data) { + final MagicPlayer player = permanent.getController(); + return (permanent == data ) ? + new MagicEvent( + permanent, + player, + new Object[]{player}, + this, + player + " draws a card."): + MagicEvent.NONE; + } + + @Override + public void executeEvent( + final MagicGame game, + final MagicEvent event, + final Object data[], + final Object[] choiceResults) { + game.doAction(new MagicDrawAction((MagicPlayer)data[0],1)); + } + }; + + public static final MagicWhenDamageIsDealtTrigger T2 = new MagicWhenDamageIsDealtTrigger() { + @Override + public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) { + return (damage.getSource() == permanent && + damage.getTarget().isPlayer() && + damage.isCombat()) ? + new MagicEvent( + permanent, + permanent.getController(), + new Object[]{permanent}, + this, + "Put a +1/+1 counter on " + permanent + "."): + MagicEvent.NONE; + } + @Override + public void executeEvent( + final MagicGame game, + final MagicEvent event, + final Object data[], + final Object[] choiceResults) { + game.doAction(new MagicChangeCountersAction((MagicPermanent)data[0],MagicCounterType.PlusOne,1,true)); + } + }; +} diff --git a/src/magic/card/Snorting_Gahr.java b/src/magic/card/Snorting_Gahr.java new file mode 100644 index 0000000000..a2cc29cc4d --- /dev/null +++ b/src/magic/card/Snorting_Gahr.java @@ -0,0 +1,8 @@ +package magic.card; + +import magic.model.trigger.MagicBecomesBlockedPumpTrigger; + +public class Snorting_Gahr { + public static final MagicBecomesBlockedPumpTrigger T = new MagicBecomesBlockedPumpTrigger(2,2,false); + +}