* Renegade Krasis - Fixed that check if Renegade Krasis was evolved did not always work correctly.

This commit is contained in:
LevelX2 2015-11-07 21:21:03 +01:00
parent 9602c57bdf
commit f3e8a93316
5 changed files with 81 additions and 69 deletions

View file

@ -25,11 +25,11 @@
* 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.keywords;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import mage.filter.Filter;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
@ -37,15 +37,12 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
*
* @author LevelX2
*/
public class EvolveTest extends CardTestPlayerBase {
@Test
public void testCreatureComesIntoPlay() {
// Cloudfin Raptor gets one +1/+1 because Mindeye Drake comes into play
addCard(Zone.BATTLEFIELD, playerA, "Island", 5);
addCard(Zone.BATTLEFIELD, playerA, "Cloudfin Raptor", 1);
@ -70,7 +67,6 @@ public class EvolveTest extends CardTestPlayerBase {
public void testCreatureComesIntoPlayNoCounter() {
// Experiment One gets no counter because Kird Ape is 1/1 with no Forest in play
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
addCard(Zone.BATTLEFIELD, playerA, "Experiment One", 1);
@ -95,7 +91,6 @@ public class EvolveTest extends CardTestPlayerBase {
public void testCreatureComesStrongerIntoPlayCounter() {
// Experiment One gets a counter because Kird Ape is 2/2 with a Forest in play
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
addCard(Zone.BATTLEFIELD, playerA, "Forest", 1);
addCard(Zone.BATTLEFIELD, playerA, "Experiment One", 1);
@ -121,7 +116,6 @@ public class EvolveTest extends CardTestPlayerBase {
public void testEvolveWithMasterBiomance() {
// Experiment One gets a counter because Kird Ape is 2/2 with a Forest in play
addCard(Zone.BATTLEFIELD, playerA, "Forest", 1);
addCard(Zone.BATTLEFIELD, playerA, "Experiment One", 1);
addCard(Zone.BATTLEFIELD, playerA, "Master Biomancer", 1);
@ -145,20 +139,18 @@ public class EvolveTest extends CardTestPlayerBase {
assertPowerToughness(playerA, "Experiment One", 3, 3);
}
@Test
public void testMultipleCreaturesComeIntoPlay() {
// Cloudfin Raptor gets one +1/+1 because itself and other creatur return from exile
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 6);
addCard(Zone.BATTLEFIELD, playerA, "Judge's Familiar", 1);
addCard(Zone.BATTLEFIELD, playerA, "Cloudfin Raptor", 1);
addCard(Zone.HAND, playerA, "Mizzium Mortars", 1);
addCard(Zone.BATTLEFIELD, playerB, "Plains", 6);
addCard(Zone.HAND, playerB, "Banisher Priest", 2);
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Banisher Priest");
addTarget(playerB, "Cloudfin Raptor");
@ -174,7 +166,7 @@ public class EvolveTest extends CardTestPlayerBase {
assertLife(playerB, 20);
assertPermanentCount(playerB, "Banisher Priest", 0);
assertGraveyardCount(playerB, 2);
assertGraveyardCount(playerA, 1);
@ -182,26 +174,22 @@ public class EvolveTest extends CardTestPlayerBase {
assertPermanentCount(playerA, "Judge's Familiar", 1);
assertPowerToughness(playerA, "Cloudfin Raptor", 1, 2);
}
}
@Test
public void testMultipleCreaturesComeIntoPlaySuddenDisappearance() {
// Sudden Disappearance
// Sorcery {5}{W}
// Exile all nonland permanents target player controls. Return the exiled cards
// Exile all nonland permanents target player controls. Return the exiled cards
// to the battlefield under their owner's control at the beginning of the next end step.
// Battering Krasis (2/1) and Crocanura (1/3) get both a +1/+1 counter each other because they come into play at the same time
addCard(Zone.BATTLEFIELD, playerA, "Battering Krasis", 1);
addCard(Zone.BATTLEFIELD, playerA, "Crocanura", 1);
addCard(Zone.BATTLEFIELD, playerB, "Plains", 6);
addCard(Zone.HAND, playerB, "Sudden Disappearance", 2);
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Sudden Disappearance", playerA);
@ -210,7 +198,7 @@ public class EvolveTest extends CardTestPlayerBase {
assertLife(playerA, 20);
assertLife(playerB, 20);
assertGraveyardCount(playerB, 1);
assertGraveyardCount(playerA, 0);
@ -219,9 +207,58 @@ public class EvolveTest extends CardTestPlayerBase {
assertPowerToughness(playerA, "Battering Krasis", 3, 2);
assertPowerToughness(playerA, "Crocanura", 2, 4);
}
}
/*
* Renegade Krasis's ability when trigger it evolves is not triggered under
* case.
*
* I control Renegade Krasis and two Ivy Lane Denizen. (Renegade Krasis and
* one of Ivy Lane Denizen have a +1/+1 counter on it)
* I cast Adaptive Snapjaw.
* When it resolves, there are three abilities on going to stack,
* Renegade Krasis's Evolve Ability, two Ivy Lane Denizen ability.
* I take two Ivy Lane Denizen on to the stack and then Renegade Krasis's Evolve
* Ability, so resolving Renegade Krasis's Evolve Ability is first . (Maybe
* Ivy Lane Denizen's target is any.) When Renegade Krasis's Evolve Ability
* resolves, +1/+1 counter is placed on it, but doesn't triggers Renegade
* Krasis's second ability.
*/
@Test
public void testRenegadeKrasis() {
// Evolve (Whenever a creature enters the battlefield under your control, if that creature has greater power or toughness
// than this creature, put a +1/+1 counter on this creature.)
// Whenever Renegade Krasis evolves, put a +1/+1 counter on each other creature you control with a +1/+1 counter on it.
addCard(Zone.BATTLEFIELD, playerA, "Renegade Krasis", 1); // 3/2
addCard(Zone.BATTLEFIELD, playerA, "Ivy Lane Denizen", 1);
addCard(Zone.BATTLEFIELD, playerA, "Forest", 9);
// Whenever another green creature enters the battlefield under your control, put a +1/+1 counter on target creature.
addCard(Zone.HAND, playerA, "Ivy Lane Denizen", 1); // {3}{G} - Creature 2/3
// Evolve
addCard(Zone.HAND, playerA, "Adaptive Snapjaw", 1); // {4}{G} - Creature 6/2
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ivy Lane Denizen");
addTarget(playerA, "Ivy Lane Denizen");
setChoice(playerA, "Evolve");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Adaptive Snapjaw");
addTarget(playerA, "Adaptive Snapjaw");
addTarget(playerA, "Adaptive Snapjaw");
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertPermanentCount(playerA, "Renegade Krasis", 1);
assertPermanentCount(playerA, "Ivy Lane Denizen", 2);
assertPermanentCount(playerA, "Adaptive Snapjaw", 1);
assertPowerToughness(playerA, "Adaptive Snapjaw", 9, 5); // +2 from Ivys +1 from add to all with +1/+1 counter
assertPowerToughness(playerA, "Renegade Krasis", 5, 4); // +1 Evolve by Ivy +1 Evolve by Snapjaw
assertPowerToughness(playerA, "Ivy Lane Denizen", 2, 3, Filter.ComparisonScope.Any);
assertPowerToughness(playerA, "Ivy Lane Denizen", 5, 6, Filter.ComparisonScope.Any); // +1 from Other Ivy + 2 from Krasis
}
}