mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Merge pull request #2919 from drmDev/ut/nacatl2
more unit tests for issue 2845 with Nacatl
This commit is contained in:
commit
84983a6841
2 changed files with 49 additions and 3 deletions
|
@ -252,6 +252,7 @@ public class BlockRequirementTest extends CardTestPlayerBase {
|
|||
|
||||
/*
|
||||
Reported bug: Nacatl War-pride unable to be blocked ?
|
||||
Basic case: have it be blocked by one creature.
|
||||
*/
|
||||
@Test
|
||||
public void testNacatlWarPrideBlockOneCreature() {
|
||||
|
@ -273,15 +274,60 @@ public class BlockRequirementTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerB, "Primeval Titan");
|
||||
|
||||
attack(1, playerA, "Nacatl War-Pride");
|
||||
block(1, playerB, "Primeval Titan", "Nacatl War-Pride");
|
||||
|
||||
setStopAt(1, PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 17); // one 3/3 tokens attacking got through still
|
||||
assertLife(playerB, 17); // one 3/3 tokens attacking got through still, Nacatl forced to be blocked by Primeval
|
||||
assertGraveyardCount(playerA, "Nacatl War-Pride", 1);
|
||||
|
||||
Permanent primetime = getPermanent("Primeval Titan", playerB);
|
||||
Assert.assertEquals("Damage to Primeval should be 3 not 0", 3, primetime.getDamage());
|
||||
}
|
||||
|
||||
/*
|
||||
Reported bug: Nacatl War-pride unable to be blocked ?
|
||||
Give Nacatl unblockable and attempt to block it. Mix the two effects "cannot be blocked" and "must be blocked".
|
||||
*/
|
||||
@Test
|
||||
public void testNacatlWarPrideCannotBeBlocked() {
|
||||
|
||||
String nWarPride = "Nacatl War-Pride";
|
||||
String pTitan = "Primeval Titan";
|
||||
String aForm = "Aqueous Form";
|
||||
|
||||
/*
|
||||
Nacatl War-Pride {3}{G}{G}{G}
|
||||
Creature - Cat Warrior 3/3
|
||||
Nacatl War-Pride must be blocked by exactly one creature if able.
|
||||
Whenever Nacatl War-Pride attacks, create X tokens that are copies of Nacatl War-Pride and that are tapped and attacking,
|
||||
where X is the number of creatures defending player controls. Exile the tokens at the beginning of the next end step.
|
||||
*/
|
||||
addCard(Zone.BATTLEFIELD, playerA, nWarPride);
|
||||
|
||||
/*
|
||||
Enchantment - Aura {1}{U}
|
||||
Enchanted creature can't be blocked.
|
||||
Whenever enchanted creature attacks, scry 1. (Look at the top card of your library. You may put that card on the bottom of your library.)
|
||||
*/
|
||||
addCard(Zone.HAND, playerA, aForm);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, pTitan);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, aForm, nWarPride);
|
||||
|
||||
attack(1, playerA, nWarPride);
|
||||
block(1, playerB, pTitan, nWarPride); // blocking a token with the same name
|
||||
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 17); // Nacatl dealt damage unblocked
|
||||
|
||||
assertPermanentCount(playerA, nWarPride, 1);
|
||||
assertGraveyardCount(playerA, 0);
|
||||
Permanent primetime = getPermanent(pTitan, playerB);
|
||||
Assert.assertEquals("Damage to Primeval should be 3 not 0", 3, primetime.getDamage()); // blocked a token
|
||||
}
|
||||
}
|
||||
|
|
|
@ -306,7 +306,7 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns card list containter for specified game zone and player.
|
||||
* Returns card list container for specified game zone and player.
|
||||
*
|
||||
* @param gameZone
|
||||
* @param player
|
||||
|
|
Loading…
Reference in a new issue