Missing return value (G_CanAffordBuildPoints).
Move repair cost into a separate function.