@Override public ActivateOncePerTurnManaAbility copy() { return new ActivateOncePerTurnManaAbility(this); }
@Override public boolean activate(Game game, boolean noMana) { if (canActivate(this.controllerId, game).canActivate()) { return super.activate(game, noMana); } return false; }
public KozileksTranslator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); this.subtype.add(SubType.ELDRAZI); this.subtype.add(SubType.DRONE); this.power = new MageInt(3); this.toughness = new MageInt(5); // Devoid this.addAbility(new DevoidAbility(this.color)); // Pay 1 life: Add {C}. Activate this ability only once each turn. this.addAbility(new ActivateOncePerTurnManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.ColorlessMana(1)), new PayLifeCost(1))); }
public WallOfRoots(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); this.subtype.add(SubType.PLANT); this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(5); // Defender this.addAbility(DefenderAbility.getInstance()); // Put a -0/-1 counter on Wall of Roots: Add {G}. Activate this ability only once each turn. this.addAbility(new ActivateOncePerTurnManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana(1)), new PutCountersSourceCost(new BoostCounter(0, -1)))); }
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 RamosDragonEngine(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); // Flying this.addAbility(FlyingAbility.getInstance()); // Whenever you cast a spell, put a +1/+1 counter on Ramos, Dragon Engine for each of that spell's colors. this.addAbility(new SpellCastControllerTriggeredAbility(new RamosDragonEngineAddCountersEffect(), new FilterSpell("a spell"), false, true)); // Remove five +1/+1 counters from Ramos: Add {W}{W}{U}{U}{B}{B}{R}{R}{G}{G}. Activate this ability only once each turn. Ability ability = new ActivateOncePerTurnManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(2, 2, 2, 2, 2, 0, 0, 0)), new RemoveCountersSourceCost(CounterType.P1P1.createInstance(5))); this.addAbility(ability); }