Hello everyone. I decided to add a "prestige" parameter to my map, which limits the number of creatures in a hero's army. To implement this, I had to disable the standard creature recruitment in all dwellings and write a script that displays the question: "Do you want to recruit [x] creatures for [y] gold? OK Cancel"
However, the drawback is that the hero can only recruit all the creatures available in the building, or those for which they have enough prestige and gold.
Also, when upgrading creatures or recruiting them from a garrison, the change in available prestige is not taken into account, so the hero can end up with an army larger than their prestige allows.
Is it possible to make it so that the standard creature recruitment window limits the number of creatures not only by gold but also by prestige?
Auto-translated