- Timestamp:
- May 18, 2022, 10:43:27 PM (2 years ago)
- Location:
- trunk/AI/StdAI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AI/StdAI/AI.pas
r328 r442 176 176 LeaveOutValue: array[0..nAdv - 1] of integer; 177 177 178 179 178 constructor TAI.Create(Nation: integer); 180 179 begin … … 209 208 Result := Data.BehaviorFlags and bBarbarina <> 0; 210 209 end; 211 212 210 213 211 //------------------------------- … … 653 651 Result := ad; 654 652 end; 655 656 653 657 654 //------------------------------- … … 1145 1142 end; 1146 1143 end; 1147 end; // ProcessSettlers 1148 1144 end; 1149 1145 1150 1146 //------------------------------- … … 1350 1346 SetAdvanceValues; 1351 1347 1352 1353 1348 {$IFDEF DEBUG} 1354 1349 (*for p1:=0 to nPl-1 do … … 1380 1375 end; 1381 1376 end; 1382 1383 1377 {$ENDIF} 1384 1385 1378 1386 1379 procedure TAI.CheckGender; … … 1416 1409 end; 1417 1410 end; 1418 1419 1411 1420 1412 procedure TAI.SetAdvanceValues; … … 1785 1777 end; 1786 1778 1787 1788 1779 procedure TAI.MoveUnitsHome; 1789 1780 const … … 2055 2046 Dec(UnitLack[District[Loc], ModelCat[mix]]) 2056 2047 end; 2057 end; // MoveUnitsHome 2058 2048 end; 2059 2049 2060 2050 procedure TAI.CheckAttack(uix: integer); … … 2176 2166 until Exhausted; 2177 2167 end; 2178 end; // CheckAttack 2179 2168 end; 2180 2169 2181 2170 procedure TAI.Patrol(uix: integer); … … 2282 2271 until Exhausted; 2283 2272 end; 2284 end; // Patrol2273 end; 2285 2274 2286 2275 procedure TAI.AttackAndPatrol; … … 2342 2331 Patrol(uix); 2343 2332 end; 2344 end; // AttackAndPatrol 2345 2333 end; 2346 2334 2347 2335 function TAI.HavePort: boolean; … … 2369 2357 end; 2370 2358 end; 2371 2372 2359 2373 2360 procedure TAI.SetCityProduction; … … 2836 2823 2837 2824 ChangeHomeCities; 2838 end; // SetCityProduction 2839 2825 end; 2840 2826 2841 2827 function TAI.ChooseGovernment: integer; … … 2855 2841 Result := gDespotism; 2856 2842 end; 2857 2858 2843 2859 2844 //------------------------------- … … 2927 2912 end; 2928 2913 end; 2929 2930 2914 2931 2915 function TAI.WantNegotiation(Nation: integer; NegoTime: TNegoTime): boolean; … … 3153 3137 end; 3154 3138 end; 3155 end; // Negotiation 3156 3139 end; 3157 3140 3158 3141 procedure SetLeaveOutValue; -
trunk/AI/StdAI/Barbarina.pas
r328 r442 833 833 if Result then 834 834 Moved[uix] := True; 835 end; // ProcessMove835 end; 836 836 837 837 procedure TBarbarina.AttackAndPatrol; … … 1205 1205 end 1206 1206 until not BackToStart; 1207 end; // AttackAndPatrol1207 end; 1208 1208 1209 1209 procedure TBarbarina.Barbarina_SetCityProduction; -
trunk/AI/StdAI/ToolAI.pas
r328 r442 106 106 end; 107 107 108 109 108 const 110 109 // no-formations … … 132 131 mxAdjacent = $00000001; 133 132 134 135 133 var 136 134 nContinent, nOcean, nDistrict: integer; … … 145 143 // total number of prerequisites for each advance 146 144 147 148 145 implementation 149 146 … … 166 163 TurnsAfterLoad: array[0..lxmax * lymax - 1] of shortint; 167 164 168 169 165 procedure ReplaceD(Start, Stop: pinteger; Raider, Twix: integer); 170 166 begin … … 183 179 Result := Start; 184 180 end; 185 186 181 187 182 function TToolAI.CenterOfEmpire: integer; … … 263 258 end; 264 259 265 266 260 //------------------------------------------------------------------------------ 267 261 // City Tiles Processing … … 311 305 end; 312 306 end; 313 314 307 315 308 //------------------------------------------------------------------------------ … … 469 462 Unit_StartJob(uix, TileJob[JobLocOfSettler[uix]]); 470 463 end; 471 end; // JobAssignment_Go 472 464 end; 473 465 474 466 //------------------------------------------------------------------------------ … … 594 586 end; 595 587 end; 596 597 588 598 589 //------------------------------------------------------------------------------ … … 898 889 Result := csForbiddenTile; 899 890 end; 900 end; // CheckStep891 end; 901 892 902 893 (* … … 1020 1011 end; 1021 1012 1022 1023 1013 //------------------------------------------------------------------------------ 1024 1014 // Oversea Transport … … 1108 1098 Pile.Free; 1109 1099 end; 1110 1111 1100 1112 1101 function TToolAI.SeaTransport_MakeGroupPlan( … … 1472 1461 end; 1473 1462 1474 1475 1463 //------------------------------------------------------------------------------ 1476 1464 // Misc … … 1493 1481 end; 1494 1482 end; 1495 1496 1483 1497 1484 //------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.