forked from External/mage
Merge fix
This commit is contained in:
parent
d17df585c5
commit
01caeed298
4 changed files with 35 additions and 11 deletions
|
|
@ -20,9 +20,8 @@ public class PermanentToken extends PermanentImpl {
|
|||
|
||||
protected Token token;
|
||||
|
||||
public PermanentToken(Token token, UUID controllerId, String expansionSetCode, Game game) {
|
||||
public PermanentToken(Token token, UUID controllerId, Game game) {
|
||||
super(controllerId, controllerId, token.getName());
|
||||
this.expansionSetCode = expansionSetCode;
|
||||
this.token = token.copy();
|
||||
this.token.getAbilities().newOriginalId(); // neccessary if token has ability like DevourAbility()
|
||||
this.token.getAbilities().setSourceId(objectId);
|
||||
|
|
@ -40,7 +39,6 @@ public class PermanentToken extends PermanentImpl {
|
|||
public PermanentToken(final PermanentToken permanent) {
|
||||
super(permanent);
|
||||
this.token = permanent.token.copy();
|
||||
this.expansionSetCode = permanent.expansionSetCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ public abstract class TokenImpl extends MageObjectImpl implements Token {
|
|||
for (int i = 0; i < amount; i++) {
|
||||
// TODO: add random setTokenType here?
|
||||
// use event.getPlayerId() as controller because it can be replaced by replacement effect
|
||||
PermanentToken newPermanent = new PermanentToken(token, event.getPlayerId(), setCode, game);
|
||||
PermanentToken newPermanent = new PermanentToken(token, event.getPlayerId(), game);
|
||||
game.getState().addCard(newPermanent);
|
||||
needTokens.add(newPermanent);
|
||||
game.getPermanentsEntering().put(newPermanent.getId(), newPermanent);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue