Valid parameters of an effect
Posted: 31 Jul 2014, 17:30
The more I script cards and fix bugs in effects, the more I'm thinking a documentation of the different effects and their required/allowed parameters would be helpful. I've decided to implement such a documentation using Java annotations, which has the advantage that it's implemented directly into the code. I've also implemented some logic to check the legality of each parameter value (uses regular expressions). A patch is attached.
Is this something we want? IMO we'd need documentation of these parameters at some point anyway, and this was the cleanest way I could think of. It could help detect bugs in cards without even testing them, and provide a central reference point for scripting cards (although we might need some tool to convert it to something a bit more user-friendly, rather than Java compiler-friendly).
Is this something we want? IMO we'd need documentation of these parameters at some point anyway, and this was the cleanest way I could think of. It could help detect bugs in cards without even testing them, and provide a central reference point for scripting cards (although we might need some tool to convert it to something a bit more user-friendly, rather than Java compiler-friendly).