mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
* Sidisi, Brood Tyrant - Fixed that the second ability did wrongly trigger, if Sidisi left battlefield before first ability did resolve.
This commit is contained in:
parent
4785ebd5f8
commit
9aa02f3d6f
14 changed files with 119 additions and 32 deletions
|
|
@ -99,7 +99,7 @@ public class MorphTest extends CardTestPlayerBase {
|
|||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Pine Walker");
|
||||
setChoice(playerA, "Yes"); // cast it face down as 2/2 creature
|
||||
|
||||
attack(3, playerA, "");
|
||||
attack(3, playerA, "face down creature");
|
||||
|
||||
activateAbility(3, PhaseStep.POSTCOMBAT_MAIN, playerA, "{4}{G}: Turn this face-down permanent face up.");
|
||||
setStopAt(3, PhaseStep.END_TURN);
|
||||
|
|
@ -133,8 +133,8 @@ public class MorphTest extends CardTestPlayerBase {
|
|||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Icefeather Aven");
|
||||
setChoice(playerA, "Yes"); // cast it face down as 2/2 creature
|
||||
|
||||
attack(3, playerA, "");
|
||||
attack(3, playerA, "");
|
||||
attack(3, playerA, "face down creature");
|
||||
attack(3, playerA, "face down creature");
|
||||
activateAbility(3, PhaseStep.DECLARE_BLOCKERS, playerA, "{1}{G}{U}: Turn this face-down permanent face up.");
|
||||
setChoice(playerA, "No"); // Don't use return permanent to hand effect
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
public class DeflectingPalmTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* Tests if a damage spell is selected as source the damge is prevented and is dealt to the controller of the damage spell
|
||||
* Tests if a damage spell is selected as source the damage is prevented and is dealt to the controller of the damage spell
|
||||
*/
|
||||
@Test
|
||||
public void testPreventDamageFromSpell() {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,10 @@ public class GutterGrimeTest extends CardTestPlayerBase {
|
|||
|
||||
@Test
|
||||
public void testScenario2() {
|
||||
// Creature tokens you control get +1/+1 and have vigilance.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Intangible Virtue");
|
||||
// Whenever a nontoken creature you control dies, put a slime counter on Gutter Grime, then put a green Ooze creature token onto
|
||||
// the battlefield with "This creature's power and toughness are each equal to the number of slime counters on Gutter Grime."
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Gutter Grime");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Runeclaw Bear", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||
|
|
@ -44,8 +47,15 @@ public class GutterGrimeTest extends CardTestPlayerBase {
|
|||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", "Runeclaw Bear");
|
||||
|
||||
setStopAt(3, PhaseStep.END_TURN);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, "Runeclaw Bear", 1);
|
||||
assertGraveyardCount(playerA, "Lightning Bolt", 1);
|
||||
assertPermanentCount(playerA, "Gutter Grime", 1);
|
||||
assertPermanentCount(playerA, "Intangible Virtue", 1);
|
||||
|
||||
assertPermanentCount(playerA, "Ooze", 1);
|
||||
assertPowerToughness(playerA, "Ooze", 2, 2, Filter.ComparisonScope.Any);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ public class ServantOfTheScaleTest extends CardTestPlayerBase {
|
|||
assertPermanentCount(playerA, "Silvercoat Lion", 1);
|
||||
assertPowerToughness(playerA, "Silvercoat Lion", 3,3);
|
||||
|
||||
assertGraveyardCount(playerB, "Lightning Bolt", 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package org.mage.test.cards.triggers.dies;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class SidisiBroodTyrantTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* Tests that if Sidisi, Brood Tyrant leaves the battlefield
|
||||
* before it's first ability resolves, there will be no Zombie token added to the battlefield
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
public void testDiesTriggeredAbility() {
|
||||
// {1}{B}{G}{U}
|
||||
// Whenever Sidisi, Brood Tyrant enters the battlefield or attacks, put the top three cards of your library into your graveyard
|
||||
// Whenever one or more creature cards are put into your graveyard from your library, put a 2/2 black Zombie creature token onto the battlefield.
|
||||
addCard(Zone.HAND, playerA, "Sidisi, Brood Tyrant");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||
addCard(Zone.LIBRARY, playerA, "Silvercoat Lion", 2);
|
||||
skipInitShuffling();
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Mountain");
|
||||
addCard(Zone.HAND, playerB, "Lightning Bolt");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Sidisi, Brood Tyrant");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", "Sidisi, Brood Tyrant", "Whenever {this} enters the battlefield");
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerB, "Lightning Bolt", 1);
|
||||
assertGraveyardCount(playerA, "Sidisi, Brood Tyrant", 1);
|
||||
|
||||
assertGraveyardCount(playerA, 4);
|
||||
assertPermanentCount(playerA, "Zombie", 0);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ public class LastKnownInformationTest extends CardTestPlayerBase {
|
|||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Bolt", "Safehold Elite");
|
||||
// choose triggered ability order
|
||||
playerA.addChoice("When enchanted creature dies");
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Bolt", "Safehold Elite", "When enchanted creature dies, put X 1/1 red and white Soldier creature token with haste onto the battlefield, where X is its power");
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Bolt", "Safehold Elite", "When enchanted creature dies");
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue