Mark copied tokens as copies of their copied object#14615
Open
matoro wants to merge 1 commit intomagefree:masterfrom
Open
Mark copied tokens as copies of their copied object#14615matoro wants to merge 1 commit intomagefree:masterfrom
matoro wants to merge 1 commit intomagefree:masterfrom
Conversation
I observed this crash when trying to perform the combo in this test (the
real combo casts Astral Dragon first, then Undercover Operative, but
reversing them still reproduces the issue and isn't infinite).
Applying this change seems to fix the issue, and makes Undercover
Operative behave identically to other clone cards that did not exhibit
the issue. The infinite combo still seems to function.
```
java.lang.ClassCastException: class mage.game.permanent.token.EmptyToken cannot be cast to class mage.game.permanent.Permanent (mage.game.permanent.token.EmptyToken and mage.game.permanent.Permanent are in unnamed module of loader java.net.URLClassLoader @3c98781a)
at mage.cards.u.UndercoverOperativeApplier.apply(UndercoverOperative.java:59)
at mage.abilities.effects.common.CreateTokenCopyTargetEffect.apply(CreateTokenCopyTargetEffect.java:218)
at mage.abilities.AbilityImpl.resolveMode(AbilityImpl.java:232)
at mage.abilities.AbilityImpl.resolve(AbilityImpl.java:216)
at mage.abilities.TriggeredAbilityImpl.resolve(TriggeredAbilityImpl.java:279)
at mage.game.stack.StackAbility.resolve(StackAbility.java:85)
at mage.game.GameImpl.resolve(GameImpl.java:1842)
at mage.game.GameImpl.playPriority(GameImpl.java:1763)
at mage.game.turn.Step.priority(Step.java:73)
at mage.game.turn.Phase.playStep(Phase.java:205)
at mage.game.turn.Phase.play(Phase.java:91)
at mage.game.turn.Turn.play(Turn.java:132)
at mage.game.GameImpl.playTurn(GameImpl.java:1180)
at mage.game.GameImpl.play(GameImpl.java:1087)
at mage.game.GameImpl.start(GameImpl.java:1063)
at mage.server.game.GameWorker.call(GameWorker.java:35)
at mage.server.game.GameWorker.call(GameWorker.java:16)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I observed this crash when trying to perform the combo in this test (the real combo casts Astral Dragon first, then Undercover Operative, but reversing them still reproduces the issue and isn't infinite).
Applying this change seems to fix the issue, and makes Undercover Operative behave identically to other clone cards that did not exhibit the issue. The infinite combo still seems to function.