Rework RemoveCounterCost
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 940
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 160
Description
`RemoveCounterCost` is a cost for removing a number of (specific type) counters from permanents or cards.
Currently, it does take a non-specific `Target`. Notably there is no constraint/check that the target has at least one counter. Which results in an unintuitive UI that rollbacks the payment if selecting one with none of the counter.
It would make a lot more sense to provide `Filter`(s) instead of `Target`, and add the extra minimum constraint to the filter to target permanents/cards with at least 1 matching counter there.
It could also make sense to split the class for `FilterCard` (rare, e.g. [[Mari, the Killing Quill]]) and `FilterPermanent` (more common, e.g. [[Falco Spara]]).
Another solution (worst in my opinion), would be to always make sure that the target is filtering permanents/cards with at least 1 of the matching counter, but that seems like a lot of extra code in userrs that should be shared by the common effect.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the RemoveCounterCost class and its usages, including the Falco Spara and Mari, the Killing Quill examples mentioned in the issue. Compare the current Target-based behavior with the proposed FilterCard and FilterPermanent alternatives. Done means selecting a permanent or card without a matching counter no longer causes an unintuitive payment rollback, but the preferred design still needs to be decided.
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
- 25/100