@Override public AddManaOfAnyTypeProducedEffect copy() { return new AddManaOfAnyTypeProducedEffect(this); }
@Override public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); if (permanent != null) { Player targetController = game.getPlayer(permanent.getControllerId()); if (targetController == null) { return false; } checkToFirePossibleEvents(getMana(game, source), game, source); targetController.getManaPool().addMana(getMana(game, source), game, source); return true; } return false; }
public MirarisWake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{G}{W}"); // Creatures you control get +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield))); // Whenever you tap a land for mana, add one mana of any type that land produced. AddManaOfAnyTypeProducedEffect effect = new AddManaOfAnyTypeProducedEffect(); effect.setText("add one mana of any type that land produced"); this.addAbility(new TapForManaAllTriggeredManaAbility( effect, new FilterControlledLandPermanent("you tap a land"), SetTargetPointer.PERMANENT)); }
return null; Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); if (permanent != null) { Player targetController = game.getPlayer(permanent.getControllerId()); return null; Mana types = (Mana) this.getValue("mana"); Choice choice = new ChoiceColor(true); choice.getChoices().clear();
public ZendikarResurgent(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{G}{G}"); // Whenever you tap a land for mana, add one mana of any type that land produced. (<i>The types of mana are white, blue, black, red, green, and colorless.)</i> AddManaOfAnyTypeProducedEffect effect = new AddManaOfAnyTypeProducedEffect(); effect.setText("add one mana of any type that land produced"); this.addAbility(new TapForManaAllTriggeredManaAbility( effect, new FilterControlledLandPermanent("you tap a land"), SetTargetPointer.PERMANENT)); // Whenever you cast a creature spell, draw a card. this.addAbility(new SpellCastControllerTriggeredAbility( new DrawCardSourceControllerEffect(1), StaticFilters.FILTER_SPELL_A_CREATURE, false)); }
public ExtraplanarLensTriggeredAbility() { super(Zone.BATTLEFIELD, new AddManaOfAnyTypeProducedEffect()); }
public NikyaOfTheOldWays(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{G}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.CENTAUR); this.subtype.add(SubType.DRUID); this.power = new MageInt(5); this.toughness = new MageInt(5); // You can't cast noncreature spells. this.addAbility(new SimpleStaticAbility( Zone.BATTLEFIELD, new NikyaOfTheOldWaysCantCastEffect() )); // Whenever you tap a land for mana, add one mana of any type that land produced. AddManaOfAnyTypeProducedEffect effect = new AddManaOfAnyTypeProducedEffect(); effect.setText("add one mana of any type that land produced"); this.addAbility(new TapForManaAllTriggeredManaAbility( effect, new FilterControlledLandPermanent("you tap a land"), SetTargetPointer.PERMANENT) ); }
public HeartbeatOfSpring(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); // Whenever a player taps a land for mana, that player adds one mana of any type that land produced. this.addAbility(new TapForManaAllTriggeredManaAbility( new AddManaOfAnyTypeProducedEffect(), new FilterLandPermanent("a player taps a land"), SetTargetPointer.PERMANENT)); }
public ManaFlare(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); // Whenever a player taps a land for mana, that player adds one mana of any type that land produced. this.addAbility(new TapForManaAllTriggeredManaAbility( new AddManaOfAnyTypeProducedEffect(), new FilterLandPermanent("a player taps a land"), SetTargetPointer.PERMANENT)); }
public DictateOfKarametra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{G}{G}"); // Flash this.addAbility(FlashAbility.getInstance()); // Whenever a player taps a land for mana, that player adds one mana of any type that land produced. this.addAbility(new TapForManaAllTriggeredManaAbility( new AddManaOfAnyTypeProducedEffect(), new FilterLandPermanent("a player taps a land"), SetTargetPointer.PERMANENT)); }
public KeeperOfProgenitus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); this.subtype.add(SubType.ELF); this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(3); // Whenever a player taps a Mountain, Forest, or Plains for mana, that player adds one mana of any type that land produced. this.addAbility(new TapForManaAllTriggeredManaAbility( new AddManaOfAnyTypeProducedEffect(), filter, SetTargetPointer.PERMANENT)); }
public ZhurTaaAncient(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{G}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(7); this.toughness = new MageInt(5); // Whenever a player taps a land for mana, that player adds one mana of any type that land produced. this.addAbility(new TapForManaAllTriggeredManaAbility( new AddManaOfAnyTypeProducedEffect(), new FilterLandPermanent("a player taps a land"), SetTargetPointer.PERMANENT)); }
public Overabundance(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}{G}"); // Whenever a player taps a land for mana, that player adds one mana of any type that land produced, and Overabundance deals 1 damage to him or her. this.addAbility(new TapForManaAllTriggeredManaAbility( new AddManaOfAnyTypeProducedEffect(), new FilterLandPermanent( "a player taps a land"), SetTargetPointer.PERMANENT )); this.addAbility(new TapForManaAllTriggeredAbility( new DamageTargetEffect(1, true, "that player"), new FilterLandPermanent("a player taps a land"), SetTargetPointer.PLAYER )); }
public WintersNight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}{G}{W}"); addSuperType(SuperType.WORLD); // Whenever a player taps a snow land for mana, that player adds one mana of any type that land produced. // That land doesn't untap during its controller's next untap step. ManaEffect effect = new AddManaOfAnyTypeProducedEffect(); effect.setText("that player adds one mana of any type that land produced"); Ability ability = new TapForManaAllTriggeredManaAbility(effect, filter, SetTargetPointer.PERMANENT); Effect effect2 = new DontUntapInControllersNextUntapStepTargetEffect(); effect2.setText("That land doesn't untap during its controller's next untap step"); ability.addEffect(effect2); this.addAbility(ability); }
public VorinclexVoiceOfHunger(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{G}{G}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.PRAETOR); this.power = new MageInt(7); this.toughness = new MageInt(6); // Trample this.addAbility(TrampleAbility.getInstance()); // Whenever you tap a land for mana, add one mana of any type that land produced. ManaEffect effect = new AddManaOfAnyTypeProducedEffect(); effect.setText("add one mana of any type that land produced"); this.addAbility(new TapForManaAllTriggeredManaAbility( effect, new FilterControlledLandPermanent("you tap a land"), SetTargetPointer.PERMANENT)); // Whenever an opponent taps a land for mana, that land doesn't untap during its controller's next untap step. this.addAbility(new VorinclexTriggeredAbility2()); }