* Some minor changes.

This commit is contained in:
LevelX2 2020-06-03 18:06:03 +02:00
parent e0a0820717
commit 75d0926f4b
3 changed files with 38 additions and 31 deletions

View file

@ -63,7 +63,7 @@ class NacatlWarPrideEffect extends OneShotEffect {
public NacatlWarPrideEffect() {
super(Outcome.Benefit);
this.staticText = "create X tokens that are copies of Nacatl War-Pride tapped and attacking, where X is the number of creatures defending player controls. Exile the tokens at the beginning of the next end step.";
this.staticText = "create X tokens that are copies of {this} tapped and attacking, where X is the number of creatures defending player controls. Exile the tokens at the beginning of the next end step";
}
public NacatlWarPrideEffect(final NacatlWarPrideEffect effect) {

View file

@ -17,10 +17,10 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
/**
* Volrath's Shapeshifter
*
* As long as the top card of your graveyard is a creature card,
* Volrath's Shapeshifter has the full text of that card and has the
* text "2: Discard a card." (Volrath's Shapeshifter has that card's name,
* mana cost, color, types, abilities, power, and toughness.)
* As long as the top card of your graveyard is a creature card, Volrath's
* Shapeshifter has the full text of that card and has the text "2: Discard a
* card." (Volrath's Shapeshifter has that card's name, mana cost, color, types,
* abilities, power, and toughness.)
*
*/
public class VolrathsShapshifterTest extends CardTestPlayerBase {
@ -38,7 +38,9 @@ public class VolrathsShapshifterTest extends CardTestPlayerBase {
skipInitShuffling();
setStopAt(1, PhaseStep.END_TURN);
setStrictChooseMode(true);
execute();
assertAllCommandsUsed();
assertPermanentCount(playerA, "Assault Griffin", 1);
assertPowerToughness(playerA, "Assault Griffin", 3, 2);
@ -50,7 +52,8 @@ public class VolrathsShapshifterTest extends CardTestPlayerBase {
}
/**
* Tests turing back into Volrath's Shapeshifter after a new card is put on top that isn't a creature
* Tests turing back into Volrath's Shapeshifter after a new card is put on
* top that isn't a creature
*/
@Test
public void testLosingCopy() {
@ -68,7 +71,9 @@ public class VolrathsShapshifterTest extends CardTestPlayerBase {
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Target player puts the top card of their library into their graveyard.", playerA);
setStopAt(1, PhaseStep.END_TURN);
setStrictChooseMode(true);
execute();
assertAllCommandsUsed();
assertPermanentCount(playerA, "Volrath's Shapeshifter", 1);
assertPowerToughness(playerA, "Volrath's Shapeshifter", 0, 1);
@ -83,7 +88,6 @@ public class VolrathsShapshifterTest extends CardTestPlayerBase {
addCard(Zone.BATTLEFIELD, playerA, "Island", 5);
addCard(Zone.HAND, playerA, "Mind Control", 1);
addCard(Zone.LIBRARY, playerA, "Forest", 1);
addCard(Zone.GRAVEYARD, playerA, "Dutiful Thrull", 1);
@ -95,7 +99,10 @@ public class VolrathsShapshifterTest extends CardTestPlayerBase {
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Mind Control", "Assault Griffin");
setStopAt(1, PhaseStep.END_TURN);
setStrictChooseMode(true);
execute();
assertAllCommandsUsed();
assertPermanentCount(playerA, "Dutiful Thrull", 1);
assertPowerToughness(playerA, "Dutiful Thrull", 1, 1);
@ -103,16 +110,14 @@ public class VolrathsShapshifterTest extends CardTestPlayerBase {
Permanent shapeshifter = getPermanent("Dutiful Thrull", playerA.getId());
Assert.assertTrue(shapeshifter.getSubtype(currentGame).contains(SubType.THRULL));
Assert.assertTrue("Volrath's Shapeshifter must have {2} : Discard a card", hasShapeshiftersOriginalAbility(shapeshifter));
}
private boolean hasShapeshiftersOriginalAbility(Permanent shapeshifter) {
for (Ability ability : shapeshifter.getAbilities()) {
if(ability instanceof SimpleActivatedAbility) {
SimpleActivatedAbility simpleActivatedAbility = (SimpleActivatedAbility)ability;
return simpleActivatedAbility.getZone() == Zone.BATTLEFIELD && simpleActivatedAbility.getEffects().size() == 1 &&
simpleActivatedAbility.getEffects().get(0) instanceof DiscardControllerEffect && simpleActivatedAbility.getManaCosts().size() == 1
if (ability instanceof SimpleActivatedAbility) {
SimpleActivatedAbility simpleActivatedAbility = (SimpleActivatedAbility) ability;
return simpleActivatedAbility.getZone() == Zone.BATTLEFIELD && simpleActivatedAbility.getEffects().size() == 1
&& simpleActivatedAbility.getEffects().get(0) instanceof DiscardControllerEffect && simpleActivatedAbility.getManaCosts().size() == 1
&& simpleActivatedAbility.getManaCosts().get(0) instanceof GenericManaCost && simpleActivatedAbility.getManaCosts().get(0).convertedManaCost() == 2;
}
}

View file

@ -38,6 +38,8 @@ public class MairsilThePretenderTest extends CardTestCommanderDuelBase {
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1);
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
addCard(Zone.LIBRARY, playerA, "Silvercoat Lion", 3);
skipInitShuffling();
// Enchant creature
// Enchanted creature has haste and At the beginning of your upkeep, destroy this creature.