mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Added test for #6823.
This commit is contained in:
parent
1cdb715d92
commit
983019251e
1 changed files with 66 additions and 17 deletions
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
package org.mage.test.cards.abilities.oneshot.counterspell;
|
package org.mage.test.cards.abilities.oneshot.counterspell;
|
||||||
|
|
||||||
import mage.constants.PhaseStep;
|
import mage.constants.PhaseStep;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
|
@ -10,22 +10,19 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class CounterspellTest extends CardTestPlayerBase {
|
public class CounterspellTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
It looks like Boom//Bust can't be countered (although it says it's countered in the log).
|
* It looks like Boom//Bust can't be countered (although it says it's
|
||||||
|
* countered in the log).
|
||||||
Code: Select all
|
*
|
||||||
13:10: Benno casts Boom [8ce] targeting Mountain [4c8] Island [80c]
|
* Code: Select all 13:10: Benno casts Boom [8ce] targeting Mountain [4c8]
|
||||||
13:10: Benno casts Counterspell [2b7] targeting Boom [8ce]
|
* Island [80c] 13:10: Benno casts Counterspell [2b7] targeting Boom [8ce]
|
||||||
13:10: Benno puts Boom [8ce] from stack into their graveyard
|
* 13:10: Benno puts Boom [8ce] from stack into their graveyard 13:10: Boom
|
||||||
13:10: Boom is countered by Counterspell [2b7]
|
* is countered by Counterspell [2b7] 13:10: Benno puts Counterspell [2b7]
|
||||||
13:10: Benno puts Counterspell [2b7] from stack into their graveyard
|
* from stack into their graveyard 13:10: Mountain [4c8] was destroyed
|
||||||
13:10: Mountain [4c8] was destroyed
|
* 13:10: Island [80c] was destroyed
|
||||||
13:10: Island [80c] was destroyed
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCounterSplitSpell() {
|
public void testCounterSplitSpell() {
|
||||||
// Boom - Sorcery {1}{R}
|
// Boom - Sorcery {1}{R}
|
||||||
|
@ -51,4 +48,56 @@ public class CounterspellTest extends CardTestPlayerBase {
|
||||||
assertLife(playerA, 20);
|
assertLife(playerA, 20);
|
||||||
assertLife(playerB, 20);
|
assertLife(playerB, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* https://github.com/magefree/mage/issues/6823
|
||||||
|
*
|
||||||
|
* I cast Lightning Bolt, then tried to counter it with Memory Lapse, then
|
||||||
|
* Twincast the Memory Lapse, using the copy to counter the original.
|
||||||
|
*
|
||||||
|
* Expected result: Original Memory Lapse countered, put on top of library;
|
||||||
|
* Lightning Bolt resolves
|
||||||
|
*
|
||||||
|
* Actual Result: Original Memory Lapse says it gets countered, but still
|
||||||
|
* resolves, Lightning Bolt is countered and put on top of library
|
||||||
|
*
|
||||||
|
* Of particular note, both the original and the copy of Memory Lapse have
|
||||||
|
* the same card ID (6b5), which seems likely to cause issues.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
@Ignore
|
||||||
|
public void testCopyCounterToCounter() {
|
||||||
|
// Lightning Bolt deals 3 damage to any target.
|
||||||
|
addCard(Zone.HAND, playerA, "Lightning Bolt");
|
||||||
|
// Copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||||
|
addCard(Zone.HAND, playerA, "Twincast");
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||||
|
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||||
|
// Counter target spell. If that spell is countered this way, put it on top of its owner's library instead of into that player's graveyard.
|
||||||
|
addCard(Zone.HAND, playerB, "Memory Lapse"); // Instant {1}{U}
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerA);
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Memory Lapse", "Lightning Bolt");
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Twincast", "Memory Lapse");
|
||||||
|
|
||||||
|
setChoice(playerA, "Yes"); // change the target
|
||||||
|
addTarget(playerA, "Memory Lapse");
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertAllCommandsUsed();
|
||||||
|
|
||||||
|
assertGraveyardCount(playerA, "Lightning Bolt", 1);
|
||||||
|
assertGraveyardCount(playerA, "Twincast", 1);
|
||||||
|
|
||||||
|
assertLibraryCount(playerB, "Memory Lapse", 1);
|
||||||
|
|
||||||
|
assertLife(playerA, 20);
|
||||||
|
assertLife(playerB, 17);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue