Interactions between Tokens and CommandObjects are very screwy
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 940
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 160
Description
The problems go both ways:
- Tokens creating CommandObjects will lead to missing set symbols and possibly other problems
- CommandObjects creating tokens will lead to missing set symbols and possibly other problems
The core of the issue is that many places in the view code (and possibly engine code) erroneously do something like this:
```
Card source = game.getCard(something.someSourceId);
if (source != null) {
// Do stuff with source
} else {
// Incorrectly does nothing (or even worse, something it shouldn't) even
// though the source might exist and be a CommandObject or Token
}
```
I spotted at least 5 different places in the code where the issue exists, and there's presumably more. Solving this is not _too_ difficult, but it will be a headache to find _all_ of the relevant places where the mistake has been made, because it seems quite widespread.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.