Changeset 265 for trunk/UClientGUI.pas
- Timestamp:
- Jan 15, 2019, 1:03:40 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UClientGUI.pas
r257 r265 190 190 191 191 // Show cell text 192 if (Cell. Power <> 0) or (Cell.Extra = etObjectiveTarget) then begin192 if (Cell.OneUnit.Power <> 0) or (Cell.Extra = etObjectiveTarget) then begin 193 193 Pen.Style := psSolid; 194 194 Font.Color := clWhite; … … 319 319 if Cell.MapCell.Player = ControlPlayer then 320 320 CellText := IntToStr(Cell.GetAvialPower) 321 else CellText := IntToStr(Cell.MapCell.Power); 321 else begin 322 if Assigned(Cell.MapCell.OneUnit) then 323 CellText := IntToStr(Cell.MapCell.OneUnit.Power) 324 else CellText := ''; 325 end; 322 326 if Assigned(SelectedCell) and (SelectedCell = Cell) then 323 327 Brush.Color := clGreen … … 349 353 if (MapCell.Terrain <> ttVoid) and View.IsCellVisible(MapCell) then begin 350 354 Brush.Color := MapCell.GetColor; 351 PaintMapCell(Canvas, MapCell.PosPx, IntToStr(MapCell.Power), View, MapCell); 355 if Assigned(Cell.MapCell.OneUnit) then 356 CellText := IntToStr(MapCell.OneUnit.Power) 357 else CellText := ''; 358 PaintMapCell(Canvas, MapCell.PosPx, CellText, View, MapCell); 352 359 end; 353 360 end; … … 514 521 Player.Moves.Remove(SelectedCell.MovesFrom[I]); 515 522 end; 516 TGame(Game).CurrentPlayer.SetMove(SelectedCell, NewSelectedCell, SelectedCell.MapCell. Power, False);523 TGame(Game).CurrentPlayer.SetMove(SelectedCell, NewSelectedCell, SelectedCell.MapCell.OneUnit.Power, False); 517 524 SelectedCell := nil; 518 525 end else … … 522 529 for I := SelectedCell.MovesFrom.Count - 1 downto 0 do 523 530 Player.Moves.Remove(SelectedCell.MovesFrom[I]); 524 UnitMove := TGame(Game).CurrentPlayer.SetMove(SelectedCell, NewSelectedCell, SelectedCell.MapCell. Power, False);531 UnitMove := TGame(Game).CurrentPlayer.SetMove(SelectedCell, NewSelectedCell, SelectedCell.MapCell.OneUnit.Power, False); 525 532 if Assigned(UnitMove) then 526 533 UnitMove.CountRepeat := TGame(Player.Game).Map.MaxPower; … … 528 535 else SelectedCell := nil; 529 536 end else begin 530 TGame(Game).CurrentPlayer.SetMove(SelectedCell, NewSelectedCell, SelectedCell.MapCell. Power);537 TGame(Game).CurrentPlayer.SetMove(SelectedCell, NewSelectedCell, SelectedCell.MapCell.OneUnit.Power); 531 538 SelectedCell := nil; 532 539 end;
Note:
See TracChangeset
for help on using the changeset viewer.