use of mage.abilities.effects.common.continuous.BoostTargetEffect in project mage by magefree.
the class PufferExtractEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
int xValue = source.getManaCostsToPay().getX();
game.addEffect(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn), source);
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new DestroyTargetEffect().setTargetPointer(new FixedTarget(source.getFirstTarget(), game))), source);
return true;
}
use of mage.abilities.effects.common.continuous.BoostTargetEffect in project mage by magefree.
the class RayOfEnfeeblementEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getFirstTarget());
if (permanent == null) {
return false;
}
game.addEffect(new BoostTargetEffect(-4, permanent.getColor(game).isWhite() ? -4 : -1, Duration.EndOfTurn), source);
return true;
}
use of mage.abilities.effects.common.continuous.BoostTargetEffect in project mage by magefree.
the class TowerAboveTriggeredAbility method apply.
@Override
public boolean apply(Game game, Ability source) {
Permanent target = game.getPermanent(source.getFirstTarget());
if (target == null) {
return false;
}
ContinuousEffect effect = new BoostTargetEffect(4, 4, Duration.EndOfTurn);
ContinuousEffect effect2 = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn);
ContinuousEffect effect3 = new GainAbilityTargetEffect(WitherAbility.getInstance(), Duration.EndOfTurn);
ContinuousEffect effect4 = new GainAbilityTargetEffect(new TowerAboveTriggeredAbility(), Duration.EndOfTurn);
effect.setTargetPointer(new FixedTarget(target.getId(), game));
effect2.setTargetPointer(new FixedTarget(target.getId(), game));
effect3.setTargetPointer(new FixedTarget(target.getId(), game));
effect4.setTargetPointer(new FixedTarget(target.getId(), game));
effect4.setText("");
game.addEffect(effect, source);
game.addEffect(effect2, source);
game.addEffect(effect3, source);
game.addEffect(effect4, source);
return true;
}
use of mage.abilities.effects.common.continuous.BoostTargetEffect in project mage by magefree.
the class GoatnapEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getFirstTarget());
if (permanent == null || !permanent.hasSubtype(SubType.GOAT, game)) {
return false;
}
game.addEffect(new BoostTargetEffect(3, 0, Duration.EndOfTurn), source);
return true;
}
use of mage.abilities.effects.common.continuous.BoostTargetEffect in project mage by magefree.
the class GrowthSpurtEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
int result = controller.rollDice(outcome, source, game, 6);
Permanent permanent = game.getPermanent(source.getFirstTarget());
if (permanent != null) {
ContinuousEffect effect = new BoostTargetEffect(result, result, Duration.EndOfTurn);
effect.setTargetPointer(new FixedTarget(permanent, game));
game.addEffect(effect, source);
}
}
return false;
}
Aggregations