mirror of
https://github.com/magefree/mage.git
synced 2026-01-22 19:29:59 -08:00
* Some changes to activation count and sacrifice source triggers.
This commit is contained in:
parent
06d3b929a2
commit
0c0dd82480
10 changed files with 116 additions and 124 deletions
|
|
@ -155,4 +155,51 @@ public class LimitedCountedActivationsTest extends CardTestPlayerBase {
|
|||
assertLife(playerA, 16);
|
||||
assertLife(playerB, 15);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDragonWhelpDontSacrificeNewObject() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 8);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1);
|
||||
// Flying
|
||||
// {R}: Dragon Whelp gets +1/+0 until end of turn. If this ability has been activated four or more times this turn, sacrifice Dragon Whelp at the beginning of the next end step.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Dragon Whelp", 1); // 3/3
|
||||
// Put target creature card from a graveyard onto the battlefield under your control. You lose life equal to its converted mana cost.
|
||||
addCard(Zone.HAND, playerA, "Reanimate", 1);
|
||||
// Target creature gains haste until end of turn.
|
||||
addCard(Zone.HAND, playerA, "Unnatural Speed", 1);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Swamp", 2);
|
||||
// Destroy target nonartifact, nonblack creature. It can't be regenerated.
|
||||
addCard(Zone.HAND, playerB, "Terror", 1); // {1}{B}
|
||||
|
||||
activateAbility(1, PhaseStep.UPKEEP, playerA, "{R}: ");
|
||||
activateAbility(1, PhaseStep.UPKEEP, playerA, "{R}: ");
|
||||
activateAbility(1, PhaseStep.UPKEEP, playerA, "{R}: ");
|
||||
activateAbility(1, PhaseStep.UPKEEP, playerA, "{R}: ");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Terror", "Dragon Whelp");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Reanimate", "Dragon Whelp");
|
||||
castSpell(1, PhaseStep.BEGIN_COMBAT, playerA, "Unnatural Speed", "Dragon Whelp");
|
||||
|
||||
activateAbility(1, PhaseStep.DECLARE_ATTACKERS, playerA, "{R}: ");
|
||||
activateAbility(1, PhaseStep.DECLARE_ATTACKERS, playerA, "{R}: ");
|
||||
activateAbility(1, PhaseStep.DECLARE_ATTACKERS, playerA, "{R}: ");
|
||||
|
||||
attack(1, playerA, "Dragon Whelp");
|
||||
|
||||
setStopAt(2, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, "Unnatural Speed", 1);
|
||||
assertGraveyardCount(playerA, "Reanimate", 1);
|
||||
|
||||
assertGraveyardCount(playerB, "Terror", 1);
|
||||
|
||||
assertPermanentCount(playerA, "Dragon Whelp", 1);
|
||||
assertPowerToughness(playerA, "Dragon Whelp", 2, 3);
|
||||
assertGraveyardCount(playerA, "Dragon Whelp", 0);
|
||||
|
||||
assertLife(playerA, 16);
|
||||
assertLife(playerB, 15);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package org.mage.test.cards.abilities.other;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
|
|
@ -39,20 +38,18 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
*/
|
||||
public class NecromancyTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* Necromancy
|
||||
* Enchantment, 2B (3)
|
||||
* You may cast Necromancy as though it had flash. If you cast it any time a
|
||||
* sorcery couldn't have been cast, the controller of the permanent it
|
||||
* becomes sacrifices it at the beginning of the next cleanup step.
|
||||
* When Necromancy enters the battlefield, if it's on the battlefield, it
|
||||
* becomes an Aura with "enchant creature put onto the battlefield with
|
||||
* Necromancy." Put target creature card from a graveyard onto the
|
||||
* battlefield under your control and attach Necromancy to it. When
|
||||
* Necromancy leaves the battlefield, that creature's controller sacrifices it.
|
||||
/**
|
||||
* Necromancy Enchantment, 2B (3) You may cast Necromancy as though it had
|
||||
* flash. If you cast it any time a sorcery couldn't have been cast, the
|
||||
* controller of the permanent it becomes sacrifices it at the beginning of
|
||||
* the next cleanup step. When Necromancy enters the battlefield, if it's on
|
||||
* the battlefield, it becomes an Aura with "enchant creature put onto the
|
||||
* battlefield with Necromancy." Put target creature card from a graveyard
|
||||
* onto the battlefield under your control and attach Necromancy to it. When
|
||||
* Necromancy leaves the battlefield, that creature's controller sacrifices
|
||||
* it.
|
||||
*
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testNecromancy() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3);
|
||||
|
|
@ -60,7 +57,7 @@ public class NecromancyTest extends CardTestPlayerBase {
|
|||
addCard(Zone.GRAVEYARD, playerA, "Craw Wurm");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Necromancy");
|
||||
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
|
|
@ -77,7 +74,7 @@ public class NecromancyTest extends CardTestPlayerBase {
|
|||
addCard(Zone.GRAVEYARD, playerA, "Craw Wurm");
|
||||
|
||||
castSpell(1, PhaseStep.UPKEEP, playerA, "Necromancy");
|
||||
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
|
|
@ -87,14 +84,20 @@ public class NecromancyTest extends CardTestPlayerBase {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if Necromancy is sacrificed if cast as instant and if the
|
||||
* reanimated creature will be sacrificed.
|
||||
*/
|
||||
@Test
|
||||
public void testNecromancyFlashSacrifice() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3);
|
||||
// If you cast it any time a sorcery couldn't have been cast, the controller of the permanent it becomes sacrifices it at the beginning of the next cleanup step.
|
||||
// When Necromancy leaves the battlefield, that creature's controller sacrifices it.
|
||||
addCard(Zone.HAND, playerA, "Necromancy");
|
||||
addCard(Zone.GRAVEYARD, playerA, "Craw Wurm");
|
||||
addCard(Zone.GRAVEYARD, playerA, "Craw Wurm"); // 6/4
|
||||
|
||||
castSpell(1, PhaseStep.UPKEEP, playerA, "Necromancy");
|
||||
|
||||
|
||||
setStopAt(2, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
|
|
@ -114,7 +117,7 @@ public class NecromancyTest extends CardTestPlayerBase {
|
|||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Necromancy"); // enchanting the Craw Wurm
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Disenchant", "Necromancy"); // if Necromancy leaves, the enchanted creature has to leave too
|
||||
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
|
|
@ -124,5 +127,5 @@ public class NecromancyTest extends CardTestPlayerBase {
|
|||
assertGraveyardCount(playerA, "Necromancy", 1);
|
||||
assertGraveyardCount(playerA, "Craw Wurm", 1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,13 +36,13 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class BrainMaggotTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* When Brain Maggot enters the battlefield, target opponent reveals his or her hand and
|
||||
* you choose a nonland card from it. Exile that card until Brain Maggot leaves the battlefield.
|
||||
*
|
||||
* When Brain Maggot enters the battlefield, target opponent reveals his or
|
||||
* her hand and you choose a nonland card from it. Exile that card until
|
||||
* Brain Maggot leaves the battlefield.
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
public void testCardFromHandWillBeExiled() {
|
||||
|
|
@ -61,10 +61,10 @@ public class BrainMaggotTest extends CardTestPlayerBase {
|
|||
assertExileCount("Bloodflow Connoisseur", 1);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testCardFromHandWillBeExiledAndReturn() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2);
|
||||
// When Brain Maggot enters the battlefield, target opponent reveals his or her hand and you choose a nonland card from it. Exile that card until Brain Maggot leaves the battlefield.
|
||||
addCard(Zone.HAND, playerA, "Brain Maggot", 2);
|
||||
|
||||
addCard(Zone.HAND, playerB, "Bloodflow Connoisseur", 1);
|
||||
|
|
@ -105,4 +105,4 @@ public class BrainMaggotTest extends CardTestPlayerBase {
|
|||
assertHandCount(playerB, "Bloodflow Connoisseur", 1);
|
||||
assertExileCount("Bloodflow Connoisseur", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue