There are a few problems with this: Apart from the coding and possibly UI/UX issues, the main one are talisman conditions like "Use at most X skills in total". How would you display this info?
As far as a way that's easy to implement goes, my suggestion:
- On preview screen, display "Total Skill Limit: X"
- In-game, when checking a skill's count (including for rendering the skill panel), instead of just using "
GetSkillCount(spbSkill)" directly, use the lesser of that or the remaining number of skill uses before hitting the limit.
- Perhaps, when a skill is limited by the total skill uses rather than its own uses (for example, if you have 5 builders remaining, but you have 5 or less
total skill uses remaining), display the skill count in red.
Secondary suggestion: As much as I don't like the idea of it being a core game mechanic, restricting such a feature to a "talisman mode" seems like an artificial restriction. If this were to be implemented, a total-skill-limit may as well become a core gameplay feature.
I believe the total skill limit, is the only remaining talisman condition that would pose a problem for enforcing. Aside from that, we have save requirements, time limits and single-skill limits, all of which are just tighter versions of the level's standard rules.