added test for Nacatl War-Pride

This commit is contained in:
drmDev 2017-03-04 18:54:29 -05:00
parent 545b21881b
commit 6d20c7a996

View file

@ -29,6 +29,8 @@ package org.mage.test.cards.requirement;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import mage.game.permanent.Permanent;
import org.junit.Assert;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
@ -66,7 +68,7 @@ public class BlockRequirementTest extends CardTestPlayerBase {
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Oppressive Rays", "Silvercoat Lion");
// Silvercoat Lion has not to block because it has to pay {3} to block
// Silvercoat Lion cannot block because it has to pay {3} to block
attack(2, playerB, "Prized Unicorn");
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
@ -247,4 +249,39 @@ public class BlockRequirementTest extends CardTestPlayerBase {
assertGraveyardCount(playerB, "Dimensional Infiltrator", 1);
assertGraveyardCount(playerB, "Llanowar Elves", 1);
}
/*
Reported bug: Nacatl War-pride unable to be blocked ?
*/
@Test
public void testNacatlWarPrideBlockOneCreature() {
/*
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, "Nacatl War-Pride");
/*
Primeval Titan {4}{G}{G}
Creature - Giant 6/6
Trample. Whenever Primeval Titan enters the battlefield or attacks, you may search your library for up to two land cards,
put them onto the battlefield tapped, then shuffle your library.
*/
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
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());
}
}