Copy abilities - fixed wrong copy of transformed tokens like Incubator/Phyrexian (related to #11535, #11307, #10801, #10263);

This commit is contained in:
Oleg Agafonov 2023-12-10 14:49:47 +04:00
parent 50fd029c3b
commit 00a7cc645d
7 changed files with 273 additions and 28 deletions

View file

@ -1972,9 +1972,12 @@ public abstract class GameImpl implements Game {
// if it was no copy of copy take the target itself
if (newBluePrint == null) {
newBluePrint = copyFromPermanent.copy();
// reset to original characteristics
newBluePrint.reset(this);
//getState().addCard(permanent);
// workaround to find real copyable characteristics of transformed/facedown/etc permanents
if (copyFromPermanent.isMorphed()
|| copyFromPermanent.isManifested()
|| copyFromPermanent.isFaceDown(this)) {
@ -1982,7 +1985,7 @@ public abstract class GameImpl implements Game {
}
newBluePrint.assignNewId();
if (copyFromPermanent.isTransformed()) {
TransformAbility.transformPermanent(newBluePrint, newBluePrint.getSecondCardFace(), this, source);
TransformAbility.transformPermanent(newBluePrint,this, source);
}
if (copyFromPermanent.isPrototyped()) {
Abilities<Ability> abilities = copyFromPermanent.getAbilities();