From 41c1540f45254ad65fe8cd021dfd08e22af64b9e Mon Sep 17 00:00:00 2001 From: Dilnu Date: Sun, 18 Sep 2016 20:16:56 -0400 Subject: [PATCH 1/3] Fix a couple typos --- Mage/src/main/java/mage/game/GameImpl.java | 2 +- Mage/src/main/java/mage/target/Targets.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Mage/src/main/java/mage/game/GameImpl.java b/Mage/src/main/java/mage/game/GameImpl.java index f020c0e1e1..76aa1802bb 100644 --- a/Mage/src/main/java/mage/game/GameImpl.java +++ b/Mage/src/main/java/mage/game/GameImpl.java @@ -1284,7 +1284,7 @@ public abstract class GameImpl implements Game, Serializable { state.setPriorityPlayerId(player.getId()); while (!player.isPassed() && player.canRespond() && !isPaused() && !gameOver(null)) { if (!resuming) { - // 603.3. Once an ability has triggered, its controller puts it on the stack as an object that’s not a card the next time a player would receive priority + // 603.3. Once an ability has triggered, its controller puts it on the stack as an object that's not a card the next time a player would receive priority checkStateAndTriggered(); applyEffects(); if (state.getStack().isEmpty()) { diff --git a/Mage/src/main/java/mage/target/Targets.java b/Mage/src/main/java/mage/target/Targets.java index be2bbe1d6e..fd4715e449 100644 --- a/Mage/src/main/java/mage/target/Targets.java +++ b/Mage/src/main/java/mage/target/Targets.java @@ -100,7 +100,7 @@ public class Targets extends ArrayList { if (target.getTargetController() != null) { // some targets can have controller different than ability controller targetController = target.getTargetController(); } - if (noMana) { // if cast without mana (e.g. by supend you may notr be able to cancel the casting if you are able to cast it + if (noMana) { // if cast without mana (e.g. by suspend you may not be able to cancel the casting if you are able to cast it target.setRequired(true); } if (!target.chooseTarget(outcome, targetController, source, game)) { From 2cab391d74ad00133dd41ce865ec3b48c8bc3b94 Mon Sep 17 00:00:00 2001 From: Dilnu Date: Sun, 18 Sep 2016 20:17:18 -0400 Subject: [PATCH 2/3] Fix a typo that broke the Snapcaster Blaze Test --- .../org/mage/test/cards/abilities/keywords/FlashbackTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/FlashbackTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/FlashbackTest.java index a6d6538bf9..b79f3ea19a 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/FlashbackTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/FlashbackTest.java @@ -119,7 +119,7 @@ public class FlashbackTest extends CardTestPlayerBase { addCard(Zone.GRAVEYARD, playerA, "Blaze", 1); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Snapcaster Mage"); - setChoice(playerA, "B laze"); + setChoice(playerA, "Blaze"); activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Flashback"); setChoice(playerA, "X=1"); From 4427121a646ef50a89baf874ab94e03c86c0c115 Mon Sep 17 00:00:00 2001 From: Dilnu Date: Sun, 18 Sep 2016 20:20:29 -0400 Subject: [PATCH 3/3] Fix the Snapcaster Mage Repeal Test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The flashback ability was attempting to choose targets. That doesn’t really make sense since the Targets should be chosen by the actual spell being cast. --- Mage/src/main/java/mage/abilities/AbilityImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mage/src/main/java/mage/abilities/AbilityImpl.java b/Mage/src/main/java/mage/abilities/AbilityImpl.java index 118a40b5f0..65f1095d37 100644 --- a/Mage/src/main/java/mage/abilities/AbilityImpl.java +++ b/Mage/src/main/java/mage/abilities/AbilityImpl.java @@ -328,7 +328,9 @@ public abstract class AbilityImpl implements Ability { if (sourceObject != null && !this.getAbilityType().equals(AbilityType.TRIGGERED)) { // triggered abilities check this already in playerImpl.triggerAbility sourceObject.adjustTargets(this, game); } - if (mode.getTargets().size() > 0 && mode.getTargets().chooseTargets(getEffects().get(0).getOutcome(), this.controllerId, this, noMana, game) == false) { + // Flashback abilities haven't made the choices the underlying spell might need for targetting. + if (!(this instanceof FlashbackAbility) && mode.getTargets().size() > 0 && mode.getTargets().chooseTargets( + getEffects().get(0).getOutcome(), this.controllerId, this, noMana, game) == false) { if ((variableManaCost != null || announceString != null) && !game.isSimulation()) { game.informPlayer(controller, (sourceObject != null ? sourceObject.getIdName() : "") + ": no valid targets with this value of X"); }