Missing return value (G_CanAffordBuildPoints).
Move repair cost into a separate function.
Team stages are based on map control. Stages can be lost.

For now there is a fixed threshold for each stage.