fully externalize bQueenLosingControlOfSector

This commit is contained in:
Marco Antonio J. Costa
2025-09-02 20:01:47 -03:00
committed by majcosta
parent e5d25810f6
commit 7d9cd87da8
3 changed files with 8 additions and 21 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ typedef struct
UINT8 usLevelModifierLowLimit;
UINT8 usLevelModifierHighLimit;
BOOLEAN bAllowUnrestrictedXPLevels;
BOOLEAN bQueenLosingControlOfSector;
UINT8 bQueenLosingControlOfSector;
BOOLEAN bBloodcatAmbush;
BOOLEAN bAirRaidLookForDive;
UINT32 iGetNumberOfTurnsPowerGenFanWillBeStoppedFor; //UB
+1 -1
View File
@@ -555,7 +555,7 @@ difficultySettingsEndElementHandle(void *userData, const XML_Char *name)
else if(strcmp(name, "QueenAttackLosingControlOfSector") == 0)
{
pData->curElement = ELEMENT;
pData->curDifficultySettings.bQueenLosingControlOfSector = (BOOLEAN) atol(pData->szCharData);
pData->curDifficultySettings.bQueenLosingControlOfSector = atoi(pData->szCharData);
}
else if(strcmp(name, "BloodcatAmbushSectors") == 0)
{
+6 -19
View File
@@ -5756,26 +5756,13 @@ void StrategicHandleQueenLosingControlOfSector( INT16 sSectorX, INT16 sSectorY,
else
return;
//Madd: tweaked to increase attacks for experienced and expert to 8 and 12, and unlimited for insane
UINT8 value9;
if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
value9 = 1;
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_MEDIUM )
value9 = 2;
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_HARD )
value9 = 3;
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_INSANE )
value9 = 4;
else
{
value9 = Random (4);
if (value9 == 0) value9 = 1;
}
if( pSector->ubInvestigativeState >= ( 4 * value9 ) && !zDiffSetting[gGameOptions.ubDifficultyLevel].bQueenLosingControlOfSector )
{
//This is the 4th time the player has conquered this sector. We won't pester the player with probing attacks here anymore.
return;
const auto queenStopsAttacking = zDiffSetting[gGameOptions.ubDifficultyLevel].bQueenLosingControlOfSector;
if (queenStopsAttacking != 0 && pSector->ubInvestigativeState >= queenStopsAttacking) {
/* This is equal or higher than QueenAttackLosingControlOfSector number of times the player has conquered this sector.
We won't pester the player with probing attacks here anymore. */
return;
}
}
if( sSectorX != gWorldSectorX || sSectorY != gWorldSectorY )