Package mage.abilities.common

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


        // {1}{R}: Olivia Voldaren deals 1 damage to another target creature. That creature becomes a Vampire in addition to its other types. Put a +1/+1 counter on Olivia Voldaren.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}{R}"));
        ability.addTarget(new TargetCreaturePermanent(filter));
        ability.addEffect(new AddCardSubTypeTargetEffect("Vampire", Duration.WhileOnBattlefield));
        ability.addEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
        this.addAbility(ability);

        // {3}{B}{B}: Gain control of target Vampire for as long as you control Olivia Voldaren.
        ConditionalContinousEffect effect = new ConditionalContinousEffect(new GainControlTargetEffect(Duration.Custom), new PermanentsOnTheBattlefieldCondition(filter2), rule);
        Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{3}{B}{B}"));
View Full Code Here


        Effect effect = new BoostSourceEffect(1, 0, Duration.EndOfTurn);
        effect.setText("{this} gets +1/+0");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}{R}"));
        effect = new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("and gains trample until end of turn");
        ability.addEffect(effect);
        this.addAbility(ability);
    }

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

        this.toughness = new MageInt(1);

        // {tap}: Sparksmith deals X damage to target creature and X damage to you, where X is the number of Goblins on the battlefield.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter)), new TapSourceCost());
        ability.addTarget(new TargetCreaturePermanent());
        ability.addEffect(new DamageControllerEffect(new PermanentsOnBattlefieldCount(filter)));
        this.addAbility(ability);
    }

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

        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{B}"));
        ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
        // and you gain 2 life.
        effect = new GainLifeEffect(2);
        effect.setText("and you gain 2 life");
        ability.addEffect(effect);
        this.addAbility(ability);
    }

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

        Effect effect = new LoseAbilitySourceEffect(HexproofAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("Until end of turn, {this} loses hexproof");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{3}{B}"));
        Effect effect2 = new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
        effect2.setText("and gains first strike");
        ability.addEffect(effect2);
        Effect effect3 = new GainAbilitySourceEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn);
        effect3.setText("and deathtouch");
        ability.addEffect(effect3);
        this.addAbility(ability);
    }
View Full Code Here

        Effect effect2 = new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
        effect2.setText("and gains first strike");
        ability.addEffect(effect2);
        Effect effect3 = new GainAbilitySourceEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn);
        effect3.setText("and deathtouch");
        ability.addEffect(effect3);
        this.addAbility(ability);
    }

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

        effect.setText("Until end of turn, {this} becomes a 3/3 red and green Elemental creature");
        // {2}{R}{G}: Until end of turn, Raging Ravine becomes a 3/3 red and green Elemental creature with "Whenever this creature attacks, put a +1/+1 counter on it." It's still a land.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}{R}{G}"));
        effect = new GainAbilitySourceEffect(new AttacksTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false), Duration.EndOfTurn);
        effect.setText("with \"Whenever this creature attacks, put a +1/+1 counter on it.\" It's still a land");
        ability.addEffect(effect);
        this.addAbility(ability);
    }

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

        effect.setText("Prevent all combat damage that would be dealt to");
        // and dealt by target creature you control this turn.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}{U}"));
        effect = new PreventDamageByTargetEffect(Duration.EndOfTurn, true);
        effect.setText("and dealt by target creature you control this turn.");
        ability.addEffect(effect);
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetControlledCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here

        Effect effect = new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("{this} gains first strike");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new DiscardCardCost(true));
        effect = new GainAbilitySourceEffect(HasteAbility.getInstance(),Duration.EndOfTurn);
        effect.setText("and haste until end of turn");
        ability.addEffect(effect);
        this.addAbility(ability);
    }

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

        // {1}{B}, {tap}: Target opponent discards a card. Then if that player has no cards in hand, flip Nezumi Shortfang.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1), new ManaCostsImpl("{1}{B}"));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetOpponent());
        ability.addEffect(new ConditionalOneShotEffect(
                    new FlipSourceEffect(new StabwhiskerTheOdious()),
                    new CardsInTargetOpponentHandCondition(CardsInTargetOpponentHandCondition.CountType.FEWER_THAN, 1),
                    "Then if that player has no cards in hand, flip {this}"));
        this.addAbility(ability);
    }
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.