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:
jimga150 2024-07-30 00:39:01 -04:00 committed by GitHub
parent 32042687fb
commit c73cfebcd9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 50 additions and 28 deletions

View file

@ -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);
}
}