|
22 | 22 | import java.util.UUID;
|
23 | 23 |
|
24 | 24 | /**
|
25 |
| - * @author LevelX2 |
| 25 | + * @author LevelX2, JayDi85 |
26 | 26 | */
|
27 | 27 | public class CopySpellTest extends CardTestPlayerBase {
|
28 | 28 |
|
@@ -905,4 +905,56 @@ private void cardsMustHaveSameZoneAndZCC(Card originalCard, Card copiedCard, Str
|
905 | 905 | Assert.fail(infoPrefix + " - " + "cards must have same zone and zcc: " + zcc1 + " - " + zone1 + " != " + zcc2 + " - " + zone2);
|
906 | 906 | }
|
907 | 907 | }
|
| 908 | + |
| 909 | + /** |
| 910 | + * Bug: If Swan Song is used to counter a copied spell, no tokens are created #12883 |
| 911 | + */ |
| 912 | + @Test |
| 913 | + public void test_LKI() { |
| 914 | + // Counter target enchantment, instant, or sorcery spell. |
| 915 | + // Its controller creates a 2/2 blue Bird creature token with flying. |
| 916 | + addCard(Zone.HAND, playerA, "Swan Song", 1); // {U} |
| 917 | + addCard(Zone.BATTLEFIELD, playerA, "Island", 1); |
| 918 | + // |
| 919 | + // Until end of turn, whenever a player casts an instant or sorcery spell, that player copies it and |
| 920 | + // may choose new targets for the copy. |
| 921 | + addCard(Zone.HAND, playerA, "Bonus Round", 1); // {1}{R}{R} |
| 922 | + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3); |
| 923 | + // |
| 924 | + addCard(Zone.HAND, playerA, "Lightning Bolt", 1); // {R} |
| 925 | + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); |
| 926 | + addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears", 1); |
| 927 | + addCard(Zone.BATTLEFIELD, playerB, "Augmenting Automaton", 1); |
| 928 | + |
| 929 | + checkPermanentCount("before", 1, PhaseStep.PRECOMBAT_MAIN, playerA, playerA, "Bird Token", 0); |
| 930 | + checkPermanentCount("before", 1, PhaseStep.PRECOMBAT_MAIN, playerA, playerB, "Grizzly Bears", 1); |
| 931 | + checkPermanentCount("before", 1, PhaseStep.PRECOMBAT_MAIN, playerA, playerB, "Augmenting Automaton", 1); |
| 932 | + |
| 933 | + // prepare copy effect |
| 934 | + activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}", 3); |
| 935 | + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Bonus Round"); |
| 936 | + waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN); |
| 937 | + |
| 938 | + // cast and duplicate bolt |
| 939 | + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt"); |
| 940 | + addTarget(playerA, "Grizzly Bears"); // original target |
| 941 | + setChoice(playerA, true); // use new target |
| 942 | + addTarget(playerA, "Augmenting Automaton"); // copy target |
| 943 | + waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, true); // resolve copy trigger |
| 944 | + checkStackObject("on copy", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Lightning Bolt", 2); |
| 945 | + |
| 946 | + // counter copy and save Augmenting Automaton |
| 947 | + activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {U}", 1); |
| 948 | + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Swan Song", "Lightning Bolt[only copy]", "Lightning Bolt", StackClause.WHILE_COPY_ON_STACK); |
| 949 | + setChoice(playerA, false); // no change target for duplicated counter spell (non-relevant here) |
| 950 | + waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN); |
| 951 | + |
| 952 | + checkPermanentCount("after", 1, PhaseStep.PRECOMBAT_MAIN, playerA, playerA, "Bird Token", 1); |
| 953 | + checkPermanentCount("after", 1, PhaseStep.PRECOMBAT_MAIN, playerA, playerB, "Grizzly Bears", 0); |
| 954 | + checkPermanentCount("after", 1, PhaseStep.PRECOMBAT_MAIN, playerA, playerB, "Augmenting Automaton", 1); |
| 955 | + |
| 956 | + setStrictChooseMode(true); |
| 957 | + setStopAt(1, PhaseStep.END_COMBAT); |
| 958 | + execute(); |
| 959 | + } |
908 | 960 | }
|
0 commit comments