* Fixed a problem with P/T of permanets that transform back again to the original source card (fixes #6156).

This commit is contained in:
LevelX2 2020-01-09 08:25:29 +01:00
parent b366a83a45
commit 7ce7c2ad70
2 changed files with 35 additions and 0 deletions

View file

@ -4,6 +4,7 @@ package mage.abilities.effects.common;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.constants.Outcome;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -55,6 +56,11 @@ public class TransformSourceEffect extends OneShotEffect {
if (withoutTrigger) {
sourcePermanent.setTransformed(fromDayToNight);
} else {
if (sourcePermanent.isTransformed()) {
Card orgCard = game.getCard(source.getSourceId());
sourcePermanent.getPower().modifyBaseValue(orgCard.getPower().getValue());
sourcePermanent.getToughness().modifyBaseValue(orgCard.getToughness().getValue());
}
sourcePermanent.transform(game);
}
if (!game.isSimulation()) {