forked from External/mage
* 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:
parent
feb17320c5
commit
bb15176a84
5 changed files with 87 additions and 12 deletions
|
|
@ -36,7 +36,6 @@ import mage.constants.SubType;
|
|||
import mage.constants.SuperType;
|
||||
import mage.game.permanent.PermanentCard;
|
||||
import mage.game.permanent.PermanentToken;
|
||||
import mage.game.permanent.token.TokenImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
/**
|
||||
|
|
@ -110,8 +109,8 @@ public class CopyTokenFunction implements Function<Token, Card> {
|
|||
|
||||
for (Ability ability0 : sourceObj.getAbilities()) {
|
||||
Ability ability = ability0.copy();
|
||||
ability.newId();
|
||||
ability.setSourceId(target.getId());
|
||||
ability.newOriginalId(); // The token is independant from the copy from object so it need a new original Id, otherwise there are problems to check for created continuous effects to check if the source (the Token) has still this ability
|
||||
|
||||
target.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue