mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
add tests related to #9839 (ignored failing)
This commit is contained in:
parent
a516105899
commit
c7057598fe
1 changed files with 84 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ import mage.constants.Zone;
|
|||
import mage.counters.CounterType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
|
|
@ -391,4 +392,87 @@ public class CloudshiftTest extends CardTestPlayerBase {
|
|||
|
||||
}
|
||||
|
||||
// Reported bug: #9839
|
||||
private static final String cloudshift = "Cloudshift";
|
||||
private static final String mist = "Turn to Mist";
|
||||
private static final String kor = "Lone Missionary"; // 2/1 ETB gain 4 life
|
||||
private static final String lignify = "Lignify"; // {1}{G} Aura - enchanted creature loses all abilities and is a 0/4 Treefolk
|
||||
|
||||
@Test
|
||||
@Ignore("Failing, see #9839, perhaps due to game.getState.processAction(game) not cleaning up Permanent::removeAllAbilities in time")
|
||||
public void testEntersTriggerNotSuppressed() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Savannah", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerA, kor);
|
||||
addCard(Zone.HAND, playerA, lignify);
|
||||
addCard(Zone.HAND, playerA, cloudshift);
|
||||
|
||||
checkPT("Kor", 1, PhaseStep.UPKEEP, playerA, kor, 2, 1);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, lignify, kor);
|
||||
checkPT("Treefolk", 1, PhaseStep.BEGIN_COMBAT, playerA, kor, 0, 4);
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, cloudshift, kor);
|
||||
|
||||
setStopAt(2, PhaseStep.UPKEEP);
|
||||
setStrictChooseMode(true);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, cloudshift, 1);
|
||||
assertGraveyardCount(playerA, lignify, 1);
|
||||
assertPowerToughness(playerA, kor, 2, 1);
|
||||
assertLife(playerA, 24);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Failing, see #9839, perhaps due to game.getState.processAction(game) not cleaning up MageObject::removeAllSubTypes in time")
|
||||
public void testEntersSubtype() {
|
||||
String mystic = "Elvish Mystic";
|
||||
String vanguard = "Elvish Vanguard"; // Whenever another Elf enters the battlefield, put a +1/+1 counter on Elvish Vanguard.
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Savannah", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerA, mystic);
|
||||
addCard(Zone.BATTLEFIELD, playerA, vanguard);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Orchard Warden"); // Whenever another Treefolk creature enters the battlefield under your control, you may gain life equal to that creature’s toughness.
|
||||
addCard(Zone.HAND, playerA, lignify);
|
||||
addCard(Zone.HAND, playerA, cloudshift);
|
||||
|
||||
checkPT("Elf", 1, PhaseStep.UPKEEP, playerA, mystic, 1, 1);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, lignify, mystic);
|
||||
checkPT("Treefolk", 1, PhaseStep.BEGIN_COMBAT, playerA, mystic, 0, 4);
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, cloudshift, mystic);
|
||||
|
||||
setStopAt(2, PhaseStep.UPKEEP);
|
||||
setStrictChooseMode(true);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, cloudshift, 1);
|
||||
assertGraveyardCount(playerA, lignify, 1);
|
||||
assertPowerToughness(playerA, mystic, 1, 1);
|
||||
assertPowerToughness(playerA, vanguard, 2, 2); // received a counter when mystic entered
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEntersTriggerNotSuppressedDelayed() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 3); // not sure why duals aren't working... hybrid?
|
||||
addCard(Zone.BATTLEFIELD, playerA, kor);
|
||||
addCard(Zone.HAND, playerA, lignify);
|
||||
addCard(Zone.HAND, playerA, mist);
|
||||
|
||||
checkPT("Kor", 1, PhaseStep.UPKEEP, playerA, kor, 2, 1);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, lignify, kor);
|
||||
checkPT("Treefolk", 1, PhaseStep.BEGIN_COMBAT, playerA, kor, 0, 4);
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, mist, kor);
|
||||
|
||||
setStopAt(2, PhaseStep.UPKEEP);
|
||||
setStrictChooseMode(true);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, mist, 1);
|
||||
assertGraveyardCount(playerA, lignify, 1);
|
||||
assertPowerToughness(playerA, kor, 2, 1);
|
||||
assertLife(playerA, 24);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue