Package mage.abilities

Examples of mage.abilities.TriggeredAbility.addTarget()


        this.color.setBlack(true);

        // At the beginning of your upkeep, if you have no cards in hand, sacrifice Brink of Madness and target opponent discards his or her hand.
        TriggeredAbility ability  = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU, false);
        ability.addEffect(new BrinkOfMadnessEffect());
        ability.addTarget(new TargetOpponent());
        CardsInHandCondition contition = new CardsInHandCondition(CardsInHandCondition.CountType.EQUAL_TO, 0);
        this.addAbility(new ConditionalTriggeredAbility(ability, contition, "At the beginning of your upkeep, if you have no cards in hand, sacrifice {this} and target opponent discards his or her hand."));
       
    }
View Full Code Here


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

        // When Sedraxis Alchemist enters the battlefield, if you control a blue permanent, return target nonland permanent to its owner's hand.
        TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false);
        ability.addTarget(new TargetNonlandPermanent());
        this.addAbility(new ConditionalTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter), rule));
       
    }

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

        this.toughness = new MageInt(3);

        TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(4), false);
        ability.addEffect(new GainLifeEffect(4));
        Target target = new TargetPlayer();
        ability.addTarget(target);

        this.addAbility(new ConditionalTriggeredAbility(ability, MetalcraftCondition.getInstance(), effectText));
    }

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

                new KickedCostCondition("{W}"),
                "When Stormscape Battlemage enters the battlefield, if it was kicked with its {W} kicker, you gain 3 life."));
       
        // When Stormscape Battlemage enters the battlefield, if it was kicked with its {2}{B} kicker, destroy target nonblack creature. That creature can't be regenerated.       
        TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(true),false);
        ability.addTarget(new TargetCreaturePermanent(filter));
        this.addAbility(new ConditionalTriggeredAbility(
                ability, new KickedCostCondition("{2}{B}"),
                "When Stormscape Battlemage enters the battlefield, if it was kicked with its {2}{B} kicker, destroy target nonblack creature. That creature can't be regenerated."));       
    }
View Full Code Here

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

        TriggeredAbility conditional = new ConditionalTriggeredAbility(
                new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect()), MetalcraftCondition.getInstance(), text);
        conditional.addTarget(new TargetCreaturePermanent());
        this.addAbility(conditional);
    }

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

        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), TargetController.YOU, false);
        Target target =  new TargetOpponent();
        ability.addTarget(target);
        this.addAbility(new ConditionalTriggeredAbility(ability, ControlsBiggestOrTiedCreatureCondition.getInstance(), ruleText));
    }

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

        this.color.setRed(true);

        // Until end of turn, creatures you control gain "When this creature dies, it deals 2 damage to target creature an opponent controls."
        TriggeredAbility ability = new DiesTriggeredAbility(new DamageTargetEffect(2), false);
        Target target = new TargetCreaturePermanent(filter2);
        ability.addTarget(target);
        Effect effect = new GainAbilityControlledEffect(ability, Duration.EndOfTurn, filter);
        effect.setText("Until end of turn, creatures you control gain \"When this creature dies, it deals 2 damage to target creature an opponent controls.\" ");
        this.getSpellAbility().addEffect(effect);

    }
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.