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

Fix issue where effects would linger without a valid target #396

Closed lijim closed 1 year ago

lijim commented 1 year ago

Found this while play-testing.

Closes: #360

We had an issue where effects (like Old Farmhouse's "buff attack" effect) would linger on the game client if they didn't have a target type specified (we use getDefaultTargetForEffect for these types of effects).

Fixed this by adding the logic in for grabbing the default targets in the useEffect that handles fizzling the effects that don't have valid targets.

What the "linger" state looks like - game is unable to proceed:

Screen Shot 2023-02-21 at 8 12 15 AM