mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 15:32:08 -08:00
* Fixed a problem where for copies of cards/permanent the included spell ability was not correctly copied and the copied card had the spell ability twice. That could cause in some rare cases problems with spell ids of copies (this fixes #6824) or did allow on the other side some unproper handling of things (Animate Dead).
This commit is contained in:
parent
9f92377eef
commit
eecaa232f5
12 changed files with 300 additions and 149 deletions
|
|
@ -16,8 +16,8 @@ public class CursesTest extends CardTestPlayerBase {
|
|||
Enchantment - Aura Curse
|
||||
Enchant player
|
||||
At the beginning of enchanted player's upkeep, that player sacrifices a creature or planeswalker. If the player can't, they lose 5 life.
|
||||
*/
|
||||
private String cReality = "Cruel Reality";
|
||||
*/
|
||||
private final String cReality = "Cruel Reality";
|
||||
|
||||
@Test
|
||||
public void testCurseOfBloodletting() {
|
||||
|
|
@ -29,7 +29,6 @@ public class CursesTest extends CardTestPlayerBase {
|
|||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", playerA);
|
||||
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
|
|
@ -43,7 +42,7 @@ public class CursesTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerB, "Island", 5);
|
||||
// Enchant player
|
||||
// Whenever enchanted player casts an instant or sorcery spell, each other player may copy that
|
||||
// spell and may choose new targets for the copy they control.
|
||||
// spell and may choose new targets for the copy they control.
|
||||
addCard(Zone.HAND, playerA, "Curse of Echoes");
|
||||
// Draw three cards.
|
||||
addCard(Zone.HAND, playerB, "Jace's Ingenuity");
|
||||
|
|
@ -71,7 +70,6 @@ public class CursesTest extends CardTestPlayerBase {
|
|||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Bolt", playerA);
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Bolt", playerA);
|
||||
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
|
|
@ -90,7 +88,6 @@ public class CursesTest extends CardTestPlayerBase {
|
|||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
|
|
@ -102,64 +99,59 @@ public class CursesTest extends CardTestPlayerBase {
|
|||
* Checks if Copy Enchantment works for player auras
|
||||
*/
|
||||
@Test
|
||||
public void testCurseOfExhaustion3() {
|
||||
public void testCurseOfExhaustion3() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 4);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 3);
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 3);
|
||||
|
||||
// Enchant player
|
||||
// Enchanted player can't cast more than one spell each turn.
|
||||
addCard(Zone.HAND, playerA, "Curse of Exhaustion");
|
||||
addCard(Zone.HAND, playerA, "Lightning Bolt", 2);
|
||||
|
||||
addCard(Zone.HAND, playerA, "Lightning Bolt", 2);
|
||||
|
||||
addCard(Zone.HAND, playerB, "Copy Enchantment", 1);
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Curse of Exhaustion", playerB);
|
||||
|
||||
|
||||
castSpell(4, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||
castSpell(4, PhaseStep.PRECOMBAT_MAIN, playerB, "Copy Enchantment");
|
||||
setChoice(playerB, "Yes");
|
||||
setChoice(playerB, "Curse of Exhaustion");
|
||||
setChoice(playerB, "targetPlayer=PlayerA");
|
||||
castSpell(4, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||
|
||||
|
||||
|
||||
setStopAt(4, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertHandCount(playerB, "Copy Enchantment", 0);
|
||||
assertGraveyardCount(playerB, "Copy Enchantment", 0);
|
||||
|
||||
assertPermanentCount(playerA, "Curse of Exhaustion", 1);
|
||||
|
||||
assertPermanentCount(playerA, "Curse of Exhaustion", 1);
|
||||
assertPermanentCount(playerB, "Curse of Exhaustion", 1);
|
||||
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 17);
|
||||
}
|
||||
|
||||
|
||||
// returng curse enchantment from graveyard to battlefield
|
||||
@Test
|
||||
public void testCurseOfExhaustion4() {
|
||||
public void testCurseOfExhaustion4() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Plains", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Swamp", 2);
|
||||
|
||||
|
||||
addCard(Zone.HAND, playerA, "Lightning Bolt", 2);
|
||||
|
||||
|
||||
addCard(Zone.GRAVEYARD, playerB, "Curse of Exhaustion", 1);
|
||||
addCard(Zone.HAND, playerB, "Obzedat's Aid", 1);
|
||||
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Obzedat's Aid", "Curse of Exhaustion");
|
||||
setChoice(playerB, "PlayerA");
|
||||
|
||||
|
||||
castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||
castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||
|
||||
castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||
castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||
|
||||
setStopAt(2, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
|
@ -167,13 +159,13 @@ public class CursesTest extends CardTestPlayerBase {
|
|||
assertHandCount(playerB, "Obzedat's Aid", 0);
|
||||
assertGraveyardCount(playerB, "Obzedat's Aid", 1);
|
||||
assertGraveyardCount(playerB, "Curse of Exhaustion", 0);
|
||||
|
||||
|
||||
assertPermanentCount(playerB, "Curse of Exhaustion", 1);
|
||||
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 17);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCurseOfThirst1() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5);
|
||||
|
|
@ -240,10 +232,9 @@ public class CursesTest extends CardTestPlayerBase {
|
|||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
assertPermanentCount(playerA, "Curse of Misfortunes", 1);
|
||||
assertPermanentCount(playerA, "Curse of Bloodletting", 1);
|
||||
assertPermanentCount(playerA, "Curse of Bloodletting", 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Test
|
||||
public void testCurseOfDeathsHold() {
|
||||
// Creatures enchanted player controls get -1/-1.
|
||||
|
|
@ -251,7 +242,7 @@ public class CursesTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1);
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Curse of Death's Hold", playerB);
|
||||
|
||||
setStopAt(1, PhaseStep.END_COMBAT);
|
||||
|
|
@ -259,12 +250,12 @@ public class CursesTest extends CardTestPlayerBase {
|
|||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
|
||||
|
||||
assertPermanentCount(playerA, "Curse of Death's Hold", 1);
|
||||
|
||||
|
||||
assertPowerToughness(playerB, "Silvercoat Lion", 1, 1);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testCurseOfDeathsHold2() {
|
||||
// Creatures enchanted player controls get -1/-1.
|
||||
|
|
@ -276,31 +267,29 @@ public class CursesTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Forest", 3);
|
||||
addCard(Zone.HAND, playerB, "Reclamation Sage");
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Curse of Death's Hold", playerB);
|
||||
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Reclamation Sage");
|
||||
addTarget(playerB, "Curse of Death's Hold");
|
||||
|
||||
|
||||
// {2}{G/U}{G/U}: Put the top two cards of your library into your graveyard, then return a nonland card of an opponent's choice from your graveyard to your hand.
|
||||
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}{G/U}{G/U}: Mill two cards");
|
||||
castSpell(3, PhaseStep.POSTCOMBAT_MAIN, playerA, "Curse of Death's Hold", playerB);
|
||||
|
||||
|
||||
setStopAt(3, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
|
||||
|
||||
assertGraveyardCount(playerB, "Reclamation Sage", 1);
|
||||
assertPermanentCount(playerA, "Curse of Death's Hold", 1);
|
||||
assertGraveyardCount(playerA, 2);
|
||||
|
||||
|
||||
assertPowerToughness(playerB, "Silvercoat Lion", 1, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Test
|
||||
public void cruelRealityHasBothCreatureAndPwChoosePw() {
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package org.mage.test.cards.abilities.oneshot.counterspell;
|
|||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
|
|
@ -99,4 +98,76 @@ public class CounterspellTest extends CardTestPlayerBase {
|
|||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 17);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCopyCounterToCounterGraveyard() {
|
||||
// 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
|
||||
addCard(Zone.HAND, playerB, "Counterspell"); // Instant {1}{U}
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Counterspell", "Lightning Bolt");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Twincast", "Counterspell");
|
||||
|
||||
setChoice(playerA, "Yes"); // change the target
|
||||
addTarget(playerA, "Counterspell");
|
||||
|
||||
setStrictChooseMode(true);
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertGraveyardCount(playerA, "Lightning Bolt", 1);
|
||||
assertGraveyardCount(playerA, "Twincast", 1);
|
||||
|
||||
assertGraveyardCount(playerB, "Counterspell", 1);
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 17);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCopyCounterToCounterExile() {
|
||||
// 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", 3);
|
||||
// CCounter target spell. If that spell is countered this way, exile it instead of putting it into its owner's graveyard.
|
||||
addCard(Zone.HAND, playerB, "Dissipate"); // Instant {1}{U}
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Dissipate", "Lightning Bolt");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Twincast", "Dissipate");
|
||||
|
||||
setChoice(playerA, "Yes"); // change the target
|
||||
addTarget(playerA, "Dissipate");
|
||||
|
||||
setStrictChooseMode(true);
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertGraveyardCount(playerA, "Lightning Bolt", 1);
|
||||
assertGraveyardCount(playerA, "Twincast", 1);
|
||||
|
||||
assertExileCount(playerB, "Dissipate", 1);
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 17);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package org.mage.test.cards.enchantments;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
|
|
@ -119,7 +118,7 @@ public class AnimateDeadTest extends CardTestPlayerBase {
|
|||
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Cruel Edict", playerA);
|
||||
|
||||
setStopAt(2, PhaseStep.BEGIN_COMBAT);
|
||||
setStopAt(2, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerB, "Cruel Edict", 1);
|
||||
|
|
@ -168,6 +167,8 @@ public class AnimateDeadTest extends CardTestPlayerBase {
|
|||
*/
|
||||
@Test
|
||||
public void testAnimateAndDragonlordAtarkaWithNoTargets() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2);
|
||||
|
||||
// Enchant creature card in a graveyard
|
||||
|
|
@ -188,6 +189,11 @@ public class AnimateDeadTest extends CardTestPlayerBase {
|
|||
setStopAt(2, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
|
||||
assertPermanentCount(playerA, "Animate Dead", 1);
|
||||
assertPermanentCount(playerA, "Dragonlord Atarka", 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ public class WorldgorgerDragonTest extends CardTestPlayerBase {
|
|||
*/
|
||||
@Test
|
||||
public void testWithAnimateDead() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2);
|
||||
|
||||
// When Worldgorger Dragon enters the battlefield, exile all other permanents you control.
|
||||
|
|
@ -79,6 +81,7 @@ public class WorldgorgerDragonTest extends CardTestPlayerBase {
|
|||
// Enchanted creature gets -1/-0.
|
||||
addCard(Zone.HAND, playerA, "Animate Dead");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
||||
|
||||
// Instant {X}{R}{R}
|
||||
// Volcanic Geyser deals X damage to any target.
|
||||
addCard(Zone.HAND, playerA, "Volcanic Geyser", 1);
|
||||
|
|
@ -86,44 +89,61 @@ public class WorldgorgerDragonTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Staunch Defenders", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Animate Dead", "Worldgorger Dragon");
|
||||
setChoice(playerA, "Worldgorger Dragon");
|
||||
setChoice(playerA, "When {this} enters the battlefield, if it's");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
|
||||
setChoice(playerA, "Worldgorger Dragon");
|
||||
setChoice(playerA, "When {this} enters the battlefield, if it's");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
|
||||
setChoice(playerA, "Worldgorger Dragon");
|
||||
setChoice(playerA, "When {this} enters the battlefield, if it's");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
|
||||
setChoice(playerA, "Worldgorger Dragon");
|
||||
setChoice(playerA, "When {this} enters the battlefield, if it's");
|
||||
setChoice(playerA, "No");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
|
||||
setChoice(playerA, "Worldgorger Dragon");
|
||||
setChoice(playerA, "When {this} enters the battlefield, if it's");
|
||||
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
|
||||
setChoice(playerA, "Worldgorger Dragon");
|
||||
setChoice(playerA, "When {this} enters the battlefield, if it's");
|
||||
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
|
||||
setChoice(playerA, "Worldgorger Dragon");
|
||||
setChoice(playerA, "When {this} enters the battlefield, if it's");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Volcanic Geyser", playerB, 22);
|
||||
setChoice(playerA, "X=20");
|
||||
|
||||
// not an infinite loop resulting in a draw
|
||||
for (int i = 0; i < 6; ++i)
|
||||
{
|
||||
setChoice(playerA, "No");
|
||||
setChoice(playerB, "No");
|
||||
}
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertAllCommandsUsed();
|
||||
assertLife(playerA, 44);
|
||||
assertLife(playerB, 0);
|
||||
|
||||
|
|
@ -132,7 +152,7 @@ public class WorldgorgerDragonTest extends CardTestPlayerBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* v9: Worldgorger Dragon + Animate Dead is still acting up (yey complex
|
||||
* v9: Worldgorger Dragon + Animate Dead is still acting up (yet complex
|
||||
* rules interactions!). The first time you return Animate Dead from
|
||||
* Worldgorger's exile, it works like it's supposed to. You have to pick a
|
||||
* creature, and it brings it back. But if you pick Worldgorger Dragon
|
||||
|
|
@ -149,6 +169,8 @@ public class WorldgorgerDragonTest extends CardTestPlayerBase {
|
|||
*/
|
||||
@Test
|
||||
public void testWithAnimateDeadDifferentTargets() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2);
|
||||
|
||||
// When Worldgorger Dragon enters the battlefield, exile all other permanents you control.
|
||||
|
|
@ -161,9 +183,9 @@ public class WorldgorgerDragonTest extends CardTestPlayerBase {
|
|||
// under your control and attach Animate Dead to it. When Animate Dead leaves the battlefield, that creature's controller sacrifices it.
|
||||
addCard(Zone.HAND, playerA, "Animate Dead");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
||||
// Instant {X}{R}{R}
|
||||
|
||||
// Volcanic Geyser deals X damage to any target.
|
||||
addCard(Zone.HAND, playerA, "Volcanic Geyser", 1);
|
||||
addCard(Zone.HAND, playerA, "Volcanic Geyser", 1);// Instant {X}{R}{R}
|
||||
// When Staunch Defenders enters the battlefield, you gain 4 life.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Staunch Defenders", 1);
|
||||
|
||||
|
|
@ -176,13 +198,15 @@ public class WorldgorgerDragonTest extends CardTestPlayerBase {
|
|||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
setChoice(playerA, "Worldgorger Dragon");
|
||||
setChoice(playerA, "When {this} enters the battlefield, if it's");
|
||||
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
|
||||
setChoice(playerA, "Silvercoat Lion");
|
||||
|
||||
setChoice(playerA, "When {this} enters the battlefield, if it's");
|
||||
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
|
|
@ -193,6 +217,8 @@ public class WorldgorgerDragonTest extends CardTestPlayerBase {
|
|||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertGraveyardCount(playerA, "Volcanic Geyser", 1);
|
||||
assertGraveyardCount(playerA, "Worldgorger Dragon", 1);
|
||||
assertPermanentCount(playerA, "Silvercoat Lion", 1);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package org.mage.test.turnmod;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
|
|
@ -97,4 +96,50 @@ public class ExtraTurnsTest extends CardTestPlayerBase {
|
|||
Assert.assertEquals("For turn " + currentGame.getTurnNum() + ", playerB has to be the active player but active player is: "
|
||||
+ currentGame.getPlayer(currentGame.getActivePlayerId()).getName(), currentGame.getActivePlayerId(), playerB.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* https://github.com/magefree/mage/issues/6824
|
||||
*
|
||||
* When you cast miracled Temporal Mastery with God-Eternal Kefnet on the
|
||||
* battlefield and copy it with it's ability you get only 1 extra turn. It
|
||||
* should be 2, since you cast Temporal Mastery with it's miracle ability +
|
||||
* you get a copy from Kefnet's ability. Still after first extra turn game
|
||||
* proceeds to next player.
|
||||
*/
|
||||
@Test
|
||||
public void testCopyMiracledTemporalMastery4TwoExtraTurns() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 7);
|
||||
// Flying
|
||||
// You may reveal the first card you draw each turn as you draw it. Whenever you reveal an instant or sorcery card this way,
|
||||
// copy that card and you may cast the copy. That copy costs {2} less to cast.
|
||||
// When God-Eternal Kefnet dies or is put into exile from the battlefield, you may put it into its owner’s library third from the top.
|
||||
addCard(Zone.BATTLEFIELD, playerB, "God-Eternal Kefnet", 1);
|
||||
// Take an extra turn after this one. Exile Temporal Mastery.
|
||||
// Miracle {1}{U} (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.)
|
||||
addCard(Zone.LIBRARY, playerB, "Temporal Mastery", 1); // Sorcery {5}{U}{U}
|
||||
skipInitShuffling();
|
||||
|
||||
setChoice(playerB, "Yes"); // Would you like to reveal first drawn card (Temporal Mastery, you can copy it and cast {2} less)?
|
||||
setChoice(playerB, "Yes"); // Would you like to copy Temporal Mastery and cast it {2} less?
|
||||
setChoice(playerB, "Yes"); // Reveal Temporal Mastery to be able to use Miracle?
|
||||
setChoice(playerB, "Yes"); // Miracle {1}{U} (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.)
|
||||
|
||||
setChoice(playerB, "No"); // Would you like to reveal first drawn card? (Turn 3)
|
||||
setChoice(playerB, "No"); // Would you like to reveal first drawn card? (Turn 4)
|
||||
|
||||
// Turn 3 + 4 are extra turns
|
||||
setStopAt(4, PhaseStep.PRECOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertExileCount(playerB, "Temporal Mastery", 1);
|
||||
|
||||
Assert.assertTrue("Turn 4 is an extra turn ", currentGame.getState().isExtraTurn());
|
||||
Assert.assertEquals("For turn " + currentGame.getTurnNum() + ", playerB has to be the active player but active player is: "
|
||||
+ currentGame.getPlayer(currentGame.getActivePlayerId()).getName(), currentGame.getActivePlayerId(), playerB.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue