public ChanceEncounter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{R}"); // Whenever you win a coin flip, put a luck counter on Chance Encounter. this.addAbility(new ChanceEncounterTriggeredAbility()); // At the beginning of your upkeep, if Chance Encounter has ten or more luck counters on it, you win the game. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new WinGameSourceControllerEffect(), TargetController.YOU, false); this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceHasCounterCondition(CounterType.LUCK, 10, Integer.MAX_VALUE), "At the beginning of your upkeep, if {this} has ten or more luck counters on it, you win the game")); }
public QuestForTheGoblinLord(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{R}"); // Whenever a Goblin enters the battlefield under your control, you may put a quest counter on Quest for the Goblin Lord. this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.QUEST.createInstance()), goblinFilter, true)); // As long as Quest for the Goblin Lord has five or more quest counters on it, creatures you control get +2/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new BoostAllEffect(2, 0, Duration.WhileOnBattlefield, filter, false), new SourceHasCounterCondition(CounterType.QUEST, 5, Integer.MAX_VALUE), rule))); }
public AinokArtillerist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); this.subtype.add(SubType.HOUND); this.subtype.add(SubType.ARCHER); this.power = new MageInt(4); this.toughness = new MageInt(1); // Ainok Artillerist has reach as long as it has a +1/+1 counter on it. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(ReachAbility.getInstance()), new SourceHasCounterCondition(CounterType.P1P1),"{this} has reach as long as it has a +1/+1 counter on it"))); }
public Lightwalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); // Lightwalker has flying as long as it has a +1/+1 counter on it. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()), new SourceHasCounterCondition(CounterType.P1P1),"Lightwalker has flying as long as it has a +1/+1 counter on it"))); }
public BalothPup(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(1); // Baloth Pup has trample as long as it has a +1/+1 counter on it. Effect effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()), new SourceHasCounterCondition(CounterType.P1P1), rule); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); }
public RepairBeginningOfUpkeepInterveningIfTriggeredAbility() { super(new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD, new RemoveCounterSourceEffect(CounterType.REPAIR.createInstance()), TargetController.YOU, false), new SourceHasCounterCondition(CounterType.REPAIR), "At the beginning of your upkeep, remove a repair counter from {this}"); this.setRuleVisible(false); }
public QuestForRenewal(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); // Whenever a creature you control becomes tapped, you may put a quest counter on Quest for Renewal. this.addAbility(new BecomesTappedTriggeredAbility(new AddCountersSourceEffect(CounterType.QUEST.createInstance()), true, new FilterControlledCreaturePermanent("a creature you control"))); // As long as there are four or more quest counters on Quest for Renewal, untap all creatures you control during each other player's untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( new UntapAllDuringEachOtherPlayersUntapStepEffect(new FilterControlledCreaturePermanent()), new SourceHasCounterCondition(CounterType.QUEST, 4, Integer.MAX_VALUE), "As long as there are four or more quest counters on {this}, untap all creatures you control during each other player's untap step."))); }
public Thunderblust(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}{R}"); this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(7); this.toughness = new MageInt(2); // Haste this.addAbility(HasteAbility.getInstance()); // Thunderblust has trample as long as it has a -1/-1 counter on it. Effect effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()), new SourceHasCounterCondition(CounterType.M1M1), rule); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); // Persist this.addAbility(new PersistAbility()); }
public GemstoneMine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); // Gemstone Mine enters the battlefield with three mining counters on it. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.MINING.createInstance(3)))); // {T}, Remove a mining counter from Gemstone Mine: Add one mana of any color. If there are no mining counters on Gemstone Mine, sacrifice it. Ability ability = new AnyColorManaAbility(); ability.addCost(new RemoveCountersSourceCost(CounterType.MINING.createInstance(1))); ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new SourceHasCounterCondition(CounterType.MINING, 0, 0), "If there are no mining counters on {this}, sacrifice it")); this.addAbility(ability); }
public PyramidOfThePantheon(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); // {2}, {T}: Add one mana of any color. Put a brick counter on Pyramid of the Pantheon. Ability ability = new AnyColorManaAbility(new GenericManaCost(2)); ability.addCost(new TapSourceCost()); ability.addEffect(new AddCountersSourceEffect(CounterType.BRICK.createInstance())); this.addAbility(ability); // {T}: Add three mana of any one color. Activate this ability only of there are three or more brick counters on Pyramid of the Pantheon. this.addAbility(new ActivateIfConditionManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(3), new TapSourceCost(), new SourceHasCounterCondition(CounterType.BRICK, 3))); }
public ManaBloom(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{X}{G}"); // Mana Bloom enters the battlefield with X charge counters on it. this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.CHARGE.createInstance()))); // Remove a charge counter from Mana Bloom: Add one mana of any color. Activate this ability only once each turn. Ability ability = new ActivateOncePerTurnManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new RemoveCountersSourceCost(CounterType.CHARGE.createInstance())); this.addAbility(ability); // At the beginning of your upkeep, if Mana Bloom has no charge counters on it, return it to its owner's hand. TriggeredAbility triggeredAbility = new BeginningOfUpkeepTriggeredAbility(new ReturnToHandSourceEffect(true), TargetController.YOU, false); this.addAbility(new ConditionalInterveningIfTriggeredAbility(triggeredAbility, new SourceHasCounterCondition(CounterType.CHARGE, 0, 0), "At the beginning of your upkeep, if Mana Bloom has no charge counters on it, return it to its owner's hand.")); }
public Fasting(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); // At the beginning of your upkeep, put a hunger counter on Fasting. Then destroy Fasting if it has five or more hunger counters on it. Ability ability = new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.HUNGER.createInstance()), TargetController.YOU, false); ability.addEffect(new ConditionalOneShotEffect(new DestroySourceEffect(), new SourceHasCounterCondition(CounterType.HUNGER, 5), "Then destroy {this} if it has five or more hunger counters on it")); this.addAbility(ability); // If you would begin your draw step, you may skip that step instead. If you do, you gain 2 life. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new FastingReplacementEffect())); // When you draw a card, destroy Fasting. this.addAbility(new DrawCardControllerTriggeredAbility(new DestroySourceEffect(), false)); }
public RemoteFarm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); // Remote Farm enters the battlefield tapped with two depletion counters on it. this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance(2)))); // {tap}, Remove a depletion counter from Remote Farm: Add {W}{W}. If there are no depletion counters on Remote Farm, sacrifice it. Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana(2), new TapSourceCost()); ability.addCost(new RemoveCountersSourceCost(CounterType.DEPLETION.createInstance(1))); ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new SourceHasCounterCondition(CounterType.DEPLETION, 0,0), "If there are no depletion counters on {this}, sacrifice it")); this.addAbility(ability); }
public SandstoneNeedle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); // Sandstone Needle enters the battlefield tapped with two depletion counters on it. this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance(2)))); // {tap}, Remove a depletion counter from Sandstone Needle: Add {R}{R}. If there are no depletion counters on Sandstone Needle, sacrifice it. Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(2), new TapSourceCost()); ability.addCost(new RemoveCountersSourceCost(CounterType.DEPLETION.createInstance(1))); ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new SourceHasCounterCondition(CounterType.DEPLETION, 0,0), "If there are no depletion counters on {this}, sacrifice it")); this.addAbility(ability); }
public PeatBog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); // Peat Bog enters the battlefield tapped with two depletion counters on it. this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance(2)))); // {T}, Remove a depletion counter from Peat Bog: Add {B}{B}. If there are no depletion counters on Peat Bog, sacrifice it. Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(2), new TapSourceCost()); ability.addCost(new RemoveCountersSourceCost(CounterType.DEPLETION.createInstance(1))); ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new SourceHasCounterCondition(CounterType.DEPLETION, 0,0), "If there are no depletion counters on {this}, sacrifice it")); this.addAbility(ability); }
public HickoryWoodlot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); // Hickory Woodlot enters the battlefield tapped with two depletion counters on it. this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance(2)))); // {tap}, Remove a depletion counter from Hickory Woodlot: Add {G}{G}. If there are no depletion counters on Hickory Woodlot, sacrifice it. Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(2), new TapSourceCost()); ability.addCost(new RemoveCountersSourceCost(CounterType.DEPLETION.createInstance(1))); ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new SourceHasCounterCondition(CounterType.DEPLETION, 0,0), "If there are no depletion counters on {this}, sacrifice it")); this.addAbility(ability); }
public SoulEcho(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{X}{W}{W}"); // Soul Echo enters the battlefield with X echo counters on it. this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.ECHO.createInstance()))); // You don't lose the game for having 0 or less life. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontLoseByZeroOrLessLifeEffect(Duration.WhileOnBattlefield))); // At the beginning of your upkeep, sacrifice Soul Echo if there are no echo counters on it. // Otherwise, target opponent may choose that for each 1 damage that would be dealt to you until your next upkeep, you remove an echo counter from Soul Echo instead. Effect effect = new ConditionalOneShotEffect(new SacrificeSourceEffect(), new SoulEchoOpponentsChoiceEffect(), new SourceHasCounterCondition(CounterType.ECHO, 0, 0), "sacrifice {this} if there are no echo counters on it. Otherwise, target opponent may choose that for each 1 damage that would be dealt to you until your next upkeep, you remove an echo counter from {this} instead"); Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false, false); ability.addTarget(new TargetOpponent()); this.addAbility(ability); }
public SaprazzanSkerry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); // Saprazzan Skerry enters the battlefield tapped with two depletion counters on it. this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance(2)))); // {tap}, Remove a depletion counter from Saprazzan Skerry: Add {U}{U}. If there are no depletion counters on Saprazzan Skerry, sacrifice it. Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana(2), new TapSourceCost()); ability.addCost(new RemoveCountersSourceCost(CounterType.DEPLETION.createInstance(1))); ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new SourceHasCounterCondition(CounterType.DEPLETION, 0,0), "If there are no depletion counters on {this}, sacrifice it")); this.addAbility(ability); }
public JeweledAmulet(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{0}"); // {1}, {tap}: Put a charge counter on Jeweled Amulet. Note the type of mana spent to pay this activation cost. Activate this ability only if there are no charge counters on Jeweled Amulet. ConditionalActivatedAbility ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new JeweledAmuletAddCounterEffect(), new ManaCostsImpl("{1}"), new SourceHasCounterCondition(CounterType.CHARGE, 0, 0), rule); ability.addEffect(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(), true)); ability.addCost(new TapSourceCost()); this.addAbility(ability); // {tap}, Remove a charge counter from Jeweled Amulet: Add one mana of Jeweled Amulet's last noted type. Ability ability2 = new SimpleManaAbility(Zone.BATTLEFIELD, new JeweledAmuletAddManaEffect(), new TapSourceCost()); ability2.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance())); this.addAbility(ability2); }
public LuxaRiverShrine(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); // {1}, {T}: You gain 1 life. Put a brick counter on Luxa River Shrine. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), new ManaCostsImpl("{1}")); ability.addCost(new TapSourceCost()); ability.addEffect(new AddCountersSourceEffect(CounterType.BRICK.createInstance())); this.addAbility(ability); // {T}: You gain 2 life. Activate this ability only if there are three or more brick counters on Luxa River Shrine. Condition condition = new SourceHasCounterCondition(CounterType.BRICK, 3, Integer.MAX_VALUE); this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), new TapSourceCost(), condition, rule)); }