Added castability highlighting for cards in hand #9383
+80
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds my number one favorite QoL feature from other MTG implementations (DOTP, Magic Arena, etc.) - castability highlighting. Or in other words, the game uses a thin yellow border to highlight cards that you are able to cast at any given moment based on your available mana, timing, etc. This does not highlight all playable cards, only cards that have a mana cost. The option is toggled off by default. Makes looking at hand and deciding what you can cast much easier to parse.
Details:
Added a private helper method (canCastCard()) that checks if a card in hand can be cast with available mana. The method:
If a card is castable, a thin yellow border is drawn using the same logic as the current green "hover" border
Also added a descriptive toggle in the in-game Preferences menu (towards the bottom of the "Graphics Options" section) to allow users to activate this new functionality as desired. Been meaning to get around to adding this for prob 10 years now lol.
All feedback welcomed and appreciated