diff --git a/resources/magic/data/cards.txt b/resources/magic/data/cards.txt index 04504d2b42..5fb21c86de 100644 --- a/resources/magic/data/cards.txt +++ b/resources/magic/data/cards.txt @@ -16821,3 +16821,23 @@ type=Land mana=u3 timing=land mana_or_combat + +>Forbidding Watchtower +url=http://magiccards.info/10e/en/352.html +image=http://magiccards.info/scans/en/10e/352.jpg +value=4 +rarity=U +type=Land +mana=w3 +timing=land +mana_or_combat + +>Ghitu Encampment +url=http://magiccards.info/10e/en/353.html +image=http://magiccards.info/scans/en/10e/353.jpg +value=4 +rarity=U +type=Land +mana=r3 +timing=land +mana_or_combat diff --git a/src/magic/card/Forbidding_Watchtower.java b/src/magic/card/Forbidding_Watchtower.java new file mode 100644 index 0000000000..3b0320e6db --- /dev/null +++ b/src/magic/card/Forbidding_Watchtower.java @@ -0,0 +1,92 @@ +package magic.card; + +import magic.model.MagicColor; +import magic.model.MagicGame; +import magic.model.MagicManaCost; +import magic.model.MagicManaType; +import magic.model.MagicPayedCost; +import magic.model.MagicPermanent; +import magic.model.MagicPowerToughness; +import magic.model.MagicSource; +import magic.model.MagicSubType; +import magic.model.MagicType; +import magic.model.action.MagicBecomesCreatureAction; +import magic.model.condition.MagicArtificialCondition; +import magic.model.condition.MagicCondition; +import magic.model.event.MagicActivationHints; +import magic.model.event.MagicEvent; +import magic.model.event.MagicManaActivation; +import magic.model.event.MagicPayManaCostEvent; +import magic.model.event.MagicPermanentActivation; +import magic.model.event.MagicTapManaActivation; +import magic.model.event.MagicTiming; +import magic.model.trigger.MagicTappedIntoPlayTrigger; +import magic.model.trigger.MagicTrigger; +import magic.model.mstatic.MagicStatic; +import magic.model.mstatic.MagicLayer; + +import java.util.Arrays; +import java.util.EnumSet; + +public class Forbidding_Watchtower { + private static final MagicStatic PT = new MagicStatic(MagicLayer.SetPT, MagicStatic.UntilEOT) { + @Override + public void getPowerToughness(final MagicGame game,final MagicPermanent permanent,final MagicPowerToughness pt) { + pt.set(1,5); + } + }; + private static final MagicStatic ST = new MagicStatic(MagicLayer.Type, MagicStatic.UntilEOT) { + @Override + public EnumSet getSubTypeFlags(final MagicPermanent permanent,final EnumSet flags) { + final EnumSet mod = flags.clone(); + mod.add(MagicSubType.Soldier); + return mod; + } + @Override + public int getTypeFlags(final MagicPermanent permanent,final int flags) { + return flags|MagicType.Creature.getMask(); + } + }; + private static final MagicStatic C = new MagicStatic(MagicLayer.Color, MagicStatic.UntilEOT) { + @Override + public int getColorFlags(final MagicPermanent permanent,final int flags) { + return MagicColor.White.getMask(); + } + }; + + public static final MagicPermanentActivation A = new MagicPermanentActivation( + new MagicCondition[]{new MagicArtificialCondition( + MagicManaCost.ONE_WHITE.getCondition(), + MagicManaCost.WHITE_WHITE.getCondition())}, + new MagicActivationHints(MagicTiming.Animate), + "Animate") { + @Override + public MagicEvent[] getCostEvent(final MagicSource source) { + return new MagicEvent[]{new MagicPayManaCostEvent(source,source.getController(),MagicManaCost.ONE_WHITE)}; + } + @Override + public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) { + return new MagicEvent( + source, + source.getController(), + new Object[]{source}, + this, + "Until end of turn, " + source + + " becomes a 1/5 white Soldier creature. " + + "It's still a land."); + } + @Override + public void executeEvent( + final MagicGame game, + final MagicEvent event, + final Object[] data, + final Object[] choiceResults) { + game.doAction(new MagicBecomesCreatureAction((MagicPermanent)data[0],PT,ST,C)); + } + }; + + public static final MagicTrigger T = new MagicTappedIntoPlayTrigger(); + + public static final MagicManaActivation M = new MagicTapManaActivation( + Arrays.asList(MagicManaType.White),1); +} diff --git a/src/magic/card/Ghitu_Encampment.java b/src/magic/card/Ghitu_Encampment.java new file mode 100644 index 0000000000..9de8b550eb --- /dev/null +++ b/src/magic/card/Ghitu_Encampment.java @@ -0,0 +1,99 @@ +package magic.card; + +import magic.model.MagicAbility; +import magic.model.MagicColor; +import magic.model.MagicGame; +import magic.model.MagicManaCost; +import magic.model.MagicManaType; +import magic.model.MagicPayedCost; +import magic.model.MagicPermanent; +import magic.model.MagicPowerToughness; +import magic.model.MagicSource; +import magic.model.MagicSubType; +import magic.model.MagicType; +import magic.model.action.MagicBecomesCreatureAction; +import magic.model.condition.MagicArtificialCondition; +import magic.model.condition.MagicCondition; +import magic.model.event.MagicActivationHints; +import magic.model.event.MagicEvent; +import magic.model.event.MagicManaActivation; +import magic.model.event.MagicPayManaCostEvent; +import magic.model.event.MagicPermanentActivation; +import magic.model.event.MagicTapManaActivation; +import magic.model.event.MagicTiming; +import magic.model.trigger.MagicTappedIntoPlayTrigger; +import magic.model.trigger.MagicTrigger; +import magic.model.mstatic.MagicStatic; +import magic.model.mstatic.MagicLayer; + +import java.util.Arrays; +import java.util.EnumSet; + +public class Ghitu_Encampment { + private static final MagicStatic PT = new MagicStatic(MagicLayer.SetPT, MagicStatic.UntilEOT) { + @Override + public void getPowerToughness(final MagicGame game,final MagicPermanent permanent,final MagicPowerToughness pt) { + pt.set(2,1); + } + }; + private static final MagicStatic AB = new MagicStatic(MagicLayer.Ability, MagicStatic.UntilEOT) { + @Override + public long getAbilityFlags(final MagicGame game,final MagicPermanent permanent,final long flags) { + return flags|MagicAbility.FirstStrike.getMask(); + } + }; + private static final MagicStatic ST = new MagicStatic(MagicLayer.Type, MagicStatic.UntilEOT) { + @Override + public EnumSet getSubTypeFlags(final MagicPermanent permanent,final EnumSet flags) { + final EnumSet mod = flags.clone(); + mod.add(MagicSubType.Warrior); + return mod; + } + @Override + public int getTypeFlags(final MagicPermanent permanent,final int flags) { + return flags|MagicType.Creature.getMask(); + } + }; + private static final MagicStatic C = new MagicStatic(MagicLayer.Color, MagicStatic.UntilEOT) { + @Override + public int getColorFlags(final MagicPermanent permanent,final int flags) { + return MagicColor.Red.getMask(); + } + }; + + public static final MagicPermanentActivation A = new MagicPermanentActivation( + new MagicCondition[]{new MagicArtificialCondition( + MagicManaCost.ONE_RED.getCondition(), + MagicManaCost.RED_RED.getCondition())}, + new MagicActivationHints(MagicTiming.Animate), + "Animate") { + @Override + public MagicEvent[] getCostEvent(final MagicSource source) { + return new MagicEvent[]{new MagicPayManaCostEvent(source,source.getController(),MagicManaCost.ONE_RED)}; + } + @Override + public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) { + return new MagicEvent( + source, + source.getController(), + new Object[]{source}, + this, + "Until end of turn, " + source + + " becomes a 2/1 red Warrior creature with first strike. " + + "It's still a land."); + } + @Override + public void executeEvent( + final MagicGame game, + final MagicEvent event, + final Object[] data, + final Object[] choiceResults) { + game.doAction(new MagicBecomesCreatureAction((MagicPermanent)data[0],PT,AB,ST,C)); + } + }; + + public static final MagicTrigger T = new MagicTappedIntoPlayTrigger(); + + public static final MagicManaActivation M = new MagicTapManaActivation( + Arrays.asList(MagicManaType.Red),1); +}