Investigate custom target classes
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 940
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 160
Description
As noticed in 2d625f0 - many overrides of `canTarget()` ought to be reviewed and cleaned if possible
- Use an ObjectSourcePlayer predicate and standard filter logic instead of custom target class, if no dependence on other targets
- Maybe can create some shared logic for effects where one target depends on another target (e.g. shared type, same controller, lesser mana value, etc.)
- If `canTarget()` override is needed, generally must also override `possibleTargets()`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the card classes that override canTarget() and checking their possibleTargets() implementations. Compare each override with ObjectSourcePlayer predicates and standard filter logic, including effects with dependencies between targets. Done means unnecessary custom target classes are cleaned up, shared logic is identified where appropriate, and required possibleTargets() overrides remain consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- game-dev
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100