add m21 tests for B

This commit is contained in:
Ingmar Goudt 2020-07-26 12:32:21 +02:00
parent 7a78be8c6a
commit 134bb63185
8 changed files with 351 additions and 0 deletions

View file

@ -0,0 +1,82 @@
package org.mage.test.cards.single.m21;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import mage.counters.CounterType;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
public class BasriDevotedPaladinTest extends CardTestPlayerBase {
private static final String basriDevotedPaladin = "Basri, Devoted Paladin";
// +1: Put a +1/+1 counter on up to one target creature. It gains vigilance until end of turn.
// 1: Whenever a creature attacks this turn, put a +1/+1 counter on it.
// 6: Creatures you control get +2/+2 and gain flying until end of turn.
@Test
public void testAddCounter(){
// Loyalty 4
// +1: Put a +1/+1 counter on up to one target creature. It gains vigilance until end of turn.
addCard(Zone.BATTLEFIELD, playerA, basriDevotedPaladin,1);
addCard(Zone.BATTLEFIELD, playerA, "Savannah Lions");
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+1: ");
addTarget(playerA, "Savannah Lions");
setStrictChooseMode(true);
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertAllCommandsUsed();
assertAbility(playerA, "Savannah Lions", VigilanceAbility.getInstance(), true);
assertCounterCount(playerA, "Savannah Lions", CounterType.P1P1, 1);
}
@Test
public void testAttackTrigger(){
// Loyalty 4
// 1: Whenever a creature attacks this turn, put a +1/+1 counter on it.
addCard(Zone.BATTLEFIELD, playerA, basriDevotedPaladin,1);
addCard(Zone.BATTLEFIELD, playerA, "Savannah Lions");
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "-1: ");
attack(3, playerA, "Savannah Lions");
setStrictChooseMode(true);
setStopAt(5, PhaseStep.PRECOMBAT_MAIN);
execute();
assertAllCommandsUsed();
assertLife(playerB, 17);
assertCounterCount(playerA, "Savannah Lions", CounterType.P1P1, 1);
}
@Test
public void testUltimate(){
// Loyalty 4
// 6: Creatures you control get +2/+2 and gain flying until end of turn.
addCard(Zone.BATTLEFIELD, playerA, basriDevotedPaladin,1);
addCard(Zone.BATTLEFIELD, playerA, "Savannah Lions");
//turn 1, Loyalty = 5
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+1: ");
addTarget(playerA, "Savannah Lions");
// turn 3, Loyalty = 6
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "+1: ");
addTarget(playerA, "Savannah Lions");
activateAbility(5, PhaseStep.PRECOMBAT_MAIN, playerA, "-6: ");
setStrictChooseMode(true);
setStopAt(5, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertAllCommandsUsed();
assertPowerToughness(playerA, "Savannah Lions", 6, 5);
assertAbility(playerA, "Savannah Lions", FlyingAbility.getInstance(), true);
}
}

View file

@ -0,0 +1,79 @@
package org.mage.test.cards.single.m21;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
public class BasrisLieutenantTest extends CardTestPlayerBase {
private static final String basrisLieutenant = "Basri's Lieutenant";
@Test
public void counterOnLieutenant(){
// When Basri's Lieutenant enters the battlefield, put a +1/+1 counter on target creature you control.
// Whenever Basri's Lieutenant or another creature you control dies, if it had a +1/+1 counter on it, create a 2/2 white Knight creature token with vigilance.
addCard(Zone.HAND, playerA, basrisLieutenant);
addCard(Zone.BATTLEFIELD, playerA, "Plains", 8);
// Destroy all creatures. They can't be regenerated.
addCard(Zone.HAND, playerA, "Wrath of God");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, basrisLieutenant);
addTarget(playerA, basrisLieutenant);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Wrath of God");
setStrictChooseMode(true);
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertAllCommandsUsed();
assertPermanentCount(playerA, "Knight", 1);
}
@Test
public void counterOnOtherCreature(){
// When Basri's Lieutenant enters the battlefield, put a +1/+1 counter on target creature you control.
// Whenever Basri's Lieutenant or another creature you control dies, if it had a +1/+1 counter on it, create a 2/2 white Knight creature token with vigilance.
addCard(Zone.HAND, playerA, basrisLieutenant);
addCard(Zone.BATTLEFIELD, playerA, "Plains", 8);
addCard(Zone.BATTLEFIELD, playerA, "Savannah Lions");
// Destroy all creatures. They can't be regenerated.
addCard(Zone.HAND, playerA, "Wrath of God");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, basrisLieutenant);
addTarget(playerA, "Savannah Lions");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Wrath of God");
setStrictChooseMode(true);
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertAllCommandsUsed();
assertPermanentCount(playerA, "Knight", 1);
}
@Test
public void creatureWithoutCounterDies(){
// When Basri's Lieutenant enters the battlefield, put a +1/+1 counter on target creature you control.
// Whenever Basri's Lieutenant or another creature you control dies, if it had a +1/+1 counter on it, create a 2/2 white Knight creature token with vigilance.
addCard(Zone.HAND, playerA, basrisLieutenant);
addCard(Zone.BATTLEFIELD, playerA, "Plains", 4);
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5);
addCard(Zone.BATTLEFIELD, playerA, "Savannah Lions");
// Destroy target nonartifact, nonblack creature. It can't be regenerated.
addCard(Zone.HAND, playerA, "Terror");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, basrisLieutenant);
addTarget(playerA, "Savannah Lions");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Terror", basrisLieutenant);
setStrictChooseMode(true);
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertAllCommandsUsed();
assertPermanentCount(playerA, "Knight", 0);
}
}

View file

@ -0,0 +1,33 @@
package org.mage.test.cards.single.m21;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import mage.counters.CounterType;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
public class BasrisSolidarityTest extends CardTestPlayerBase {
private static final String basrisSolidarity = "Basri's Solidarity";
@Test
public void addCountersToControlledCreatures(){
addCard(Zone.BATTLEFIELD, playerA, "Savannah Lions");
addCard(Zone.BATTLEFIELD, playerA, "Scryb Sprites");
addCard(Zone.BATTLEFIELD, playerB, "Raging Goblin");
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
// Put a +1/+1 counter on each creature you control.
addCard(Zone.HAND, playerA, basrisSolidarity);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, basrisSolidarity);
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
setStrictChooseMode(true);
execute();
assertAllCommandsUsed();
assertCounterCount(playerA, "Savannah Lions", CounterType.P1P1, 1);
assertCounterCount(playerA, "Scryb Sprites", CounterType.P1P1, 1);
assertCounterCount(playerB, "Raging Goblin", CounterType.P1P1, 0);
}
}

View file

@ -0,0 +1,30 @@
package org.mage.test.cards.single.m21;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
public class BoltHoundTest extends CardTestPlayerBase {
@Test
public void testBoostOthers(){
// Haste
// Whenever Bolt Hound attacks, other creatures you control get +1/+0 until end of turn.
addCard(Zone.BATTLEFIELD, playerA, "Bolt Hound");
addCard(Zone.BATTLEFIELD, playerA, "Raging Goblin");
attack(1, playerA, "Bolt Hound");
attack(1, playerA, "Raging Goblin");
setStrictChooseMode(true);
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertAllCommandsUsed();
assertLife(playerB, 16);
assertPowerToughness(playerA, "Bolt Hound", 2,2);
assertPowerToughness(playerA, "Raging Goblin", 2, 1);
}
}

View file

@ -0,0 +1,27 @@
package org.mage.test.cards.single.m21;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
public class BonePitBruteTest extends CardTestPlayerBase {
@Test
public void boostETB(){
// {4}{R}{R}
// When Bone Pit Brute enters the battlefield, target creature gets +4/+0 until end of turn.
addCard(Zone.HAND, playerA, "Bone Pit Brute");
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 6);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Bone Pit Brute");
addTarget(playerA, "Bone Pit Brute");
setStrictChooseMode(true);
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertAllCommandsUsed();
assertPowerToughness(playerA, "Bone Pit Brute", 8, 5);
}
}

View file

@ -0,0 +1,45 @@
package org.mage.test.cards.single.m21;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
public class BrashTaunterTest extends CardTestPlayerBase {
@Test
public void testTriggerDamageToOpponent(){
// Whenever Brash Taunter is dealt damage, it deals that much damage to target opponent.
addCard(Zone.BATTLEFIELD, playerA, "Brash Taunter");
addCard(Zone.BATTLEFIELD, playerA, "Mountain");
// Shock deals 2 damage to any target
addCard(Zone.HAND, playerA, "Shock");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Shock", "Brash Taunter");
addTarget(playerA, playerB);
setStrictChooseMode(true);
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertAllCommandsUsed();
assertLife(playerB, 18);
}
@Test
public void testFightAbility(){
// Whenever Brash Taunter is dealt damage, it deals that much damage to target opponent.
// {2}{R}, {T}: Brash Taunter fights another target creature.
addCard(Zone.BATTLEFIELD, playerA, "Brash Taunter");
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
addCard(Zone.BATTLEFIELD, playerB, "Serra Angel");
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}{R}", "Serra Angel");
addTarget(playerA, playerB);
setStrictChooseMode(true);
setStopAt(3, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertAllCommandsUsed();
assertLife(playerB, 16);
}
}

View file

@ -0,0 +1,24 @@
package org.mage.test.cards.single.m21;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
public class BurlfistOakTest extends CardTestPlayerBase {
@Test
public void boostOnCardDraw(){
// {2}{G}{G}
// Whenever you draw a card, Burlfist Oak gets +2/+2 until end of turn.
addCard(Zone.BATTLEFIELD, playerA, "Burlfist Oak");
setStopAt(3, PhaseStep.PRECOMBAT_MAIN);
setStrictChooseMode(true);
execute();
assertAllCommandsUsed();
assertPowerToughness(playerA, "Burlfist Oak", 4, 5);
}
}

View file

@ -0,0 +1,31 @@
package org.mage.test.cards.single.m21;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
public class BurnBrightTest extends CardTestPlayerBase {
@Test
public void boostControlledCreatures(){
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
addCard(Zone.BATTLEFIELD, playerA, "Raging Goblin");
addCard(Zone.BATTLEFIELD, playerA, "Scryb Sprites");
addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears");
// {2}{R}
// Creatures you control get +2/+0 until end of turn.
addCard(Zone.HAND, playerA, "Burn Bright");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Burn Bright");
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
setStrictChooseMode(true);
execute();
assertAllCommandsUsed();
assertPowerToughness(playerA, "Raging Goblin", 3, 1);
assertPowerToughness(playerA, "Scryb Sprites", 3, 1);
assertPowerToughness(playerB, "Grizzly Bears", 2, 2);
}
}