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

@ -32,8 +32,10 @@ public class PermanentToken extends PermanentImpl {
this.power = new MageInt(token.getPower().getModifiedBaseValue());
this.toughness = new MageInt(token.getToughness().getModifiedBaseValue());
this.copyFromToken(this.token, game, false); // needed to have at this time (e.g. for subtypes for entersTheBattlefield replacement effects)
// if transformed on ETB
if (this.token.isEntersTransformed()) {
TransformAbility.transformPermanent(this, this.token.getBackFace(), game, null);
TransformAbility.transformPermanent(this, game, null);
}
// token's ZCC must be synced with original token to keep abilities settings
@ -146,6 +148,10 @@ public class PermanentToken extends PermanentImpl {
@Override
public boolean isTransformable() {
// 701.28c
// If a spell or ability instructs a player to transform a permanent that
// isnt represented by a transforming token or a transforming double-faced card,
// nothing happens.
return token.getBackFace() != null;
}