DayNightTest - fix testCopy null secondCardFace

* pulling directly from game cards is grabbing a card half and not the main card
This commit is contained in:
jmlundeen 2025-12-05 10:45:22 -06:00
parent 5b2629f0dc
commit 4f88266893

View file

@ -1,6 +1,7 @@
package org.mage.test.cards.abilities.keywords; package org.mage.test.cards.abilities.keywords;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.DoubleFacedCard;
import mage.constants.PhaseStep; import mage.constants.PhaseStep;
import mage.constants.Zone; import mage.constants.Zone;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -67,7 +68,7 @@ public class DayNightTest extends CardTestPlayerBase {
addCard(Zone.HAND, playerA, ruffian); addCard(Zone.HAND, playerA, ruffian);
runCode("copy", 1, PhaseStep.PRECOMBAT_MAIN, playerA, (info, player, game) -> { runCode("copy", 1, PhaseStep.PRECOMBAT_MAIN, playerA, (info, player, game) -> {
Card card = currentGame.getCards().stream().filter(c -> c.getName().equals(ruffian)).findFirst().orElse(null); Card card = currentGame.getCards().stream().filter(c -> c.getName().equals(ruffian) && c instanceof DoubleFacedCard).findFirst().orElse(null);
Assert.assertNotNull(card); Assert.assertNotNull(card);
Assert.assertNotNull(card.getSecondCardFace()); Assert.assertNotNull(card.getSecondCardFace());