示例#1
0
  public Deglamer(UUID ownerId) {
    super(ownerId, 118, "Deglamer", Rarity.COMMON, new CardType[] {CardType.INSTANT}, "{1}{G}");
    this.expansionSetCode = "MOR";

    this.color.setGreen(true);

    // Choose target artifact or enchantment. Its owner shuffles it into his or her library.
    this.getSpellAbility().addEffect(new DeglamerShuffleIntoLibraryEffect());
    Target target = new TargetPermanent(1, 1, filter, true);
    target.setRequired(true);
    this.getSpellAbility().addTarget(target);
  }
示例#2
0
 public GruulTurf(UUID ownerId) {
   super(ownerId, 134, "Gruul Turf", Rarity.COMMON, new CardType[] {CardType.LAND}, "");
   this.expansionSetCode = "HOP";
   this.addAbility(new EntersBattlefieldTappedAbility());
   Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false);
   Target target = new TargetControlledPermanent(filter);
   target.setRequired(true);
   ability.addTarget(target);
   this.addAbility(ability);
   this.addAbility(
       new SimpleManaAbility(
           Constants.Zone.BATTLEFIELD, new Mana(1, 1, 0, 0, 0, 0, 0), new TapSourceCost()));
 }
示例#3
0
  public EchoingTruth(UUID ownerId) {
    super(ownerId, 66, "Echoing Truth", Rarity.COMMON, new CardType[] {CardType.INSTANT}, "{1}{U}");
    this.expansionSetCode = "DDF";

    this.color.setBlue(true);

    // Return target nonland permanent and all other permanents with the same name as that permanent
    // to their owners' hands.
    Target target = new TargetNonlandPermanent();
    target.setRequired(true);
    this.getSpellAbility().addTarget(target);
    this.getSpellAbility().addEffect(new ReturnToHandAllNamedPermanentsEffect());
  }
示例#4
0
 @Override
 public boolean apply(Game game, Ability source) {
   Player controller = game.getPlayer(source.getControllerId());
   if (controller != null) {
     Target target = new TargetSource();
     target.setRequired(true);
     target.setNotTarget(true);
     if (controller.chooseTarget(outcome, target, source, game)) {
       ContinuousEffect continuousEffect = new InterventionPactPreventDamageEffect();
       continuousEffect.setTargetPointer(new FixedTarget(target.getFirstTarget()));
       game.addEffect(continuousEffect, source);
     }
     return true;
   }
   return false;
 }
示例#5
0
  public TriumphOfCruelty(UUID ownerId) {
    super(
        ownerId,
        122,
        "Triumph of Cruelty",
        Rarity.UNCOMMON,
        new CardType[] {CardType.ENCHANTMENT},
        "{2}{B}");
    this.expansionSetCode = "AVR";

    this.color.setBlack(true);

    // At the beginning of your upkeep, target opponent discards a card if you control the creature
    // with the greatest power or tied for the greatest power.
    TriggeredAbility ability =
        new BeginningOfUpkeepTriggeredAbility(
            new DiscardTargetEffect(1), Constants.TargetController.YOU, false);
    Target target = new TargetOpponent();
    target.setRequired(true);
    ability.addTarget(target);
    this.addAbility(
        new ConditionalTriggeredAbility(
            ability, ControlsBiggestOrTiedCreatureCondition.getInstance(), ruleText));
  }