Package mage.abilities

Examples of mage.abilities.TriggeredAbility.addTarget()


        // Tribute 6
        this.addAbility(new TributeAbility(6));
        // When Nessian Wilds Ravager enters the battlefield, if tribute wasn't paid, you may have Nessian Wilds Ravager fight another target creature.
        TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new FightTargetSourceEffect(), true);
        ability.addTarget(new TargetCreaturePermanent(filter));
        this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.getInstance(),
                "When {this} enters the battlefield, if its tribute wasn't paid, you may have {this} fight another target creature."));
    }

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


        this.addAbility(FlyingAbility.getInstance());
        // Tribute 2</i>
        this.addAbility(new TributeAbility(2));
        // When Shrike Harpy enters the battlefield, if tribute wasn't paid, target opponent sacrifices a creature.
        TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new SacrificeEffect(new FilterCreaturePermanent("a creature"), 1, "target opponent"), false);
        ability.addTarget(new TargetOpponent());
        this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.getInstance(),
                "When {this} enters the battlefield, if its tribute wasn't paid, target opponent sacrifices a creature."));
    }

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

        // Tribute 3</i>
        this.addAbility(new TributeAbility(3));
        // When Nessian Demolok enters the battlefield, if tribute wasn't paid, destroy target noncreature permanent.
        TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
        ability.addTarget(new TargetPermanent(filter));
        this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.getInstance(),
                "When {this} enters the battlefield, if its tribute wasn't paid, destroy target noncreature permanent."));
    }

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

        this.toughness = new MageInt(4);

        // Morbid - When Morkut Banshee enters the battlefield, if a creature died this turn, target creature gets -4/-4 until end of turn.
        TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(-4, -4, Duration.EndOfTurn));
        TriggeredAbility ability = new ConditionalTriggeredAbility(triggeredAbility, MorbidCondition.getInstance(), staticText);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }

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

        // At the beginning of combat on your turn, if you control each creature on the battlefield with the greatest power, gain control
        // of target creature an opponent controls until end of turn. Untap that creature. It gains haste until end of turn.
        TriggeredAbility gainControlAbility = new BeginningOfCombatTriggeredAbility(new GainControlTargetEffect(Duration.EndOfTurn), TargetController.YOU, false);
        gainControlAbility.addEffect(new UntapTargetEffect());
        gainControlAbility.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
        gainControlAbility.addTarget(new TargetCreaturePermanent(filter));
        Ability conditionalAbility = new ConditionalTriggeredAbility(gainControlAbility, ControlsEachCreatureWithGreatestPowerCondition.getInstance(), ruleText);
        this.addAbility(conditionalAbility);
    }

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

        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);
        triggeredAbility.addTarget(target);
        this.addAbility(new ConditionalTriggeredAbility(
                triggeredAbility,
                new InvertCondition(new CreatureCardsInControllerGraveCondition(6)),
                "At the beginning of your upkeep, if there are fewer than six creature cards in your graveyard, sacrifice a creature"));
View Full Code Here

        this.expansionSetCode = "SHM";
        this.color.setBlack(true);

        Effect effect = new BlowflyInfestationEffect();
        TriggeredAbility triggeredAbility = new DiesCreatureTriggeredAbility(effect, false, false, true);
        triggeredAbility.addTarget(new TargetCreaturePermanent());
        Condition condition = new BlowflyInfestationCondition();
        this.addAbility(new ConditionalTriggeredAbility(triggeredAbility, condition, rule));

    }
View Full Code Here

        this.addAbility(FlyingAbility.getInstance());
        // Tribute 3
        this.addAbility(new TributeAbility(3));
        // When Siren of the Fanged Coast enters the battlefield, if tribute wasn't paid, gain control of target creature.
        TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new GainControlTargetEffect(Duration.EndOfGame, true), false);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.getInstance(),
                "When {this} enters the battlefield, if its tribute wasn't paid, gain control of target creature."));       
    }

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

        // Flying
        this.addAbility(FlyingAbility.getInstance());

        // Landfall - Whenever a land enters the battlefield under your control, you may exile target nonland permanent other than Admonition Angel.
        TriggeredAbility ability = new LandfallAbility(Zone.BATTLEFIELD, new ExileTargetForSourceEffect("Admonition Angel Exile"), true);
        ability.addTarget(new TargetPermanent(filter));
        this.addAbility(ability);

        // When Admonition Angel leaves the battlefield, return all cards exiled with it to the battlefield under their owners' control.
        Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false);
        this.addAbility(ability2);
View Full Code Here

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

        // Whenever Hollowsage becomes untapped, you may have target player discard a card.
        TriggeredAbility ability = new BecomesUntappedTriggeredAbility(new DiscardTargetEffect(1), true);
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
       
    }
   
    public Hollowsage(final Hollowsage 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.