Loading

Paste #p7uvaedf7

  1. local myCID = Utils.MyCID();
  2.  
  3.                 if (!AITown.HasStatue(town)) {
  4.                     local action = AITown.TOWN_ACTION_BUILD_STATUE;
  5.                     if (AITown.IsActionAvailable(town, action)) {
  6.                         local perform_action = true;
  7.                         if (cvgs.IsCompanyValueGSGame() && cvgs.GetCompanyIDRank(myCID) == 1 && cvgs.RankingList().Count() > 1) {
  8.                             AILog.Info("Cost of perfoming action: " + TestPerformTownAction().TestCost(town, action) + " ; Value difference to company behind: " + cvgs.GetCompanyIDDiffToNext(myCID, false));
  9.                             if (TestPerformTownAction().TestCost(town, action) > cvgs.GetCompanyIDDiffToNext(myCID, false)) {
  10.                                 perform_action = false;
  11.                             }
  12.                         }
  13.                         if (perform_action && AITown.PerformTownAction(town, action)) {
  14.                             AILog.Warning("Built a statue in " + AITown.GetName(town) + ".");
  15.                         }
  16.                     }

Version history

Revision # Author Created at
ptjsvzrdg Anonymous 26 Dec 2018, 22:48:49 UTC Diff
pwcf1wdzf Anonymous 26 Dec 2018, 22:44:19 UTC Diff

Comments