diff --git a/Strategic/Player Command.cpp b/Strategic/Player Command.cpp index 9d109433..731df8ab 100644 --- a/Strategic/Player Command.cpp +++ b/Strategic/Player Command.cpp @@ -533,12 +533,13 @@ BOOLEAN SetThisSectorAsEnemyControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, BO { gubQuest[QUEST_HELD_IN_ALMA] = QUESTNOTSTARTED; } + #ifndef JA2UB //shadooow: re-enable quest if player loses control of the Tixa prison and quest was disabled previously if (sMapX == gModSettings.ubTixaPrisonSectorX && sMapY == gModSettings.ubTixaPrisonSectorY && gubQuest[QUEST_HELD_IN_TIXA] == QUESTCANNOTSTART) { gubQuest[QUEST_HELD_IN_TIXA] = QUESTNOTSTARTED; } - + #endif // Flugente: reduce workforce SectorInfo[SECTOR( sMapX, sMapY )].usWorkers = SectorInfo[SECTOR( sMapX, sMapY )].usWorkers * gGameExternalOptions.dInitialWorkerRate; diff --git a/Strategic/Queen Command.cpp b/Strategic/Queen Command.cpp index c5af2d8d..35cee345 100644 --- a/Strategic/Queen Command.cpp +++ b/Strategic/Queen Command.cpp @@ -2807,18 +2807,16 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier ) } ChangeSoldiersAssignment( pSoldier, ASSIGNMENT_POW ); - // ATE: Make them neutral! - if ( gubQuest[ QUEST_HELD_IN_ALMA ] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED) - { - pSoldier->aiData.bNeutral = TRUE; - } - RemoveCharacterFromSquads( pSoldier ); WORLDITEM WorldItem; std::vector pWorldItem; +#ifdef JA2UB + if (gStrategicStatus.ubNumCapturedForRescue < 3 && (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED)) +#else if (gStrategicStatus.ubNumCapturedForRescue < 3 && (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED)) +#endif { INT32 itemdropoffgridno = -1; @@ -2826,21 +2824,25 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier ) if ( gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED ) { //-teleport him to NE Alma sector (not Tixa as originally planned) + pSoldier->aiData.bNeutral = TRUE; pSoldier->sSectorX = gModSettings.ubInitialPOWSectorX; //13 pSoldier->sSectorY = gModSettings.ubInitialPOWSectorY; //9 pSoldier->bSectorZ = 0; pSoldier->usStrategicInsertionData = gModSettings.iInitialPOWGridNo[gStrategicStatus.ubNumCapturedForRescue]; itemdropoffgridno = gModSettings.iInitialPOWItemGridNo[gStrategicStatus.ubNumCapturedForRescue]; } + #ifndef JA2UB else if (gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED) { //-teleport him to Tixa as originally planned + pSoldier->aiData.bNeutral = TRUE; pSoldier->sSectorX = gModSettings.ubTixaPrisonSectorX; pSoldier->sSectorY = gModSettings.ubTixaPrisonSectorY; pSoldier->bSectorZ = 0; pSoldier->usStrategicInsertionData = gModSettings.iTixaPrisonPOWGridNo[gStrategicStatus.ubNumCapturedForRescue]; itemdropoffgridno = gModSettings.iTixaPrisonPOWItemGridNo[gStrategicStatus.ubNumCapturedForRescue]; } + #endif else //if ( gubQuest[QUEST_HELD_IN_ALMA] == QUESTDONE ) { //-teleport him to N7 diff --git a/Strategic/strategicmap.cpp b/Strategic/strategicmap.cpp index 3032d30c..6978b775 100644 --- a/Strategic/strategicmap.cpp +++ b/Strategic/strategicmap.cpp @@ -3304,6 +3304,7 @@ void UpdateMercsInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ ) // Do action HandleNPCDoAction( 0, NPC_ACTION_GRANT_EXPERIENCE_3, 0 ); } + #ifndef JA2UB else if (gubQuest[QUEST_HELD_IN_TIXA] == QUESTINPROGRESS) { // Complete quest @@ -3312,6 +3313,7 @@ void UpdateMercsInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ ) // Do action HandleNPCDoAction(0, NPC_ACTION_GRANT_EXPERIENCE_3, 0); } + #endif } } } diff --git a/Tactical/Overhead.cpp b/Tactical/Overhead.cpp index 5f6d83ee..1ff9a738 100644 --- a/Tactical/Overhead.cpp +++ b/Tactical/Overhead.cpp @@ -7618,12 +7618,14 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated ) { gubQuest[QUEST_HELD_IN_ALMA] = QUESTNOTSTARTED; } + #ifndef JA2UB //shadooow: re-enable quest if player loses control of the Tixa prison and quest was disabled previously if (gWorldSectorX == gModSettings.ubTixaPrisonSectorX && gWorldSectorY == gModSettings.ubTixaPrisonSectorY && gbWorldSectorZ == 0 && gubQuest[QUEST_HELD_IN_TIXA] == QUESTCANNOTSTART) { gubQuest[QUEST_HELD_IN_TIXA] = QUESTNOTSTARTED; } + #endif // Play death music #ifdef NEWMUSIC @@ -7848,7 +7850,8 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated ) gubQuest[QUEST_HELD_IN_ALMA] = QUESTCANNOTSTART; } } - //shadooow: disable quest if player takes control of the Alma prison + #ifndef JA2UB + //shadooow: disable quest if player takes control of the Tixa prison if (gWorldSectorX == gModSettings.ubTixaPrisonSectorX && gWorldSectorY == gModSettings.ubTixaPrisonSectorY && gbWorldSectorZ == 0 && gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED) { @@ -7862,7 +7865,7 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated ) gubQuest[QUEST_HELD_IN_TIXA] = QUESTCANNOTSTART; } } - + #endif // Say battle end quote.... if (fAnEnemyRetreated) @@ -8585,7 +8588,11 @@ BOOLEAN CheckForLosingEndOfBattle( ) { //if( GetWorldDay() > STARTDAY_ALLOW_PLAYER_CAPTURE_FOR_RESCUE && !( gStrategicStatus.uiFlags & STRATEGIC_PLAYER_CAPTURED_FOR_RESCUE )) { - if ( gubQuest[ QUEST_HELD_IN_ALMA ] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || (gubQuest[QUEST_HELD_IN_ALMA] != QUESTINPROGRESS && gubQuest[QUEST_HELD_IN_TIXA] != QUESTINPROGRESS && gubQuest[ QUEST_INTERROGATION ] == QUESTNOTSTARTED ) ) + #ifdef JA2UB + if (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || (gubQuest[QUEST_HELD_IN_ALMA] != QUESTINPROGRESS && gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED)) + #else + if ( gubQuest[ QUEST_HELD_IN_ALMA ] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || (gubQuest[QUEST_HELD_IN_ALMA] != QUESTINPROGRESS && gubQuest[QUEST_HELD_IN_TIXA] != QUESTINPROGRESS && gubQuest[ QUEST_INTERROGATION ] == QUESTNOTSTARTED ) ) + #endif { fDoCapture = TRUE; // CJC Dec 1 2002: fix capture sequences @@ -11264,7 +11271,11 @@ void PrisonerSurrenderMessageBoxCallBack( UINT8 ubExitValue ) // in order for this to work, there must be no militia present, the enemy must not already have offered asked you to surrender, and certain quests may not be active if ( !( gTacticalStatus.fEnemyFlags & ENEMY_OFFERED_SURRENDER ) && gTacticalStatus.Team[ MILITIA_TEAM ].bMenInSector == 0 ) { + #ifdef JA2UB + if (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || (gubQuest[QUEST_HELD_IN_ALMA] != QUESTINPROGRESS && gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED)) + #else if (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || (gubQuest[QUEST_HELD_IN_ALMA] != QUESTINPROGRESS && gubQuest[QUEST_HELD_IN_TIXA] != QUESTINPROGRESS && gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED)) + #endif { gTacticalStatus.fEnemyFlags |= ENEMY_OFFERED_SURRENDER;