mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
minor adjustments to new perspectives test
This commit is contained in:
parent
f912ee6213
commit
2d91ee49cf
1 changed files with 39 additions and 41 deletions
|
@ -16,7 +16,9 @@ public class NewPerspectivesTest extends CardTestPlayerBase {
|
|||
When New Perspectives enters the battlefield, draw three cards.
|
||||
As long as you have seven or more cards in hand, you may pay 0 rather than pay cycling costs.
|
||||
*/
|
||||
private String nPerspectives = "New Perspectives";
|
||||
private final String newPerspectives = "New Perspectives";
|
||||
private final String reliquaryTower = "Reliquary Tower"; // only used to not have to discard due to hand size to make testing easier
|
||||
private final String flameJet = "Flame Jet"; // just a cycle card with (2) cycling
|
||||
|
||||
/**
|
||||
* just a basic test for free cycling!
|
||||
|
@ -24,22 +26,21 @@ public class NewPerspectivesTest extends CardTestPlayerBase {
|
|||
@Test
|
||||
public void newPerspectives_7Cards_FreeCycling() {
|
||||
|
||||
String fJet = "Flame Jet"; // {1}{R} Sorcery deal 3 dmg to player. cycling (2)
|
||||
|
||||
removeAllCardsFromHand(playerA);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 6);
|
||||
addCard(Zone.HAND, playerA, nPerspectives);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 5);
|
||||
addCard(Zone.BATTLEFIELD, playerA, reliquaryTower);
|
||||
addCard(Zone.HAND, playerA, newPerspectives);
|
||||
addCard(Zone.HAND, playerA, "Mountain", 3);
|
||||
addCard(Zone.HAND, playerA, fJet);
|
||||
addCard(Zone.HAND, playerA, flameJet);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, nPerspectives);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, newPerspectives);
|
||||
activateAbility(1, PhaseStep.BEGIN_COMBAT, playerA, "Cycling");
|
||||
|
||||
setStopAt(1, PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, nPerspectives, 1);
|
||||
assertGraveyardCount(playerA, fJet, 1);
|
||||
assertPermanentCount(playerA, newPerspectives, 1);
|
||||
assertGraveyardCount(playerA, flameJet, 1);
|
||||
assertHandCount(playerA, 7); // 4 + 3 (new perspectives ETB) (+ 1 - 1) (cycling)
|
||||
}
|
||||
|
||||
|
@ -49,22 +50,21 @@ public class NewPerspectivesTest extends CardTestPlayerBase {
|
|||
@Test
|
||||
public void newPerspectives_LessThan7Cards_CyclingNotFree() {
|
||||
|
||||
String fJet = "Flame Jet"; // {1}{R} Sorcery deal 3 dmg to player. cycling (2)
|
||||
|
||||
removeAllCardsFromHand(playerA);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 6);
|
||||
addCard(Zone.HAND, playerA, nPerspectives);
|
||||
addCard(Zone.HAND, playerA, fJet);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 5);
|
||||
addCard(Zone.BATTLEFIELD, playerA, reliquaryTower);
|
||||
addCard(Zone.HAND, playerA, newPerspectives);
|
||||
addCard(Zone.HAND, playerA, flameJet);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, nPerspectives);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, newPerspectives);
|
||||
activateAbility(1, PhaseStep.BEGIN_COMBAT, playerA, "Cycling");
|
||||
|
||||
setStopAt(1, PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, nPerspectives, 1);
|
||||
assertGraveyardCount(playerA, fJet, 0);
|
||||
assertHandCount(playerA, fJet, 1);
|
||||
assertPermanentCount(playerA, newPerspectives, 1);
|
||||
assertGraveyardCount(playerA, flameJet, 0);
|
||||
assertHandCount(playerA, flameJet, 1);
|
||||
assertHandCount(playerA, 4); // 1 + 3 (new perspectives ETB)
|
||||
}
|
||||
|
||||
|
@ -75,53 +75,51 @@ public class NewPerspectivesTest extends CardTestPlayerBase {
|
|||
@Test
|
||||
public void newPerspectives_PlayingSecondOneWithFewerThan7CardsOnCast() {
|
||||
|
||||
String fJet = "Flame Jet"; // {1}{R} Sorcery deal 3 dmg to player. cycling (2)
|
||||
|
||||
removeAllCardsFromHand(playerA);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 6);
|
||||
addCard(Zone.HAND, playerA, nPerspectives, 2);
|
||||
addCard(Zone.HAND, playerA, fJet);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 5);
|
||||
addCard(Zone.BATTLEFIELD, playerA, reliquaryTower);
|
||||
addCard(Zone.HAND, playerA, newPerspectives, 2);
|
||||
addCard(Zone.HAND, playerA, flameJet);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, nPerspectives);
|
||||
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, nPerspectives);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, newPerspectives);
|
||||
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, newPerspectives);
|
||||
|
||||
activateAbility(3, PhaseStep.BEGIN_COMBAT, playerA, "Cycling");
|
||||
|
||||
setStopAt(3, PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, nPerspectives, 2);
|
||||
assertPermanentCount(playerA, newPerspectives, 2);
|
||||
assertHandCount(playerA, 8); // 1 (flame jet cycled) + 3 (new perspectives ETB) + 1 (draw step) + 3 (2nd perspectives etb)
|
||||
assertGraveyardCount(playerA, fJet, 1);
|
||||
assertGraveyardCount(playerA, flameJet, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Reported bug for #3323: NOTE test failing due to bug in code (game freezes after casting 2nd new perspectives)
|
||||
* Reported bug for #3323:
|
||||
* If you cast a second copy of New Perspective while the first one is still in play, the client will freeze.
|
||||
* Unable to reproduce by Unit Test, only through manual test.
|
||||
*/
|
||||
@Test
|
||||
public void newPerspectives_PlayingSecondOneWithMoreThan7CardsOnCast() {
|
||||
|
||||
String fJet = "Flame Jet"; // {1}{R} Sorcery deal 3 dmg to player. cycling (2)
|
||||
|
||||
removeAllCardsFromHand(playerA);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 6);
|
||||
addCard(Zone.HAND, playerA, nPerspectives, 2);
|
||||
//this made test buggy: addCard(Zone.HAND, playerA, "Mountain", 3);
|
||||
addCard(Zone.HAND, playerA, fJet);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 5);
|
||||
addCard(Zone.BATTLEFIELD, playerA, reliquaryTower);
|
||||
addCard(Zone.HAND, playerA, newPerspectives, 2);
|
||||
addCard(Zone.HAND, playerA, "Mountain", 3);
|
||||
addCard(Zone.HAND, playerA, flameJet);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, nPerspectives);
|
||||
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, nPerspectives);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, newPerspectives);
|
||||
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, newPerspectives);
|
||||
|
||||
activateAbility(3, PhaseStep.BEGIN_COMBAT, playerA, "Cycling");
|
||||
|
||||
setStopAt(3, PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, nPerspectives, 0); // check it wasn't discarded
|
||||
assertPermanentCount(playerA, nPerspectives, 2);
|
||||
assertGraveyardCount(playerA, fJet, 1);
|
||||
//assertHandCount(playerA, 11); // 1 (flame jet cycled) + 3 Mountains in hand + 3 (new perspectives ETB) + 1 (draw step) + 3 (2nd perspectives etb)
|
||||
assertHandCount(playerA, 8); // 1 (flame jet cycled) + 3 (new perspectives ETB) + 1 (draw step) + 3 (2nd perspectives etb)
|
||||
assertGraveyardCount(playerA, newPerspectives, 0); // check it wasn't discarded
|
||||
assertPermanentCount(playerA, newPerspectives, 2);
|
||||
assertGraveyardCount(playerA, flameJet, 1);
|
||||
assertHandCount(playerA, 11); // 1 (flame jet cycled) + 3 Mountains in hand + 3 (new perspectives ETB) + 1 (draw step) + 3 (2nd perspectives etb)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue