lijim / monks-and-mages

Monks and Mages is a TCG-game built on React and socket.io
https://www.monksandmages.com
MIT License
17 stars 0 forks source link

Feat: Add effect resolution logic for 25+ new effects #455

Closed lijim closed 1 year ago

lijim commented 1 year ago

This PR establishes a number of helpers / refactorings (e.g. having an exhaustive enum check) to add in the 25+ new effects established by https://github.com/lijim/monks-and-mages/pull/453

Each effect resolution comes with unit tests.

In addition, an edge cases around rules was changed:

Also, resolveEffect is by far and away one of the largest files, so I took the effort to break the 'effect requirement checking' logic out into a separate file.

Lastly, this PR adds typescript checks to the lint checking, as I realized we never added it in explicitly.