@Override public RemoveCounterSourceEffect copy() { return new RemoveCounterSourceEffect(this); }
public SuspendBeginningOfUpkeepInterveningIfTriggeredAbility() { super(new BeginningOfUpkeepTriggeredAbility(Zone.EXILED, new RemoveCounterSourceEffect(CounterType.TIME.createInstance()), TargetController.YOU, false), SuspendedCondition.instance, "At the beginning of your upkeep, if this card ({this}) is suspended, remove a time counter from it."); this.setRuleVisible(false); }
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 MerseineActivatedAbility() { super(Zone.BATTLEFIELD, new RemoveCounterSourceEffect(CounterType.NET.createInstance()), new MerseineCost()); }
@Override public boolean apply(Game game, Ability source) { Permanent p = game.getPermanent(source.getSourceId()); if (p != null) { AtTheEndOfCombatDelayedTriggeredAbility ability = new AtTheEndOfCombatDelayedTriggeredAbility(new RemoveCounterSourceEffect(CounterType.P1P1.createInstance())); game.addDelayedTriggeredAbility(ability, source); } return false; }
@Override public boolean apply(Game game, Ability source) { Permanent p = game.getPermanent(source.getSourceId()); if (p != null) { AtTheEndOfCombatDelayedTriggeredAbility ability = new AtTheEndOfCombatDelayedTriggeredAbility(new RemoveCounterSourceEffect(CounterType.P1P1.createInstance())); game.addDelayedTriggeredAbility(ability, source); } return false; }
@Override public boolean apply(Game game, Ability source) { Permanent p = game.getPermanent(source.getSourceId()); if (p != null) { AtTheEndOfCombatDelayedTriggeredAbility ability = new AtTheEndOfCombatDelayedTriggeredAbility(new RemoveCounterSourceEffect(CounterType.P1P1.createInstance())); game.addDelayedTriggeredAbility(ability, source); } return false; }
public BelligerentHatchling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R/W}"); this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(6); // First strike this.addAbility(FirstStrikeAbility.getInstance()); // Belligerent Hatchling enters the battlefield with four -1/-1 counters on it. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.M1M1.createInstance(4)),"with four -1/-1 counters on it")); // Whenever you cast a red spell, remove a -1/-1 counter from Belligerent Hatchling. this.addAbility(new SpellCastControllerTriggeredAbility(new RemoveCounterSourceEffect(CounterType.M1M1.createInstance(1)), filterRedSpell, false)); // Whenever you cast a white spell, remove a -1/-1 counter from Belligerent Hatchling. this.addAbility(new SpellCastControllerTriggeredAbility(new RemoveCounterSourceEffect(CounterType.M1M1.createInstance(1)), filterWhiteSpell, false)); }
public NoxiousHatchling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B/G}"); this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(6); // Noxious Hatchling enters the battlefield with four -1/-1 counters on it. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.M1M1.createInstance(4)),"with four -1/-1 counters on it")); // Wither (This deals damage to creatures in the form of -1/-1 counters.) this.addAbility(WitherAbility.getInstance()); // Whenever you cast a black spell, remove a -1/-1 counter from Noxious Hatchling. this.addAbility(new SpellCastControllerTriggeredAbility(new RemoveCounterSourceEffect(CounterType.M1M1.createInstance()), filterBlackSpell, false)); // Whenever you cast a green spell, remove a -1/-1 counter from Noxious Hatchling. this.addAbility(new SpellCastControllerTriggeredAbility(new RemoveCounterSourceEffect(CounterType.M1M1.createInstance()), filterGreenSpell, false)); }
public DivineIntervention(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{6}{W}{W}"); // Divine Intervention enters the battlefield with 2 intervention counters on it. Effect effect = new AddCountersSourceEffect(CounterType.INTERVENTION.createInstance(2)); this.addAbility(new EntersBattlefieldAbility(effect, "with 2 intervention counters")); // At the beginning of your upkeep, remove an intervention counter from Divine Intervention. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new RemoveCounterSourceEffect(CounterType.INTERVENTION.createInstance()), TargetController.YOU, false)); // Whenever a intervention counter is removed from Protean Hydra, put two intervention counters on it at the beginning of the next end step. this.addAbility(new DivineInterventionAbility()); }
public CelestialConvergence(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); // Celestial Convergence enters the battlefield with seven omen counters on it. Effect effect = new AddCountersSourceEffect(CounterType.OMEN.createInstance(7)); this.addAbility(new EntersBattlefieldAbility(effect, "with seven omen counters")); // At the beginning of your upkeep, remove an omen counter from Celestial Convergence. If there are no omen counters on Celestial Convergence, the player with the highest life total wins the game. If two or more players are tied for highest life total, the game is a draw. Ability ability = new BeginningOfUpkeepTriggeredAbility( Zone.BATTLEFIELD, new RemoveCounterSourceEffect(CounterType.OMEN.createInstance(1)), TargetController.YOU, false); ability.addEffect(new CelestialConvergenceEffect()); this.addAbility(ability); }
public Lichenthrope(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); this.subtype.add(SubType.PLANT); this.subtype.add(SubType.FUNGUS); this.power = new MageInt(5); this.toughness = new MageInt(5); // If damage would be dealt to Lichenthrope, put that many -1/-1 counters on it instead. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new LichenthropeEffect())); // At the beginning of your upkeep, remove a -1/-1 counter from Lichenthrope. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new RemoveCounterSourceEffect(CounterType.M1M1.createInstance()), TargetController.YOU, false)); }
public Magmaroth(UUID ownerId, CardSetInfo cardSetInfo){ super(ownerId, cardSetInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); subtype.add(SubType.ELEMENTAL); power = new MageInt(5); toughness = new MageInt(5); // At the beginning of your upkeep, put a -1/-1 counter on Magmaroth addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.M1M1.createInstance()), TargetController.YOU, false)); // Whenever you cast a noncreature spell, remove a -1/-1 counter from Magmaroth addAbility(new SpellCastControllerTriggeredAbility(new RemoveCounterSourceEffect(CounterType.M1M1.createInstance()), filterNonCreature, false)); }
public Karstoderm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(0); this.toughness = new MageInt(0); // Karstoderm enters the battlefield with five +1/+1 counters on it. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(5)), "{this} enters the battlefield with five +1/+1 counters on it")); // Whenever an artifact enters the battlefield, remove a +1/+1 counter from Karstoderm. this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new RemoveCounterSourceEffect(CounterType.P1P1.createInstance(1)), new FilterArtifactPermanent("an artifact"), false)); }
public DarkDepths(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); addSuperType(SuperType.LEGENDARY); addSuperType(SuperType.SNOW); // Dark Depths enters the battlefield with ten ice counters on it. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.ICE.createInstance(10)), "with ten ice counters on it")); // {3}: Remove an ice counter from Dark Depths. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RemoveCounterSourceEffect(CounterType.ICE.createInstance(1)), new ManaCostsImpl("{3}"))); // When Dark Depths has no ice counters on it, sacrifice it. If you do, create a legendary 20/20 black Avatar creature token with flying and "This creature is indestructible" named Marit Lage. this.addAbility(new DarkDepthsAbility()); }
public SavageFirecat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); this.subtype.add(SubType.ELEMENTAL); this.subtype.add(SubType.CAT); this.power = new MageInt(0); this.toughness = new MageInt(0); // Trample this.addAbility(TrampleAbility.getInstance()); // Savage Firecat enters the battlefield with seven +1/+1 counters on it. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(7)))); // Whenever you tap a land for mana, remove a +1/+1 counter from Savage Firecat. this.addAbility(new SavageFirecatTriggeredAbility(new RemoveCounterSourceEffect(CounterType.P1P1.createInstance()))); }
public BloodletterQuill(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); // {2}, {T}, Put a blood counter on Bloodletter Quill: Draw a card, then lose 1 life for each blood counter on Bloodletter Quill. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(2)); ability.addEffect(new LoseLifeSourceControllerEffect(new CountersSourceCount(CounterType.BLOOD)) .setText(", then lose 1 life for each blood counter on {this}")); ability.addCost(new TapSourceCost()); ability.addCost(new PutCountersSourceCost(CounterType.BLOOD.createInstance())); this.addAbility(ability); // {U}{B}: Remove a blood counter from Bloodletter Quill. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RemoveCounterSourceEffect(CounterType.BLOOD.createInstance()), new ManaCostsImpl("{U}{B}"))); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Permanent sourcePermanent = game.getPermanent(source.getSourceId()); if (controller != null && sourcePermanent != null) { if (!sourcePermanent.getCounters(game).containsKey(CounterType.PLAGUE) || controller.chooseUse(outcome, "Put a plague counter on? (No removes one)", source, game)) { return new AddCountersSourceEffect(CounterType.PLAGUE.createInstance(), true).apply(game, source); } else { return new RemoveCounterSourceEffect(CounterType.PLAGUE.createInstance()).apply(game, source); } } return false; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Permanent sourcePermanent = game.getPermanent(source.getSourceId()); if (controller != null && sourcePermanent != null) { if (!sourcePermanent.getCounters(game).containsKey(CounterType.CHARGE) || controller.chooseUse(outcome, "Put a charge counter on? (No removes one)", source, game)) { return new AddCountersSourceEffect(CounterType.CHARGE.createInstance(), true).apply(game, source); } else { return new RemoveCounterSourceEffect(CounterType.CHARGE.createInstance()).apply(game, source); } } return false; } }
public ArmageddonClock(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); // At the beginning of your upkeep, put a doom counter on Armageddon Clock. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.DOOM.createInstance(), new StaticValue(1), true), TargetController.YOU, false)); // At the beginning of your draw step, Armageddon Clock deals damage equal to the number of doom counters on it to each player. this.addAbility(new BeginningOfDrawTriggeredAbility(new DamagePlayersEffect(Outcome.Damage, new CountersSourceCount(CounterType.DOOM)) .setText("{this} deals damage equal to the number of doom counters on it to each player"), TargetController.YOU, false)); // {4}: Remove a doom counter from Armageddon Clock. Any player may activate this ability but only during any upkeep step. ActivatedAbilityImpl ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new RemoveCounterSourceEffect(CounterType.DOOM.createInstance()), new ManaCostsImpl("{4}"), new IsStepCondition(PhaseStep.UPKEEP, false), "Remove a doom counter from {this}. Any player may activate this ability but only during any upkeep step"); ability.setMayActivate(TargetController.ANY); this.addAbility(ability); }