From 11d788f546f7e1f99926fa594e27640001a0deb7 Mon Sep 17 00:00:00 2001 From: beholder Date: Fri, 30 Sep 2011 09:27:21 +0200 Subject: [PATCH] added Silverchase Fox and Silver-Inlaid Dagger. corrected typo in Qasali Pridemage --- resources/magic/data/cards2.txt | 24 +++++++++++ src/magic/card/Qasali_Pridemage.java | 2 +- src/magic/card/Silver_Inlaid_Dagger.java | 25 ++++++++++++ src/magic/card/Silverchase_Fox.java | 52 ++++++++++++++++++++++++ 4 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 src/magic/card/Silver_Inlaid_Dagger.java create mode 100644 src/magic/card/Silverchase_Fox.java diff --git a/resources/magic/data/cards2.txt b/resources/magic/data/cards2.txt index ea28b6361f..e76a2a3d4a 100644 --- a/resources/magic/data/cards2.txt +++ b/resources/magic/data/cards2.txt @@ -4919,3 +4919,27 @@ cost={2} equip={1} given_ability=first strike timing=equipment + +>Silverchase Fox +image=http://magiccards.info/scans/en/isd/31.jpg +value=2 +rarity=C +type=Creature +subtype=Fox +color=w +converted=2 +cost={1}{W} +pt=2/2 +timing=main + +>Silver-Inlaid Dagger +image=http://magiccards.info/scans/en/isd/233.jpg +value=2 +rarity=U +type=Artifact +subtype=Equipment +converted=1 +cost={1} +equip={2} +given_pt=2/0 +timing=equipment diff --git a/src/magic/card/Qasali_Pridemage.java b/src/magic/card/Qasali_Pridemage.java index a43460fc22..4c92a14bdf 100644 --- a/src/magic/card/Qasali_Pridemage.java +++ b/src/magic/card/Qasali_Pridemage.java @@ -20,7 +20,7 @@ public class Qasali_Pridemage { public static final MagicPermanentActivation A = new MagicPermanentActivation( new MagicCondition[]{MagicManaCost.ONE.getCondition()}, new MagicActivationHints(MagicTiming.Removal), - "Destory") { + "Destroy") { @Override public MagicEvent[] getCostEvent(final MagicSource source) { diff --git a/src/magic/card/Silver_Inlaid_Dagger.java b/src/magic/card/Silver_Inlaid_Dagger.java new file mode 100644 index 0000000000..678532dcf2 --- /dev/null +++ b/src/magic/card/Silver_Inlaid_Dagger.java @@ -0,0 +1,25 @@ +package magic.card; + +import magic.model.MagicGame; +import magic.model.MagicPermanent; +import magic.model.MagicPowerToughness; +import magic.model.MagicSubType; +import magic.model.mstatic.MagicLayer; +import magic.model.mstatic.MagicStatic; +import magic.model.target.MagicTargetFilter; + +public class Silver_Inlaid_Dagger { + public static final MagicStatic S = new MagicStatic( + MagicLayer.ModPT, + MagicTargetFilter.TARGET_CREATURE) { + @Override + public void getPowerToughness(final MagicGame game,final MagicPermanent permanent,final MagicPowerToughness pt) { + pt.add(1,0); + } + @Override + public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) { + return source.getEquippedCreature().hasSubType(MagicSubType.Human,game) && + target == source.getEquippedCreature(); + } + }; +} diff --git a/src/magic/card/Silverchase_Fox.java b/src/magic/card/Silverchase_Fox.java new file mode 100644 index 0000000000..5c94611a6a --- /dev/null +++ b/src/magic/card/Silverchase_Fox.java @@ -0,0 +1,52 @@ +package magic.card; + +import magic.model.MagicGame; +import magic.model.MagicLocationType; +import magic.model.MagicManaCost; +import magic.model.MagicPayedCost; +import magic.model.MagicPermanent; +import magic.model.MagicSource; +import magic.model.action.MagicPermanentAction; +import magic.model.action.MagicRemoveFromPlayAction; +import magic.model.choice.MagicTargetChoice; +import magic.model.condition.MagicCondition; +import magic.model.event.MagicActivationHints; +import magic.model.event.MagicEvent; +import magic.model.event.MagicPayManaCostSacrificeEvent; +import magic.model.event.MagicPermanentActivation; +import magic.model.event.MagicTiming; +import magic.model.target.MagicDestroyTargetPicker; + +public class Silverchase_Fox { + public static final MagicPermanentActivation A = new MagicPermanentActivation( + new MagicCondition[]{MagicManaCost.ONE_WHITE.getCondition()}, + new MagicActivationHints(MagicTiming.Removal), + "Exile") { + + @Override + public MagicEvent[] getCostEvent(final MagicSource source) { + return new MagicEvent[]{new MagicPayManaCostSacrificeEvent(source,source.getController(),MagicManaCost.ONE_WHITE)}; + } + + @Override + public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) { + return new MagicEvent( + source, + source.getController(), + MagicTargetChoice.NEG_TARGET_ENCHANTMENT, + new MagicDestroyTargetPicker(false), + MagicEvent.NO_DATA, + this, + "Exile target enchantment$."); + } + + @Override + public void executeEvent(final MagicGame game,final MagicEvent event,final Object[] data,final Object[] choiceResults) { + event.processTargetPermanent(game,choiceResults,0,new MagicPermanentAction() { + public void doAction(final MagicPermanent permanent) { + game.doAction(new MagicRemoveFromPlayAction(permanent,MagicLocationType.Exile)); + } + }); + } + }; +}