Exemple #1
0
  public RealityAcid(UUID ownerId) {
    super(
        ownerId,
        45,
        "Reality Acid",
        Rarity.COMMON,
        new CardType[] {CardType.ENCHANTMENT},
        "{2}{U}");
    this.expansionSetCode = "PLC";
    this.subtype.add("Aura");

    // Enchant permanent
    TargetPermanent auraTarget = new TargetPermanent();
    this.getSpellAbility().addTarget(auraTarget);
    this.getSpellAbility().addEffect(new AttachEffect(Outcome.GainControl));
    Ability ability = new EnchantAbility(auraTarget.getTargetName());
    this.addAbility(ability);

    // Vanishing 3
    ability =
        new EntersBattlefieldAbility(
            new AddCountersSourceEffect(CounterType.TIME.createInstance(3)));
    ability.setRuleVisible(false);
    this.addAbility(ability);
    this.addAbility(new VanishingUpkeepAbility(3));
    this.addAbility(new VanishingSacrificeAbility());

    // When Reality Acid leaves the battlefield, enchanted permanent's controller sacrifices it.
    Effect effect = new SacrificeTargetEffect("enchanted permanent's controller sacrifices it");
    this.addAbility(new RealityAcidTriggeredAbility(effect, false));
  }
Exemple #2
0
 @Override
 public boolean checkTrigger(GameEvent event, Game game) {
   return event.getData().equals(CounterType.TIME.getName())
       && event.getTargetId().equals(this.getSourceId());
 }