diff --git a/resources/magic/data/cards.txt b/resources/magic/data/cards.txt index 1cce75a97b..a06eac15f0 100644 --- a/resources/magic/data/cards.txt +++ b/resources/magic/data/cards.txt @@ -12411,3 +12411,24 @@ converted=4 cost={4} pt=2/2 timing=main + +>Hedron Scrabbler +image=http://magiccards.info/scans/en/zen/204.jpg +value=1 +rarity=C +type=Artifact,Creature +subtype=Construct +converted=2 +cost={2} +pt=1/1 +timing=main + +>Ior Ruin Expedition +image=http://magiccards.info/scans/en/zen/49.jpg +value=3 +rarity=C +type=Enchantment +color=u +converted=2 +cost={1}{U} +timing=enchantment diff --git a/src/magic/card/Hedron_Scrabbler.java b/src/magic/card/Hedron_Scrabbler.java new file mode 100644 index 0000000000..657c76c2a3 --- /dev/null +++ b/src/magic/card/Hedron_Scrabbler.java @@ -0,0 +1,34 @@ +package magic.card; + +import magic.model.MagicGame; +import magic.model.MagicPermanent; +import magic.model.MagicPlayer; +import magic.model.action.MagicChangeTurnPTAction; +import magic.model.event.MagicEvent; +import magic.model.trigger.MagicWhenOtherComesIntoPlayTrigger; + +public class Hedron_Scrabbler { + public static final MagicWhenOtherComesIntoPlayTrigger T = new MagicWhenOtherComesIntoPlayTrigger() { + @Override + public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent played) { + final MagicPlayer player = permanent.getController(); + return (player == played.getController() && played.isLand()) ? + new MagicEvent( + permanent, + player, + new Object[]{permanent}, + this, + permanent + " gets +1/+1 until end of turn."): + 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],1,1)); + } + }; +} diff --git a/src/magic/card/Ior_Ruin_Expedition.java b/src/magic/card/Ior_Ruin_Expedition.java new file mode 100644 index 0000000000..1dc6ada80e --- /dev/null +++ b/src/magic/card/Ior_Ruin_Expedition.java @@ -0,0 +1,83 @@ +package magic.card; + +import magic.model.MagicCounterType; +import magic.model.MagicGame; +import magic.model.MagicPayedCost; +import magic.model.MagicPermanent; +import magic.model.MagicPlayer; +import magic.model.MagicSource; +import magic.model.action.MagicChangeCountersAction; +import magic.model.action.MagicDrawAction; +import magic.model.choice.MagicMayChoice; +import magic.model.choice.MagicSimpleMayChoice; +import magic.model.condition.MagicCondition; +import magic.model.event.MagicActivationHints; +import magic.model.event.MagicEvent; +import magic.model.event.MagicPermanentActivation; +import magic.model.event.MagicRemoveCounterEvent; +import magic.model.event.MagicSacrificeEvent; +import magic.model.event.MagicTiming; +import magic.model.trigger.MagicWhenOtherComesIntoPlayTrigger; + +public class Ior_Ruin_Expedition { + public static final MagicWhenOtherComesIntoPlayTrigger T = new MagicWhenOtherComesIntoPlayTrigger() { + @Override + public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent played) { + final MagicPlayer player = permanent.getController(); + return (player == played.getController() && played.isLand()) ? + new MagicEvent( + permanent, + player, + new MagicSimpleMayChoice( + player + " may put a quest counter on " + permanent + ".", + MagicSimpleMayChoice.ADD_CHARGE_COUNTER, + 1, + MagicSimpleMayChoice.DEFAULT_YES), + new Object[]{permanent}, + this, + player + " may put a quest counter on " + permanent + ".") : + 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 MagicChangeCountersAction((MagicPermanent)data[0],MagicCounterType.Charge,1,true)); + } + } + }; + + public static final MagicPermanentActivation A = new MagicPermanentActivation( + new MagicCondition[]{MagicCondition.THREE_CHARGE_COUNTERS_CONDITION}, + new MagicActivationHints(MagicTiming.Draw), + "Draw") { + @Override + public MagicEvent[] getCostEvent(final MagicSource source) { + return new MagicEvent[]{ + new MagicRemoveCounterEvent((MagicPermanent)source,MagicCounterType.Charge,3), + new MagicSacrificeEvent((MagicPermanent)source)}; + } + @Override + public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) { + final MagicPlayer player=source.getController(); + return new MagicEvent( + source, + player, + new Object[]{player}, + this, + player + " draws two cards"); + } + @Override + public void executeEvent( + final MagicGame game, + final MagicEvent event, + final Object[] data, + final Object[] choiceResults) { + game.doAction(new MagicDrawAction((MagicPlayer)data[0],2)); + } + }; +}