Package mage.abilities.common

Examples of mage.abilities.common.EntersBattlefieldTriggeredAbility.addTarget()


        this.color.setWhite(true);

        // When Banishing Light enters the battlefield, exile target nonland permanent an opponent controls until Banishing Light leaves the battlefield.
        Ability ability = new EntersBattlefieldTriggeredAbility(new BanishingLightExileEffect());
        ability.addTarget(new TargetPermanent(filter));
        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 dying / battlefield leaving source object, what shouldn't happen)
        this.addAbility(new BanishingLightReturnExiledAbility());       
    }
View Full Code Here


        this.power = new MageInt(1);
        this.toughness = new MageInt(1);

        // When Satyr Grovedancer enters the battlefield, put a +1/+1 counter on target creature.
        Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), false);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }

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

        this.power = new MageInt(1);
        this.toughness = new MageInt(1);

        // When Brain Maggot enters the battlefield, target opponent reveals his or her hand and you choose a nonland card from it. Exile that card until Brain Maggot leaves the battlefield.
        Ability ability = new EntersBattlefieldTriggeredAbility(new BrainMaggotExileEffect());
        ability.addTarget(new TargetOpponent());
        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 dying / battlefield leaving source object, what shouldn't happen)
        this.addAbility(new BrainMaggotReturnExiledAbility());          
    }
View Full Code Here

        this.toughness = new MageInt(2);

        // When Frost Lynx enters the battlefield, tap target creature an opponent controls.  It doesn't untap during its controller's next untap step.
        Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect(), false);
        ability.addEffect(new SkipNextUntapTargetEffect("It"));
        ability.addTarget(new TargetCreaturePermanent(filter));
        this.addAbility(ability);
    }

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

        super(ownerId, 221, "Meteorite", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{5}");
        this.expansionSetCode = "M15";

        // When Meteorite enters the battlefield, it deals 2 damage to target creature or player.
        Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2), false);
        ability.addTarget(new TargetCreatureOrPlayer());
        this.addAbility(ability);
       
        // {T}: Add one mana of any color to your mana pool.
        this.addAbility(new AnyColorManaAbility());
    }
View Full Code Here

        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        // When Goretusk Firebeast enters the battlefield, it deals 4 damage to target player.
        Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(4), false);
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }

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

        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // When Shadowborn Demon enters the battlefield, destroy target non-Demon creature.
        Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(),false);
        Target target = new TargetCreaturePermanent(filter);
        ability.addTarget(target);
        this.addAbility(ability);
        // At the beginning of your upkeep, if there are fewer than six creature cards in your graveyard, sacrifice a creature.
        TriggeredAbility triggeredAbility = new BeginningOfUpkeepTriggeredAbility(new SacrificeTargetEffect(), TargetController.YOU, false);
        target = new TargetControlledCreaturePermanent();
        target.setNotTarget(false);
View Full Code Here

        this.color.setBlue(true);
        this.power = new MageInt(3);
        this.toughness = new MageInt(3);
        this.addAbility(FlyingAbility.getInstance());
        Ability ability = new EntersBattlefieldTriggeredAbility(new PutOnLibraryTargetEffect(true), false);
        ability.addTarget(new TargetPermanent(filter));
        this.addAbility(ability);
    }

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

        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        // When Banisher Priest enters the battlefield, exile target creature an opponent controls until Banisher Priest leaves the battlefield.
        Ability ability = new EntersBattlefieldTriggeredAbility(new BanisherPriestExileEffect());
        ability.addTarget(new TargetCreaturePermanent(filter));
        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 dying Banish Priest, what shouldn't happen)
        this.addAbility(new BanisherPriestReturnExiledAbility());
       
View Full Code Here

        this.power = new MageInt(4);
        this.toughness = new MageInt(4);

        // When Fleshpulper Giant enters the battlefield, you may destroy target creature with toughness 2 or less.
        Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true);
        ability.addTarget(new TargetCreaturePermanent(filter));
        this.addAbility(ability);
       
    }

    public FleshpulperGiant(final FleshpulperGiant 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.