mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
Test and fix for Oblivion Ring and Planeswalkers interaction
This commit is contained in:
parent
5541fe4163
commit
3f14fdc0ca
3 changed files with 30 additions and 4 deletions
|
|
@ -2,7 +2,6 @@ package org.mage.test.cards.triggers;
|
|||
|
||||
import mage.Constants;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestBase;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
|
|
@ -77,4 +76,27 @@ public class OblivionRingTest extends CardTestPlayerBase {
|
|||
assertPermanentCount(playerA, "Oblivion Ring", 0);
|
||||
assertPermanentCount(playerB, "Craw Wurm", 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that when Oblivion Ring gets destroyed planeswalker returns with new counters and can be used second time at the same turn
|
||||
*/
|
||||
@Test
|
||||
public void testExilePlaneswalker() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Plains", 5);
|
||||
addCard(Constants.Zone.HAND, playerA, "Oblivion Ring");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Jace Beleren");
|
||||
addCard(Constants.Zone.HAND, playerA, "Revoke Existence");
|
||||
|
||||
activateAbility(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "-1: Target player draws 1 card", playerA);
|
||||
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Oblivion Ring");
|
||||
castSpell(1, Constants.PhaseStep.POSTCOMBAT_MAIN, playerA, "Revoke Existence", "Oblivion Ring");
|
||||
activateAbility(1, Constants.PhaseStep.POSTCOMBAT_MAIN, playerA, "-1: Target player draws 1 card", playerA);
|
||||
|
||||
setStopAt(1, Constants.PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Oblivion Ring", 0);
|
||||
assertPermanentCount(playerA, "Jace Beleren", 1); // returns back
|
||||
assertHandCount(playerA, 2); // can use ability twice
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue