Package mage.abilities.common

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


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

        this.addAbility(FlyingAbility.getInstance());
        Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(2, 2, Duration.EndOfTurn), false);
        ability.addEffect(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }

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


        this.color.setRed(true);
        this.power = new MageInt(3);
        this.toughness = new MageInt(3);

        TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new BoostSourceEffect(3, 3, Duration.EndOfTurn), false);
        ability.addEffect(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
        this.addAbility(new ConditionalTriggeredAbility(ability, MetalcraftCondition.getInstance(), effectText));
    }

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

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

        // When Lord of Tresserhorn enters the battlefield, you lose 2 life, you sacrifice two creatures, and target opponent draws two cards.
        Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeSourceControllerEffect(2), false);
        ability.addEffect(new SacrificeTargetEffect(", you sacrifice two creatures"));
        Target target = new TargetControlledCreaturePermanent(2,2, new FilterControlledCreaturePermanent(), true);
        ability.addTarget(target);
        Effect effect = new DrawCardTargetEffect(2);
        effect.setText(", and target opponent draws two cards");
        effect.setTargetPointer(new SecondTargetPointer());
View Full Code Here

        Target target = new TargetControlledCreaturePermanent(2,2, new FilterControlledCreaturePermanent(), true);
        ability.addTarget(target);
        Effect effect = new DrawCardTargetEffect(2);
        effect.setText(", and target opponent draws two cards");
        effect.setTargetPointer(new SecondTargetPointer());
        ability.addEffect(effect);
        ability.addTarget(new TargetOpponent());
        this.addAbility(ability);
        // {B}: Regenerate Lord of Tresserhorn.
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{B}")));
    }
View Full Code Here

        Ability ability = new EntersBattlefieldTriggeredAbility(new ContagionEngineEffect());
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
        ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ProliferateEffect(), new GenericManaCost(4));
        ability.addCost(new TapSourceCost());
        ability.addEffect(new ProliferateEffect());
        this.addAbility(ability);
    }

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

        this.addAbility(FlyingAbility.getInstance());

        Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect());
        TargetCard target = new TargetCardInYourGraveyard(new FilterArtifactCard("artifact card from your graveyard"));
        ability.addTarget(target);
        ability.addEffect(new RazorHippogriffGainLifeEffect());

        this.addAbility(ability);
    }

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

        // When Scion of Vitu-Ghazi enters the battlefield, if you cast it from your hand, put a 1/1 white Bird creature token with flying onto the battlefield, then populate.
        Ability ability = new EntersBattlefieldTriggeredAbility(
                new ConditionalOneShotEffect(new CreateTokenEffect(new BirdToken()), new CastFromHandCondition(),
                "if you cast it from your hand, put a 1/1 white Bird creature token with flying onto the battlefield,"));
        ability.addEffect(new PopulateEffect("then"));
        this.addAbility(ability);
    }

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

        this.addAbility(HasteAbility.getInstance());

        // When Craterhoof Behemoth enters the battlefield, creatures you control gain trample and get +X/+X until end of turn, where X is the number of creatures you control.
        Ability ability = new EntersBattlefieldTriggeredAbility(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, filter));
        PermanentsOnBattlefieldCount controlledCreatures = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent("the number of creatures you control"), null);
        ability.addEffect(new BoostControlledEffect(controlledCreatures, controlledCreatures, Duration.EndOfTurn, filter, false, true));
        this.addAbility(ability);
    }

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

    public void build() {
        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // When Battleflight Eagle enters the battlefield, target creature gets +2/+2 and gains flying until end of turn.
        Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(2, 2, Duration.EndOfTurn));
        ability.addEffect(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }

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

        this.addAbility(FlyingAbility.getInstance());

        // When Dungeon Geists enters the battlefield, tap target creature an opponent controls. That creature doesn't untap during its controller's untap step for as long as you control Dungeon Geists.
        Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect(), false);
        ability.addEffect(new DungeonGeistsEffect());
        Target target = new TargetCreaturePermanent(filter);
        ability.addTarget(target);
        this.addAbility(ability);
        // watcher needed to send normal events to Dungeon Geists ReplacementEffect
        this.addWatcher(new DungeonGeistsWatcher());
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.