mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 20:32:06 -08:00
Fixed a bug that triggred abilities of permanents that were controlled by a player that is not the owner could sometime trigger for a wrong player (Fixes #271).
This commit is contained in:
parent
0751b934ac
commit
857da3a08a
5 changed files with 66 additions and 15 deletions
|
|
@ -53,9 +53,17 @@ public class UndyingTest extends CardTestPlayerBase {
|
|||
*/
|
||||
@Test
|
||||
public void testUndyingEvil() {
|
||||
// Elite Vanguard
|
||||
// Creature — Human Soldier 2/1
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Elite Vanguard");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3);
|
||||
// Last Gasp
|
||||
// Instant, 1B
|
||||
// Target creature gets -3/-3 until end of turn.
|
||||
addCard(Zone.HAND, playerA, "Last Gasp");
|
||||
// Undying Evil
|
||||
// Target creature gains undying until end of turn.
|
||||
// When it dies, if it had no +1/+1 counters on it, return it to the battlefield under its owner's control with a +1/+1 counter on it.)
|
||||
addCard(Zone.HAND, playerA, "Undying Evil");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Last Gasp", "Elite Vanguard");
|
||||
|
|
|
|||
|
|
@ -50,8 +50,19 @@ public class SorinLordOfInnistradTest extends CardTestPlayerBase {
|
|||
|
||||
@Test
|
||||
public void testCard3() {
|
||||
// Sorin, Lord of Innistrad English
|
||||
// Planeswalker — Sorin (Loyalty: 3), 2WB
|
||||
// +1: Put a 1/1 black Vampire creature token with lifelink onto the battlefield.
|
||||
// -2: You get an emblem with "Creatures you control get +1/+0."
|
||||
// -6: Destroy up to three target creatures and/or other planeswalkers. Return each card put into a graveyard this way to the battlefield under your control.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Sorin, Lord of Innistrad");
|
||||
// Craw Wurm
|
||||
// Creature — Wurm 6/4, 4GG
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Craw Wurm");
|
||||
// Angel of Mercy English
|
||||
// Creature — Angel 3/3, 4W (5)
|
||||
// Flying
|
||||
// When Angel of Mercy enters the battlefield, you gain 3 life.
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Angel of Mercy");
|
||||
|
||||
addCounters(1, PhaseStep.UPKEEP, playerA, "Sorin, Lord of Innistrad", CounterType.LOYALTY, 3);
|
||||
|
|
@ -62,8 +73,9 @@ public class SorinLordOfInnistradTest extends CardTestPlayerBase {
|
|||
assertPermanentCount(playerA, "Craw Wurm", 1);
|
||||
assertPermanentCount(playerA, "Angel of Mercy", 1);
|
||||
|
||||
assertLife(playerA, 23);
|
||||
|
||||
assertLife(playerB, 20);
|
||||
assertLife(playerA, 23);
|
||||
assertPermanentCount(playerA, "Sorin, Lord of Innistrad", 0);
|
||||
assertPermanentCount(playerB, "Craw Wurm", 0);
|
||||
assertPermanentCount(playerB, "Angel of Mercy", 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue