Package mage.abilities.keyword

Examples of mage.abilities.keyword.EnchantAbility.addTarget()


        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);

        // When Chained to the Rocks enters the battlefield, exile target creature an opponent controls until Chained to the Rocks leaves the battlefield. (That creature returns under its owner's control.)
        ability = new EntersBattlefieldTriggeredAbility(new ChainedToTheRocksEffect());
        ability.addTarget(new TargetCreaturePermanent(filterTarget));
        this.addAbility(ability);
        // Implemented as triggered effect that doesn't uses the stack (implementation with watcher does not work correctly because if the returned creature
        // has a DiesTriggeredAll ability it triggers for the battlefield leaving Chained to the Rocks, what shouldn't happen)
        this.addAbility(new ChainedToTheRocksReturnExiledAbility());
View Full Code Here


        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);

        // {1}{W}: The next 1 damage that would be dealt to enchanted creature this turn is dealt to target creature or player instead.
        ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new WardOfPietyPreventDamageTargetEffect(), new ManaCostsImpl("{1}{W}"));
        ability.addTarget(new TargetCreatureOrPlayer());
        this.addAbility(ability);
    }

    public WardOfPiety(final WardOfPiety card) {
        super(card);
View Full Code Here

        // When enchanted creature dies, target player loses X life and you gain X life, where X is its power.
        DynamicValue attachedPower = new AttachedPermanentPowerCount();
        ability = new DiesAttachedTriggeredAbility(new LoseLifeTargetEffect(attachedPower), "enchanted creature");
        ability.addEffect(new GainLifeEffect(attachedPower));
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }

    public DyingWish(final DyingWish card) {
        super(card);
View Full Code Here

        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);
        // Enchanted creature has haste and "{tap}: This creature deals 1 damage to target creature or player."
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(HasteAbility.getInstance(), AttachmentType.AURA)));
        ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost());
        ability.addTarget(new TargetCreatureOrPlayer());
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.AURA)));
    }

    public LightningProwess(final LightningProwess card) {
        super(card);
View Full Code Here

        ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new AttachedToCounterCondition(CounterType.P1P1, 3),
                "Then if it has three or more +1/+1 counters on it, sacrifice {this}"));
        this.addAbility(ability);
        // When you sacrifice Ordeal of Erebos, target player discards two cards.
        ability = new SacrificeSourceTriggeredAbility(new DiscardTargetEffect(2), false);
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);

    }

    public OrdealOfErebos(final OrdealOfErebos card) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.