mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Added a test.
This commit is contained in:
parent
3bac7b550c
commit
cd354bacc3
1 changed files with 60 additions and 23 deletions
|
@ -37,32 +37,31 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public class DeathtouchTest extends CardTestPlayerBase {
|
public class DeathtouchTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void simpleDeathtouchDuringCombat() {
|
public void simpleDeathtouchDuringCombat() {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Archangel of Thune");
|
addCard(Zone.BATTLEFIELD, playerA, "Archangel of Thune");
|
||||||
// Creature - Rat 1/1
|
// Creature - Rat 1/1
|
||||||
// Deathtouch
|
// Deathtouch
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Typhoid Rats");
|
addCard(Zone.BATTLEFIELD, playerB, "Typhoid Rats");
|
||||||
|
|
||||||
|
|
||||||
attack(2, playerB, "Typhoid Rats");
|
attack(2, playerB, "Typhoid Rats");
|
||||||
block(2, playerA, "Archangel of Thune", "Typhoid Rats");
|
block(2, playerA, "Archangel of Thune", "Typhoid Rats");
|
||||||
|
|
||||||
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
|
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
assertLife(playerA, 23);
|
assertLife(playerA, 23);
|
||||||
assertLife(playerB, 20);
|
assertLife(playerB, 20);
|
||||||
|
|
||||||
assertGraveyardCount(playerA, "Archangel of Thune", 1);
|
assertGraveyardCount(playerA, "Archangel of Thune", 1);
|
||||||
assertGraveyardCount(playerB, "Typhoid Rats", 1);
|
assertGraveyardCount(playerB, "Typhoid Rats", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if a creature getting damage from Marath abilitity dies
|
* Checks if a creature getting damage from Marath abilitity dies from
|
||||||
* from Deathtouch, if Marath is equiped with Deathtouch giving Equipment
|
* Deathtouch, if Marath is equiped with Deathtouch giving Equipment and
|
||||||
* and Marath dies from removing the +1/+1 counters.
|
* Marath dies from removing the +1/+1 counters.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testMarathWillOfTheWild() {
|
public void testMarathWillOfTheWild() {
|
||||||
|
@ -73,21 +72,20 @@ public class DeathtouchTest extends CardTestPlayerBase {
|
||||||
// Equipped creature has deathtouch and lifelink.
|
// Equipped creature has deathtouch and lifelink.
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Basilisk Collar");
|
addCard(Zone.BATTLEFIELD, playerA, "Basilisk Collar");
|
||||||
/*
|
/*
|
||||||
{R}{G}{W} Legendary Creature - Elemental Beast
|
{R}{G}{W} Legendary Creature - Elemental Beast
|
||||||
Marath, Will of the Wild enters the battlefield with a number of +1/+1 counters on
|
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.
|
it equal to the amount of mana spent to cast it.
|
||||||
{X}, Remove X +1/+1 counters from Marath: Choose one -
|
{X}, Remove X +1/+1 counters from Marath: Choose one -
|
||||||
* Put X +1/+1 counters on target creature
|
* Put X +1/+1 counters on target creature
|
||||||
* Marath deals X damage to target creature or player
|
* 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
|
* 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.HAND, playerA, "Marath, Will of the Wild", 1);
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Archangel of Thune");
|
addCard(Zone.BATTLEFIELD, playerB, "Archangel of Thune");
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Marath, Will of the Wild");
|
||||||
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.PRECOMBAT_MAIN, playerA, "Equip {2}", "Marath, Will of the Wild");
|
||||||
|
|
||||||
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X},Remove X +1/+1 counters from Marath", "Archangel of Thune");
|
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X},Remove X +1/+1 counters from Marath", "Archangel of Thune");
|
||||||
|
@ -104,6 +102,45 @@ public class DeathtouchTest extends CardTestPlayerBase {
|
||||||
assertLife(playerB, 20);
|
assertLife(playerB, 20);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@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);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue