Hey, I have a question regarding how triggers work
For some reason, the limited number of unit training trigger was bypassed. Basically the building can train how many units of that type I want. I think it might be related to the fact that if you use the trigger make unit unavailable and then available for player while before you limited the number of training, this weird thing happens. It does not happen with other units I've limited. However, the difference is that the units in question come from a building that becomes yours later on and the limiting of the training is run before the building changes owner to become the player's. The same if the building is created instead of changing ownership.
It works if the training limiting triggers come after the building is under the player's control.