Balancing the battle difficulty
In game genres such as RTS, it is very important to have a well-balanced difficulty, otherwise the game will either be too easy and boring without challenges for the player, or too difficult, unfair, and unenjoyable. In both cases, the player will likely stop playing the game. We need to find the right balance that will make the game strategically challenging, but with a learning curve that will not punish the player right at the beginning of the session.
We could change the values in all ScriptableObjects for each unit and enemy and play all of our levels until we find the right configurations. However, that would take a long time and it is very likely that we will miss some cases when testing in-game. Fortunately, we now have a great tool to validate our configuration changes in the form of the test script that we just wrote, which can validate configurations and simulate battles in a few seconds. Indeed, we already have 50 tests that cover a lot...