Added a test.

This commit is contained in:
LevelX2 2015-07-15 17:24:18 +02:00
parent 3bac7b550c
commit cd354bacc3

View file

@ -45,7 +45,6 @@ public class DeathtouchTest extends CardTestPlayerBase {
// Deathtouch
addCard(Zone.BATTLEFIELD, playerB, "Typhoid Rats");
attack(2, playerB, "Typhoid Rats");
block(2, playerA, "Archangel of Thune", "Typhoid Rats");
@ -60,9 +59,9 @@ public class DeathtouchTest extends CardTestPlayerBase {
}
/**
* Checks if a creature getting damage from Marath abilitity dies
* from Deathtouch, if Marath is equiped with Deathtouch giving Equipment
* and Marath dies from removing the +1/+1 counters.
* Checks if a creature getting damage from Marath abilitity dies from
* Deathtouch, if Marath is equiped with Deathtouch giving Equipment and
* Marath dies from removing the +1/+1 counters.
*/
@Test
public void testMarathWillOfTheWild() {
@ -85,7 +84,6 @@ public class DeathtouchTest extends CardTestPlayerBase {
addCard(Zone.BATTLEFIELD, playerB, "Archangel of Thune");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Marath, Will of the Wild");
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip {2}", "Marath, Will of the Wild");
@ -105,5 +103,44 @@ public class DeathtouchTest extends CardTestPlayerBase {
}
@Test
public void testMarathWillOfTheWildEleshNorn() {
addCard(Zone.BATTLEFIELD, playerA, "Mountain");
addCard(Zone.BATTLEFIELD, playerA, "Forest");
addCard(Zone.BATTLEFIELD, playerA, "Plains");
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 10);
// Equipped creature has deathtouch and lifelink.
addCard(Zone.BATTLEFIELD, playerA, "Basilisk Collar");
/*
{R}{G}{W} Legendary Creature - Elemental Beast
Marath, Will of the Wild enters the battlefield with a number of +1/+1 counters on
it equal to the amount of mana spent to cast it.
{X}, Remove X +1/+1 counters from Marath: Choose one -
* Put X +1/+1 counters on target creature
* Marath deals X damage to target creature or player
* Put an X/X green Elemental creature token onto the battlefield. X can't be 0
*/
addCard(Zone.HAND, playerA, "Marath, Will of the Wild", 1);
addCard(Zone.BATTLEFIELD, playerB, "Elesh Norn, Grand Cenobite");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Marath, Will of the Wild");
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip {2}", "Marath, Will of the Wild");
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X},Remove X +1/+1 counters from Marath", "Elesh Norn, Grand Cenobite");
setModeChoice(playerA, "2"); // Marath deals X damage to target creature or player
setChoice(playerA, "X=1");
setStopAt(1, PhaseStep.END_TURN);
execute();
assertPermanentCount(playerA, "Marath, Will of the Wild", 0); // died because he's 0/0
assertPermanentCount(playerB, "Elesh Norn, Grand Cenobite", 0); // died from deathtouch
assertLife(playerA, 21); // +1 from lifelink doing 1 damage with Marath to Elesh Norn
assertLife(playerB, 20);
}
}