Fixing aura token creation (#10858)

* rework aura token creation

* add missing copy constructor

* add message for token if unable to be created

* add a few extra role tests
This commit is contained in:
Evan Kranzler 2023-08-18 13:25:48 -04:00 committed by GitHub
parent 93cfb86a0f
commit b892562b95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 148 additions and 63 deletions

View file

@ -314,7 +314,7 @@ public class Spell extends StackObjectImpl implements Card {
if (isCopy()) {
Token token = CopyTokenFunction.createTokenCopy(card, game, this);
// The token that a resolving copy of a spell becomes isnt said to have been created. (2020-09-25)
if (token.putOntoBattlefield(1, game, ability, getControllerId(), false, false, null, false)) {
if (token.putOntoBattlefield(1, game, ability, getControllerId(), false, false, null, null, false)) {
permId = token.getLastAddedTokenIds().stream().findFirst().orElse(null);
flag = true;
} else {
@ -381,7 +381,7 @@ public class Spell extends StackObjectImpl implements Card {
} else if (isCopy()) {
Token token = CopyTokenFunction.createTokenCopy(card, game, this);
// The token that a resolving copy of a spell becomes isnt said to have been created. (2020-09-25)
token.putOntoBattlefield(1, game, ability, getControllerId(), false, false, null, false);
token.putOntoBattlefield(1, game, ability, getControllerId(), false, false, null, null, false);
return true;
} else {
return controller.moveCards(card, Zone.BATTLEFIELD, ability, game, false, faceDown, false, null);