mirror of
https://github.com/correl/mage.git
synced 2024-11-29 03:00:12 +00:00
- Fixed bug ShanidSleepersScourgeTest
- Moved ShanidSleepersScourgeTest into correct folder
This commit is contained in:
parent
4999fb02b9
commit
e5b66a34fd
3 changed files with 84 additions and 60 deletions
|
@ -17,7 +17,10 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
|
|
|
@ -1,60 +0,0 @@
|
||||||
package org.mage.test.cards.abilities.activated;
|
|
||||||
|
|
||||||
import mage.abilities.keyword.MenaceAbility;
|
|
||||||
import mage.constants.PhaseStep;
|
|
||||||
import mage.constants.Zone;
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
|
||||||
|
|
||||||
public class ShanidSleepersScourgeTest extends CardTestPlayerBase {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testShanidSleepersScourge() {
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Shanid, Sleepers' Scourge");
|
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Llanowar Elves");
|
|
||||||
|
|
||||||
addCard(Zone.HAND, playerA, "Academy Ruins", 1);
|
|
||||||
addCard(Zone.HAND, playerA, "Mox Amber", 1);
|
|
||||||
|
|
||||||
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Academy Ruins");
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Mox Amber");
|
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.END_TURN);
|
|
||||||
execute();
|
|
||||||
assertLife(playerA, 20 - 2);
|
|
||||||
assertHandCount(playerA, 2);
|
|
||||||
assertLife(playerB, 20);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testShanidSleepersScourgeNoTrigger() {
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Shanid, Sleepers' Scourge");
|
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Llanowar Elves");
|
|
||||||
|
|
||||||
addCard(Zone.HAND, playerA, "Memnite", 1);
|
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Memnite");
|
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.END_TURN);
|
|
||||||
execute();
|
|
||||||
assertLife(playerA, 20);
|
|
||||||
assertHandCount(playerA, 0);
|
|
||||||
assertLife(playerB, 20);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testShanidSleepersScourgeMenace() {
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Shanid, Sleepers' Scourge");
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Gaddock Teeg");
|
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Gaddock Teeg");
|
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
|
|
||||||
execute();
|
|
||||||
assertLife(playerA, 20);
|
|
||||||
assertHandCount(playerA, 0);
|
|
||||||
assertLife(playerB, 20);
|
|
||||||
assertAbility(playerA, "Gaddock Teeg", new MenaceAbility(false), true);
|
|
||||||
assertAbility(playerB, "Gaddock Teeg", new MenaceAbility(false), false);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
package org.mage.test.cards.single.dmc;
|
||||||
|
|
||||||
|
import mage.abilities.keyword.MenaceAbility;
|
||||||
|
import mage.constants.PhaseStep;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link mage.cards.s.ShanidSleepersScourge Shanid, Sleepers' Scourge}
|
||||||
|
* {1}{R}{W}{B}
|
||||||
|
*
|
||||||
|
* Menace
|
||||||
|
* Other legendary creatures you control have menace.
|
||||||
|
* Whenever you play a legendary land or cast a legendary spell, you draw a card and you lose 1 life.
|
||||||
|
*
|
||||||
|
* @author freaisdead
|
||||||
|
*/
|
||||||
|
public class ShanidSleepersScourgeTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test that you correctly draw a card for playing a legendary land and legendary artifact
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testShanidSleepersScourge() {
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Shanid, Sleepers' Scourge");
|
||||||
|
|
||||||
|
addCard(Zone.HAND, playerA, "Academy Ruins", 1); // Legendary Land
|
||||||
|
addCard(Zone.HAND, playerA, "Mox Amber", 1); // Legendary Artifact
|
||||||
|
|
||||||
|
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Academy Ruins");
|
||||||
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Mox Amber");
|
||||||
|
|
||||||
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
assertLife(playerA, 20 - 2);
|
||||||
|
assertHandCount(playerA, 2);
|
||||||
|
assertLife(playerB, 20);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test that the draw card ability does not trigger for non-legendary
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testShanidSleepersScourgeNoTrigger() {
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Shanid, Sleepers' Scourge");
|
||||||
|
|
||||||
|
addCard(Zone.HAND, playerA, "Forest");
|
||||||
|
addCard(Zone.HAND, playerA, "Memnite", 1);
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Memnite", true);
|
||||||
|
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Forest");
|
||||||
|
|
||||||
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
assertLife(playerA, 20);
|
||||||
|
assertHandCount(playerA, 0);
|
||||||
|
assertLife(playerB, 20);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test that it correctly gives menace to your own legendary creatures,
|
||||||
|
* but not to your non-legendary creatures nor to your opponent's legendary creatures.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testShanidSleepersScourgeMenace() {
|
||||||
|
// Legendary
|
||||||
|
String gaddock = "Gaddock Teeg";
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Shanid, Sleepers' Scourge");
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Memnite"); // Non-legendary
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, gaddock);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, gaddock); // Legendary
|
||||||
|
|
||||||
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertAbility(playerA, gaddock, new MenaceAbility(false), true);
|
||||||
|
assertAbility(playerA, "Memnite", new MenaceAbility(false), false);
|
||||||
|
assertAbility(playerB, gaddock, new MenaceAbility(false), false);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue