mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
* Fixed a bug that non permanent cards could be moved to battlefield instead of staying in the zone they are.
This commit is contained in:
parent
82fa86cc24
commit
22e6fee101
4 changed files with 94 additions and 4 deletions
|
|
@ -482,4 +482,56 @@ public class ManifestTest extends CardTestPlayerBase {
|
|||
assertHandCount(playerB, "Mountain", 1);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_ManifestSorceryAndBlinkIt() {
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Swamp", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Plains", 2);
|
||||
|
||||
// {1}{B}, {T}, Sacrifice another creature: Manifest the top card of your library.
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Qarsi High Priest", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1);
|
||||
|
||||
// Exile target creature you control, then return that card to the battlefield under your control.
|
||||
addCard(Zone.HAND, playerB, "Cloudshift", 1); //Instant {W}
|
||||
|
||||
|
||||
// Devoid
|
||||
// Flying
|
||||
// At the beginning of your upkeep, sacrifice a creature
|
||||
// Whenever you sacrifice a creature, draw a card.
|
||||
addCard(Zone.LIBRARY, playerB, "Mountain", 1);
|
||||
addCard(Zone.LIBRARY, playerB, "Lightning Bolt", 1);
|
||||
addCard(Zone.LIBRARY, playerB, "Mountain", 1);
|
||||
|
||||
skipInitShuffling();
|
||||
|
||||
activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}{B}, {T}, Sacrifice another creature");
|
||||
setChoice(playerB, "Silvercoat Lion");
|
||||
|
||||
waitStackResolved(2, PhaseStep.PRECOMBAT_MAIN, playerB);
|
||||
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Cloudshift", EmptyNames.FACE_DOWN_CREATURE.toString());
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(2, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
// no life gain
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
|
||||
assertPermanentCount(playerB, "Qarsi High Priest", 1);
|
||||
|
||||
assertGraveyardCount(playerB, "Silvercoat Lion", 1);
|
||||
assertGraveyardCount(playerB, "Cloudshift", 1);
|
||||
|
||||
assertPermanentCount(playerB, "Lightning Bolt", 0);
|
||||
assertExileCount(playerB, "Lightning Bolt", 1);
|
||||
|
||||
assertHandCount(playerB, "Mountain", 1);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import mage.abilities.mana.ManaOptions;
|
|||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
|
@ -309,5 +310,35 @@ public class TappedForManaRelatedTest extends CardTestPlayerBase {
|
|||
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
|
||||
assertManaOptions("{B}{B}{B}{B}{B}", manaOptions);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void TestParadiseMantle() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
// Equipped creature has "{T}: Add one mana of any color."
|
||||
// Equip {1}
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Paradise Mantle", 1); // Creature {1}{B} 1/2
|
||||
|
||||
// Flying;
|
||||
// {2}, {untap}: Add one mana of any color.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Pili-Pala", 1); // Artifact Creature (1/1)
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip");
|
||||
addTarget(playerA, "Pili-Pala"); // Select a creature you control
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertAllCommandsUsed();
|
||||
|
||||
Permanent pp = getPermanent("Pili-Pala");
|
||||
Assert.assertTrue("Pili-Pala has 1 attachment", pp.getAttachments().size() == 1);
|
||||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
|
||||
assertManaOptions("{Any}", manaOptions);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue