mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Added test.
This commit is contained in:
parent
16330ff474
commit
a38216ccf2
1 changed files with 30 additions and 13 deletions
|
@ -36,10 +36,8 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class AttackRequirementTest extends CardTestPlayerBase {
|
||||
|
||||
|
||||
@Test
|
||||
public void testSimpleAttackRequirement() {
|
||||
// Defender
|
||||
|
@ -61,7 +59,6 @@ public class AttackRequirementTest extends CardTestPlayerBase {
|
|||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testAttackRequirementWithAttackRestriction() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 3);
|
||||
|
@ -79,7 +76,6 @@ public class AttackRequirementTest extends CardTestPlayerBase {
|
|||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ghostly Prison");
|
||||
|
||||
// Juggernaut is forced to attack but can't without paying the Ghostly Prison cost and don't has to pay the costs so no attack
|
||||
|
||||
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
|
@ -88,4 +84,25 @@ public class AttackRequirementTest extends CardTestPlayerBase {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Goblin Rabblemaster isn't forcing Goblins to attack.
|
||||
*/
|
||||
@Test
|
||||
public void testAttackRequirementGoblinRabblemaster() {
|
||||
// Other Goblin creatures you control attack each turn if able.
|
||||
// At the beginning of combat on your turn, put a 1/1 red Goblin creature token with haste onto the battlefield.
|
||||
// When Goblin Rabblemaster attacks, it gets +1/+0 until end of turn for each other attacking Goblin.
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Goblin Rabblemaster"); // 2/2
|
||||
// Menace (This creature can't be blocked except by two or more creatures.)
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Boggart Brute"); // 3/2
|
||||
|
||||
attack(2, playerB, "Goblin Rabblemaster");
|
||||
|
||||
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 12); // got damage 1 from Token, 3 from Boggart Brute + 2 + 2 from Goblin Rabblemaster = 9
|
||||
assertLife(playerB, 20);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue