mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Lightning Runner - Fixed a bug of the optional untap and add combat phase effect.
This commit is contained in:
parent
5fe25b0af7
commit
b1a51ce7cf
2 changed files with 15 additions and 11 deletions
|
@ -87,8 +87,8 @@ class LightningRunnerEffect extends OneShotEffect {
|
|||
|
||||
LightningRunnerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "you get {E}{E}, then you may pay {E}{E}{E}{E}{E}{E}{E}{E}. If you do, " +
|
||||
"untap all creatures you control and after this phase, there is an additional combat phase";
|
||||
staticText = "you get {E}{E}, then you may pay {E}{E}{E}{E}{E}{E}{E}{E}. If you do, "
|
||||
+ "untap all creatures you control and after this phase, there is an additional combat phase";
|
||||
}
|
||||
|
||||
LightningRunnerEffect(final LightningRunnerEffect effect) {
|
||||
|
@ -100,11 +100,15 @@ class LightningRunnerEffect extends OneShotEffect {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
new GetEnergyCountersControllerEffect(2).apply(game, source);
|
||||
if (controller.getCounters().getCount(CounterType.ENERGY) > 5) {
|
||||
Cost cost = new PayEnergyCost(6);
|
||||
if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) {
|
||||
new UntapAllControllerEffect(new FilterControlledCreaturePermanent(), "untap all creatures you control").apply(game, source);
|
||||
new AdditionalCombatPhaseEffect("and after this phase, there is an additional combat phase").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.getSourceId(), source.getControllerId(), true)) {
|
||||
new UntapAllControllerEffect(new FilterControlledCreaturePermanent()).apply(game, source);
|
||||
new AdditionalCombatPhaseEffect().apply(game, source);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -61,9 +61,9 @@ public class GetEnergyCountersControllerEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
return player.addCounters(CounterType.ENERGY.createInstance(value.calculate(game, source, this)), game);
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
return controller.addCounters(CounterType.ENERGY.createInstance(value.calculate(game, source, this)), game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ public class GetEnergyCountersControllerEffect extends OneShotEffect {
|
|||
if (!staticText.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("you get ");
|
||||
int val = 1;
|
||||
|
|
Loading…
Reference in a new issue