mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 07:22:03 -08:00
Devs: added docs and todo about short living LKI, LKI and current problems;
This commit is contained in:
parent
107c10fd2c
commit
83017e3c51
10 changed files with 79 additions and 19 deletions
|
|
@ -17,7 +17,7 @@ public class GoblinWelderTest extends CardTestPlayerBase {
|
|||
private static final String relic = "Darksteel Relic";
|
||||
private static final String aspirant = "Blood Aspirant";
|
||||
|
||||
@Ignore
|
||||
@Ignore // TODO: related to problems with dies triggers and short living LKI, see TriggeredAbilityImpl for details
|
||||
@Test
|
||||
public void testSacrificeDiesTrigger() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, welder);
|
||||
|
|
@ -25,10 +25,15 @@ public class GoblinWelderTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, aspirant);
|
||||
addCard(Zone.GRAVEYARD, playerA, relic);
|
||||
|
||||
addTarget(playerA, relic);
|
||||
addTarget(playerA, wurmcoil);
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}:");
|
||||
addTarget(playerA, wurmcoil);
|
||||
addTarget(playerA, relic);
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, true);
|
||||
// must have 2 dies triggers on stack: from source and from another, but it have only from another
|
||||
setChoice(playerA, "Whenever you sacrifice a permanent"); // select from 2 triggers
|
||||
checkStackSize("check triggers", 1, PhaseStep.PRECOMBAT_MAIN, playerA, 2);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
|
@ -36,6 +41,6 @@ public class GoblinWelderTest extends CardTestPlayerBase {
|
|||
assertGraveyardCount(playerA, wurmcoil, 1);
|
||||
assertPermanentCount(playerA, relic, 1);
|
||||
assertCounterCount(aspirant, CounterType.P1P1, 1);
|
||||
assertPermanentCount(playerA, "Wurm", 2); // TODO: currently fails here
|
||||
assertPermanentCount(playerA, "Wurm", 2);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package org.mage.test.cards.triggers.dies;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
|
|
@ -7,9 +6,8 @@ import org.junit.Test;
|
|||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author noxx
|
||||
*
|
||||
* <p>
|
||||
* Whenever Blood Artist or another creature dies, target player loses 1 life
|
||||
* and you gain 1 life.
|
||||
*/
|
||||
|
|
@ -30,11 +28,20 @@ public class BloodArtistTest extends CardTestPlayerBase {
|
|||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Bloodflow Connoisseur", 1);
|
||||
|
||||
// 2x blood artist, kill one of it and get 3x dies triggers
|
||||
// from living artist: 2x triggers
|
||||
// from killed artist: 1x trigger
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", "Blood Artist");
|
||||
setChoice(playerA, "Whenever {this} or another creature"); // 2x dies triggers
|
||||
addTarget(playerA, playerB, 2); // targets for 2x triggers
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", "Bloodflow Connoisseur");
|
||||
addTarget(playerA, playerB); // targets for 1x trigger (from living artist)
|
||||
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertLife(playerA, 23);
|
||||
assertLife(playerB, 17);
|
||||
|
|
@ -53,11 +60,15 @@ public class BloodArtistTest extends CardTestPlayerBase {
|
|||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Pillarfield Ox", 1);
|
||||
|
||||
// sac 2x and gen 2x dies triggers
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Bone Splinters", "Pillarfield Ox");
|
||||
setChoice(playerA, "Silvercoat Lion");
|
||||
setChoice(playerA, "Silvercoat Lion"); // sacrifice for cost
|
||||
addTarget(playerA, playerB, 2);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertGraveyardCount(playerA, "Bone Splinters", 1);
|
||||
assertGraveyardCount(playerA, "Silvercoat Lion", 1);
|
||||
|
|
@ -77,11 +88,15 @@ public class BloodArtistTest extends CardTestPlayerBase {
|
|||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Pillarfield Ox", 1);
|
||||
|
||||
// sac blood artist as a cost and trigger 1x
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Bone Splinters", "Pillarfield Ox");
|
||||
setChoice(playerA, "Blood Artist");
|
||||
setChoice(playerA, "Blood Artist"); // sacrifice for cost
|
||||
addTarget(playerA, playerB); // dies trigger with lose life
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertGraveyardCount(playerA, "Bone Splinters", 1);
|
||||
assertGraveyardCount(playerA, "Blood Artist", 1);
|
||||
|
|
@ -104,13 +119,17 @@ public class BloodArtistTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerB, "Pillarfield Ox", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1);
|
||||
|
||||
// sac blood artist for cost, trigger 1x BUT remove blood artist before trigger resolve
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Bone Splinters", "Pillarfield Ox");
|
||||
setChoice(playerA, "Blood Artist");
|
||||
// Blood Artist may no longer trigger from destroyed creature because already in the graveyard
|
||||
setChoice(playerA, "Blood Artist"); // sacrifice for cost
|
||||
addTarget(playerA, playerB); // dies trigger with lose life, but it will be fizzled
|
||||
// remove boold artist first - Blood Artist may no longer trigger from destroyed creature because already in the graveyard
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Terror", "Silvercoat Lion", "Bone Splinters");
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertGraveyardCount(playerA, "Bone Splinters", 1);
|
||||
assertGraveyardCount(playerA, "Terror", 1);
|
||||
|
|
|
|||
|
|
@ -27,8 +27,12 @@ public class OmnathLocusOfRageTest extends CardTestPlayerBase {
|
|||
addCard(Zone.HAND, playerB, "Diabolic Edict", 1); // {1}{B}
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Swamp", 2);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Diabolic Edict", playerA);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Diabolic Edict");
|
||||
addTarget(playerB, playerA);
|
||||
addTarget(playerA, "Omnath, Locus of Rage"); // sacrifice target
|
||||
addTarget(playerA, playerB); // target for dies trigger with damage
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
|
@ -55,7 +59,9 @@ public class OmnathLocusOfRageTest extends CardTestPlayerBase {
|
|||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", "Lightning Elemental"); // Dying Lightning Elemental does no longer trigger ability of Omnath
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Blastfire Bolt", "Omnath, Locus of Rage");
|
||||
addTarget(playerA, playerB); // target for dies trigger with damage
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
|
@ -67,7 +73,6 @@ public class OmnathLocusOfRageTest extends CardTestPlayerBase {
|
|||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 17);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -84,6 +89,7 @@ public class OmnathLocusOfRageTest extends CardTestPlayerBase {
|
|||
setChoice(playerB, "Green");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Stave Off", "Silvercoat Lion");
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue