Package mage.abilities.common

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


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

        // Whenever Mardu Roughrider attacks, target creature can't block this turn.
        AttacksTriggeredAbility ability = new AttacksTriggeredAbility(new CantBlockTargetEffect(Duration.EndOfTurn), false);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }

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


        this.addAbility(FlyingAbility.getInstance());
        // Whenever Trained Condor attacks, another target creature you control gains flying until end of turn.
        Effect effect = new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn);
        Ability ability = new AttacksTriggeredAbility(effect, false);
        Target target = new TargetControlledCreaturePermanent(1, 1, filter, true);
        ability.addTarget(target);
        this.addAbility(ability);
    }

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

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

    // Whenever Cho-Arrim Bruiser attacks, you may tap up to two target creatures.
        Ability ability = new AttacksTriggeredAbility(new TapTargetEffect(), true);
        ability.addTarget(new TargetCreaturePermanent(0, 2));
        this.addAbility(ability);
    }

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

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

        // Enchanted creature has "Whenever this creature attacks, you may tap or untap target permanent."
        Ability gainedAbility = new AttacksTriggeredAbility(new MayTapOrUntapTargetEffect(), true);
        gainedAbility.addTarget(new TargetPermanent());
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA)));
    }

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

        this.color.setWhite(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        Ability ability = new AttacksTriggeredAbility(new TapTargetEffect(), true);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }

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

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

        // Whenever Grotag Thrasher attacks, target creature can't block this turn.
        AttacksTriggeredAbility ability = new AttacksTriggeredAbility(new CantBlockTargetEffect(Duration.EndOfTurn), false);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }

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

       
        // Whenever Kinscaer Harpoonist attacks, you may have target creature lose flying until end of turn.
        Effect effect = new LoseAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("you may have target creature lose flying until end of turn");
        Ability ability = new AttacksTriggeredAbility(effect, true);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
       
    }

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

        this.color.setRed(true);
        this.power = new MageInt(4);
        this.toughness = new MageInt(4);
        Ability ability = new AttacksTriggeredAbility(new OgreGeargrabberEffect1(), false);
        ability.addEffect(new GainControlTargetEffect(Duration.EndOfTurn));
        ability.addTarget(new TargetPermanent(1, 1, filter, false));
        this.addAbility(ability);
    }

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

        // Whenever Frenzied Goblin attacks, you may pay {R}. If you do, target creature can't block this turn.
        Ability ability = new AttacksTriggeredAbility(new DoIfCostPaid(new CantBlockTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{R}")),false,
                "Whenever {this} attacks you may pay {R}. If you do, target creature can't block this turn.");
        Target target = new TargetCreaturePermanent();
        ability.addTarget(target);
        this.addAbility(ability);
    }

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

        this.power = new MageInt(5);
        this.toughness = new MageInt(3);

        // Whenever Nefashu attacks, up to five target creatures each get -1/-1 until end of turn.
        Ability ability = new AttacksTriggeredAbility(new BoostTargetEffect(-1, -1, Duration.EndOfTurn), false, rule);
        ability.addTarget(new TargetCreaturePermanent(0, 5));
        this.addAbility(ability);
    }

    public Nefashu(final Nefashu card) {
        super(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.