@Override public ConditionalActivatedAbility copy() { return new ConditionalActivatedAbility(this); }
public IceCauldron(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // {X}, {T}: Put a charge counter on Ice Cauldron and exile a nonland card from your hand. You may cast that card for as long as it remains exiled. Note the type and amount of mana spent to pay this activation cost. Activate this ability only if there are no charge counters on Ice Cauldron. ConditionalActivatedAbility ability = new ConditionalActivatedAbility( Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance(), true), new ManaCostsImpl("{X}"), new SourceHasCounterCondition(CounterType.CHARGE, 0, 0)); ability.addEffect(new IceCauldronExileEffect()); ability.addEffect(new IceCauldronNoteManaEffect()); ability.addCost(new TapSourceCost()); this.addAbility(ability); // {T}, Remove a charge counter from Ice Cauldron: Add Ice Cauldron's last noted type and amount of mana. Spend this mana only to cast the last card exiled with Ice Cauldron. Ability ability2 = new SimpleManaAbility(Zone.BATTLEFIELD, new IceCauldronAddManaEffect(), new TapSourceCost()); ability2.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance())); this.addAbility(ability2); }
public DreadWanderer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.JACKAL); this.power = new MageInt(2); this.toughness = new MageInt(1); // Dread Wanderer enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); // {2}{B}: Return Dread Wanderer from your graveyard to the battlefield. // Activate this ability only any time you could cast a sorcery and only if you have one or fewer cards in hand. ConditionalActivatedAbility ability = new ConditionalActivatedAbility( Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(), new ManaCostsImpl("{2}{B}"), HeckbentCondition.instance, "{2}{B}: Return {this} from your graveyard to the battlefield. " + "Activate this ability only any time you could cast a sorcery " + "and only if you have one or fewer cards in hand." ); ability.setTiming(TimingRule.SORCERY); addAbility(ability); }
public FoolsTome(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); // {2}, {tap}: Draw a card. Activate this ability only if you have no cards in hand. Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{2}"), HellbentCondition.instance); ability.addCost(new TapSourceCost()); 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 JandorsRing(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); Watcher watcher = new JandorsRingWatcher(); // {2}, {tap}, Discard the last card you drew this turn: Draw a card. // TODO: discard has to be a cost not a payment during resolution Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new JandorsRingEffect(), new ManaCostsImpl("{2}"), WatchedCardInHandCondition.instance, "Last drawn card still in hand?"); ability.addCost(new TapSourceCost()); this.addAbility(ability, watcher); }
public CinderCrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.subtype.add(SubType.SALAMANDER); this.power = new MageInt(1); this.toughness = new MageInt(2); // {R}: Cinder Crawler gets +1/+0 until end of turn. Activate this ability only if Cinder Crawler is blocked. this.addAbility(new ConditionalActivatedAbility( Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}"), SourceBlockedCondition.instance )); }
public StallionOfAshmouth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); this.subtype.add(SubType.NIGHTMARE); this.subtype.add(SubType.HORSE); this.power = new MageInt(3); this.toughness = new MageInt(3); // <i>Delirium</i> — {1}{B}: Stallion of Ashmouth gets +1/+1 until end of turn. Activate this ability only if there are // four or more card types among cards in your graveyard. this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{1}{B}"), DeliriumCondition.instance)); }
public ScrollOfOrigins(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); // {2}, {tap}: Draw a card if you have seven or more cards in hand. Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(2), new CardsInHandCondition(ComparisonType.MORE_THAN, 6), "Draw a card if you have seven or more cards in hand."); ability.addCost(new TapSourceCost()); this.addAbility(ability); }
public LibraryOfAlexandria(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); // {tap}: Add {C}. this.addAbility(new ColorlessManaAbility()); // {tap}: Draw a card. Activate this ability only if you have exactly seven cards in hand. this.addAbility(new ConditionalActivatedAbility( Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new TapSourceCost(), new CardsInHandCondition(ComparisonType.EQUAL_TO, 7), "")); }
public SeaGateWreckage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); // {T}: Add {C}. this.addAbility(new ColorlessManaAbility()); // {2}{C}, {T}: Draw a card. Activate this ability only if you have no cards in hand. Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{2}{C}"), HellbentCondition.instance); ability.addCost(new TapSourceCost()); this.addAbility(ability); }
public Scourglass(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}{W}{W}"); // {T}, Sacrifice Scourglass: Destroy all permanents except for artifacts and lands. Activate this ability only during your upkeep. Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DestroyAllEffect(filter), new TapSourceCost(), new IsStepCondition(PhaseStep.UPKEEP), null); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); }
public JadeStatue(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // {2}: Jade Statue becomes a 3/6 Golem artifact creature until end of combat. Activate this ability only during combat. this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect (new JadeStatueToken(), "", Duration.EndOfCombat), new ManaCostsImpl("{2}"), new IsPhaseCondition(TurnPhase.COMBAT), "{2}: {this} becomes a 3/6 Golem artifact creature until end of combat. Activate this ability only during combat.")); }
public KindlyStranger(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(3); this.transformable = true; this.secondSideCardClazz = mage.cards.d.DemonPossessedWitch.class; // <i>Delirium</i> — {2}{B}: Transform Kindly Stranger. Activate this ability only if there are four or more card types among cards in your graveyard. this.addAbility(new TransformAbility()); this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), new ManaCostsImpl<>("{2}{B}"), DeliriumCondition.instance)); }
public KeldonMegaliths(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); // Keldon Megaliths enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); // {tap}: Add {R}. this.addAbility(new RedManaAbility()); // Hellbent - {1}{R}, {tap}: Keldon Megaliths deals 1 damage to any target. Activate this ability only if you have no cards in hand. Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl<>("{1}{R}"), HellbentCondition.instance, "<i>Hellbent</i> — {1}{R}, {T}: {this} deals 1 damage to any target. Activate this ability only if you have no cards in hand."); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); }
public LifeChisel(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // Sacrifice a creature: You gain life equal to the sacrificed creature's toughness. Activate this ability only during your upkeep. Ability ability = new ConditionalActivatedAbility( Zone.BATTLEFIELD, new LifeChiselEffect(), new SacrificeTargetCost( new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT) ), new IsStepCondition(PhaseStep.UPKEEP), null ); this.addAbility(ability); }
public BuzzingWhackADoodle(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // As Buzzing Whack-a-Doodle enters the battlefield, you and an opponent each secretly choose Whack or Doodle. Then those choices are revealed. If the choices match, Buzzing Whack-a-Doodle has that ability. Otherwise it has Buzz. this.addAbility(new EntersBattlefieldTriggeredAbility(new BuzzingWhackADoodleEffect(), false)); // *Whack - T: Target player loses 2 life. Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2), new TapSourceCost(), new WhackCondition()); ability.addTarget(new TargetPlayer()); this.addAbility(ability); // *Doodle - T: You gain 3 life. Ability ability2 = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(3), new TapSourceCost(), new DoodleCondition()); this.addAbility(ability2); // *Buzz - 2, T: Draw a card. Ability ability3 = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{2}"), new BuzzCondition()); ability3.addCost(new TapSourceCost()); this.addAbility(ability3); }
public MirrorUniverse(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); // {tap}, Sacrifice Mirror Universe: Exchange life totals with target opponent. Activate this ability only during your upkeep. Ability ability = new ConditionalActivatedAbility( Zone.BATTLEFIELD, new ExchangeLifeTargetEffect(), new TapSourceCost(), new IsStepCondition(PhaseStep.UPKEEP, true), null); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetOpponent()); this.addAbility(ability); }
public AshenGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(1); // Haste this.addAbility(HasteAbility.getInstance()); // {B}: Return Ashen Ghoul from your graveyard to the battlefield. Activate this ability only during your upkeep and only if three or more creature cards are above Ashen Ghoul. this.addAbility(new ConditionalActivatedAbility( Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(), new ManaCostsImpl("{B}"), AshenGhoulCondition.instance )); }
public SithThoughtseeker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SITH); this.power = new MageInt(2); this.toughness = new MageInt(1); // <i>Hate</i> — {2}{U}: Draw a card. Activate this ability only if an opponent lost life from source other than combat damage this turn. Ability ability = new ConditionalActivatedAbility( Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{2}{U}"), HateCondition.instance); ability.setAbilityWord(AbilityWord.HATE); this.addAbility(ability); }