use of mage.abilities.effects.common.continuous.BoostTargetEffect 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;
}
use of mage.abilities.effects.common.continuous.BoostTargetEffect in project mage by magefree.
the class ScentOfNightshadeEffect 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 = -1 * cost.getNumberRevealedCards();
game.addEffect(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn), source);
return true;
}
use of mage.abilities.effects.common.continuous.BoostTargetEffect in project mage by magefree.
the class WolfStikeEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
if (game.checkDayNight(false)) {
BoostTargetEffect effect = new BoostTargetEffect(2, 0, Duration.EndOfTurn);
game.addEffect(effect, source);
return true;
}
return false;
}
use of mage.abilities.effects.common.continuous.BoostTargetEffect in project mage by magefree.
the class GodEternalRhonasEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Permanent godEternalRhonas = game.getPermanent(source.getSourceId());
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
if (permanent == null || godEternalRhonas != null && permanent == godEternalRhonas) {
continue;
}
ContinuousEffect effect = new BoostTargetEffect(permanent.getPower().getValue(), 0, Duration.EndOfTurn);
effect.setTargetPointer(new FixedTarget(permanent, game));
game.addEffect(effect, source);
ContinuousEffect effect2 = new GainAbilityTargetEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn);
effect2.setTargetPointer(new FixedTarget(permanent, game));
game.addEffect(effect2, source);
}
return true;
}
use of mage.abilities.effects.common.continuous.BoostTargetEffect in project mage by magefree.
the class HammerHelperEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Permanent targetCreature = game.getPermanent(source.getFirstTarget());
if (controller != null && targetCreature != null) {
source.getEffects().get(0).setTargetPointer(new FixedTarget(targetCreature.getId(), game));
game.addEffect(new GainControlTargetEffect(Duration.EndOfTurn), source);
targetCreature.untap(game);
int amount = controller.rollDice(outcome, source, game, 6);
game.addEffect(new BoostTargetEffect(amount, 0, Duration.EndOfTurn), source);
game.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), source);
return true;
}
return false;
}
Aggregations