link ZoneChangeEvent to StackObject when relevant.
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 940
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 160
Description
Following #13593, it seems like a good idea to enhance `ZoneChangeEvent` with the `StackObject` when the moved object's origin is from the stack.
We have something like this with permanents already (although it seems the target may be the permanent for both cases where fromZone OR toZone are the battlefielf). However for permanents it is quite a mess with possible target being set on event creation or latter on (through setTarget), and it is possible for the event's targetId to also be changed after the event creation.
I didn't find an easy way to do a similar work for Stack Object, as moving cards from stack is using moveCards in different ways, and the origin Spell or Ability on the stack is not always sharing an id with the main card.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with ZoneChangeEvent and the moveCards call sites that move cards from the stack, then compare how permanents are assigned targets during event creation and through setTarget. Done means a relevant ZoneChangeEvent carries the originating StackObject without relying on an incorrect shared id.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100