Refactor: Several refactors that should be done found during implementing cards
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 940
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 160
Description
Leftover TODOs from #9328:
- [ ] Several very similar `MoveCounterFromTargetToTargetEffect` should be refactored to a common class
- [ ] Change cards to make use of new `SpellCastControllerTriggeredAbility`'s `fromZone` (e.g. Kami of Celebration, Sunbird's Invocation)
- [x] Make use of new non-token creature static filter
- [ ] Change Ob Nixilis, the Adversary to use standard Casualty ability rather than custom implementation
- [x] Refactor `TargetOfOpponentsSpellOrAbilityTriggeredAbility ` and `BecomesTargetControlledPermanentTriggeredAbility` into a single class for "Whenever {a} becomes the target of a {b}" that takes filters for both {a} and {b}.
- [x] ~~Refactor `MageObject.getColor(game)` so that it handles the intricacies of MDFC and split cards internally rather than needing to be wrapped externally.~~ Clean up and double check by https://github.com/magefree/mage/pull/9328#issuecomment-1255699247
- [ ] Refactor Replicate cost show the final cost of the spell at once when paying. Currently the replicate cost is only shown _after_ the regular cost has been paid.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the unchecked TODOs in this issue and the earlier work in #9328. The listed targets include MoveCounterFromTargetToTargetEffect, SpellCastControllerTriggeredAbility, Ob Nixilis's Casualty implementation, and replicate-cost payment behavior. Done requires resolving the selected refactors and updating the related card and ability behavior, but no specific files or tests are named.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- game-dev
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100