use of mage.abilities.dynamicvalue.common.HighestManaValueCount in project mage by magefree.
the class DispersalShieldEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
DynamicValue amount = new HighestManaValueCount();
Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source));
if (spell != null && spell.getManaValue() <= amount.calculate(game, source, this)) {
return game.getStack().counter(source.getFirstTarget(), source, game);
}
return false;
}
use of mage.abilities.dynamicvalue.common.HighestManaValueCount in project mage by magefree.
the class UginsInsightEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
int highCMC = new HighestManaValueCount().calculate(game, source, this);
if (highCMC > 0) {
controller.scry(highCMC, source, game);
}
controller.drawCards(3, source, game);
return true;
}
return false;
}
Aggregations