use of mage.abilities.effects.common.AdditionalCombatPhaseEffect in project mage by magefree.
the class LightningRunnerEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
new GetEnergyCountersControllerEffect(2).apply(game, source);
if (controller.getCounters().getCount(CounterType.ENERGY) > 7) {
Cost cost = new PayEnergyCost(8);
if (controller.chooseUse(outcome, "Pay {E}{E}{E}{E}{E}{E}{E}{E} to use this? ", "Untap all creatures you control and after this phase, there is an additional combat phase.", "Yes", "No", source, game) && cost.pay(source, game, source, source.getControllerId(), true)) {
new UntapAllControllerEffect(new FilterControlledCreaturePermanent()).apply(game, source);
new AdditionalCombatPhaseEffect().apply(game, source);
}
}
return true;
}
return false;
}
Aggregations