Shifting Woodland - fixed game error on usage with MDF cards (#13308)

This commit is contained in:
Wesley Mauk 2025-02-06 23:12:30 -05:00 committed by GitHub
parent 25e4930bd5
commit b31a6c834a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 1 deletions

View file

@ -12,6 +12,7 @@ import mage.abilities.mana.GreenManaAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacedCard;
import mage.constants.*;
import mage.filter.FilterCard;
import mage.filter.FilterPermanent;
@ -21,6 +22,7 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.PermanentCard;
import mage.target.common.TargetCardInYourGraveyard;
import mage.util.CardUtil;
import mage.util.functions.EmptyCopyApplier;
import java.util.UUID;
@ -91,7 +93,7 @@ class ShiftingWoodlandCopyEffect extends OneShotEffect {
if (copyFromCard == null) {
return false;
}
Permanent blueprint = new PermanentCard(copyFromCard, source.getControllerId(), game);
Permanent blueprint = new PermanentCard(CardUtil.getDefaultCardSideForBattlefield(game, copyFromCard), source.getControllerId(), game);
game.copyPermanent(Duration.EndOfTurn, blueprint, sourcePermanent.getId(), source, new EmptyCopyApplier());
return true;
}

View file

@ -151,4 +151,24 @@ public class ShiftingWoodlandTest extends CardTestPlayerBase {
assertLife(playerB, 20 - 3 - 1);
assertGraveyardCount(playerA, woodland, 1);
}
@Test
public void test_Copy_MDFC() {
setStrictChooseMode(true);
addCard(Zone.BATTLEFIELD, playerA, "Yavimaya Coast", 4); // to be sure not to activate Woodland
addCard(Zone.BATTLEFIELD, playerA, woodland);
addCard(Zone.GRAVEYARD, playerA, "Drowner of Truth");
addCard(Zone.GRAVEYARD, playerA, "Plains");
addCard(Zone.GRAVEYARD, playerA, "Memnite");
addCard(Zone.GRAVEYARD, playerA, "Divination");
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {G}. {this} deals 1 damage to you.", 4);
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "<i>Delirium</i> &mdash; {2}{G}{G}:", "Drowner of Truth");
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertPermanentCount(playerA, "Drowner of Truth", 1);
}
}