Changeset 274 for trunk/UClientAI.pas
- Timestamp:
- Feb 3, 2019, 8:32:20 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UClientAI.pas
r273 r274 69 69 70 70 // Sort ascending to attack cells with lower power first 71 // Low power cells are better for expanding our ter itorry71 // Low power cells are better for expanding our territory 72 72 TargetCells.Sort(CellCompare); 73 73 … … 79 79 for NeighborCell in Neighbors do 80 80 if NeighborCell.MapCell.Player = ControlPlayer then 81 TotalPower := TotalPower + NeighborCell.GetAvialPower ;81 TotalPower := TotalPower + NeighborCell.GetAvialPowerForMove; 82 82 83 83 // Attack if target is weaker … … 195 195 for C := 0 to AllCells.Count - 1 do 196 196 with AllCells[C] do begin 197 if (MapCell.Player <> ControlPlayer) and (MapCell. Player <> nil) and (MapCell.Terrain <> ttVoid) then begin197 if (MapCell.Player <> ControlPlayer) and (MapCell.Terrain <> ttVoid) then begin 198 198 CanAttack := 0; 199 199 for I := 0 to Neighbors.Count - 1 do … … 307 307 // Move all units back to inner area from weak border cells 308 308 for C := 0 to BorderCells.Count - 1 do 309 with BorderCells[C]do begin309 with TPlayerCell(BorderCells[C]) do begin 310 310 // Calculate enemy power 311 311 // TODO: Do not sum different enemy power to one value
Note:
See TracChangeset
for help on using the changeset viewer.