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

View File

@@ -1019,13 +1019,13 @@ public class PhaseHandler implements java.io.Serializable {
if (DEBUG_PHASES) {
System.out.print("... " + pPlayerPriority + " plays " + chosenSa);
}
pFirstPriority = pPlayerPriority; // all opponents have to pass before stack is allowed to resolve
for (SpellAbility sa : chosenSa) {
Card saHost = sa.getHostCard();
final Zone originZone = saHost.getZone();
// TODO it has no return value if successful
pPlayerPriority.getController().playChosenSpellAbility(sa);
if (pPlayerPriority.getController().playChosenSpellAbility(sa)) {
pFirstPriority = pPlayerPriority; // all opponents have to pass before stack is allowed to resolve
}
saHost = game.getCardState(saHost);
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 declareBlockers(Player defender, Combat combat);
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 boolean payManaOptional(Card card, Cost cost, SpellAbility sa, String prompt, ManaPaymentPurpose purpose);

View File

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

View File

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