Revert "Fix token created when removed before trigger resolves"

This reverts commit e33644ecf3.
This commit is contained in:
Bug Hunter
2021-01-27 21:36:23 +00:00
committed by Hans Mackowiak
parent 22fd1ac274
commit 0f28cbda4f
5 changed files with 10 additions and 9 deletions

View File

@@ -612,7 +612,7 @@ public class PlayerControllerAi extends PlayerController {
} }
@Override @Override
public void playChosenSpellAbility(SpellAbility sa) { public boolean playChosenSpellAbility(SpellAbility sa) {
// System.out.println("Playing sa: " + sa); // System.out.println("Playing sa: " + sa);
if (sa instanceof LandAbility) { if (sa instanceof LandAbility) {
if (sa.canPlay()) { if (sa.canPlay()) {
@@ -622,6 +622,7 @@ public class PlayerControllerAi extends PlayerController {
} else { } else {
ComputerUtil.handlePlayingSpellAbility(player, sa, getGame()); ComputerUtil.handlePlayingSpellAbility(player, sa, getGame());
} }
return true;
} }
@Override @Override

View File

@@ -1019,13 +1019,13 @@ public class PhaseHandler implements java.io.Serializable {
if (DEBUG_PHASES) { if (DEBUG_PHASES) {
System.out.print("... " + pPlayerPriority + " plays " + chosenSa); System.out.print("... " + pPlayerPriority + " plays " + chosenSa);
} }
pFirstPriority = pPlayerPriority; // all opponents have to pass before stack is allowed to resolve
for (SpellAbility sa : chosenSa) { for (SpellAbility sa : chosenSa) {
Card saHost = sa.getHostCard(); Card saHost = sa.getHostCard();
final Zone originZone = saHost.getZone(); final Zone originZone = saHost.getZone();
// TODO it has no return value if successful if (pPlayerPriority.getController().playChosenSpellAbility(sa)) {
pPlayerPriority.getController().playChosenSpellAbility(sa); pFirstPriority = pPlayerPriority; // all opponents have to pass before stack is allowed to resolve
}
saHost = game.getCardState(saHost); saHost = game.getCardState(saHost);
final Zone currentZone = saHost.getZone(); final Zone currentZone = saHost.getZone();

View File

@@ -192,7 +192,7 @@ public abstract class PlayerController {
public abstract void declareAttackers(Player attacker, Combat combat); public abstract void declareAttackers(Player attacker, Combat combat);
public abstract void declareBlockers(Player defender, Combat combat); public abstract void declareBlockers(Player defender, Combat combat);
public abstract List<SpellAbility> chooseSpellAbilityToPlay(); public abstract List<SpellAbility> chooseSpellAbilityToPlay();
public abstract void playChosenSpellAbility(SpellAbility sa); public abstract boolean playChosenSpellAbility(SpellAbility sa);
public abstract CardCollection chooseCardsToDiscardToMaximumHandSize(int numDiscard); public abstract CardCollection chooseCardsToDiscardToMaximumHandSize(int numDiscard);
public abstract boolean payManaOptional(Card card, Cost cost, SpellAbility sa, String prompt, ManaPaymentPurpose purpose); public abstract boolean payManaOptional(Card card, Cost cost, SpellAbility sa, String prompt, ManaPaymentPurpose purpose);

View File

@@ -609,9 +609,9 @@ public class PlayerControllerForTests extends PlayerController {
} }
@Override @Override
public void playChosenSpellAbility(SpellAbility sa) { public boolean playChosenSpellAbility(SpellAbility sa) {
// TODO Play abilities from here // TODO Play abilities from here
return true;
} }
@Override @Override

View File

@@ -1359,8 +1359,8 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
} }
@Override @Override
public void playChosenSpellAbility(final SpellAbility chosenSa) { public boolean playChosenSpellAbility(final SpellAbility chosenSa) {
HumanPlay.playSpellAbility(this, player, chosenSa); return HumanPlay.playSpellAbility(this, player, chosenSa);
} }
@Override @Override