Search in sources :

Example 1 with RevealTargetFromHandCost

use of mage.abilities.costs.common.RevealTargetFromHandCost in project mage by magefree.

the class BrineSeerEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    RevealTargetFromHandCost cost = new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter));
    if (!cost.pay(source, game, source, source.getControllerId(), true)) {
        return false;
    }
    int xValue = cost.getNumberRevealedCards();
    return new CounterUnlessPaysEffect(new GenericManaCost(xValue)).apply(game, source);
}
Also used : CounterUnlessPaysEffect(mage.abilities.effects.common.CounterUnlessPaysEffect) RevealTargetFromHandCost(mage.abilities.costs.common.RevealTargetFromHandCost) GenericManaCost(mage.abilities.costs.mana.GenericManaCost) TargetCardInHand(mage.target.common.TargetCardInHand)

Example 2 with RevealTargetFromHandCost

use of mage.abilities.costs.common.RevealTargetFromHandCost in project mage by magefree.

the class ScentOfCinderEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    RevealTargetFromHandCost cost = new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter));
    if (!cost.pay(source, game, source, source.getControllerId(), true)) {
        return false;
    }
    int xValue = cost.getNumberRevealedCards();
    return new DamageTargetEffect(xValue).apply(game, source);
}
Also used : RevealTargetFromHandCost(mage.abilities.costs.common.RevealTargetFromHandCost) TargetCardInHand(mage.target.common.TargetCardInHand) DamageTargetEffect(mage.abilities.effects.common.DamageTargetEffect)

Example 3 with RevealTargetFromHandCost

use of mage.abilities.costs.common.RevealTargetFromHandCost in project mage by magefree.

the class ScentOfJasmineEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    RevealTargetFromHandCost cost = new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter));
    if (!cost.pay(source, game, source, source.getControllerId(), true)) {
        return false;
    }
    int xValue = cost.getNumberRevealedCards();
    return new GainLifeEffect(2 * xValue).apply(game, source);
}
Also used : RevealTargetFromHandCost(mage.abilities.costs.common.RevealTargetFromHandCost) TargetCardInHand(mage.target.common.TargetCardInHand) GainLifeEffect(mage.abilities.effects.common.GainLifeEffect)

Example 4 with RevealTargetFromHandCost

use of mage.abilities.costs.common.RevealTargetFromHandCost in project mage by magefree.

the class ScentOfBrineEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    RevealTargetFromHandCost cost = new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter));
    if (!cost.pay(source, game, source, source.getControllerId(), true)) {
        return false;
    }
    int xValue = cost.getNumberRevealedCards();
    return new CounterUnlessPaysEffect(new GenericManaCost(xValue)).apply(game, source);
}
Also used : CounterUnlessPaysEffect(mage.abilities.effects.common.CounterUnlessPaysEffect) RevealTargetFromHandCost(mage.abilities.costs.common.RevealTargetFromHandCost) GenericManaCost(mage.abilities.costs.mana.GenericManaCost) TargetCardInHand(mage.target.common.TargetCardInHand)

Example 5 with RevealTargetFromHandCost

use of mage.abilities.costs.common.RevealTargetFromHandCost in project mage by magefree.

the class ScentOfIvyEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    RevealTargetFromHandCost cost = new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter));
    if (!cost.pay(source, game, source, source.getControllerId(), true)) {
        return false;
    }
    int xValue = cost.getNumberRevealedCards();
    game.addEffect(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn), source);
    return true;
}
Also used : RevealTargetFromHandCost(mage.abilities.costs.common.RevealTargetFromHandCost) TargetCardInHand(mage.target.common.TargetCardInHand) BoostTargetEffect(mage.abilities.effects.common.continuous.BoostTargetEffect)

Aggregations

RevealTargetFromHandCost (mage.abilities.costs.common.RevealTargetFromHandCost)14 TargetCardInHand (mage.target.common.TargetCardInHand)10 BoostTargetEffect (mage.abilities.effects.common.continuous.BoostTargetEffect)5 Permanent (mage.game.permanent.Permanent)3 GenericManaCost (mage.abilities.costs.mana.GenericManaCost)2 CounterUnlessPaysEffect (mage.abilities.effects.common.CounterUnlessPaysEffect)2 DamageTargetEffect (mage.abilities.effects.common.DamageTargetEffect)2 GainLifeEffect (mage.abilities.effects.common.GainLifeEffect)2 Card (mage.cards.Card)2 Player (mage.players.Player)2 TargetCreaturePermanent (mage.target.common.TargetCreaturePermanent)2 ContinuousEffect (mage.abilities.effects.ContinuousEffect)1 FilterCreatureCard (mage.filter.common.FilterCreatureCard)1 FixedTarget (mage.target.targetpointer.FixedTarget)1