diff --git a/resources/magic/data/cards.txt b/resources/magic/data/cards.txt index e0ff7b2ec0..a31f4d6fa9 100644 --- a/resources/magic/data/cards.txt +++ b/resources/magic/data/cards.txt @@ -12022,7 +12022,7 @@ timing=fmain >Myr Propagator image=http://magiccards.info/scans/en/som/182.jpg -value=3 +value=4 rarity=R type=Artifact,Creature subtype=Myr @@ -12030,3 +12030,15 @@ converted=3 cost={3} pt=1/1 timing=main + +>Myrsmith +image=http://magiccards.info/scans/en/som/16.jpg +value=3 +rarity=U +type=Creature +subtype=Human,Artificer +color=w +converted=2 +cost={1}{W} +pt=2/1 +timing=fmain diff --git a/resources/magic/data/images.txt b/resources/magic/data/images.txt index fdaf6f0a3c..9a06aa5af8 100644 --- a/resources/magic/data/images.txt +++ b/resources/magic/data/images.txt @@ -85,6 +85,7 @@ Faerie Rogue.jpg;http://magiccards.info/extras/token/morningtide/faerie-rogue.jp Germ.jpg;http://magiccards.info/extras/token/mirrodin-besieged/germ.jpg Goblin Soldier.jpg;http://magiccards.info/extras/token/eventide/goblin-soldier.jpg Merfolk Wizard.jpg;http://magiccards.info/extras/token/lorwyn/merfolk-wizard.jpg +Myr1.jpg;http://magiccards.info/extras/token/scars-of-mirrodin/myr.jpg Ogre.jpg;http://magiccards.info/extras/token/worldwake/ogre.jpg Saproling.jpg;http://magiccards.info/extras/token/tenth-edition/saproling.jpg Snake.jpg;http://magiccards.info/extras/token/zendikar/snake.jpg diff --git a/src/magic/card/Myrsmith.java b/src/magic/card/Myrsmith.java new file mode 100644 index 0000000000..170f6addd5 --- /dev/null +++ b/src/magic/card/Myrsmith.java @@ -0,0 +1,44 @@ +package magic.card; + +import magic.data.TokenCardDefinitions; +import magic.model.MagicCard; +import magic.model.MagicGame; +import magic.model.MagicManaCost; +import magic.model.MagicPermanent; +import magic.model.MagicPlayer; +import magic.model.action.MagicPlayTokenAction; +import magic.model.choice.MagicMayChoice; +import magic.model.choice.MagicPayManaCostChoice; +import magic.model.event.MagicEvent; +import magic.model.stack.MagicCardOnStack; +import magic.model.trigger.MagicWhenSpellIsPlayedTrigger; + +public class Myrsmith { + public static final MagicWhenSpellIsPlayedTrigger T = new MagicWhenSpellIsPlayedTrigger() { + @Override + public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack data) { + final MagicPlayer player = permanent.getController(); + final MagicCard card = data.getCard(); + return (card.getOwner() == player && + data.getCardDefinition().isArtifact()) ? + new MagicEvent( + permanent, + player, + new MagicMayChoice( + "You may pay {1}.", + new MagicPayManaCostChoice(MagicManaCost.ONE)), + new Object[]{player}, + this, + player + " may$ pay {1}$. If you do, put a 1/1 " + + "colorless Myr artifact creature token onto the battlefield."): + MagicEvent.NONE; + } + + @Override + public void executeEvent(final MagicGame game,final MagicEvent event,final Object data[],final Object[] choiceResults) { + if (MagicMayChoice.isYesChoice(choiceResults[0])) { + game.doAction(new MagicPlayTokenAction((MagicPlayer)data[0],TokenCardDefinitions.MYR1_TOKEN_CARD)); + } + } + }; +} diff --git a/src/magic/data/TokenCardDefinitions.java b/src/magic/data/TokenCardDefinitions.java index f6c1ea6310..23c329c42a 100644 --- a/src/magic/data/TokenCardDefinitions.java +++ b/src/magic/data/TokenCardDefinitions.java @@ -297,6 +297,19 @@ public class TokenCardDefinitions { } }; + public static final MagicCardDefinition MYR1_TOKEN_CARD = new MagicCardDefinition("Myr","Myr1") { + public void initialize() { + setToken(); + setValue(1); + addType(MagicType.Artifact); + addType(MagicType.Creature); + setSubTypes(new String[]{"Myr"}); + setCost(MagicManaCost.ZERO); + setColoredType(); + setPowerToughness(1,1); + } + }; + public static final MagicCardDefinition APE_TOKEN_CARD=new MagicCardDefinition("Ape","Ape") { public void initialize() { setToken(); @@ -510,6 +523,7 @@ public class TokenCardDefinitions { GRIFFIN_TOKEN_CARD, BIRD_TOKEN_CARD, MERFOLK_WIZARD_TOKEN_CARD, + MYR1_TOKEN_CARD, APE_TOKEN_CARD, BEAST3_TOKEN_CARD, BEAST4_TOKEN_CARD,