diff --git a/GameSettings.cpp b/GameSettings.cpp index f36a127c..2db02c03 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -1581,12 +1581,11 @@ void LoadGameExternalOptions() gGameExternalOptions.fSurrenderMultiplier = iniReader.ReadFloat("Strategic Gameplay Settings", "SURRENDER_MULTIPLIER", 5.0f, 2.0f, 10.0f); gGameExternalOptions.fPlayerCanAsktoSurrender = iniReader.ReadBoolean("Strategic Gameplay Settings","PLAYER_CAN_ASK_TO_SURRENDER", TRUE); gGameExternalOptions.ubPrisonerReturntoQueenChance = iniReader.ReadInteger("Strategic Gameplay Settings","PRISONER_RETURN_TO_ARMY_CHANCE", 50, 0, 100); - gGameExternalOptions.ubPrisonerProcessDefectChance = iniReader.ReadInteger("Strategic Gameplay Settings","PRISONER_DEFECT_CHANCE", 10, 0, 100); - gGameExternalOptions.ubPrisonerProcessInfoBaseChance = iniReader.ReadInteger("Strategic Gameplay Settings","PRISONER_INFO_BASECHANCE", 10, 0, 100); - gGameExternalOptions.ubPrisonerProcessInfoDetectChance = iniReader.ReadInteger("Strategic Gameplay Settings","PRISONER_INFO_DETECT_CHANCE", 5, 0, 100); + gGameExternalOptions.ubPrisonerProcessDefectChance = iniReader.ReadInteger("Strategic Gameplay Settings","PRISONER_DEFECT_CHANCE", 25, 0, 100); + gGameExternalOptions.ubPrisonerProcessInfoBaseChance = iniReader.ReadInteger("Strategic Gameplay Settings","PRISONER_INFO_BASECHANCE", 25, 0, 100); gGameExternalOptions.ubPrisonerProcessInfoNumberChance = iniReader.ReadInteger("Strategic Gameplay Settings","PRISONER_INFO_NUMBER_CHANCE", 30, 0, 100); gGameExternalOptions.ubPrisonerProcessInfoDirectionChance = iniReader.ReadInteger("Strategic Gameplay Settings","PRISONER_INFO_DIRECTION_CHANCE", 40, 0, 100); - gGameExternalOptions.ubPrisonerProcessRansomBaseChance = iniReader.ReadInteger("Strategic Gameplay Settings","PRISONER_RANSOM_CHANCE", 10, 0, 100); + gGameExternalOptions.ubPrisonerProcessRansomBaseChance = iniReader.ReadInteger("Strategic Gameplay Settings","PRISONER_RANSOM_CHANCE", 25, 0, 100); // CHRISL: Determine how Skyrider should handle landing in enemy occupied sectors gGameExternalOptions.ubSkyriderHotLZ = iniReader.ReadInteger("Strategic Gameplay Settings", "ALLOW_SKYRIDER_HOT_LZ", 0); diff --git a/GameSettings.h b/GameSettings.h index 671d85cf..1fa78341 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -1196,7 +1196,6 @@ typedef struct UINT8 ubPrisonerReturntoQueenChance; UINT8 ubPrisonerProcessDefectChance; UINT8 ubPrisonerProcessInfoBaseChance; - UINT8 ubPrisonerProcessInfoDetectChance; UINT8 ubPrisonerProcessInfoNumberChance; UINT8 ubPrisonerProcessInfoDirectionChance; UINT8 ubPrisonerProcessRansomBaseChance; diff --git a/Strategic/Assignments.cpp b/Strategic/Assignments.cpp index 452c51fc..90dd12d6 100644 --- a/Strategic/Assignments.cpp +++ b/Strategic/Assignments.cpp @@ -5608,45 +5608,38 @@ void HandlePrisonerProcessingInSector( INT16 sMapX, INT16 sMapY, INT8 bZ ) else if ( result < gGameExternalOptions.ubPrisonerProcessDefectChance + gGameExternalOptions.ubPrisonerProcessInfoBaseChance ) { BOOLEAN found = FALSE; - // run through sectors and handle each type in sector - for(INT16 sX = 1; sX < MAP_WORLD_X - 1; ++sX ) + UINT8 maxtries = 20; + for(UINT8 infotry = 0; infotry < maxtries; ++infotry) { - if ( found ) - break; + UINT8 usX = 1 + Random( MAP_WORLD_X - 2 ); + UINT8 usY = 1 + Random( MAP_WORLD_Y - 2 ); - for(INT16 sY = 1; sY < MAP_WORLD_X - 1; ++sY ) - { - UINT32 result = Random(100); - if ( result < gGameExternalOptions.ubPrisonerProcessInfoDetectChance ) - { - // there need to be mobile enemies here - that the queen has troops in towns we do not own is hardly worthy information - if ( NumMobileEnemiesInSector( sX, sY ) == 0 ) - continue; + // there need to be mobile enemies here - that the queen has troops in towns we do not own is hardly worthy information, and empty sectors aren't interesting + if ( NumMobileEnemiesInSector( usX, usY ) == 0 ) + continue; - // not if we already know about this sector - if ( SectorInfo[ SECTOR( sX, sY ) ].uiFlags & SF_ASSIGN_NOTICED_ENEMIES_HERE ) - continue; + // not if we already know about this sector + if ( SectorInfo[ SECTOR( usX, usY ) ].uiFlags & SF_ASSIGN_NOTICED_ENEMIES_HERE ) + continue; - // enemy patrol detected - SectorInfo[ SECTOR( sX, sY ) ].uiFlags |= SF_ASSIGN_NOTICED_ENEMIES_HERE; + // enemy patrol detected + SectorInfo[ SECTOR( usX, usY ) ].uiFlags |= SF_ASSIGN_NOTICED_ENEMIES_HERE; - if ( result < gGameExternalOptions.ubPrisonerProcessInfoNumberChance ) - { - // we also learned the number of enemies - SectorInfo[ SECTOR( sX, sY ) ].uiFlags |= SF_ASSIGN_NOTICED_ENEMIES_KNOW_NUMBER; - } - - if ( result < gGameExternalOptions.ubPrisonerProcessInfoDirectionChance ) - { - // we also learned the direction of the patrol - SectorInfo[ SECTOR( sX, sY ) ].uiFlags |= SF_ASSIGN_NOTICED_ENEMIES_KNOW_DIRECTION; - } - - ++revealedpositions; - found = TRUE; - break; - } + if ( Chance(gGameExternalOptions.ubPrisonerProcessInfoNumberChance) ) + { + // we also learned the number of enemies + SectorInfo[ SECTOR( usX, usY ) ].uiFlags |= SF_ASSIGN_NOTICED_ENEMIES_KNOW_NUMBER; } + + if ( Chance(gGameExternalOptions.ubPrisonerProcessInfoDirectionChance) ) + { + // we also learned the direction of the patrol + SectorInfo[ SECTOR( usX, usY ) ].uiFlags |= SF_ASSIGN_NOTICED_ENEMIES_KNOW_DIRECTION; + } + + ++revealedpositions; + found = TRUE; + break; } } // chance prisoner will grant us ransom money