mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
Fix EntersBattlefieldOneOrMoreTriggeredAbility (#12592)
* Apply fix for ZONE_CHANGE_GROUP events making tokens controlled by different players * Add test * Remove unused import * Fix implementation * Rewrite to use ZONE_CHANGE_BATCH * Fix OPPONENT case * Add default case * refactor to avoid using stream as local variable and use ZoneChangeEvents in filters * Fix typo
This commit is contained in:
parent
32042687fb
commit
c73cfebcd9
2 changed files with 50 additions and 28 deletions
|
|
@ -0,0 +1,30 @@
|
|||
package org.mage.test.cards.triggers;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author jimga150
|
||||
*/
|
||||
public class EntersBattlefieldOneOrMoreTriggerTest extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
public void testZoneChangeMulti() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Marneus Calgar", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Gor Muldrak, Amphinologist", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Marneus Calgar", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Memnite", 1);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(2, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Salamander Warrior Token", 1);
|
||||
assertPermanentCount(playerB, "Salamander Warrior Token", 1);
|
||||
|
||||
assertHandCount(playerA, 1);
|
||||
assertHandCount(playerB, 1);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue