Changeset 153
- Timestamp:
- Nov 15, 2017, 10:20:16 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Languages/xtactics.cs.po
r151 r153 652 652 msgstr "Člověk" 653 653 654 #: ugame.sattackerpowerpositive 655 msgctxt "ugame.sattackerpowerpositive" 656 msgid "Attacker power have to be higher then 0." 657 msgstr "Síla útočníka musí být větší než 0." 658 659 #: ugame.scellremoveneighborerror 660 msgid "Can't remove cell from neighbour cell" 661 msgstr "Nelze odstranit buňku ze sousední buňky" 662 654 663 #: ugame.scomputer 655 664 msgctxt "ugame.scomputer" … … 657 666 msgstr "Počítač" 658 667 668 #: ugame.sdefenderpowerpositive 669 msgid "Defender power have to be higher then or equal to 0." 670 msgstr "Síla obránce musí být vyšší než nebo rovna nule." 671 659 672 #: ugame.shuman 660 673 msgctxt "ugame.shuman" … … 666 679 msgstr "Potřebujete alespoň dva hráče" 667 680 681 #: ugame.snegativecellpowernotallowed 682 msgid "Not allowed to substract power under zero to negative value" 683 msgstr "Není povoleno odečíst sílu pod nulu do záporné hodnoty" 684 668 685 #: ugame.snewgamefile 669 686 msgid "New game.xtg" … … 679 696 msgstr "Neukončená bitva" 680 697 698 #: ugame.sunitpowermismatch 699 msgid "Unit move power mismatch. Cell power is %d but %d moved away." 700 msgstr "Chyba síly přesunu jednotek. Síla buňky je %d, ale %d přesunuto pryč." 701 681 702 #: ugame.swrongfileformat 682 703 msgid "Wrong file format" -
trunk/Languages/xtactics.po
r151 r153 631 631 msgstr "" 632 632 633 #: ugame.sattackerpowerpositive 634 msgctxt "ugame.sattackerpowerpositive" 635 msgid "Attacker power have to be higher then 0." 636 msgstr "" 637 638 #: ugame.scellremoveneighborerror 639 msgid "Can't remove cell from neighbour cell" 640 msgstr "" 641 633 642 #: ugame.scomputer 634 643 msgctxt "ugame.scomputer" … … 636 645 msgstr "" 637 646 647 #: ugame.sdefenderpowerpositive 648 msgid "Defender power have to be higher then or equal to 0." 649 msgstr "" 650 638 651 #: ugame.shuman 639 652 msgctxt "ugame.shuman" … … 645 658 msgstr "" 646 659 660 #: ugame.snegativecellpowernotallowed 661 msgid "Not allowed to substract power under zero to negative value" 662 msgstr "" 663 647 664 #: ugame.snewgamefile 648 665 msgid "New game.xtg" … … 658 675 msgstr "" 659 676 677 #: ugame.sunitpowermismatch 678 msgid "Unit move power mismatch. Cell power is %d but %d moved away." 679 msgstr "" 680 660 681 #: ugame.swrongfileformat 661 682 msgid "Wrong file format" -
trunk/UGame.pas
r152 r153 61 61 Weight: Integer; // Temporary value 62 62 Links: TCellLinks; 63 procedure Check; 63 64 function NeighboringToVoid: Boolean; 64 65 procedure AreaExtend; … … 514 515 SNewGameFile = 'New game.xtg'; 515 516 SZeroZoomNotAlowed = 'Zero zoom not allowed'; 517 SCellRemoveNeighborError = 'Can''t remove cell from neighbour cell'; 518 SNegativeCellPowerNotAllowed = 'Not allowed to substract power under zero to negative value'; 519 SAttackerPowerPositive = 'Attacker power have to be higher then 0.'; 520 SDefenderPowerPositive = 'Defender power have to be higher then or equal to 0.'; 521 SUnitPowerMismatch = 'Unit move power mismatch. Cell power is %d but %d moved away.'; 516 522 517 523 procedure InitStrings; … … 726 732 for I := 0 to Cells.Count - 1 do begin 727 733 if TCell(Cells[I]).Neighbors.Remove(TCell(Cells[1 - I])) = -1 then 728 raise Exception.Create( 'Can''t remove cell from neighbour cell');734 raise Exception.Create(SCellRemoveNeighborError); 729 735 if TCell(Cells[I]).Links.Remove(Self) = -1 then 730 raise Exception.Create( 'Can''t remove cell from neighbour cell');736 raise Exception.Create(SCellRemoveNeighborError); 731 737 end; 732 738 FreeAndNil(Cells); … … 978 984 Cell := TPlayerCell(Cells[C]); 979 985 if (Cell.MapCell.Terrain <> ttVoid) and Cell.MapCell.IsVisible(View) then begin 980 CellText := IntToStr(Cell.MapCell.GetAvialPower); 986 if Cell.MapCell.Player = Player then 987 CellText := IntToStr(Cell.MapCell.GetAvialPower) 988 else CellText := IntToStr(Cell.MapCell.Power); 981 989 if Assigned(SelectedCell) and (SelectedCell = Cell.MapCell) then 982 990 Brush.Color := clGreen … … 1750 1758 if FPower = AValue then Exit; 1751 1759 if AValue < 0 then 1752 raise Exception.Create( 'Not allowed to substract power under zero do negative value');1760 raise Exception.Create(SNegativeCellPowerNotAllowed); 1753 1761 FPower := AValue; 1762 end; 1763 1764 procedure TCell.Check; 1765 var 1766 AvailPower: Integer; 1767 begin 1768 AvailPower := GetAvialPower; 1769 if AvailPower < 0 then 1770 raise Exception.Create(Format(SUnitPowerMismatch, [Power, -(AvailPower - Power)])); 1754 1771 end; 1755 1772 … … 1897 1914 for UnitMove in MovesFrom do 1898 1915 Result := Result - UnitMove.CountOnce; 1899 if Result < 0 then raise Exception.Create('Unit move power mismatch. Cell power is ' +1900 IntToStr(Power) + ' but ' + IntToStr(- (Result - Power)) + ' moved away.');1901 1916 end; 1902 1917 … … 1943 1958 for I := Neighbors.Count - 1 downto 0 do 1944 1959 if TCell(Neighbors[I]).Neighbors.Remove(Self) = -1 then 1945 raise Exception.Create( 'Can''t remove cell from neighbour cell');1960 raise Exception.Create(SCellRemoveNeighborError); 1946 1961 FreeAndNil(Neighbors); 1947 1962 inherited Destroy; … … 2522 2537 DefendRolls := TFPGList<Integer>.Create; 2523 2538 if AttackPower < 1 then 2524 raise Exception.Create( 'Attacker power have to be higher then 0.');2539 raise Exception.Create(SAttackerPowerPositive); 2525 2540 if DefendPower < 0 then 2526 raise Exception.Create( 'Defender power have to be higher then or equal to 0.');2541 raise Exception.Create(SDefenderPowerPositive); 2527 2542 while (AttackPower > 0) and (DefendPower > 0) do begin 2528 2543 // Risk game rules: … … 2654 2669 end; 2655 2670 end; 2671 2656 2672 // Remove empty moves 2657 2673 for I := Moves.Count - 1 downto 0 do … … 2734 2750 end; 2735 2751 end; 2752 CellFrom.Check; 2736 2753 if Assigned(Game.FOnMoveUpdated) then Game.FOnMoveUpdated(Result); 2737 2754 end;
Note:
See TracChangeset
for help on using the changeset viewer.