mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
Failing tests for Islandwalk (Issue#35)
This commit is contained in:
parent
d90e02ae8e
commit
9c4aee2e92
2 changed files with 106 additions and 1 deletions
|
|
@ -0,0 +1,105 @@
|
||||||
|
package org.mage.test.cards.continuous;
|
||||||
|
|
||||||
|
import mage.Constants;
|
||||||
|
import mage.abilities.keyword.IslandwalkAbility;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author magenoxx_at_gmail.com
|
||||||
|
*/
|
||||||
|
public class MasterOfThePearlTridentTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testLordAbility() {
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||||
|
addCard(Constants.Zone.HAND, playerA, "Master of the Pearl Trident");
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerA, "Merfolk of the Pearl Trident");
|
||||||
|
|
||||||
|
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Master of the Pearl Trident");
|
||||||
|
|
||||||
|
setStopAt(1, Constants.PhaseStep.BEGIN_COMBAT);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertPermanentCount(playerA, "Master of the Pearl Trident", 1);
|
||||||
|
assertPowerToughness(playerA, "Merfolk of the Pearl Trident", 2, 2);
|
||||||
|
assertAbility(playerA, "Merfolk of the Pearl Trident", new IslandwalkAbility(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testLordAbilityGone() {
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||||
|
addCard(Constants.Zone.HAND, playerA, "Master of the Pearl Trident");
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerA, "Merfolk of the Pearl Trident");
|
||||||
|
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerB, "Swamp", 3);
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerB, "Llanowar Elves");
|
||||||
|
addCard(Constants.Zone.HAND, playerB, "Murder");
|
||||||
|
|
||||||
|
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Master of the Pearl Trident");
|
||||||
|
castSpell(3, Constants.PhaseStep.DECLARE_ATTACKERS, playerB, "Murder", "Master of the Pearl Trident");
|
||||||
|
|
||||||
|
attack(3, playerA, "Merfolk of the Pearl Trident");
|
||||||
|
block(3, playerB, "Llanowar Elves", "Merfolk of the Pearl Trident");
|
||||||
|
|
||||||
|
setStopAt(3, Constants.PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertLife(playerB, 20);
|
||||||
|
assertPermanentCount(playerA, "Merfolk of the Pearl Trident", 0);
|
||||||
|
assertPermanentCount(playerB, "Llanowar Elves", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testTurnToFrog() {
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||||
|
addCard(Constants.Zone.HAND, playerA, "Master of the Pearl Trident");
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerA, "Merfolk of the Pearl Trident");
|
||||||
|
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerB, "Llanowar Elves");
|
||||||
|
addCard(Constants.Zone.HAND, playerB, "Turn to Frog");
|
||||||
|
|
||||||
|
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Master of the Pearl Trident");
|
||||||
|
castSpell(3, Constants.PhaseStep.DECLARE_ATTACKERS, playerB, "Turn to Frog", "Master of the Pearl Trident");
|
||||||
|
|
||||||
|
attack(3, playerA, "Merfolk of the Pearl Trident");
|
||||||
|
block(3, playerB, "Llanowar Elves", "Merfolk of the Pearl Trident");
|
||||||
|
|
||||||
|
setStopAt(3, Constants.PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertLife(playerB, 20);
|
||||||
|
assertPermanentCount(playerA, "Merfolk of the Pearl Trident", 0);
|
||||||
|
assertPermanentCount(playerB, "Llanowar Elves", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testTurnToFrogAndMurder() {
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||||
|
addCard(Constants.Zone.HAND, playerA, "Master of the Pearl Trident");
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerA, "Merfolk of the Pearl Trident");
|
||||||
|
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerB, "Swamp", 3);
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerB, "Llanowar Elves");
|
||||||
|
addCard(Constants.Zone.HAND, playerB, "Turn to Frog");
|
||||||
|
addCard(Constants.Zone.HAND, playerB, "Murder");
|
||||||
|
|
||||||
|
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Master of the Pearl Trident");
|
||||||
|
castSpell(3, Constants.PhaseStep.BEGIN_COMBAT, playerB, "Turn to Frog", "Master of the Pearl Trident");
|
||||||
|
castSpell(3, Constants.PhaseStep.DECLARE_ATTACKERS, playerB, "Murder", "Master of the Pearl Trident");
|
||||||
|
|
||||||
|
attack(3, playerA, "Merfolk of the Pearl Trident");
|
||||||
|
block(3, playerB, "Llanowar Elves", "Merfolk of the Pearl Trident");
|
||||||
|
|
||||||
|
setStopAt(3, Constants.PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertGraveyardCount(playerB, "Turn to Frog", 1);
|
||||||
|
assertGraveyardCount(playerB, "Murder", 1);
|
||||||
|
assertLife(playerB, 20);
|
||||||
|
assertPermanentCount(playerA, "Merfolk of the Pearl Trident", 0);
|
||||||
|
assertPermanentCount(playerB, "Llanowar Elves", 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -362,7 +362,7 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
|
||||||
* @param player
|
* @param player
|
||||||
* @param cardName
|
* @param cardName
|
||||||
* @param ability
|
* @param ability
|
||||||
* @param flag true if creature should contain ability, false otherwise
|
* @param flag true if creature should contain ability, false if it should NOT contain it instead
|
||||||
* @throws AssertionError
|
* @throws AssertionError
|
||||||
*/
|
*/
|
||||||
public void assertAbility(Player player, String cardName, Ability ability, boolean flag) throws AssertionError {
|
public void assertAbility(Player player, String cardName, Ability ability, boolean flag) throws AssertionError {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue