Changeset 558 for trunk/Database.pas
- Timestamp:
- Apr 25, 2024, 6:31:34 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Database.pas
r550 r558 889 889 for I := 0 to 11 do 890 890 begin 891 RealMap[RareLoc[I]] := RealMap[RareLoc[I]] and not (fTerrain or fSpecial) or891 RealMap[RareLoc[I]] := RealMap[RareLoc[I]] and not (fTerrain or fSpecial) or 892 892 (fDesert or fDeadLands); 893 893 for dy := -1 to 1 do … … 1489 1489 begin 1490 1490 RealMap[StartLoc0[p1]] := RealMap[StartLoc0[p1]] and 1491 not (fTerrain or fSpecial) or fGrass or fSpecial1;1491 not (fTerrain or fSpecial) or fGrass or fSpecial1; 1492 1492 CntGood := 1; 1493 1493 CntGoodGrass := 1; … … 1512 1512 then 1513 1513 begin 1514 RealMap[Loc1] := RealMap[Loc1] and not (fTerrain or fSpecial)1514 RealMap[Loc1] := RealMap[Loc1] and not (fTerrain or fSpecial) 1515 1515 or fGrass; 1516 1516 RealMap[Loc1] := RealMap[Loc1] or ActualSpecialTile(Loc1) shl 5; … … 1698 1698 ResourceMask[P] := $FFFFFFFF 1699 1699 else 1700 ResourceMask[P] := $FFFFFFFF and not (fSpecial2 or fModern);1700 ResourceMask[P] := $FFFFFFFF and not (fSpecial2 or fModern); 1701 1701 GrWallContinent[P] := -1; 1702 1702 … … 1899 1899 if Terrain[NewTile and fTerrain].IrrEff = 0 then 1900 1900 begin 1901 NewTile := NewTile and not (fPrefStartPos or fStartPos);1901 NewTile := NewTile and not (fPrefStartPos or fStartPos); 1902 1902 if (NewTile and fTerImp = tiIrrigation) or (NewTile and fTerImp = tiFarm) 1903 1903 then … … 2110 2110 Inc(TestDet, 1 shl 28) 2111 2111 else if (Domain = dGround) and (PModel.Cap[mcFanatic] > 0) and 2112 not (RW[Defender].Government in [gRepublic, gDemocracy, gFuture]) then2112 not (RW[Defender].Government in [gRepublic, gDemocracy, gFuture]) then 2113 2113 Inc(TestDet, 4 shl 28) // fanatic ground units always defend 2114 2114 else if PModel.Flags and mdZOC <> 0 then … … 2427 2427 Inc(Discovered[pTell]); 2428 2428 if euix >= -1 then 2429 Map[Loc] := Map[Loc] and not (fUnit or fCity or fOwned or fOwnZoCUnit) or2429 Map[Loc] := Map[Loc] and not (fUnit or fCity or fOwned or fOwnZoCUnit) or 2430 2430 (Tile and $07FFFFFF or AddFlags) and 2431 2431 (fUnit or fCity or fOwned or fOwnZoCUnit) … … 2439 2439 MapObservedLast[Loc] := GTurn 2440 2440 end; 2441 ObserveLevel[Loc] := ObserveLevel[Loc] and not (3 shl (2 * pTell)) or2441 ObserveLevel[Loc] := ObserveLevel[Loc] and not (3 shl (2 * pTell)) or 2442 2442 Cardinal(Level) shl (2 * pTell); 2443 2443 end; … … 2653 2653 else if (Occupant[Loc] <> P) or CityChange then 2654 2654 begin // city or enemy unit update necessary, call DiscoverTile 2655 ObserveLevel[Loc] := ObserveLevel[Loc] and not (3 shl (2 * P));2655 ObserveLevel[Loc] := ObserveLevel[Loc] and not (3 shl (2 * P)); 2656 2656 DiscoverTile(Loc, P, P, OldLevel, False, euix); 2657 2657 end … … 3003 3003 begin 3004 3004 Job := jNone; 3005 Flags := Flags and not (unFortified or unMountainDelay);3005 Flags := Flags and not (unFortified or unMountainDelay); 3006 3006 Loc0 := Loc; 3007 3007 end; … … 3139 3139 dxdy(UsedByCity[FoundLoc], FoundLoc, dx, dy); 3140 3140 V21 := (dy + 3) shl 2 + (dx + 3) shr 1; 3141 RW[p1].City[cix1].Tiles := RW[p1].City[cix1].Tiles and not (1 shl V21);3141 RW[p1].City[cix1].Tiles := RW[p1].City[cix1].Tiles and not (1 shl V21); 3142 3142 end; 3143 3143 Tiles := 1 shl 13; { exploit central tile } … … 3232 3232 V21_to_Loc(Loc, Radius); 3233 3233 for V21 := 1 to 26 do 3234 if Tiles and (1 shl V21) and not (1 shl CityOwnTile) <> 0 then3234 if Tiles and (1 shl V21) and not (1 shl CityOwnTile) <> 0 then 3235 3235 begin 3236 3236 Loc1 := Radius[V21]; … … 3239 3239 (RW[pNew].Treaty[Occupant[Loc1]] < trAlliance) then 3240 3240 begin // tile can't remain exploited 3241 Tiles := Tiles and not (1 shl V21);3241 Tiles := Tiles and not (1 shl V21); 3242 3242 UsedByCity[Loc1] := -1; 3243 3243 end; … … 3302 3302 RealMap[Loc] := RealMap[Loc] and not fTerrain or 3303 3303 Cardinal(ChangedTerrain); 3304 RealMap[Loc] := RealMap[Loc] and not (3 shl 5) or3304 RealMap[Loc] := RealMap[Loc] and not (3 shl 5) or 3305 3305 ActualSpecialTile(Loc) shl 5; 3306 3306 end; … … 3314 3314 RealMap[Loc] := RealMap[Loc] and not fTerrain or 3315 3315 Cardinal(ChangedTerrain); 3316 RealMap[Loc] := RealMap[Loc] and not (3 shl 5) or3316 RealMap[Loc] := RealMap[Loc] and not (3 shl 5) or 3317 3317 ActualSpecialTile(Loc) shl 5; 3318 3318 end; … … 3328 3328 RealMap[Loc] := RealMap[Loc] and not fTerrain or 3329 3329 Cardinal(ChangedTerrain); 3330 RealMap[Loc] := RealMap[Loc] and not (3 shl 5) or3330 RealMap[Loc] := RealMap[Loc] and not (3 shl 5) or 3331 3331 ActualSpecialTile(Loc) shl 5; 3332 if not (RealMap[Loc] and fTerrain in TerrType_Canalable) then3332 if not (RealMap[Loc] and fTerrain in TerrType_Canalable) then 3333 3333 begin 3334 3334 RemoveDomainUnits(dSea, P, Loc); … … 3376 3376 (ObserveLevel[Loc] shr (2 * p1) and 3 > lNoObserve) then 3377 3377 RW[p1].Map[Loc] := RW[p1].Map[Loc] and 3378 not (fTerrain or fSpecial or fTerImp or fRoad or fRR or fCanal or3378 not (fTerrain or fSpecial or fTerImp or fRoad or fRR or fCanal or 3379 3379 fPoll) or RealMap[Loc] and (fTerrain or fSpecial or fTerImp or 3380 3380 fRoad or fRR or fCanal or fPoll); … … 3564 3564 RW[pTarget].EnemyCity[cix].Loc := -1; 3565 3565 3566 Tile := Tile and (not (fSpecial or fModern) or ResourceMask[pTarget]);3566 Tile := Tile and (not (fSpecial or fModern) or ResourceMask[pTarget]); 3567 3567 Tile := Tile or (RW[pTarget].Map[Loc] and fModern); 3568 3568 if (Tile and fTerrain = RW[pTarget].Map[Loc] and fTerrain) then … … 3573 3573 RW[pTarget].Map[Loc] := RW[pTarget].Map[Loc] and fInEnemyZoC 3574 3574 // always preserve this flag! 3575 or Tile and not (fUnit or fHiddenUnit or fStealthUnit or fObserved or3575 or Tile and not (fUnit or fHiddenUnit or fStealthUnit or fObserved or 3576 3576 fSpiedOut or fOwned or fInEnemyZoC or fOwnZoCUnit or fPeace or fGrWall); 3577 3577 if RW[pSender].Territory[Loc] <> RW[pTarget].Territory[Loc] then … … 3664 3664 RecalcMapZoC(pTarget); 3665 3665 end; 3666 if not (NewTreaty in [trPeace, TrFriendlyContact]) then3666 if not (NewTreaty in [trPeace, TrFriendlyContact]) then 3667 3667 begin 3668 3668 RW[pSender].EvaStart[pTarget] := -PeaceEvaTurns - 1; … … 3910 3910 begin 3911 3911 for I := 0 to nAdv - 1 do // give all techs to player p1 3912 if not (I in FutureTech) and (RW[p1].Tech[I] < tsApplicable) then3912 if not (I in FutureTech) and (RW[p1].Tech[I] < tsApplicable) then 3913 3913 begin 3914 3914 RW[p1].Tech[I] := tsCheat;
Note:
See TracChangeset
for help on using the changeset viewer.