Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r79 r80 141 141 142 142 procedure TCore.AutoSave; 143 begin 143 var 144 OldFileName: string; 145 begin 146 OldFileName := Game.FileName; 144 147 Game.SaveToFile(GetAppConfigDir(False) + 'AutoSave.xtg'); 145 G etUserDir;148 Game.FileName := OldFileName; 146 149 end; 147 150 -
trunk/UGame.pas
r79 r80 1802 1802 var 1803 1803 I: Integer; 1804 Remain: Integer;1805 1804 AttackerPower: Integer; 1806 1805 DefenderPower: Integer; 1806 UnitCount: Integer; 1807 1807 begin 1808 1808 I := 0; … … 1811 1811 if CountOnce > 0 then begin 1812 1812 if CellFrom.Player = Player then begin 1813 UnitCount := CountOnce; 1814 if CountOnce > CellFrom.Power then 1815 UnitCount := CellFrom.Power; 1813 1816 if CellTo.Player = Player then begin 1814 1817 // Inner move 1815 CellTo.Power := CellTo.Power + CountOnce;1818 CellTo.Power := CellTo.Power + UnitCount; 1816 1819 end else begin 1817 AttackerPower := CountOnce;1820 AttackerPower := UnitCount; 1818 1821 DefenderPower := CellTo.Power; 1819 1822 Attack(AttackerPower, DefenderPower); … … 1830 1833 raise Exception.Create(SUnfinishedBattle); 1831 1834 end; 1832 CellFrom.Power := CellFrom.Power - CountOnce;1835 CellFrom.Power := CellFrom.Power - UnitCount; 1833 1836 CountOnce := 0; 1834 1837 end;
Note:
See TracChangeset
for help on using the changeset viewer.