mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Major rework of getting captured quests and mechanics.
- new feature: added Tixa as another prison where capture mercs can be held (Alma is still primary choice though) - fix: all mercs in the map will be taken POW when surrendered, however only 3 will appear in Alma/Tixa/N7, rest will be POW forever without chance of getting free - fix: whenever player liberates any of the POW sectors (Alma, Tixa, N7) the respective quest/cutscene with POW will be disabled in that sector until enemy recapture the sector - robot will be destroyed when surrendered as it makes no sense to inprison mechanical units - externalized the GridNos for freeing POW mercs into Mod_Settings.ini git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9095 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2725,12 +2725,24 @@ void LoadModSettings(){
|
||||
gModSettings.iInitialPOWItemGridNo[0] = iniReader.ReadInteger("Alma", "INITIAL_POW_ITEM_POSITION_1", 12246);
|
||||
gModSettings.iInitialPOWItemGridNo[1] = iniReader.ReadInteger("Alma", "INITIAL_POW_ITEM_POSITION_2", 12406);
|
||||
gModSettings.iInitialPOWItemGridNo[2] = iniReader.ReadInteger("Alma", "INITIAL_POW_ITEM_POSITION_3", 12086);
|
||||
gModSettings.iInitialPOWGetFreeGridNo[0] = iniReader.ReadInteger("Alma", "INITIAL_POW_GETFREE_GRIDNO_1", 10492);
|
||||
gModSettings.iInitialPOWGetFreeGridNo[1] = iniReader.ReadInteger("Alma", "INITIAL_POW_GETFREE_GRIDNO_2", 10482);
|
||||
gModSettings.iInitialPOWGetFreeGridNo[2] = iniReader.ReadInteger("Alma", "INITIAL_POW_GETFREE_GRIDNO_3", 9381);
|
||||
|
||||
//[Grumm]
|
||||
|
||||
//[Tixa]
|
||||
gModSettings.ubTixaPrisonSectorX = iniReader.ReadInteger("Tixa", "PRISON_SECTOR_X", 9);
|
||||
gModSettings.ubTixaPrisonSectorY = iniReader.ReadInteger("Tixa", "PRISON_SECTOR_Y", 10);
|
||||
gModSettings.iTixaPrisonPOWGridNo[0] = iniReader.ReadInteger("Tixa", "PRISON_POW_POSITION_1", 12691);
|
||||
gModSettings.iTixaPrisonPOWGridNo[1] = iniReader.ReadInteger("Tixa", "PRISON_POW_POSITION_2", 15891);
|
||||
gModSettings.iTixaPrisonPOWGridNo[2] = iniReader.ReadInteger("Tixa", "PRISON_POW_POSITION_3", 13980);
|
||||
gModSettings.iTixaPrisonPOWItemGridNo[0] = iniReader.ReadInteger("Tixa", "PRISON_POW_ITEM_POSITION_1", 10619);
|
||||
gModSettings.iTixaPrisonPOWItemGridNo[1] = iniReader.ReadInteger("Tixa", "PRISON_POW_ITEM_POSITION_2", 10619);
|
||||
gModSettings.iTixaPrisonPOWItemGridNo[2] = iniReader.ReadInteger("Tixa", "PRISON_POW_ITEM_POSITION_3", 10619);
|
||||
gModSettings.iTixaPrisonPOWGetFreeGridNo[0] = iniReader.ReadInteger("Tixa", "PRISON_POW_GETFREE_GRIDNO_1", 14145);
|
||||
gModSettings.iTixaPrisonPOWGetFreeGridNo[1] = iniReader.ReadInteger("Tixa", "PRISON_POW_GETFREE_GRIDNO_2", 14135);
|
||||
gModSettings.iTixaPrisonPOWGetFreeGridNo[2] = iniReader.ReadInteger("Tixa", "PRISON_POW_GETFREE_GRIDNO_3", 13646);
|
||||
|
||||
gModSettings.ubDyanmoCaptiveSectorX = iniReader.ReadInteger("Tixa", "DYNAMO_CAPTIVE_SECTOR_X", 9);
|
||||
gModSettings.ubDyanmoCaptiveSectorY = iniReader.ReadInteger("Tixa", "DYNAMO_CAPTIVE_SECTOR_Y", 10);
|
||||
|
||||
@@ -2177,12 +2177,16 @@ typedef struct
|
||||
UINT8 ubInitialPOWSectorY;
|
||||
INT32 iInitialPOWGridNo[3];
|
||||
INT32 iInitialPOWItemGridNo[3];
|
||||
INT32 iInitialPOWGetFreeGridNo[3];
|
||||
|
||||
//[Grumm]
|
||||
|
||||
//[Tixa]
|
||||
UINT8 ubTixaPrisonSectorX;
|
||||
UINT8 ubTixaPrisonSectorY;
|
||||
INT32 iTixaPrisonPOWGridNo[3];
|
||||
INT32 iTixaPrisonPOWItemGridNo[3];
|
||||
INT32 iTixaPrisonPOWGetFreeGridNo[3];
|
||||
|
||||
//Dynamo Captive Sector
|
||||
UINT8 ubDyanmoCaptiveSectorX;
|
||||
|
||||
@@ -523,6 +523,22 @@ BOOLEAN SetThisSectorAsEnemyControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, BO
|
||||
UpdateRefuelSiteAvailability( );
|
||||
}
|
||||
|
||||
//shadooow: re-enable quest if player loses control of the N7 prison and quest was disabled previously
|
||||
if (sMapX == gModSettings.ubMeanwhileInterrogatePOWSectorX && sMapY == gModSettings.ubMeanwhileInterrogatePOWSectorY && gubQuest[QUEST_INTERROGATION] == QUESTCANNOTSTART)
|
||||
{
|
||||
gubQuest[QUEST_INTERROGATION] = QUESTNOTSTARTED;
|
||||
}
|
||||
//shadooow: re-enable quest if player loses control of the Alma prison and quest was disabled previously
|
||||
if (sMapX == gModSettings.ubInitialPOWSectorX && sMapY == gModSettings.ubInitialPOWSectorY && gubQuest[QUEST_HELD_IN_ALMA] == QUESTCANNOTSTART)
|
||||
{
|
||||
gubQuest[QUEST_HELD_IN_ALMA] = QUESTNOTSTARTED;
|
||||
}
|
||||
//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;
|
||||
}
|
||||
|
||||
// Flugente: reduce workforce
|
||||
SectorInfo[SECTOR( sMapX, sMapY )].usWorkers = SectorInfo[SECTOR( sMapX, sMapY )].usWorkers * gGameExternalOptions.dInitialWorkerRate;
|
||||
|
||||
|
||||
+31
-38
@@ -2739,7 +2739,13 @@ void EndCaptureSequence( )
|
||||
}
|
||||
// CJC Dec 1 2002: fixing multiple captures:
|
||||
//else if ( gubQuest[ QUEST_HELD_IN_ALMA ] == QUESTDONE )
|
||||
else if ( gubQuest[ QUEST_HELD_IN_ALMA ] == QUESTDONE && gubQuest[ QUEST_INTERROGATION ] == QUESTNOTSTARTED )
|
||||
else if (gubQuest[QUEST_HELD_IN_ALMA] != QUESTINPROGRESS && gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED)
|
||||
{
|
||||
// CJC Dec 1 2002: fixing multiple captures:
|
||||
gStrategicStatus.uiFlags |= STRATEGIC_PLAYER_CAPTURED_FOR_RESCUE;
|
||||
StartQuest(QUEST_HELD_IN_TIXA, gWorldSectorX, gWorldSectorY);
|
||||
}
|
||||
else if (gubQuest[QUEST_HELD_IN_ALMA] != QUESTINPROGRESS && gubQuest[QUEST_HELD_IN_TIXA] != QUESTINPROGRESS && gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED)
|
||||
{
|
||||
StartQuest( QUEST_INTERROGATION, gWorldSectorX, gWorldSectorY );
|
||||
// CJC Dec 1 2002: fixing multiple captures:
|
||||
@@ -2765,12 +2771,6 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier )
|
||||
BOOLEAN fMadeCorpse;
|
||||
INT32 iNumEnemiesInSector;
|
||||
|
||||
// Buggler: Externalized Hardcoded grid number
|
||||
//static INT32 sAlmaCaptureGridNos[] = { 9208, 9688, 9215 }; //dnl!!!
|
||||
//static INT32 sAlmaCaptureItemsGridNo[] = { 12246, 12406, 12086 }; //dnl!!!
|
||||
|
||||
//static INT32 sInterrogationItemGridNo[] = { 12089, 12089, 12089 }; //dnl!!!
|
||||
|
||||
AssertNotNIL(pSoldier);
|
||||
|
||||
// ATE: Check first if ! in player captured sequence already
|
||||
@@ -2780,38 +2780,22 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier )
|
||||
return;
|
||||
}
|
||||
|
||||
// ATE: If maximum prisoners captured, return!
|
||||
if ( gStrategicStatus.ubNumCapturedForRescue > 2 )
|
||||
// If this is an EPC , just kill them...
|
||||
if ( AM_AN_EPC( pSoldier ) || AM_A_ROBOT(pSoldier))
|
||||
{
|
||||
return;
|
||||
pSoldier->stats.bLife = 0;
|
||||
pSoldier->iHealableInjury = 0; // added by SANDRO
|
||||
HandleSoldierDeath( pSoldier, &fMadeCorpse );
|
||||
return;
|
||||
}
|
||||
|
||||
// If this is an EPC , just kill them...
|
||||
if ( AM_AN_EPC( pSoldier ) )
|
||||
{
|
||||
pSoldier->stats.bLife = 0;
|
||||
pSoldier->iHealableInjury = 0; // added by SANDRO
|
||||
HandleSoldierDeath( pSoldier, &fMadeCorpse );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE )
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// ATE: Patch fix If in a vehicle, remove from vehicle...
|
||||
TakeSoldierOutOfVehicle( pSoldier );
|
||||
|
||||
// Are there enemies in ALMA? ( I13 )
|
||||
iNumEnemiesInSector = NumNonPlayerTeamMembersInSector( gModSettings.ubInitialPOWSectorX, gModSettings.ubInitialPOWSectorY, ENEMY_TEAM ); //(13, 9)
|
||||
|
||||
// IF there are no enemies, and we need to do alma, skip!
|
||||
if ( gubQuest[ QUEST_HELD_IN_ALMA ] == QUESTNOTSTARTED && iNumEnemiesInSector == 0 )
|
||||
{
|
||||
InternalStartQuest( QUEST_HELD_IN_ALMA, gWorldSectorX, gWorldSectorY, FALSE );
|
||||
InternalEndQuest( QUEST_HELD_IN_ALMA, gWorldSectorX, gWorldSectorY, FALSE );
|
||||
}
|
||||
// ATE: Patch fix If in a vehicle, remove from vehicle...
|
||||
TakeSoldierOutOfVehicle( pSoldier );
|
||||
|
||||
HandleMoraleEvent( pSoldier, MORALE_MERC_CAPTURED, pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ );
|
||||
|
||||
@@ -2824,7 +2808,7 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier )
|
||||
|
||||
ChangeSoldiersAssignment( pSoldier, ASSIGNMENT_POW );
|
||||
// ATE: Make them neutral!
|
||||
if ( gubQuest[ QUEST_HELD_IN_ALMA ] == QUESTNOTSTARTED )
|
||||
if ( gubQuest[ QUEST_HELD_IN_ALMA ] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED)
|
||||
{
|
||||
pSoldier->aiData.bNeutral = TRUE;
|
||||
}
|
||||
@@ -2834,7 +2818,7 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier )
|
||||
WORLDITEM WorldItem;
|
||||
std::vector<WORLDITEM> pWorldItem;
|
||||
|
||||
if ( gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_ALMA] == QUESTDONE )
|
||||
if (gStrategicStatus.ubNumCapturedForRescue < 3 && (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED))
|
||||
{
|
||||
INT32 itemdropoffgridno = -1;
|
||||
|
||||
@@ -2848,6 +2832,15 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier )
|
||||
pSoldier->usStrategicInsertionData = gModSettings.iInitialPOWGridNo[gStrategicStatus.ubNumCapturedForRescue];
|
||||
itemdropoffgridno = gModSettings.iInitialPOWItemGridNo[gStrategicStatus.ubNumCapturedForRescue];
|
||||
}
|
||||
else if (gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED)
|
||||
{
|
||||
//-teleport him to Tixa as originally planned
|
||||
pSoldier->sSectorX = gModSettings.ubTixaPrisonSectorX;
|
||||
pSoldier->sSectorY = gModSettings.ubTixaPrisonSectorY;
|
||||
pSoldier->bSectorZ = 0;
|
||||
pSoldier->usStrategicInsertionData = gModSettings.iTixaPrisonPOWGridNo[gStrategicStatus.ubNumCapturedForRescue];
|
||||
itemdropoffgridno = gModSettings.iTixaPrisonPOWItemGridNo[gStrategicStatus.ubNumCapturedForRescue];
|
||||
}
|
||||
else //if ( gubQuest[QUEST_HELD_IN_ALMA] == QUESTDONE )
|
||||
{
|
||||
//-teleport him to N7
|
||||
@@ -2855,7 +2848,7 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier )
|
||||
pSoldier->sSectorY = gModSettings.ubMeanwhileInterrogatePOWSectorY; //14
|
||||
pSoldier->bSectorZ = 0;
|
||||
pSoldier->usStrategicInsertionData = gModSettings.iMeanwhileInterrogatePOWGridNo[gStrategicStatus.ubNumCapturedForRescue];
|
||||
itemdropoffgridno = gModSettings.iMeanwhileInterrogatePOWItemGridNo[gStrategicStatus.ubNumCapturedForRescue];;
|
||||
itemdropoffgridno = gModSettings.iMeanwhileInterrogatePOWItemGridNo[gStrategicStatus.ubNumCapturedForRescue];
|
||||
}
|
||||
|
||||
// OK, drop all items!
|
||||
|
||||
@@ -1448,6 +1448,7 @@ void InternalEndQuest( UINT8 ubQuest, INT16 sSectorX, INT16 sSectorY, BOOLEAN fU
|
||||
case QUEST_KINGPIN_IDOL :
|
||||
case QUEST_CHITZENA_IDOL :
|
||||
case QUEST_HELD_IN_ALMA :
|
||||
case QUEST_HELD_IN_TIXA :
|
||||
case QUEST_RUNAWAY_JOEY :
|
||||
case QUEST_ESCORT_TOURISTS :
|
||||
GiveQuestRewardPoint( sSectorX, sSectorY, 5, NO_PROFILE );
|
||||
|
||||
+3
-1
@@ -7,7 +7,8 @@
|
||||
// Quest.ubStatus values
|
||||
#define QUESTNOTSTARTED 0
|
||||
#define QUESTINPROGRESS 1
|
||||
#define QUESTDONE 2
|
||||
#define QUESTDONE 2
|
||||
#define QUESTCANNOTSTART 255
|
||||
|
||||
#define MAX_QUESTS 255
|
||||
#define MAX_OLD_QUESTS 30
|
||||
@@ -80,6 +81,7 @@ enum Quests
|
||||
QUEST_KILL_DEIDRANNA = 25,
|
||||
|
||||
QUEST_KINGPIN_ANGEL_MARIA, // Flugente: new quest: if the player rescued Maria without implicating himself, Kingpin hires bounty hunters to kill them
|
||||
QUEST_HELD_IN_TIXA,//shadooow: new quest: captured mercs can appear in Tixa prison if conditions are met for players to free them
|
||||
#endif
|
||||
} ;
|
||||
/*
|
||||
|
||||
@@ -3273,7 +3273,8 @@ void UpdateMercsInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ )
|
||||
fPOWSquadSet = TRUE;
|
||||
|
||||
// ATE: If we are in i13 - pop up message!
|
||||
if ( sSectorX == gModSettings.ubInitialPOWSectorX && sSectorY == gModSettings.ubInitialPOWSectorY ) //(13, 9)
|
||||
if ((sSectorX == gModSettings.ubInitialPOWSectorX && sSectorY == gModSettings.ubInitialPOWSectorY) || //(13, 9)
|
||||
(sSectorX == gModSettings.ubTixaPrisonSectorX && sSectorY == gModSettings.ubTixaPrisonSectorY))
|
||||
{
|
||||
swprintf( zTemp, TacticalStr[POW_MERCS_ARE_HERE], gMercProfiles[QUEEN].zNickname );
|
||||
DoMessageBox( MSG_BOX_BASIC_STYLE, zTemp, GAME_SCREEN, (UINT8)MSG_BOX_FLAG_OK, NULL, NULL );
|
||||
@@ -3287,7 +3288,8 @@ void UpdateMercsInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ )
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( sSectorX != gModSettings.ubInitialPOWSectorX && sSectorY != gModSettings.ubInitialPOWSectorY ) //(13, 9)
|
||||
if ((sSectorX != gModSettings.ubInitialPOWSectorX && sSectorY != gModSettings.ubInitialPOWSectorY) && //(13, 9)
|
||||
(sSectorX != gModSettings.ubTixaPrisonSectorX && sSectorY != gModSettings.ubTixaPrisonSectorY))
|
||||
{
|
||||
AddCharacterToSquad( pSoldier, ubPOWSquad );
|
||||
}
|
||||
@@ -3302,6 +3304,14 @@ void UpdateMercsInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ )
|
||||
// Do action
|
||||
HandleNPCDoAction( 0, NPC_ACTION_GRANT_EXPERIENCE_3, 0 );
|
||||
}
|
||||
else if (gubQuest[QUEST_HELD_IN_TIXA] == QUESTINPROGRESS)
|
||||
{
|
||||
// Complete quest
|
||||
EndQuest(QUEST_HELD_IN_TIXA, sSectorX, sSectorY);
|
||||
|
||||
// Do action
|
||||
HandleNPCDoAction(0, NPC_ACTION_GRANT_EXPERIENCE_3, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1285,7 +1285,8 @@ BOOLEAN HandleDoorsOpenClose( SOLDIERTYPE *pSoldier, INT32 sGridNo, STRUCTURE *
|
||||
PlayJA2Sample( uiSoundID, RATE_11025, SoundVolume( MIDVOLUME, sGridNo ), 1, SoundDir( sGridNo ) );
|
||||
}
|
||||
|
||||
if (gWorldSectorX == gModSettings.ubInitialPOWSectorX && gWorldSectorY == gModSettings.ubInitialPOWSectorY && gbWorldSectorZ == 0)
|
||||
if (((gWorldSectorX == gModSettings.ubInitialPOWSectorX && gWorldSectorY == gModSettings.ubInitialPOWSectorY) ||
|
||||
(gWorldSectorX == gModSettings.ubTixaPrisonSectorX && gWorldSectorY == gModSettings.ubTixaPrisonSectorY)) && gbWorldSectorZ == 0)
|
||||
{
|
||||
DoPOWPathChecks();
|
||||
}
|
||||
|
||||
+71
-13
@@ -7599,11 +7599,31 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
|
||||
|
||||
// SANDRO - end quest if cleared the sector after interrogation (sector N7 by Meduna)
|
||||
if ( gWorldSectorX == gModSettings.ubMeanwhileInterrogatePOWSectorX && gWorldSectorY == gModSettings.ubMeanwhileInterrogatePOWSectorY &&
|
||||
gbWorldSectorZ == 0 && gubQuest[ QUEST_INTERROGATION ] == QUESTINPROGRESS )
|
||||
gbWorldSectorZ == 0)
|
||||
{
|
||||
// Quest failed
|
||||
InternalEndQuest( QUEST_INTERROGATION, gWorldSectorX, gWorldSectorY, FALSE );
|
||||
if (gubQuest[QUEST_INTERROGATION] == QUESTINPROGRESS)
|
||||
{
|
||||
// Quest failed
|
||||
InternalEndQuest(QUEST_INTERROGATION, gWorldSectorX, gWorldSectorY, FALSE);
|
||||
}
|
||||
else if (gubQuest[QUEST_INTERROGATION] == QUESTCANNOTSTART)
|
||||
{
|
||||
//shadooow: re-enable quest if player loses control of the N7 prison and quest was disabled previously
|
||||
gubQuest[QUEST_INTERROGATION] = QUESTNOTSTARTED;
|
||||
}
|
||||
}
|
||||
//shadooow: re-enable quest if player loses control of the Alma prison and quest was disabled previously
|
||||
if (gWorldSectorX == gModSettings.ubInitialPOWSectorX && gWorldSectorY == gModSettings.ubInitialPOWSectorY &&
|
||||
gbWorldSectorZ == 0 && gubQuest[QUEST_HELD_IN_ALMA] == QUESTCANNOTSTART)
|
||||
{
|
||||
gubQuest[QUEST_HELD_IN_ALMA] = QUESTNOTSTARTED;
|
||||
}
|
||||
//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;
|
||||
}
|
||||
|
||||
// Play death music
|
||||
#ifdef NEWMUSIC
|
||||
@@ -7801,11 +7821,47 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
|
||||
}
|
||||
// SANDRO - end quest if cleared the sector after interrogation (sector N7 by Meduna)
|
||||
if ( gWorldSectorX == gModSettings.ubMeanwhileInterrogatePOWSectorX && gWorldSectorY == gModSettings.ubMeanwhileInterrogatePOWSectorY &&
|
||||
gbWorldSectorZ == 0 && gubQuest[ QUEST_INTERROGATION ] == QUESTINPROGRESS )
|
||||
gbWorldSectorZ == 0)
|
||||
{
|
||||
// Complete quest
|
||||
EndQuest( QUEST_INTERROGATION, gWorldSectorX, gWorldSectorY );
|
||||
if (gubQuest[QUEST_INTERROGATION] == QUESTINPROGRESS)
|
||||
{
|
||||
// Complete quest
|
||||
EndQuest( QUEST_INTERROGATION, gWorldSectorX, gWorldSectorY );
|
||||
}
|
||||
else if(gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED)
|
||||
{
|
||||
//shadooow: disable quest if player takes control of the N7 prison
|
||||
gubQuest[QUEST_INTERROGATION] = QUESTCANNOTSTART;
|
||||
}
|
||||
}
|
||||
//shadooow: disable quest if player takes control of the Alma prison
|
||||
if (gWorldSectorX == gModSettings.ubInitialPOWSectorX && gWorldSectorY == gModSettings.ubInitialPOWSectorY &&
|
||||
gbWorldSectorZ == 0)
|
||||
{
|
||||
if (gubQuest[QUEST_HELD_IN_ALMA] == QUESTINPROGRESS)
|
||||
{
|
||||
// Complete quest
|
||||
EndQuest(QUEST_HELD_IN_ALMA, gWorldSectorX, gWorldSectorY);
|
||||
}
|
||||
else if (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED)
|
||||
{
|
||||
gubQuest[QUEST_HELD_IN_ALMA] = QUESTCANNOTSTART;
|
||||
}
|
||||
}
|
||||
//shadooow: disable quest if player takes control of the Alma prison
|
||||
if (gWorldSectorX == gModSettings.ubTixaPrisonSectorX && gWorldSectorY == gModSettings.ubTixaPrisonSectorY &&
|
||||
gbWorldSectorZ == 0 && gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED)
|
||||
{
|
||||
if (gubQuest[QUEST_HELD_IN_TIXA] == QUESTINPROGRESS)
|
||||
{
|
||||
// Complete quest
|
||||
EndQuest(QUEST_HELD_IN_TIXA, gWorldSectorX, gWorldSectorY);
|
||||
}
|
||||
else if (gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED)
|
||||
{
|
||||
gubQuest[QUEST_HELD_IN_TIXA] = QUESTCANNOTSTART;
|
||||
}
|
||||
}
|
||||
|
||||
// Say battle end quote....
|
||||
|
||||
@@ -8529,7 +8585,7 @@ 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_ALMA ] == QUESTDONE && gubQuest[ QUEST_INTERROGATION ] == QUESTNOTSTARTED ) )
|
||||
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 ) )
|
||||
{
|
||||
fDoCapture = TRUE;
|
||||
// CJC Dec 1 2002: fix capture sequences
|
||||
@@ -10401,8 +10457,10 @@ void CaptureTimerCallback( )
|
||||
|
||||
void DoPOWPathChecks( )
|
||||
{
|
||||
INT32 iLoop;
|
||||
SOLDIERTYPE * pSoldier;
|
||||
INT32 iLoop;
|
||||
SOLDIERTYPE *pSoldier;
|
||||
|
||||
BOOLEAN is_this_tixa = (gWorldSectorX == gModSettings.ubTixaPrisonSectorX && gWorldSectorY == gModSettings.ubTixaPrisonSectorY);
|
||||
|
||||
// loop through all mercs on our team and if they are POWs in sector, do POW path check and
|
||||
// put on a squad if available
|
||||
@@ -10415,15 +10473,15 @@ void DoPOWPathChecks( )
|
||||
// check to see if POW has been freed!
|
||||
// this will be true if a path can be made from the POW to either of 3 gridnos
|
||||
// 10492 (hallway) or 10482 (outside), or 9381 (outside)
|
||||
if ( FindBestPath( pSoldier, 10492, 0, WALKING, NO_COPYROUTE, PATH_THROUGH_PEOPLE ) )//dnl!!!
|
||||
if (FindBestPath( pSoldier, is_this_tixa ? gModSettings.iTixaPrisonPOWGetFreeGridNo[0] : gModSettings.iInitialPOWGetFreeGridNo[0], 0, WALKING, NO_COPYROUTE, PATH_THROUGH_PEOPLE))
|
||||
{
|
||||
// drop out of if
|
||||
}
|
||||
else if ( FindBestPath( pSoldier, 10482, 0, WALKING, NO_COPYROUTE, PATH_THROUGH_PEOPLE ) )//dnl!!!
|
||||
else if (FindBestPath( pSoldier, is_this_tixa ? gModSettings.iTixaPrisonPOWGetFreeGridNo[1] : gModSettings.iInitialPOWGetFreeGridNo[1], 0, WALKING, NO_COPYROUTE, PATH_THROUGH_PEOPLE))
|
||||
{
|
||||
// drop out of if
|
||||
}
|
||||
else if ( FindBestPath( pSoldier, 9381, 0, WALKING, NO_COPYROUTE, PATH_THROUGH_PEOPLE ) )//dnl!!!
|
||||
else if (FindBestPath( pSoldier, is_this_tixa ? gModSettings.iTixaPrisonPOWGetFreeGridNo[2] : gModSettings.iInitialPOWGetFreeGridNo[2], 0, WALKING, NO_COPYROUTE, PATH_THROUGH_PEOPLE))
|
||||
{
|
||||
// drop out of if
|
||||
}
|
||||
@@ -11206,7 +11264,7 @@ 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 )
|
||||
{
|
||||
if ( gubQuest[ QUEST_HELD_IN_ALMA ] == QUESTNOTSTARTED || ( gubQuest[ QUEST_HELD_IN_ALMA ] == QUESTDONE && gubQuest[ QUEST_INTERROGATION ] == QUESTNOTSTARTED ) )
|
||||
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))
|
||||
{
|
||||
gTacticalStatus.fEnemyFlags |= ENEMY_OFFERED_SURRENDER;
|
||||
|
||||
|
||||
@@ -5173,7 +5173,7 @@ INT16 ubMinAPCost;
|
||||
{
|
||||
//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_ALMA ] == QUESTDONE && gubQuest[ QUEST_INTERROGATION ] == QUESTNOTSTARTED ) )
|
||||
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))
|
||||
{
|
||||
gTacticalStatus.fEnemyFlags |= ENEMY_OFFERED_SURRENDER;
|
||||
return( AI_ACTION_OFFER_SURRENDER );
|
||||
|
||||
@@ -3125,7 +3125,8 @@ void SpreadEffect( INT32 sGridNo, UINT8 ubRadius, UINT16 usItem, UINT8 ubOwner,
|
||||
|
||||
// if anything has been done to change movement costs and this is a potential POW situation, check
|
||||
// paths for POWs
|
||||
if (gWorldSectorX == gModSettings.ubInitialPOWSectorX && gWorldSectorY == gModSettings.ubInitialPOWSectorY && gbWorldSectorZ == 0)
|
||||
if (((gWorldSectorX == gModSettings.ubInitialPOWSectorX && gWorldSectorY == gModSettings.ubInitialPOWSectorY) ||
|
||||
(gWorldSectorX == gModSettings.ubTixaPrisonSectorX && gWorldSectorY == gModSettings.ubTixaPrisonSectorY)) && gbWorldSectorZ == 0)
|
||||
{
|
||||
DoPOWPathChecks();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user