Changeset 328 for trunk/AI/StdAI/Barbarina.pas
- Timestamp:
- Mar 25, 2021, 3:02:29 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AI/StdAI/Barbarina.pas
r319 r328 1242 1242 WonderAvailable := WonderAvailable and PrimeWonder; // alway prefer prime wonders 1243 1243 Count := 0; 1244 for iix := 0 to 27do1244 for iix := 0 to nWonder - 1 do 1245 1245 begin 1246 1246 if (1 shl iix) and WonderAvailable <> 0 then … … 1254 1254 end; 1255 1255 Count := Random(Count); 1256 for iix := 0 to 27do1256 for iix := 0 to nWonder - 1 do 1257 1257 begin 1258 1258 if (1 shl iix) and WonderAvailable <> 0 then … … 1326 1326 WonderAvailable := 0; 1327 1327 WonderInWork := 0; 1328 for iix := 0 to 27do1328 for iix := 0 to nWonder - 1 do 1329 1329 if (Imp[iix].Preq <> preNA) and ((Imp[iix].Preq = preNone) or 1330 1330 IsResearched(Imp[iix].Preq)) and (RO.Wonder[iix].CityID = WonderNotBuiltYet) then … … 1334 1334 begin 1335 1335 iix := City_CurrentImprovementProject(cix); 1336 if (iix >= 0) and (iix < 28) then1336 if (iix >= 0) and (iix < nWonder) then 1337 1337 Inc(WonderInWork, 1 shl iix) 1338 1338 else if iix = imPalace then … … 1428 1428 1429 1429 iix := City_CurrentImprovementProject(cix); 1430 if (iix >= 0) and (iix < 28) or (iix = imPalace) or1430 if (iix >= 0) and (iix < nWonder) or (iix = imPalace) or 1431 1431 (iix = imShipComp) or (iix = imShipPow) or (iix = imShipHab) then 1432 1432 City_OptimizeTiles(cix, rwMaxProd) … … 1447 1447 if cix = cixNewCapital then 1448 1448 City_StartImprovement(cix, imPalace) 1449 else if (iix >= 0) and (iix < 28) and ((1 shl iix) and1449 else if (iix >= 0) and (iix < nWonder) and ((1 shl iix) and 1450 1450 WonderAvailable <> 0) then 1451 1451 // complete wonder production first … … 1503 1503 City_StartImprovement(cix, woZeus) 1504 1504 else if (City_CurrentImprovementProject(cix) >= 0) and 1505 (City_CurrentImprovementProject(cix) < 28) then1505 (City_CurrentImprovementProject(cix) < nWonder) then 1506 1506 begin// wonder already built, try to switch to different one 1507 1507 if (WonderAvailable and not WonderInWork > 0) and … … 1553 1553 begin // low prio projects 1554 1554 ImportantCity := WillProduceColonyShip or (Built[imPalace] > 0); 1555 for iix := 0 to 27do1555 for iix := 0 to nWonder - 1 do 1556 1556 if Built[iix] > 0 then 1557 1557 ImportantCity := True; … … 1605 1605 City_RebuildImprovement(cix, imTownHall) 1606 1606 else if (RO.Government = gFundamentalism) and not WillProduceColonyShip then 1607 for iix := 28to nImp - 1 do1607 for iix := nWonder to nImp - 1 do 1608 1608 if (Built[iix] > 0) and 1609 1609 ((iix in [imTemple, imTheater, imCathedral, imColosseum,
Note:
See TracChangeset
for help on using the changeset viewer.