use of mage.abilities.effects.common.UntapAllControllerEffect 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;
}
use of mage.abilities.effects.common.UntapAllControllerEffect in project mage by magefree.
the class HellkiteChargerEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
ManaCosts cost = new ManaCostsImpl("{5}{R}{R}");
if (player.chooseUse(Outcome.Damage, "Pay " + cost.getText() + '?', source, game)) {
cost.clearPaid();
if (cost.pay(source, game, source, source.getControllerId(), false, null)) {
new UntapAllControllerEffect(new FilterAttackingCreature(), "").apply(game, source);
game.getState().getTurnMods().add(new TurnMod(source.getControllerId(), TurnPhase.COMBAT, null, false));
return true;
}
}
}
return false;
}
Aggregations