Add unit test demonstrating Amplify bug (#6778)

* Add unit test demonstrating Amplify bug

Recreate https://github.com/magefree/mage/issues/6776.

* Update AmplifyTest.java

* Update AmplifyTest.java
This commit is contained in:
SpikesCafe-google 2020-07-03 16:48:58 -04:00 committed by GitHub
parent 68f4d67600
commit 8e819ee614
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,6 +3,7 @@ package org.mage.test.cards.abilities.keywords;
import mage.constants.PhaseStep; import mage.constants.PhaseStep;
import mage.constants.Zone; import mage.constants.Zone;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase; import org.mage.test.serverside.base.CardTestPlayerBase;
@ -90,4 +91,32 @@ public class AmplifyTest extends CardTestPlayerBase {
assertPowerToughness(playerB, "Kilnmouth Dragon", 8,8); // 5 + 3 from Amplify assertPowerToughness(playerB, "Kilnmouth Dragon", 8,8); // 5 + 3 from Amplify
} }
/**
* Tests if a creature with Amplify is able to select itself if it's put
* onto the battlefield from hand (without casting).
*
* TODO: Remove @Ignore when https://github.com/magefree/mage/issues/6776 is fixed.
*/
@Test
@Ignore
public void testAmplifyPutOntoBattlefieldFromHand() {
// Creature Dragon - Dragon 5/5 {5}{R}{R}
// Amplify 3 (As this creature enters the battlefield, put three +1/+1 counters on it for each Dragon card you reveal in your hand.)
// {T}: Kilnmouth Dragon deals damage equal to the number of +1/+1 counters on it to any target
addCard(Zone.HAND, playerA, "Kilnmouth Dragon", 1);
addCard(Zone.HAND, playerA, "Through the Breach", 1);
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Through the Breach");
setChoice(playerA, "Yes"); // Put a creature into play with Through the Breach?
addTarget(playerA, "Kilnmouth Dragon");
setChoice(playerA, "Yes"); // Reveal cards to Amplify?
addTarget(playerA, "Kilnmouth Dragon");
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertPermanentCount(playerA, "Kilnmouth Dragon", 1);
assertPowerToughness(playerA, "Kilnmouth Dragon", 5,5); // 5 + 0 from Amplify
}
} }