mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
* Create a token that's a copy - fixed that some cards can cause the game error with MDF cards (example: Haunting Imitation)
This commit is contained in:
parent
2355dfead4
commit
cbfdb7896e
5 changed files with 9 additions and 5 deletions
|
@ -26,6 +26,7 @@ import mage.game.Game;
|
|||
import mage.game.permanent.PermanentCard;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.targetpointer.FixedTargets;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -88,7 +89,7 @@ class DollhouseOfHorrorsEffect extends OneShotEffect {
|
|||
source.getControllerId(), CardType.ARTIFACT, false, 1, false,
|
||||
false, null, 0, 0, false
|
||||
);
|
||||
effect.setSavedPermanent(new PermanentCard(card, source.getControllerId(), game));
|
||||
effect.setSavedPermanent(new PermanentCard(CardUtil.getDefaultCardSideForBattlefield(game, card), source.getControllerId(), game));
|
||||
effect.setAdditionalSubType(SubType.CONSTRUCT);
|
||||
effect.addAdditionalAbilities(new SimpleStaticAbility(new BoostSourceEffect(
|
||||
xValue,
|
||||
|
|
|
@ -12,6 +12,7 @@ import mage.constants.Zone;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.PermanentCard;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -87,7 +88,7 @@ class HauntingImitationEffect extends OneShotEffect {
|
|||
);
|
||||
effect.setAdditionalSubType(SubType.SPIRIT);
|
||||
for (Card card : cards.getCards(game)) {
|
||||
effect.setSavedPermanent(new PermanentCard(card, source.getControllerId(), game));
|
||||
effect.setSavedPermanent(new PermanentCard(CardUtil.getDefaultCardSideForBattlefield(game, card), source.getControllerId(), game));
|
||||
effect.apply(game, source);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -21,6 +21,7 @@ import mage.filter.predicate.permanent.TokenPredicate;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.PermanentCard;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
@ -101,7 +102,7 @@ class MyrkulLordOfBonesEffect extends OneShotEffect {
|
|||
}
|
||||
player.moveCards(card, Zone.EXILED, source, game);
|
||||
return new CreateTokenCopyTargetEffect().setSavedPermanent(
|
||||
new PermanentCard(card, source.getControllerId(), game)
|
||||
new PermanentCard(CardUtil.getDefaultCardSideForBattlefield(game, card), source.getControllerId(), game)
|
||||
).setPermanentModifier((token, g) -> {
|
||||
token.getCardType().clear();
|
||||
token.addCardType(CardType.ENCHANTMENT);
|
||||
|
|
|
@ -25,6 +25,7 @@ import mage.players.Player;
|
|||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.targetadjustment.TargetAdjuster;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -108,7 +109,7 @@ class TamiyoCompleatedSageEffect extends OneShotEffect {
|
|||
}
|
||||
player.moveCards(card, Zone.EXILED, source, game);
|
||||
return new CreateTokenCopyTargetEffect().setSavedPermanent(
|
||||
new PermanentCard(card, source.getControllerId(), game)
|
||||
new PermanentCard(CardUtil.getDefaultCardSideForBattlefield(game, card), source.getControllerId(), game)
|
||||
).apply(game, source);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ class TawnosSolemnSurvivorEffect extends OneShotEffect {
|
|||
if (card == null) {
|
||||
return false;
|
||||
}
|
||||
Permanent permanent = new PermanentCard(card, source.getControllerId(), game);
|
||||
Permanent permanent = new PermanentCard(CardUtil.getDefaultCardSideForBattlefield(game, card), source.getControllerId(), game);
|
||||
return new CreateTokenCopyTargetEffect(
|
||||
null, CardType.ARTIFACT, false
|
||||
).setSavedPermanent(permanent).apply(game, source);
|
||||
|
|
Loading…
Reference in a new issue