local myCID = Utils.MyCID();
if (!AITown.HasStatue(town)) {
local action = AITown.TOWN_ACTION_BUILD_STATUE;
if (AITown.IsActionAvailable(town, action)) {
local perform_action = true;
if (cvgs.IsCompanyValueGSGame() && cvgs.GetCompanyIDRank(myCID) == 1 && cvgs.RankingList().Count() > 1) {
AILog.Info("Cost of perfoming action: " + TestPerformTownAction().TestCost(town, action) + " ; Value difference to company behind: " + cvgs.GetCompanyIDDiffToNext(myCID, false));
if (TestPerformTownAction().TestCost(town, action) > cvgs.GetCompanyIDDiffToNext(myCID, false)) {
perform_action = false;
}
}
if (perform_action && AITown.PerformTownAction(town, action)) {
AILog.Warning("Built a statue in " + AITown.GetName(town) + ".");
}
}