diff --git a/resources/magic/data/cards.txt b/resources/magic/data/cards.txt index 6027cf9258..aae0d807e0 100644 --- a/resources/magic/data/cards.txt +++ b/resources/magic/data/cards.txt @@ -14586,3 +14586,30 @@ cost={1}{W}{W} pt=2/2 ability=flying timing=main + +>Gustcloak Runner +url=http://magiccards.info/on/en/35.html +image=http://magiccards.info/scans/en/on/35.jpg +value=3 +rarity=C +type=Creature +subtype=Human,Soldier +color=w +converted=1 +cost={W} +pt=1/1 +timing=main + +>Gustcloak Savior +url=http://magiccards.info/on/en/36.html +image=http://magiccards.info/scans/en/on/36.jpg +value=4 +rarity=R +type=Creature +subtype=Bird,Soldier +color=w +converted=5 +cost={4}{W} +pt=3/4 +ability=flying +timing=main diff --git a/src/magic/card/Gustcloak_Runner.java b/src/magic/card/Gustcloak_Runner.java new file mode 100644 index 0000000000..bf27ed9135 --- /dev/null +++ b/src/magic/card/Gustcloak_Runner.java @@ -0,0 +1,43 @@ +package magic.card; + +import magic.model.MagicGame; +import magic.model.MagicPermanent; +import magic.model.MagicPlayer; +import magic.model.action.MagicRemoveFromCombatAction; +import magic.model.action.MagicUntapAction; +import magic.model.choice.MagicMayChoice; +import magic.model.event.MagicEvent; +import magic.model.trigger.MagicWhenBecomesBlockedTrigger; + +public class Gustcloak_Runner { + public static final MagicWhenBecomesBlockedTrigger T = new MagicWhenBecomesBlockedTrigger() { + @Override + public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) { + final MagicPlayer player = permanent.getController(); + return (creature == permanent) ? + new MagicEvent( + permanent, + player, + new MagicMayChoice(player + " may untap " + permanent + + " and remove it from combat."), + new Object[]{permanent}, + this, + player + " may$ untap " + permanent + + " and remove it from combat.") : + MagicEvent.NONE; + } + + @Override + public void executeEvent( + final MagicGame game, + final MagicEvent event, + final Object data[], + final Object[] choiceResults) { + if (MagicMayChoice.isYesChoice(choiceResults[0])) { + final MagicPermanent permanent = (MagicPermanent)data[0]; + game.doAction(new MagicUntapAction(permanent)); + game.doAction(new MagicRemoveFromCombatAction(permanent)); + } + } + }; +} diff --git a/src/magic/card/Gustcloak_Savior.java b/src/magic/card/Gustcloak_Savior.java new file mode 100644 index 0000000000..87080844ec --- /dev/null +++ b/src/magic/card/Gustcloak_Savior.java @@ -0,0 +1,43 @@ +package magic.card; + +import magic.model.MagicGame; +import magic.model.MagicPermanent; +import magic.model.MagicPlayer; +import magic.model.action.MagicRemoveFromCombatAction; +import magic.model.action.MagicUntapAction; +import magic.model.choice.MagicMayChoice; +import magic.model.event.MagicEvent; +import magic.model.trigger.MagicWhenBecomesBlockedTrigger; + +public class Gustcloak_Savior { + public static final MagicWhenBecomesBlockedTrigger T = new MagicWhenBecomesBlockedTrigger() { + @Override + public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) { + final MagicPlayer player = permanent.getController(); + return (creature.getController() == player) ? + new MagicEvent( + permanent, + player, + new MagicMayChoice(player + " may untap " + creature + + " and remove it from combat."), + new Object[]{creature}, + this, + player + " may$ untap " + creature + + " and remove it from combat.") : + MagicEvent.NONE; + } + + @Override + public void executeEvent( + final MagicGame game, + final MagicEvent event, + final Object data[], + final Object[] choiceResults) { + if (MagicMayChoice.isYesChoice(choiceResults[0])) { + final MagicPermanent permanent = (MagicPermanent)data[0]; + game.doAction(new MagicUntapAction(permanent)); + game.doAction(new MagicRemoveFromCombatAction(permanent)); + } + } + }; +}