* Fixed token ability (id handling) and token cardType (reset was not correctly done) handling (this fixed problems with copying Planeswalker with Helm of the Host).

This commit is contained in:
LevelX2 2018-05-07 00:44:32 +02:00
parent feb17320c5
commit bb15176a84
5 changed files with 87 additions and 12 deletions

View file

@ -46,7 +46,7 @@ public class PermanentToken extends PermanentImpl {
super(controllerId, controllerId, token.getName());
this.expansionSetCode = expansionSetCode;
this.token = token.copy();
this.token.getAbilities().newId(); // neccessary if token has ability like DevourAbility()
this.token.getAbilities().newOriginalId(); // neccessary if token has ability like DevourAbility()
this.token.getAbilities().setSourceId(objectId);
this.power.modifyBaseValue(token.getPower().getBaseValueModified());
this.toughness.modifyBaseValue(token.getToughness().getBaseValueModified());
@ -84,7 +84,8 @@ public class PermanentToken extends PermanentImpl {
for (ManaCost cost : token.getManaCost()) {
this.getManaCost().add(cost.copy());
}
this.cardType = token.getCardType();
this.cardType.clear();
this.cardType.addAll(token.getCardType());
this.color = token.getColor(game).copy();
this.frameColor = token.getFrameColor(game);
this.frameStyle = token.getFrameStyle();