Changeset 231 for trunk/UClientAI.pas
- Timestamp:
- Sep 19, 2018, 2:05:52 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UClientAI.pas
r223 r231 6 6 7 7 uses 8 Classes, SysUtils, UGameClient, UGame, Math ;8 Classes, SysUtils, UGameClient, UGame, Math, UPlayer, UMap; 9 9 10 10 type … … 232 232 if (TargetCells[C].GetAvialPower + TargetCells[C].GetAttackPower + MovedPower) > Game.Map.MaxPower then 233 233 MovedPower := Game.Map.MaxPower - TargetCells[C].GetAvialPower - TargetCells[C].GetAttackPower; 234 MapCell.Player.SetMove(Neighbors[I], TargetCells[C], MovedPower, False);234 TPlayer(MapCell.Player).SetMove(Neighbors[I], TargetCells[C], MovedPower, False); 235 235 end; 236 236 end; … … 311 311 // Fallback 312 312 for I := MovesTo.Count - 1 downto 0 do 313 MapCell.Player.Moves.Remove(MovesTo[I]);313 TPlayer(MapCell.Player).Moves.Remove(MovesTo[I]); 314 314 for I := 0 to Neighbors.Count - 1 do 315 315 if (Neighbors[I].MapCell.Player = MapCell.Player) and (AttackersCount(Neighbors[I]) = 0) then begin 316 MapCell.Player.SetMove(BorderCells[C], Neighbors[I], GetAvialPower, False);316 TPlayer(MapCell.Player).SetMove(BorderCells[C], Neighbors[I], GetAvialPower, False); 317 317 Break; 318 318 end;
Note:
See TracChangeset
for help on using the changeset viewer.