Changeset 274 for trunk/UGame.pas


Ignore:
Timestamp:
Feb 3, 2019, 8:32:20 PM (6 years ago)
Author:
chronos
Message:
  • Added: Keep information about available unit moves during turn.
  • Added: Allow to move units instantly during turn.
  • Added: Game system parameter to play without possibility to merge/split units.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UGame.pas

    r273 r274  
    349349        StartCell.OneUnit.Power := Player.StartUnits;
    350350        StartCell.OneUnit.Kind := GameSystem.UnitKinds[0];
     351        StartCell.OneUnit.Player := Player;
    351352      end;
    352353    end;
     354    InitUnitMoves;
    353355    PlayerMap.CheckVisibility;
    354356    Inc(I);
     
    524526    SetValue(DOMString(Path + '/MaxPower'), MaxPower);
    525527    Players.SaveConfig(Config, Path + '/Players');
     528    GameSystem.SaveConfig(Config, Path + '/GameSystem');
    526529  end;
    527530end;
     
    562565    MaxPower := GetValue(DOMString(Path + '/MaxPower'), 99);
    563566    Players.LoadConfig(Config, Path + '/Players');
     567    GameSystem.LoadConfig(Config, Path + '/GameSystem');
    564568  end;
    565569end;
     
    771775  CurrentPlayer.ReduceMovesPower;
    772776  CurrentPlayer.RemoveInvalidMoves;
     777  CurrentPlayer.InitUnitMoves;
    773778  if Assigned(FOnChange) then
    774779    FOnChange(Self);
Note: See TracChangeset for help on using the changeset viewer.