Guile + opponent Reflections of Littjara
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 940
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 160
Description
Opponent cast Mirym, Sentinel Wurm while Reflections of littjara is in play naming Dragons. I have Guile in play and cast a counterspell. Then the game rolled back and this error came up.
Here is the log.
Game exception occurred:
java.lang.UnsupportedOperationException: Cards cannot be copied while on the Battlefield
Server version: 1.4.52-V7-beta2 (build: 2023-12-01 15:58)
Stack trace:
mage.game.GameState.copyCard(GameState.java:1488)
mage.game.GameImpl.copyCard(GameImpl.java:2027)
mage.game.stack.Spell.copySpell(Spell.java:833)
mage.game.stack.Spell.createSingleCopy(Spell.java:1109)
mage.game.stack.StackObjectImpl.createCopyOnStack(StackObjectImpl.java:163)
mage.abilities.effects.common.CopyTargetSpellEffect.apply(CopyTargetSpellEffect.java:90)
mage.abilities.AbilityImpl.resolveMode(AbilityImpl.java:192)
mage.abilities.AbilityImpl.resolve(AbilityImpl.java:176)
mage.abilities.TriggeredAbilityImpl.resolve(TriggeredAbilityImpl.java:172)
mage.game.stack.StackAbility.resolve(StackAbility.java:84)
mage.game.GameImpl.resolve(GameImpl.java:1722)
mage.game.GameImpl.playPriority(GameImpl.java:1647)
mage.game.turn.Step.priority(Step.java:67)
mage.game.turn.Phase.playStep(Phase.java:204)
mage.game.turn.Phase.play(Phase.java:90)
mage.game.turn.Turn.play(Turn.java:137)
mage.game.GameImpl.playTurn(GameImpl.java:1101)
mage.game.GameImpl.play(GameImpl.java:1008)
mage.game.GameImpl.start(GameImpl.java:984)
mage.server.game.GameWorker.call(GameWorker.java:34)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with mage.game.GameState.copyCard at GameState.java:1488 and follow the stack through GameImpl.copyCard, Spell.copySpell, and CopyTargetSpellEffect.apply. Reproduce the Guile and Reflections of Littjara interaction using the issue's sequence and log. Done means the game no longer throws while copying the spell and the rollback completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100