Merge pull request #1881 from drmDev/master

Soulbond bug test - should use stack but does not
This commit is contained in:
Derek M 2016-04-15 17:24:09 -04:00
commit 3b98d0714d

View file

@ -9,6 +9,7 @@ import mage.constants.Zone;
import mage.filter.Filter;
import mage.game.permanent.Permanent;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
@ -390,4 +391,42 @@ public class SoulbondKeywordTest extends CardTestPlayerBase {
Assert.assertEquals(trustedForcemange.getPairedCard(), null);
Assert.assertEquals(eliteVanguard.getPairedCard(), null);
}
/*
* Reported bug: Soulbond should use the stack, but unable to use instant speed removal since no trigger occurs
*/
@Test
@Ignore
// Soulbond does not currently use the stack, so this test will fail until then
public void testRespondToSoulboundWithRemoval() {
// When Palinchron enters the battlefield, untap up to seven lands.
// {2}{U}{U}: Return Palinchron to its owner's hand.
addCard(Zone.BATTLEFIELD, playerA, "Palinchron"); // 4/5 flying
// Soulbond
// As long as Deadeye Navigator is paired with another creature, each of those creatures has "{1}{U}: Exile this creature, then return it to the battlefield under your control."
addCard(Zone.HAND, playerA, "Deadeye Navigator"); // 5/5
addCard(Zone.BATTLEFIELD, playerA, "Island", 8);
addCard(Zone.BATTLEFIELD, playerB, "Doom Blade", 1); // {1}{B} instant: Destroy target non-black creature
addCard(Zone.BATTLEFIELD, playerB, "Swamp", 2);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Deadeye Navigator");
setChoice(playerA, "Yes");
addTarget(playerA, "Palinchron");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Doom Blade", "Deadeye Navigator");
// Deadeye's ability should not be usable since was Destroyed before Soulbond trigger resolved
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{U}:");
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
Permanent palinchron = getPermanent("Palinchron", playerA);
Permanent deadeye = getPermanent("Deadeye Navigator", playerA);
Assert.assertEquals(null, palinchron.getPairedCard()); // should not be paired
Assert.assertEquals(null, deadeye.getPairedCard()); // should not be paired
assertGraveyardCount(playerA, "Deadeye Navigator", 1);
assertGraveyardCount(playerB, "Doom Blade", 1);
assertPermanentCount(playerA, "Palinchron", 1);
}
}