mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
Some null exceptions checking and fixed some other minor problems.
This commit is contained in:
parent
af2d55f8aa
commit
fcc6174e5e
13 changed files with 156 additions and 130 deletions
|
|
@ -6,7 +6,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.PhaseStep;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.util.functions.Function;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
|
|
@ -16,11 +15,11 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
public class ConstellationTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* Daxos's Torment {3}{B}
|
||||
* Constellation — Whenever Daxos’s Torment or another enchantment enters the battlefield under your control,
|
||||
* Daxos’s Torment becomes a 5/5 Demon creature with flying and haste in addition to its other types until end of turn.
|
||||
* Daxos's Torment {3}{B} Constellation — Whenever Daxos’s Torment or
|
||||
* another enchantment enters the battlefield under your control, Daxos’s
|
||||
* Torment becomes a 5/5 Demon creature with flying and haste in addition to
|
||||
* its other types until end of turn.
|
||||
*/
|
||||
|
||||
private final String daxosCard = "Daxos's Torment";
|
||||
|
||||
private void assertDaxosBoost(boolean mustHave) {
|
||||
|
|
@ -150,7 +149,7 @@ public class ConstellationTest extends CardTestPlayerBase {
|
|||
|
||||
assertHandCount(playerA, daxosCard, 0);
|
||||
assertPermanentCount(playerA, daxosCard, 1);
|
||||
assertHandCount(playerA, "Gravity Sphere", 0);
|
||||
assertHandCount(playerA, "Gravity Sphere", 0); // Possible problem : this is sometimes 1
|
||||
assertPermanentCount(playerA, "Gravity Sphere", 1);
|
||||
|
||||
assertPowerToughness(playerA, daxosCard, 5, 5);
|
||||
|
|
@ -227,5 +226,3 @@ public class ConstellationTest extends CardTestPlayerBase {
|
|||
playDaxosAndVampire(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -185,4 +185,44 @@ public class SuspendTest extends CardTestPlayerBase {
|
|||
assertHandCount(playerA, "Rift Bolt", 0);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Cards cast from other zones that aren't the hand should not trigger
|
||||
* Knowledge Pool, as it states that only cards cast from the hand should be
|
||||
* exiled afterwards.
|
||||
*
|
||||
* Example: cards coming off suspend shouldn't trigger Knowledge Pool.
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
public void testThatNotCastFromHand() {
|
||||
|
||||
// Rift Bolt deals 3 damage to any target.
|
||||
// Suspend 1-{R}
|
||||
addCard(Zone.HAND, playerA, "Rift Bolt", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||
addCard(Zone.LIBRARY, playerA, "Silvercoat Lion", 3);
|
||||
// Imprint - When Knowledge Pool enters the battlefield, each player exiles the top three cards of their library
|
||||
// Whenever a player casts a spell from their hand, that player exiles it. If the player does, he or she may cast another nonland card
|
||||
// exiled with Knowledge Pool without paying that card's mana cost.
|
||||
addCard(Zone.HAND, playerB, "Knowledge Pool", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Plains", 6);
|
||||
addCard(Zone.LIBRARY, playerB, "Silvercoat Lion", 3);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Suspend");
|
||||
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Knowledge Pool");
|
||||
|
||||
addTarget(playerA, playerB);
|
||||
|
||||
setStopAt(3, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerB, "Knowledge Pool", 1);
|
||||
assertHandCount(playerA, "Rift Bolt", 0);
|
||||
assertGraveyardCount(playerA, "Rift Bolt", 1);
|
||||
assertLife(playerB, 17);
|
||||
assertPermanentCount(playerA, "Silvercoat Lion", 0);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue