magefree / magefree/mage

Breaking of the Fellowship raise game error on usage (TargetPermanent class error)

Open
#13,831 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

AI bug
Dominant language
Java
Stars
2.4k
Forks
940
Avg merge
2d 12h
Merged PRs (30d)
160

Description

Error stack:

Caused by: java.lang.ClassCastException: mage.target.TargetPermanent cannot be cast to mage.target.common.TargetCreaturePermanent
	at mage.cards.b.BreakingOfTheFellowshipFirstTarget.addTarget(BreakingOfTheFellowship.java:99)
	at mage.target.TargetImpl.getTargetOptions(TargetImpl.java:634)
	at mage.players.PlayerImpl.addTargetOptions(PlayerImpl.java:4570)
	at mage.players.PlayerImpl.getPlayableOptions(PlayerImpl.java:4522)
	at mage.player.ai.SimulatedPlayer2.simulateOptions(SimulatedPlayer2.java:114)
	at mage.player.ai.SimulatedPlayer2.simulatePriority(SimulatedPlayer2.java:79)
	at mage.player.ai.ComputerPlayer6.simulatePriority(ComputerPlayer6.java:503)
	at mage.player.ai.ComputerPlayer6.addActions(ComputerPlayer6.java:287)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at mage/cards/b/BreakingOfTheFellowship.java line 99 and inspect how addTarget interacts with mage/target/TargetImpl.java in getTargetOptions. Reproduce usage of Breaking of the Fellowship and trace the target type mismatch; done means the usage no longer raises the reported ClassCastException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
game-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.