mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 07:22:03 -08:00
Reworked Suspend ability: (#13527)
* Updated Delay and Gandalf Of The Secret Fire to get the main card since they target spells * Suspend now properly lets you play either side of mdfc and spell parts from adventure/omen cards utilizing CardUtil.castSpellWithAttributesForFree method * Removed extra code in SuspendPlayCardEffect since the referenced bug for Epochrasite does not seem to appear. Removed related gainedTemporary variable also. * Added tests for Omen and Suspend With Taigam, Master Opportunists as well as an Epochrasite test for recasting after suspend.
This commit is contained in:
parent
8dd8953a85
commit
1b06813997
5 changed files with 158 additions and 43 deletions
|
|
@ -42,6 +42,40 @@ public class SuspendTest extends CardTestPlayerBase {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests bug that was mentioned in suspend ability, but does not appear to still be an issue.
|
||||
* Epochrasite being unable to be cast after casting from suspend and returning to hand.
|
||||
*/
|
||||
@Test
|
||||
public void test_Single_Epochrasite_Recast_After_Suspend() {
|
||||
// Bug was mentioned in suspend ability, but does not appear to still be an issue
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 4);
|
||||
// Epochrasite enters the battlefield with three +1/+1 counters on it if you didn't cast it from your hand.
|
||||
// When Epochrasite dies, exile it with three time counters on it and it gains suspend.
|
||||
addCard(Zone.HAND, playerA, "Epochrasite", 1);
|
||||
addCard(Zone.HAND, playerB, "Lightning Bolt", 1);
|
||||
addCard(Zone.HAND, playerB, "Boomerang", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Epochrasite");
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Bolt", "Epochrasite");
|
||||
castSpell(7, PhaseStep.DRAW, playerB, "Boomerang", "Epochrasite");
|
||||
castSpell(7, PhaseStep.PRECOMBAT_MAIN, playerA, "Epochrasite");
|
||||
|
||||
|
||||
setChoice(playerA, true); // choose yes to cast
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(7, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerB, "Lightning Bolt", 1);
|
||||
assertPermanentCount(playerA, "Epochrasite", 1); // returned on turn 7 and cast again after going to hand
|
||||
assertPowerToughness(playerA, "Epochrasite", 1, 1);
|
||||
assertAbility(playerA, "Epochrasite", HasteAbility.getInstance(), false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests Jhoira of the Ghitu works (give suspend to a exiled card) {2},
|
||||
* Exile a nonland card from your hand: Put four time counters on the exiled
|
||||
|
|
@ -275,6 +309,7 @@ public class SuspendTest extends CardTestPlayerBase {
|
|||
|
||||
// 3 time counters removes on upkeep (3, 5, 7) and cast again
|
||||
setChoice(playerA, true); // choose yes to cast
|
||||
setChoice(playerA, "Cast Wear");
|
||||
addTarget(playerA, "Bident of Thassa");
|
||||
checkPermanentCount("after suspend", 7, PhaseStep.PRECOMBAT_MAIN, playerB, "Bident of Thassa", 0);
|
||||
checkPermanentCount("after suspend", 7, PhaseStep.PRECOMBAT_MAIN, playerB, "Bow of Nylea", 1);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,105 @@
|
|||
package org.mage.test.cards.single.tdm;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
public class TaigamMasterOpportunistTest extends CardTestPlayerBase {
|
||||
|
||||
private static final String TAIGAM = "Taigam, Master Opportunist";
|
||||
private static final String ORNITHOPTER = "Ornithopter";
|
||||
private static final String TWINMAW = "Twinmaw Stormbrood";
|
||||
private static final String BITE = "Charring Bite";
|
||||
private static final String TURTLE = "Aegis Turtle";
|
||||
private static final String AKOUM = "Akoum Warrior";
|
||||
|
||||
@Test
|
||||
public void testCardWithSpellOption() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, TAIGAM);
|
||||
addCard(Zone.HAND, playerA, ORNITHOPTER);
|
||||
addCard(Zone.HAND, playerA, TWINMAW);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plateau", 6);
|
||||
addCard(Zone.BATTLEFIELD, playerB, TURTLE, 2);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, ORNITHOPTER, true);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, BITE, TURTLE);
|
||||
checkCardCounters("time counters", 1, PhaseStep.BEGIN_COMBAT, playerA, TWINMAW, CounterType.TIME, 4);
|
||||
setChoice(playerA, true);
|
||||
setChoice(playerA, "Cast " + BITE);
|
||||
addTarget(playerA, TURTLE);
|
||||
|
||||
setStopAt(9, PhaseStep.PRECOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertLibraryCount(playerA, TWINMAW, 1);
|
||||
assertGraveyardCount(playerB, TURTLE, 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMDFC() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, TAIGAM);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plateau", 6);
|
||||
addCard(Zone.HAND, playerA, ORNITHOPTER);
|
||||
addCard(Zone.HAND, playerA, AKOUM);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, ORNITHOPTER, true);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, AKOUM);
|
||||
setChoice(playerA, true);
|
||||
setChoice(playerA, "Play Akoum Teeth");
|
||||
|
||||
setStopAt(9, PhaseStep.PRECOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Akoum Teeth", 1);
|
||||
assertTapped("Akoum Teeth", true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMDFC2() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plateau", 6);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||
addCard(Zone.HAND, playerB, "Delay");
|
||||
addCard(Zone.HAND, playerA, AKOUM);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, AKOUM);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Delay", AKOUM);
|
||||
setChoice(playerA, true);
|
||||
setChoice(playerA, "Play Akoum Teeth");
|
||||
|
||||
setStopAt(7, PhaseStep.PRECOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Akoum Teeth", 1);
|
||||
assertTapped("Akoum Teeth", true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plateau", 6);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerB, TURTLE);
|
||||
addCard(Zone.HAND, playerB, "Delay");
|
||||
addCard(Zone.HAND, playerA, TWINMAW);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, TWINMAW);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Delay", TWINMAW);
|
||||
setChoice(playerA, true);
|
||||
setChoice(playerA, "Cast " + BITE);
|
||||
addTarget(playerA, TURTLE);
|
||||
|
||||
setStopAt(7, PhaseStep.PRECOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue