mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
unittests for akh
This commit is contained in:
parent
53b77acd89
commit
14148b1ac3
3 changed files with 290 additions and 15 deletions
|
@ -1,5 +1,9 @@
|
|||
package org.mage.test.cards.abilities.keywords;
|
||||
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
|
@ -7,11 +11,153 @@ import org.junit.Test;
|
|||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author escplan9
|
||||
*/
|
||||
public class ExertTest extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
public void exertGustWalker() {
|
||||
|
||||
String gWalker = "Gust Walker";
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, gWalker);
|
||||
attack(1, playerA, gWalker);
|
||||
setChoice(playerA, "Yes");
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
|
||||
execute();
|
||||
|
||||
assertAbility(playerA, gWalker, FlyingAbility.getInstance(), true);
|
||||
assertPowerToughness(playerA, gWalker, 3, 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void exertHoodedBrawler() {
|
||||
|
||||
String brawler = "Hooded Brawler";
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, brawler);
|
||||
attack(1, playerA, brawler);
|
||||
setChoice(playerA, "Yes");
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPowerToughness(playerA, brawler, 5, 4);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void exertBitterbladeWarrior() {
|
||||
|
||||
String warrior = "Bitterblade Warrior";
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, warrior);
|
||||
attack(1, playerA, warrior);
|
||||
setChoice(playerA, "Yes");
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertAbility(playerA, warrior, DeathtouchAbility.getInstance(), true);
|
||||
assertPowerToughness(playerA, warrior, 3, 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void exertRhetCropSpearmaster() {
|
||||
|
||||
String spearmaster = "Rhet-Crop Spearmaster";
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, spearmaster);
|
||||
attack(1, playerA, spearmaster);
|
||||
setChoice(playerA, "Yes");
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertAbility(playerA, spearmaster, FirstStrikeAbility.getInstance(), true);
|
||||
assertPowerToughness(playerA, spearmaster, 4, 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void exertTahCropElite(){
|
||||
String elite = "Tah-Crop Elite";
|
||||
addCard(Zone.BATTLEFIELD, playerA, elite);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears");
|
||||
attack(1, playerA, elite);
|
||||
setChoice(playerA, "Yes");
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
assertPowerToughness(playerA, "Grizzly Bears", 3, 3);
|
||||
assertPowerToughness(playerA, elite, 3, 3);
|
||||
assertPowerToughness(playerB, "Grizzly Bears", 2, 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void exertEmberhornMinotaur(){
|
||||
String minotaur = "Emberhorn Minotaur";
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, minotaur);
|
||||
attack(1, playerA, minotaur);
|
||||
setChoice(playerA, "Yes");
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertAbility(playerA, minotaur, new MenaceAbility(), true);
|
||||
assertPowerToughness(playerA, minotaur, 5, 4);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void exertNefcropEntangler(){
|
||||
String entangler = "Nef-Crop Entangler";
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, entangler);
|
||||
attack(1, playerA, entangler);
|
||||
setChoice(playerA, "Yes");
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPowerToughness(playerA, entangler, 3, 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void exertTrueheartTwins(){
|
||||
String twins = "Trueheart Twins";
|
||||
addCard(Zone.BATTLEFIELD, playerA, twins);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Hyena Pack");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Dune Beetle");
|
||||
attack(1, playerA, twins);
|
||||
setChoice(playerA, "Yes");
|
||||
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
assertPowerToughness(playerA, twins, 5, 4);
|
||||
assertPowerToughness(playerA, "Hyena Pack", 4, 4);
|
||||
assertPowerToughness(playerB, "Dune Beetle", 1, 4);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void exertOtherCreatureTrueheartTwins(){
|
||||
String twins = "Trueheart Twins";
|
||||
String gWalker = "Gust Walker";
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, gWalker);
|
||||
addCard(Zone.BATTLEFIELD, playerA, twins);
|
||||
attack(1, playerA, gWalker);
|
||||
setChoice(playerA, "Yes");
|
||||
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
assertPowerToughness(playerA, twins, 5, 4);
|
||||
assertPowerToughness(playerA, gWalker, 4, 3);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void exertUsedDoesNotUntapNextUntapStep() {
|
||||
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
package org.mage.test.cards.single.akh;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
public class AnnointedProcessionTest extends CardTestPlayerBase {
|
||||
|
||||
public final String anointedProcession = "Anointed Procession";
|
||||
|
||||
|
||||
@Test
|
||||
public void createDoubleTokens() {
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, anointedProcession, 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 10);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Anointer Priest", 1);
|
||||
addCard(Zone.HAND, playerA, "Liliana's Mastery");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Liliana's Mastery");
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Zombie", 4);
|
||||
assertLife(playerA, 24);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createTwoDoubleTokens() {
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, anointedProcession, 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 10);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Anointer Priest", 1);
|
||||
addCard(Zone.HAND, playerA, "Liliana's Mastery");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Liliana's Mastery");
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Zombie", 8);
|
||||
assertLife(playerA, 28);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void notTriggerWhenNotOwned(){
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, anointedProcession, 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 10);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Anointer Priest", 1);
|
||||
addCard(Zone.HAND, playerA, "Liliana's Mastery");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Liliana's Mastery");
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Zombie", 2);
|
||||
assertLife(playerA, 20);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createDoubleTokenOnEmbalm() {
|
||||
addCard(Zone.GRAVEYARD, playerA, "Sacred Cat", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Anointed Procession", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 5);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Embalm");
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Sacred Cat", 2);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void cycleStirTheSands(){
|
||||
addCard(Zone.BATTLEFIELD, playerA, anointedProcession, 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 10);
|
||||
addCard(Zone.HAND, playerA, "Stir the Sands");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Stir the Sands");
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Zombie", 6);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package org.mage.test.cards.single.akh;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
public class ThroneOfTheGodPharaohTest extends CardTestPlayerBase {
|
||||
|
||||
String throne = "Throne of the God-Pharaoh";
|
||||
|
||||
@Test
|
||||
public void testMyTurn() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, throne);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears");
|
||||
|
||||
attack(1, playerA, "Grizzly Bears", playerB);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 17);
|
||||
assertLife(playerA, 20);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOpponentsTurn() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, throne);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears");
|
||||
|
||||
attack(1, playerA, "Grizzly Bears", playerB);
|
||||
setStopAt(2, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 17);
|
||||
assertLife(playerA, 20);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in a new issue