Skip to content

Conversation

@jtomse
Copy link

@jtomse jtomse commented Dec 29, 2025

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:

  1. Verifies the card is in hand
  2. Gets the actual Card object from the game by matching ID
  3. Retrieves all spell abilities for the card
  4. For each spell ability, checks if it can be played (timing/restrictions)
  5. Verifies the player can pay the mana cost using ComputerUtilMana.canPayManaCost()

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants