magefree / mage

Magic Another Game Engine
http://xmage.today
MIT License
1.84k stars 759 forks source link

Guile + opponent Reflections of Littjara #11530

Open jmba98 opened 9 months ago

jmba98 commented 9 months ago

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)

xenohedron commented 9 months ago

[[Miirym, Sentinel Wyrm]] [[Reflections of Littjara]] [[Guile]]

github-actions[bot] commented 9 months ago

Miirym, Sentinel Wyrm - (Gatherer) (Scryfall) (EDHREC)

{3}{G}{U}{R} Legendary Creature — Dragon Spirit 6/6 Flying, ward {2} Whenever another nontoken Dragon enters the battlefield under your control, create a token that's a copy of it, except the token isn't legendary.

Reflections of Littjara - (Gatherer) (Scryfall) (EDHREC)

{4}{U} Enchantment As Reflections of Littjara enters the battlefield, choose a creature type. Whenever you cast a spell of the chosen type, copy that spell. (A copy of a permanent spell becomes a token.)

Guile - (Gatherer) (Scryfall) (EDHREC)

{3}{U}{U}{U} Creature — Elemental Incarnation 6/6 Guile can't be blocked except by three or more creatures. If a spell or ability you control would counter a spell, instead exile that spell and you may play that card without paying its mana cost. When Guile is put into a graveyard from anywhere, shuffle it into its owner's library.

jeffwadsworth commented 8 months ago

Yeah, the spell object exists, but the LKI on it is null. The game state doesn't even know its zone. CopyTargetSpellEffect() I assume that it is due to the targeted spell being a copy. Interesting bug.