magefree / magefree/mage

Flashbacking Cabal Therapy resulted in a bug

Open
#11,676 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
2.4k
Forks
940
Avg merge
2d 12h
Merged PRs (30d)
160

Description

Game exception occurred:

java.lang.IllegalArgumentException: Wrong code usage. Choices must contains some values
Server version: 1.4.52-V7-beta5 (build: 2023-12-23 13:50)
Stack trace:
mage.player.human.HumanPlayer.choose(HumanPlayer.java:581)
mage.abilities.effects.common.ChooseACardNameEffect$TypeOfName.getChoice(ChooseACardNameEffect.java:65)
mage.abilities.effects.common.ChooseACardNameEffect$TypeOfName.getChoice(ChooseACardNameEffect.java:54)
mage.abilities.effects.common.ChooseACardNameEffect.apply(ChooseACardNameEffect.java:131)
mage.abilities.AbilityImpl.resolveMode(AbilityImpl.java:192)
mage.abilities.AbilityImpl.resolve(AbilityImpl.java:179)
mage.game.stack.Spell.resolve(Spell.java:295)
mage.game.GameImpl.resolve(GameImpl.java:1734)
mage.game.GameImpl.playPriority(GameImpl.java:1659)
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:1112)
mage.game.GameImpl.play(GameImpl.java:1019)
mage.game.GameImpl.start(GameImpl.java:995)
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.abilities.effects.common.ChooseACardNameEffect.java and the choice handling in mage.player.human.HumanPlayer.java, using the reported Cabal Therapy flashback scenario as the reproduction. Trace why the choice list is empty when the effect resolves. Done means the scenario no longer raises the reported IllegalArgumentException and presents a valid choice.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.