Merge pull request #1583 from drmDev/master

tests for Blood Moon and Pithing Needle interactions
This commit is contained in:
LevelX2 2016-03-03 09:21:04 +01:00
commit beb257c081
2 changed files with 150 additions and 1 deletions

View file

@ -159,7 +159,75 @@ public class BloodMoonTest extends CardTestPlayerBase {
assertHandCount(playerA, 1);
// Check that the Steam Vents produces only {R}
Assert.assertTrue("The mana the land can produce should be [{U}] but it's " + playerB.getManaAvailable(currentGame).toString(), playerB.getManaAvailable(currentGame).toString().equals("[{U}]"));
}
/**
* Possible bug reported: Blood Moon effects no longer appearing with Pithing Needle naming Blood Moon.
*
* Testing Blood Moon on battlefield before Pithing Needle naming it.
* Non-basics should still only produce {R}
*/
@Test
public void testBloodMoonBeforePithingNeedle() {
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
// Blood Moon 2R
// Enchantment
// Nonbasic lands are Mountains
addCard(Zone.BATTLEFIELD, playerA, "Blood Moon", 1);
// Artifact (1)
// As Pithing Needle enters the battlefield, name a card.
// Activated abilities of sources with the chosen name can't be activated unless they're mana abilities.
addCard(Zone.HAND, playerB, "Pithing Needle"); // {1}
addCard(Zone.BATTLEFIELD, playerB, "Ghost Quarter", 1);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Pithing Needle");
setChoice(playerB, "Blood Moon");
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertPermanentCount(playerA, "Blood Moon", 1);
assertPermanentCount(playerB, "Pithing Needle", 1);
assertPermanentCount(playerB, "Ghost Quarter", 1);
Assert.assertTrue("The mana the land can produce should be [{R}] but it's " + playerB.getManaAvailable(currentGame).toString(), playerB.getManaAvailable(currentGame).toString().equals("[{R}]"));
}
/**
* Possible bug reported: Blood Moon effects no longer appearing with Pithing Needle naming Blood Moon.
*
* Testing Pithing Needle on the battlefield naming Blood Moon, then playing Blood Moon after.
* Non-basics should still only produce {R}
*/
@Test
public void testBloodMoonAfterPithingNeedle() {
// Artifact (1)
// As Pithing Needle enters the battlefield, name a card.
// Activated abilities of sources with the chosen name can't be activated unless they're mana abilities.
addCard(Zone.HAND, playerA, "Pithing Needle"); // {1}
addCard(Zone.BATTLEFIELD, playerA, "Ghost Quarter", 1);
// Blood Moon 2R
// Enchantment
// Nonbasic lands are Mountains
addCard(Zone.HAND, playerB, "Blood Moon", 1);
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 3);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Pithing Needle");
setChoice(playerA, "Blood Moon");
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Blood Moon");
setStopAt(3, PhaseStep.PRECOMBAT_MAIN);
execute();
assertPermanentCount(playerB, "Blood Moon", 1);
assertPermanentCount(playerA, "Pithing Needle", 1);
assertPermanentCount(playerA, "Ghost Quarter", 1);
Assert.assertTrue("The mana the land can produce should be [{R}] but it's " + playerA.getManaAvailable(currentGame).toString(), playerA.getManaAvailable(currentGame).toString().equals("[{R}]"));
}
}

View file

@ -0,0 +1,81 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.mage.test.cards.abilities.enters;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
*/
public class SkylineCascadeTest extends CardTestPlayerBase {
/**
* Reported bug on Skyline Cascade not working properly.
*
* Test the typical situation - tapped creature not being able to untap during next untap step.
*/
@Test
public void testPreventsTappedCreatureUntapping() {
// {W} 2/1
addCard(Zone.BATTLEFIELD, playerA, "Savannah Lions");
/**
* Skyline Cascade enters the battlefield tapped.
* When Skyline Cascade enters the battlefield, target creature an opponent controls doesn't untap during its controller's next untap step.
* Tap: Add {B} to your mana pool.
*/
addCard(Zone.HAND, playerB, "Skyline Cascade");
attack(1, playerA, "Savannah Lions");
playLand(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Skyline Cascade");
addTarget(playerA, "Savannah Lions");
setStopAt(3, PhaseStep.PRECOMBAT_MAIN);
execute();
assertTapped("Savannah Lions", true);
assertTapped("Skyline Cascade", true);
}
/**
* Reported bug on Skyline Cascade not working properly.
*
* "Skyline Cascades triggered ability doesn't tap the creature. It can target any creature, tapped or untapped.
* If that creature is already untapped at the beginning of its controllers next untap step, the effect wont do anything."
* http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=402038
*
* An untapped creature will remain untapped.
*/
@Test
public void testDoesNotStopUntappedCreatureUntapping() {
// {W} 2/1
addCard(Zone.BATTLEFIELD, playerA, "Savannah Lions");
/**
* Skyline Cascade enters the battlefield tapped.
* When Skyline Cascade enters the battlefield, target creature an opponent controls doesn't untap during its controller's next untap step.
* Tap: Add {B} to your mana pool.
*/
addCard(Zone.HAND, playerB, "Skyline Cascade");
playLand(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Skyline Cascade");
addTarget(playerA, "Savannah Lions");
setStopAt(3, PhaseStep.PRECOMBAT_MAIN);
execute();
assertTapped("Savannah Lions", false);
assertTapped("Skyline Cascade", true);
}
}