mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
Shifting Woodland - fixed game error on usage with MDF cards (#13308)
This commit is contained in:
parent
25e4930bd5
commit
b31a6c834a
2 changed files with 23 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ import mage.abilities.mana.GreenManaAbility;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.ModalDoubleFacedCard;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
|
@ -21,6 +22,7 @@ import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.game.permanent.PermanentCard;
|
import mage.game.permanent.PermanentCard;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
import mage.util.CardUtil;
|
||||||
import mage.util.functions.EmptyCopyApplier;
|
import mage.util.functions.EmptyCopyApplier;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -91,7 +93,7 @@ class ShiftingWoodlandCopyEffect extends OneShotEffect {
|
||||||
if (copyFromCard == null) {
|
if (copyFromCard == null) {
|
||||||
return false;
|
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());
|
game.copyPermanent(Duration.EndOfTurn, blueprint, sourcePermanent.getId(), source, new EmptyCopyApplier());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -151,4 +151,24 @@ public class ShiftingWoodlandTest extends CardTestPlayerBase {
|
||||||
assertLife(playerB, 20 - 3 - 1);
|
assertLife(playerB, 20 - 3 - 1);
|
||||||
assertGraveyardCount(playerA, woodland, 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> — {2}{G}{G}:", "Drowner of Truth");
|
||||||
|
|
||||||
|
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertPermanentCount(playerA, "Drowner of Truth", 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue