Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Ja2/GameInitOptionsScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ typedef struct
UINT8 usLevelModifierLowLimit;
UINT8 usLevelModifierHighLimit;
BOOLEAN bAllowUnrestrictedXPLevels;
BOOLEAN bQueenLosingControlOfSector;
UINT8 bQueenLosingControlOfSector;
BOOLEAN bBloodcatAmbush;
BOOLEAN bAirRaidLookForDive;
UINT32 iGetNumberOfTurnsPowerGenFanWillBeStoppedFor; //UB
Expand Down
2 changes: 1 addition & 1 deletion Ja2/XML_DifficultySettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
25 changes: 6 additions & 19 deletions Strategic/Strategic AI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down