mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 12:52:06 -08:00
3 Curses from DKA
This commit is contained in:
parent
6828f1d651
commit
828662f6f3
8 changed files with 582 additions and 0 deletions
|
|
@ -0,0 +1,31 @@
|
|||
package org.mage.test.cards;
|
||||
|
||||
import mage.Constants;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward
|
||||
*/
|
||||
public class TestCurseOfBloodletting extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
public void testCard1() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Mountain", 7);
|
||||
addCard(Constants.Zone.HAND, playerA, "Curse of Bloodletting");
|
||||
addCard(Constants.Zone.HAND, playerA, "Lightning Bolt", 2);
|
||||
|
||||
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Curse of Bloodletting", playerB);
|
||||
castSpell(1, Constants.PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||
castSpell(1, Constants.PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", playerA);
|
||||
|
||||
|
||||
setStopAt(1, Constants.PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 17);
|
||||
assertLife(playerB, 14);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.mage.test.cards;
|
||||
|
||||
import mage.Constants;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward
|
||||
*/
|
||||
public class TestCurseOfEchoes extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
public void testCard1() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 5);
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerB, "Island", 5);
|
||||
addCard(Constants.Zone.HAND, playerA, "Curse of Echoes");
|
||||
addCard(Constants.Zone.HAND, playerB, "Jace's Ingenuity");
|
||||
|
||||
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Curse of Echoes", playerB);
|
||||
castSpell(1, Constants.PhaseStep.POSTCOMBAT_MAIN, playerB, "Jace's Ingenuity");
|
||||
|
||||
setStopAt(1, Constants.PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, 3);
|
||||
assertHandCount(playerB, 3);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package org.mage.test.cards;
|
||||
|
||||
import mage.Constants;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward
|
||||
*/
|
||||
public class TestCurseOfExhaustion extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
public void testCard1() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Plains", 4);
|
||||
addCard(Constants.Zone.HAND, playerA, "Curse of Exhaustion");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerB, "Mountain", 2);
|
||||
addCard(Constants.Zone.HAND, playerB, "Lightning Bolt", 2);
|
||||
|
||||
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Curse of Exhaustion", playerB);
|
||||
castSpell(1, Constants.PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Bolt", playerA);
|
||||
castSpell(1, Constants.PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Bolt", playerA);
|
||||
|
||||
|
||||
setStopAt(1, Constants.PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 20);
|
||||
assertLife(playerA, 17);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCard2() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Mountain", 4);
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Plains", 2);
|
||||
addCard(Constants.Zone.HAND, playerA, "Curse of Exhaustion");
|
||||
addCard(Constants.Zone.HAND, playerA, "Lightning Bolt", 2);
|
||||
|
||||
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Curse of Exhaustion", playerB);
|
||||
castSpell(1, Constants.PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||
castSpell(1, Constants.PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||
|
||||
|
||||
setStopAt(1, Constants.PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 14);
|
||||
}
|
||||
}
|
||||
|
|
@ -352,6 +352,17 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
|
|||
Assert.assertEquals("(Battlefield) Card counts are not equal (" + cardName + ")", count, actualCount);
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert card count in player's hand.
|
||||
*
|
||||
* @param player {@link Player} who's hand should be counted.
|
||||
* @param count Expected count.
|
||||
*/
|
||||
public void assertHandCount(Player player, int count) throws AssertionError {
|
||||
int actual = currentGame.getPlayer(player.getId()).getHand().size();
|
||||
Assert.assertEquals("(Hand) Card counts are not equal ", count, actual);
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert card count in player's graveyard.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue