diff --git a/resources/magic/data/cards.txt b/resources/magic/data/cards.txt index 48f899f7aa..d5b3548f86 100644 --- a/resources/magic/data/cards.txt +++ b/resources/magic/data/cards.txt @@ -15835,3 +15835,17 @@ cost={2}{B} pt=3/1 ability=shadow timing=main + +>Augur il-Vec +url=http://magiccards.info/fut/en/2.html +image=http://magiccards.info/scans/en/fut/2.jpg +value=2 +rarity=C +type=Creature +subtype=Human,Cleric +color=w +converted=2 +cost={1}{W} +pt=1/3 +ability=shadow +timing=main diff --git a/src/magic/card/Augur_il_Vec.java b/src/magic/card/Augur_il_Vec.java new file mode 100644 index 0000000000..748829425f --- /dev/null +++ b/src/magic/card/Augur_il_Vec.java @@ -0,0 +1,44 @@ +package magic.card; + +import magic.model.MagicGame; +import magic.model.MagicPayedCost; +import magic.model.MagicPermanent; +import magic.model.MagicPlayer; +import magic.model.MagicSource; +import magic.model.action.MagicChangeLifeAction; +import magic.model.condition.MagicCondition; +import magic.model.event.MagicActivationHints; +import magic.model.event.MagicEvent; +import magic.model.event.MagicPermanentActivation; +import magic.model.event.MagicSacrificeEvent; +import magic.model.event.MagicTiming; + +public class Augur_il_Vec { + public static final MagicPermanentActivation A = new MagicPermanentActivation( + new MagicCondition[]{MagicCondition.YOUR_UPKEEP_CONDITION}, + new MagicActivationHints(MagicTiming.None), + "Life+4") { + @Override + public MagicEvent[] getCostEvent(final MagicSource source) { + return new MagicEvent[]{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 + " gains 4 life."); + } + @Override + public void executeEvent( + final MagicGame game, + final MagicEvent event, + final Object[] data, + final Object[] choiceResults) { + game.doAction(new MagicChangeLifeAction((MagicPlayer)data[0],4)); + } + }; +} diff --git a/src/magic/model/condition/MagicCondition.java b/src/magic/model/condition/MagicCondition.java index c7bf4669b8..c24eea42f9 100644 --- a/src/magic/model/condition/MagicCondition.java +++ b/src/magic/model/condition/MagicCondition.java @@ -9,6 +9,7 @@ import magic.model.MagicPermanent; import magic.model.MagicSource; import magic.model.MagicSubType; import magic.model.MagicType; +import magic.model.phase.MagicPhaseType; public interface MagicCondition { @@ -37,6 +38,13 @@ public interface MagicCondition { return game.canPlaySorcery(source.getController()); } }; + + MagicCondition YOUR_UPKEEP_CONDITION = new MagicCondition() { + public boolean accept(final MagicGame game,final MagicSource source) { + return game.isPhase(MagicPhaseType.Upkeep) && + game.getTurnPlayer() == source.getController(); + } + }; MagicCondition ONE_LIFE_CONDITION=new MagicCondition() { public boolean accept(final MagicGame game,final MagicSource source) {