Changeset 194 for trunk/UGame.pas
- Timestamp:
- May 14, 2018, 5:38:45 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UGame.pas
r193 r194 17 17 TriangleCellMulY = 1.05; 18 18 MaxPlayerCount = 8; 19 DefaultMaxPower = 99; 19 20 20 21 type … … 460 461 FogOfWar: Boolean; 461 462 BridgeEnabled: Boolean; 463 MaxPower: Integer; 462 464 function AttackProbability(AttackCount, DefendCount: Integer): Double; 463 465 procedure LoadConfig(Config: TXmlConfig; Path: string); … … 1406 1408 DefaultCellSize.X := ReadInteger(Node, 'DefaultCellSizeX', 1); 1407 1409 DefaultCellSize.Y := ReadInteger(Node, 'DefaultCellSizeY', 1); 1408 MaxPower := ReadInteger(Node, 'MaxPower', 99);1410 MaxPower := ReadInteger(Node, 'MaxPower', DefaultMaxPower); 1409 1411 Shape := TMapShape(ReadInteger(Node, 'Shape', Integer(msRectangle))); 1410 1412 Node2 := Node.FindNode('Cells'); … … 1656 1658 constructor TMap.Create; 1657 1659 begin 1658 MaxPower := 99;1660 MaxPower := DefaultMaxPower; 1659 1661 DefaultCellSize := TPoint.Create(220, 220); 1660 1662 Cells := TCells.Create; … … 3260 3262 VoidPercentage := ReadInteger(RootNode, 'VoidPercentage', 0); 3261 3263 MaxNeutralUnits := ReadInteger(RootNode, 'MaxNeutralUnits', 3); 3264 MaxPower := ReadInteger(RootNode, 'MaxPower', DefaultMaxPower); 3262 3265 GrowCells := TGrowCells(ReadInteger(RootNode, 'GrowCells', Integer(gcNone))); 3263 3266 GrowAmount := TGrowAmount(ReadInteger(RootNode, 'GrowAmount', Integer(gaByOne))); … … 3309 3312 WriteInteger(RootNode, 'VoidPercentage', VoidPercentage); 3310 3313 WriteInteger(RootNode, 'MaxNeutralUnits', MaxNeutralUnits); 3314 WriteInteger(RootNode, 'MaxPower', MaxPower); 3311 3315 WriteInteger(RootNode, 'GrowCells', Integer(GrowCells)); 3312 3316 WriteInteger(RootNode, 'GrowAmount', Integer(GrowAmount)); … … 3447 3451 VoidEnabled := True; 3448 3452 VoidPercentage := 20; 3449 MaxNeutralUnits := 4; 3453 MaxPower := DefaultMaxPower; 3454 MaxNeutralUnits := Min(4, MaxPower); 3450 3455 3451 3456 Map.Game := Self; … … 3477 3482 3478 3483 Map.Generate; 3484 Map.MaxPower := MaxPower; 3479 3485 BuildTerrain; 3480 3486
Note:
See TracChangeset
for help on using the changeset viewer.