mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
- Added playable mercs: John Kulba (the tourist) and 3 JA1 natives (Elio, Juan, Wahan) (by anv)
o Added faces (except camo faces), speech, bio, ... o All those 4 mercs are available at M.E.R.C o Added INI options for enabling/disabling recruitable Speck, Kulba and natives o If enabled, Kulba becomes available as a MERC merc after finishing escort quest, delay is configurable (two weeks by default). He won't be available earlier even if MERC_WEBSITE_ALL_MERCS_AVAILABLE is set to TRUE see: http://www.bears-pit.com/board/ubbthreads.php/topics/298288/47.html - Improvement: MERC mercs get unlocked according to their own availability conditions, not to their order in MercAvailability.xml git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6258 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -849,6 +849,14 @@ void LoadGameExternalOptions()
|
|||||||
// CHRISL: New setting to allow Slay to remain as a hired PC
|
// CHRISL: New setting to allow Slay to remain as a hired PC
|
||||||
gGameExternalOptions.fEnableSlayForever = iniReader.ReadBoolean("Recruitment Settings", "SLAY_STAYS_FOREVER", FALSE);
|
gGameExternalOptions.fEnableSlayForever = iniReader.ReadBoolean("Recruitment Settings", "SLAY_STAYS_FOREVER", FALSE);
|
||||||
|
|
||||||
|
// anv: playable Speck
|
||||||
|
gGameExternalOptions.fEnableRecruitableSpeck = iniReader.ReadBoolean("Recruitment Settings", "RECRUITABLE_SPECK", TRUE);
|
||||||
|
// anv: John Kulba becomes recruitable as a merc after finishing escort quest
|
||||||
|
gGameExternalOptions.fEnableRecruitableJohnKulba = iniReader.ReadBoolean("Recruitment Settings", "RECRUITABLE_JOHN_KULBA", TRUE);
|
||||||
|
gGameExternalOptions.ubRecruitableJohnKulbaDelay = iniReader.ReadInteger("Recruitment Settings", "RECRUITABLE_JOHN_KULBA_DELAY", 14, 0, 255);
|
||||||
|
// anv: enable JA1 natives as MERC mercs
|
||||||
|
gGameExternalOptions.fEnableRecruitableJA1Natives = iniReader.ReadBoolean("Recruitment Settings", "RECRUITABLE_JA1_NATIVES", TRUE);
|
||||||
|
|
||||||
// Buggler: setting to show/hide skills/traits in AIM & MERC hiring page
|
// Buggler: setting to show/hide skills/traits in AIM & MERC hiring page
|
||||||
gGameExternalOptions.fShowSkillsInHirePage = iniReader.ReadBoolean("Recruitment Settings", "SHOW_SKILLS_IN_HIRING_PAGE", FALSE);
|
gGameExternalOptions.fShowSkillsInHirePage = iniReader.ReadBoolean("Recruitment Settings", "SHOW_SKILLS_IN_HIRING_PAGE", FALSE);
|
||||||
|
|
||||||
|
|||||||
@@ -726,6 +726,14 @@ typedef struct
|
|||||||
// CHRISL: option to allow Slay to remain as a hired PC
|
// CHRISL: option to allow Slay to remain as a hired PC
|
||||||
BOOLEAN fEnableSlayForever;
|
BOOLEAN fEnableSlayForever;
|
||||||
|
|
||||||
|
// anv: playable Speck
|
||||||
|
BOOLEAN fEnableRecruitableSpeck;
|
||||||
|
// anv: John Kulba becomes recruitable as a merc after finishing escort quest
|
||||||
|
BOOLEAN fEnableRecruitableJohnKulba;
|
||||||
|
UINT16 ubRecruitableJohnKulbaDelay;
|
||||||
|
// anv: enable JA1 natives as MERC mercs
|
||||||
|
BOOLEAN fEnableRecruitableJA1Natives;
|
||||||
|
|
||||||
// CHRISL: Setting to turn off the description and stack popup options from the sector inventory panel
|
// CHRISL: Setting to turn off the description and stack popup options from the sector inventory panel
|
||||||
BOOLEAN fSectorDesc;
|
BOOLEAN fSectorDesc;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -189,7 +189,7 @@ void ExitAimLinks()
|
|||||||
DeleteVideoObjectFromIndex(guiFuneralLink);
|
DeleteVideoObjectFromIndex(guiFuneralLink);
|
||||||
DeleteVideoObjectFromIndex(guiInsuranceLink);
|
DeleteVideoObjectFromIndex(guiInsuranceLink);
|
||||||
|
|
||||||
for(i=0; i<AIM_LINK_NUM_LINKS; i++)
|
for(INT16 i=0; i<AIM_LINK_NUM_LINKS; i++)
|
||||||
MSYS_RemoveRegion( &gSelectedLinkRegion[i]);
|
MSYS_RemoveRegion( &gSelectedLinkRegion[i]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -125,6 +125,13 @@ typedef struct
|
|||||||
BOOLEAN fSpeckSaidFloMarriedCousinQuote;
|
BOOLEAN fSpeckSaidFloMarriedCousinQuote;
|
||||||
BOOLEAN fHasAMercDiedAtMercSite;
|
BOOLEAN fHasAMercDiedAtMercSite;
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
#else
|
||||||
|
UINT32 uiJohnEscortedDate;// anv: Remember when Kulbas were escorted out, so John can be recruited later
|
||||||
|
BOOLEAN bJohnEscorted;// and if they were at all
|
||||||
|
UINT8 ubJohnPossibleMissedFlights;// and how many flights he already missed
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CRIPPLED_VERSION
|
#ifdef CRIPPLED_VERSION
|
||||||
UINT8 ubCrippleFiller[20];
|
UINT8 ubCrippleFiller[20];
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -352,7 +352,19 @@
|
|||||||
|
|
||||||
#define BOBBY_R_MEDUNA_SHIPMENT ( AIM_MEDICAL_DEPOSIT_NO_REFUND + AIM_MEDICAL_DEPOSIT_NO_REFUND_LENGTH )
|
#define BOBBY_R_MEDUNA_SHIPMENT ( AIM_MEDICAL_DEPOSIT_NO_REFUND + AIM_MEDICAL_DEPOSIT_NO_REFUND_LENGTH )
|
||||||
#define BOBBY_R_MEDUNA_SHIPMENT_LENGTH 4
|
#define BOBBY_R_MEDUNA_SHIPMENT_LENGTH 4
|
||||||
|
|
||||||
|
// anv: Kulba's odyssey
|
||||||
|
#define JOHN_KULBA_MISSED_FLIGHT_1 ( BOBBY_R_MEDUNA_SHIPMENT + BOBBY_R_MEDUNA_SHIPMENT_LENGTH )
|
||||||
|
#define JOHN_KULBA_MISSED_FLIGHT_1_LENGTH 3
|
||||||
|
|
||||||
|
#define JOHN_KULBA_MISSED_FLIGHT_2 ( JOHN_KULBA_MISSED_FLIGHT_1 + JOHN_KULBA_MISSED_FLIGHT_1_LENGTH )
|
||||||
|
#define JOHN_KULBA_MISSED_FLIGHT_2_LENGTH 3
|
||||||
|
|
||||||
|
#define JOHN_KULBA_MISSED_FLIGHT_3 ( JOHN_KULBA_MISSED_FLIGHT_2 + JOHN_KULBA_MISSED_FLIGHT_2_LENGTH )
|
||||||
|
#define JOHN_KULBA_MISSED_FLIGHT_3_LENGTH 3
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// WANNE: New 1.13 MERC merc mail text for level up that Speck sends
|
// WANNE: New 1.13 MERC merc mail text for level up that Speck sends
|
||||||
//#define MERC_UP_LEVEL_GASTON (BOBBY_R_MEDUNA_SHIPMENT + BOBBY_R_MEDUNA_SHIPMENT_LENGTH)
|
//#define MERC_UP_LEVEL_GASTON (BOBBY_R_MEDUNA_SHIPMENT + BOBBY_R_MEDUNA_SHIPMENT_LENGTH)
|
||||||
//#define MERC_UP_LEVEL_GASTON_LENGTH 2
|
//#define MERC_UP_LEVEL_GASTON_LENGTH 2
|
||||||
|
|||||||
@@ -825,6 +825,14 @@ BOOLEAN InitLaptopAndLaptopScreens()
|
|||||||
#endif
|
#endif
|
||||||
LaptopSaveInfo.fBobbyRSiteCanBeAccessed = FALSE;
|
LaptopSaveInfo.fBobbyRSiteCanBeAccessed = FALSE;
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
#else
|
||||||
|
//Reset Kulbas' saving date and possible missed flights
|
||||||
|
LaptopSaveInfo.bJohnEscorted = FALSE;
|
||||||
|
LaptopSaveInfo.uiJohnEscortedDate = 0;
|
||||||
|
LaptopSaveInfo.ubJohnPossibleMissedFlights = 3;
|
||||||
|
#endif
|
||||||
|
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
+163
-11
@@ -366,6 +366,31 @@ BOOLEAN LoadNewMercsFromLoadGameFile( HWFILE hFile )
|
|||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOLEAN CanMercBeAvailableDuringInit( UINT8 ubMercToCheck )// anv: for all mercs available
|
||||||
|
{
|
||||||
|
if( gConditionsForMercAvailability[ubMercToCheck].Drunk == TRUE )
|
||||||
|
return ( FALSE );
|
||||||
|
if( gGameExternalOptions.fEnableRecruitableJA1Natives == FALSE )
|
||||||
|
{
|
||||||
|
if( gConditionsForMercAvailability[ubMercToCheck].ProfilId == ELIO ||
|
||||||
|
gConditionsForMercAvailability[ubMercToCheck].ProfilId == JUAN ||
|
||||||
|
gConditionsForMercAvailability[ubMercToCheck].ProfilId == WAHAN )
|
||||||
|
return ( FALSE );
|
||||||
|
}
|
||||||
|
if( gGameExternalOptions.fEnableRecruitableSpeck == FALSE )
|
||||||
|
{
|
||||||
|
if( gConditionsForMercAvailability[ubMercToCheck].ProfilId == SPECK_PLAYABLE )
|
||||||
|
return ( FALSE );
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef JA25
|
||||||
|
#else
|
||||||
|
if( gConditionsForMercAvailability[ubMercToCheck].ProfilId == JOHN_MERC )
|
||||||
|
return ( FALSE );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return ( TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
void GameInitMercs()
|
void GameInitMercs()
|
||||||
{
|
{
|
||||||
@@ -391,6 +416,29 @@ void GameInitMercs()
|
|||||||
NUMBER_OF_BAD_MERCS = NUMBER_OF_BAD_MERCS + 1;
|
NUMBER_OF_BAD_MERCS = NUMBER_OF_BAD_MERCS + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// anv: if all merc should be availabe, then set their availability info
|
||||||
|
if(gGameExternalOptions.fAllMercsAvailable == TRUE)
|
||||||
|
{
|
||||||
|
for(i=0; i<NUMBER_OF_MERCS; i++)
|
||||||
|
{
|
||||||
|
if( CanMercBeAvailableDuringInit(i) )
|
||||||
|
{
|
||||||
|
gConditionsForMercAvailabilityTemp[i].StartMercsAvailable = TRUE;
|
||||||
|
gConditionsForMercAvailabilityTemp[i].NewMercsAvailable = TRUE;
|
||||||
|
gConditionsForMercAvailability[i].StartMercsAvailable = TRUE;
|
||||||
|
gConditionsForMercAvailability[i].NewMercsAvailable = TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gConditionsForMercAvailabilityTemp[i].StartMercsAvailable = FALSE;
|
||||||
|
gConditionsForMercAvailabilityTemp[i].NewMercsAvailable = FALSE;
|
||||||
|
gConditionsForMercAvailability[i].StartMercsAvailable = FALSE;
|
||||||
|
gConditionsForMercAvailability[i].NewMercsAvailable = FALSE;
|
||||||
|
LAST_MERC_ID--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LaptopSaveInfo.gubPlayersMercAccountStatus = MERC_NO_ACCOUNT;
|
LaptopSaveInfo.gubPlayersMercAccountStatus = MERC_NO_ACCOUNT;
|
||||||
gubCurMercIndex = 0;
|
gubCurMercIndex = 0;
|
||||||
|
|
||||||
@@ -1105,6 +1153,55 @@ void DailyUpdateOfMercSite( UINT16 usDate)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// anv: Gets the actually available merc. For use in displaying unlocked mercs on MERC website.
|
||||||
|
UINT8 GetAvailableMercIndex(UINT8 gubCurMercIndex)
|
||||||
|
{
|
||||||
|
UINT8 returnID = 0;
|
||||||
|
if( gubCurMercIndex <= NUM_PROFILES )
|
||||||
|
{
|
||||||
|
UINT8 availableID = 0;
|
||||||
|
UINT8 ID = 0;
|
||||||
|
//go through mercs, but only consider those unlocked
|
||||||
|
while( availableID < gubCurMercIndex )
|
||||||
|
{
|
||||||
|
ID++;
|
||||||
|
if( gConditionsForMercAvailability[ ID ].StartMercsAvailable == TRUE )
|
||||||
|
availableID++;
|
||||||
|
|
||||||
|
}
|
||||||
|
returnID = ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Is this a drunken merc (e.g Larry) and has an additional drunken profile
|
||||||
|
if( gConditionsForMercAvailability[ returnID ].Drunk == TRUE && gConditionsForMercAvailability[ returnID ].uiAlternateIndex != 255)
|
||||||
|
{
|
||||||
|
if ( HasLarryRelapsed() )
|
||||||
|
{
|
||||||
|
// Drunken Larry
|
||||||
|
if (gConditionsForMercAvailability[ returnID ].uiIndex <= NUM_PROFILES)
|
||||||
|
{
|
||||||
|
returnID = gConditionsForMercAvailability[ returnID ].uiIndex;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Assert(0);
|
||||||
|
return( TRUE );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Normal Larry (Normal Profile is one
|
||||||
|
returnID = gConditionsForMercAvailability[ returnID ].uiAlternateIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return returnID;
|
||||||
|
}
|
||||||
|
|
||||||
|
UINT8 GetAvailableMercIDFromMERCArray(UINT8 ubMercID)
|
||||||
|
{
|
||||||
|
return gubMercArray[GetAvailableMercIndex(ubMercID)];
|
||||||
|
}
|
||||||
|
|
||||||
//Gets the actual merc id from the array
|
//Gets the actual merc id from the array
|
||||||
UINT8 GetMercIDFromMERCArray(UINT8 ubMercID)
|
UINT8 GetMercIDFromMERCArray(UINT8 ubMercID)
|
||||||
{
|
{
|
||||||
@@ -2379,7 +2476,7 @@ BOOLEAN ShouldSpeckStartTalkingDueToActionOnSubPage()
|
|||||||
if( gfJustHiredAMercMerc )
|
if( gfJustHiredAMercMerc )
|
||||||
{
|
{
|
||||||
|
|
||||||
HandlePlayerHiringMerc( GetMercIDFromMERCArray( gubCurMercIndex ) );
|
HandlePlayerHiringMerc( GetAvailableMercIDFromMERCArray( gubCurMercIndex ) );
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#else
|
#else
|
||||||
@@ -2428,7 +2525,7 @@ BOOLEAN IsSpeckComAvailable() // anv: Prevent Speck from talking if his playable
|
|||||||
|| gMercProfiles[ SPECK_PLAYABLE ].bMercStatus == MERC_FIRED_AS_A_POW ) )
|
|| gMercProfiles[ SPECK_PLAYABLE ].bMercStatus == MERC_FIRED_AS_A_POW ) )
|
||||||
|
|
||||||
//he still can talk if he was just hired, so he can say his recruitment quote
|
//he still can talk if he was just hired, so he can say his recruitment quote
|
||||||
&& ( GetMercIDFromMERCArray( gubCurMercIndex ) != SPECK_PLAYABLE
|
&& ( GetAvailableMercIDFromMERCArray( gubCurMercIndex ) != SPECK_PLAYABLE
|
||||||
|| gusMercVideoSpeckSpeech == SPECK_QUOTE_PLAYER_TRIES_TO_HIRE_ALREADY_HIRED_MERC
|
|| gusMercVideoSpeckSpeech == SPECK_QUOTE_PLAYER_TRIES_TO_HIRE_ALREADY_HIRED_MERC
|
||||||
|| gusMercVideoSpeckSpeech == SPECK_QUOTE_BIFF_UNAVALIABLE
|
|| gusMercVideoSpeckSpeech == SPECK_QUOTE_BIFF_UNAVALIABLE
|
||||||
|| gusMercVideoSpeckSpeech == SPECK_QUOTE_SPECK_UNAVAILABLE
|
|| gusMercVideoSpeckSpeech == SPECK_QUOTE_SPECK_UNAVAILABLE
|
||||||
@@ -2516,12 +2613,21 @@ void HandleSpeckWitnessingEmployeeDeath( SOLDIERTYPE* pSoldier ) // anv: handle
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
#else
|
||||||
|
void AddJohnAsMerc() // anv: add John as playable merc after escorting Kulbas out of country
|
||||||
|
{
|
||||||
|
LaptopSaveInfo.bJohnEscorted = TRUE;
|
||||||
|
LaptopSaveInfo.uiJohnEscortedDate = GetWorldDay();
|
||||||
|
return;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
BOOLEAN ShouldSpeckSayAQuote()
|
BOOLEAN ShouldSpeckSayAQuote()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//if we are entering from anywhere except a sub page, and we should say the opening quote
|
//if we are entering from anywhere except a sub page, and we should say the opening quote
|
||||||
if( gfJustEnteredMercSite && gubArrivedFromMercSubSite == MERC_CAME_FROM_OTHER_PAGE )
|
if( gfJustEnteredMercSite && gubArrivedFromMercSubSite == MERC_CAME_FROM_OTHER_PAGE )
|
||||||
{
|
{
|
||||||
@@ -2919,8 +3025,55 @@ BOOLEAN CanMercBeAvailableYet( UINT8 ubMercToCheck )
|
|||||||
return ( FALSE );
|
return ( FALSE );
|
||||||
|
|
||||||
//if the merc is already hired
|
//if the merc is already hired
|
||||||
if( !IsMercHireable( GetMercIDFromMERCArray( gConditionsForMercAvailability[ ubMercToCheck ].ubMercArrayID ) ) )
|
//if( !IsMercHireable( GetMercIDFromMERCArray( gConditionsForMercAvailability[ ubMercToCheck ].ubMercArrayID ) ) )
|
||||||
|
// return( FALSE );
|
||||||
|
|
||||||
|
// anv: John Kulba should be recruitable after escort quest
|
||||||
|
#ifdef JA2UB
|
||||||
|
// too many Kulbas
|
||||||
|
#else
|
||||||
|
// if merc is Kulba, he was escorted as a civilian and enough days passed
|
||||||
|
if( gConditionsForMercAvailability[ ubMercToCheck ].ProfilId == JOHN_MERC )
|
||||||
|
{
|
||||||
|
if(gGameExternalOptions.fEnableRecruitableJohnKulba == TRUE)
|
||||||
|
{
|
||||||
|
if( LaptopSaveInfo.bJohnEscorted == TRUE
|
||||||
|
&& LaptopSaveInfo.uiJohnEscortedDate + gGameExternalOptions.ubRecruitableJohnKulbaDelay < GetWorldDay() )
|
||||||
|
{
|
||||||
|
return( TRUE );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return( FALSE );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// anv: if JA1 natives are turned off, prevent them from being be available
|
||||||
|
if(gGameExternalOptions.fEnableRecruitableJA1Natives == FALSE)
|
||||||
|
{
|
||||||
|
if( gConditionsForMercAvailability[ ubMercToCheck ].ProfilId == ELIO ||
|
||||||
|
gConditionsForMercAvailability[ ubMercToCheck ].ProfilId == JUAN ||
|
||||||
|
gConditionsForMercAvailability[ ubMercToCheck ].ProfilId == WAHAN )
|
||||||
|
{
|
||||||
|
return( FALSE );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// anv: if recruitable Speck is turned off, prevent him from being available
|
||||||
|
if(gGameExternalOptions.fEnableRecruitableSpeck == FALSE)
|
||||||
|
{
|
||||||
|
if( gConditionsForMercAvailability[ ubMercToCheck ].ProfilId == SPECK_PLAYABLE )
|
||||||
|
{
|
||||||
|
return( FALSE );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
//if player has paid enough money for the merc to be available, and the it is after the current day
|
//if player has paid enough money for the merc to be available, and the it is after the current day
|
||||||
if( gConditionsForMercAvailability[ ubMercToCheck ].usMoneyPaid <= LaptopSaveInfo.uiTotalMoneyPaidToSpeck &&
|
if( gConditionsForMercAvailability[ ubMercToCheck ].usMoneyPaid <= LaptopSaveInfo.uiTotalMoneyPaidToSpeck &&
|
||||||
@@ -2942,7 +3095,8 @@ void NewMercsAvailableAtMercSiteCallBack( )
|
|||||||
{
|
{
|
||||||
gConditionsForMercAvailability[i].NewMercsAvailable = TRUE;
|
gConditionsForMercAvailability[i].NewMercsAvailable = TRUE;
|
||||||
|
|
||||||
if ( gConditionsForMercAvailability[ gConditionsForMercAvailability[i].uiIndex ].Drunk == TRUE )
|
//if ( gConditionsForMercAvailability[ gConditionsForMercAvailability[i].uiIndex ].Drunk == TRUE )
|
||||||
|
if ( gConditionsForMercAvailability[i].Drunk == TRUE )
|
||||||
{
|
{
|
||||||
LaptopSaveInfo.gubLastMercIndex = gConditionsForMercAvailability[gConditionsForMercAvailability[i].uiAlternateIndex].uiIndex;
|
LaptopSaveInfo.gubLastMercIndex = gConditionsForMercAvailability[gConditionsForMercAvailability[i].uiAlternateIndex].uiIndex;
|
||||||
}
|
}
|
||||||
@@ -2952,16 +3106,15 @@ void NewMercsAvailableAtMercSiteCallBack( )
|
|||||||
if (i > 0 && gConditionsForMercAvailability[ gConditionsForMercAvailability[i - 1].uiIndex ].uiAlternateIndex != 255)
|
if (i > 0 && gConditionsForMercAvailability[ gConditionsForMercAvailability[i - 1].uiIndex ].uiAlternateIndex != 255)
|
||||||
{
|
{
|
||||||
// Previous merc has alternate (drunk) merc, skip his one!
|
// Previous merc has alternate (drunk) merc, skip his one!
|
||||||
LaptopSaveInfo.gubLastMercIndex = LaptopSaveInfo.gubLastMercIndex + 2;
|
//LaptopSaveInfo.gubLastMercIndex = LaptopSaveInfo.gubLastMercIndex + 2;
|
||||||
|
LaptopSaveInfo.gubLastMercIndex = LaptopSaveInfo.gubLastMercIndex++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LaptopSaveInfo.gubLastMercIndex++;
|
LaptopSaveInfo.gubLastMercIndex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//gConditionsForMercAvailability[gConditionsForMercAvailability[i].uiIndex].NewMercsAvailable = TRUE; LaptopSaveInfo.ubLastMercAvailableId = gConditionsForMercAvailability[i].uiIndex;
|
||||||
gConditionsForMercAvailability[gConditionsForMercAvailability[i].uiIndex].NewMercsAvailable = TRUE;
|
|
||||||
LaptopSaveInfo.ubLastMercAvailableId = gConditionsForMercAvailability[i].uiIndex;
|
|
||||||
gConditionsForMercAvailability[i].StartMercsAvailable = TRUE;
|
gConditionsForMercAvailability[i].StartMercsAvailable = TRUE;
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
@@ -2970,7 +3123,6 @@ void NewMercsAvailableAtMercSiteCallBack( )
|
|||||||
//new mercs are available
|
//new mercs are available
|
||||||
LaptopSaveInfo.fNewMercsAvailableAtMercSite = TRUE;
|
LaptopSaveInfo.fNewMercsAvailableAtMercSite = TRUE;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
if( IsSpeckComAvailable() )
|
if( IsSpeckComAvailable() )
|
||||||
{
|
{
|
||||||
AddEmail( NEW_MERCS_AT_MERC, NEW_MERCS_AT_MERC_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
AddEmail( NEW_MERCS_AT_MERC, NEW_MERCS_AT_MERC_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||||
|
|||||||
+7
-1
@@ -109,7 +109,7 @@ enum
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
BOOLEAN CanMercBeAvailableDuringInit( UINT8 ubMercToCheck );// anv: for all mercs available
|
||||||
void GameInitMercs();
|
void GameInitMercs();
|
||||||
BOOLEAN EnterMercs();
|
BOOLEAN EnterMercs();
|
||||||
void ExitMercs();
|
void ExitMercs();
|
||||||
@@ -123,6 +123,9 @@ BOOLEAN RemoveMercBackGround();
|
|||||||
void DailyUpdateOfMercSite( UINT16 usDate);
|
void DailyUpdateOfMercSite( UINT16 usDate);
|
||||||
UINT8 GetMercIDFromMERCArray(UINT8 ubMercID);
|
UINT8 GetMercIDFromMERCArray(UINT8 ubMercID);
|
||||||
|
|
||||||
|
UINT8 GetAvailableMercIndex(UINT8 gubCurMercIndex);
|
||||||
|
UINT8 GetAvailableMercIDFromMERCArray(UINT8 ubMercID);
|
||||||
|
|
||||||
void DisplayTextForSpeckVideoPopUp(STR16 pString);
|
void DisplayTextForSpeckVideoPopUp(STR16 pString);
|
||||||
|
|
||||||
BOOLEAN IsMercMercAvailable( UINT8 ubMercID );
|
BOOLEAN IsMercMercAvailable( UINT8 ubMercID );
|
||||||
@@ -157,6 +160,9 @@ void MakeBiffAwayForCoupleOfDays();
|
|||||||
#else
|
#else
|
||||||
BOOLEAN IsSpeckComAvailable();
|
BOOLEAN IsSpeckComAvailable();
|
||||||
void HandleSpeckWitnessingEmployeeDeath( SOLDIERTYPE* pSoldier );
|
void HandleSpeckWitnessingEmployeeDeath( SOLDIERTYPE* pSoldier );
|
||||||
|
|
||||||
|
// anv: for Kulba hireable after escort quest
|
||||||
|
void AddJohnAsMerc( );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void InitializeNumDaysMercArrive();
|
void InitializeNumDaysMercArrive();
|
||||||
|
|||||||
@@ -2731,6 +2731,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
|
|||||||
if( pSoldier->ubProfile == FLO )
|
if( pSoldier->ubProfile == FLO )
|
||||||
{
|
{
|
||||||
SetFactTrue( FACT_PC_MARRYING_DARYL_IS_FLO );
|
SetFactTrue( FACT_PC_MARRYING_DARYL_IS_FLO );
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#else
|
#else
|
||||||
// anv: make Speck whine about it immediately if on team
|
// anv: make Speck whine about it immediately if on team
|
||||||
@@ -4013,6 +4014,13 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
|
|||||||
|
|
||||||
case NPC_ACTION_ADD_JOHNS_GUN_SHIPMENT:
|
case NPC_ACTION_ADD_JOHNS_GUN_SHIPMENT:
|
||||||
AddJohnsGunShipment();
|
AddJohnsGunShipment();
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
#else
|
||||||
|
// anv: recruitable Kulba
|
||||||
|
if( gGameExternalOptions.fEnableRecruitableJohnKulba == TRUE )
|
||||||
|
AddJohnAsMerc();
|
||||||
|
#endif
|
||||||
// also close panel
|
// also close panel
|
||||||
DeleteTalkingMenu();
|
DeleteTalkingMenu();
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -65,6 +65,12 @@
|
|||||||
#include "ub_config.h"
|
#include "ub_config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
#else
|
||||||
|
// anv: for Kulba's odyssey
|
||||||
|
#include "email.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
//forward declarations of common classes to eliminate includes
|
//forward declarations of common classes to eliminate includes
|
||||||
class OBJECTTYPE;
|
class OBJECTTYPE;
|
||||||
class SOLDIERTYPE;
|
class SOLDIERTYPE;
|
||||||
@@ -452,6 +458,38 @@ void MercArrivesCallback( UINT8 ubSoldierID )
|
|||||||
|
|
||||||
pMerc = &gMercProfiles[ pSoldier->ubProfile ];
|
pMerc = &gMercProfiles[ pSoldier->ubProfile ];
|
||||||
|
|
||||||
|
// anv: handle Kulba's odyssey
|
||||||
|
#ifdef JA2UB
|
||||||
|
// too many Kulbas
|
||||||
|
#else
|
||||||
|
if(pSoldier->ubProfile == JOHN_MERC)
|
||||||
|
{
|
||||||
|
// just in case
|
||||||
|
if( LaptopSaveInfo.ubJohnPossibleMissedFlights > 3 )
|
||||||
|
LaptopSaveInfo.ubJohnPossibleMissedFlights = 3;
|
||||||
|
// every time Kulba delays his arrival, chances of next delay decrease
|
||||||
|
if( Random( 100 ) < LaptopSaveInfo.ubJohnPossibleMissedFlights * 25 )
|
||||||
|
{
|
||||||
|
pSoldier->uiTimeSoldierWillArrive = pSoldier->uiTimeSoldierWillArrive + 720 + Random ( 720 );
|
||||||
|
AddStrategicEvent( EVENT_DELAYED_HIRING_OF_MERC, pSoldier->uiTimeSoldierWillArrive, pSoldier->ubID );
|
||||||
|
if(LaptopSaveInfo.ubJohnPossibleMissedFlights == 3 )
|
||||||
|
AddEmail( JOHN_KULBA_MISSED_FLIGHT_1, JOHN_KULBA_MISSED_FLIGHT_1_LENGTH, JOHN_KULBA, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT );
|
||||||
|
else if(LaptopSaveInfo.ubJohnPossibleMissedFlights == 2 )
|
||||||
|
AddEmail( JOHN_KULBA_MISSED_FLIGHT_2, JOHN_KULBA_MISSED_FLIGHT_2_LENGTH, JOHN_KULBA, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT );
|
||||||
|
else if(LaptopSaveInfo.ubJohnPossibleMissedFlights == 1 )
|
||||||
|
AddEmail( JOHN_KULBA_MISSED_FLIGHT_3, JOHN_KULBA_MISSED_FLIGHT_3_LENGTH, JOHN_KULBA, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT );
|
||||||
|
|
||||||
|
LaptopSaveInfo.ubJohnPossibleMissedFlights--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// reset possible missed flights, for the future Kulba's adventures
|
||||||
|
LaptopSaveInfo.ubJohnPossibleMissedFlights = 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// add the guy to a squad
|
// add the guy to a squad
|
||||||
AddCharacterToAnySquad( pSoldier );
|
AddCharacterToAnySquad( pSoldier );
|
||||||
|
|
||||||
|
|||||||
@@ -242,6 +242,12 @@ enum NPCIDs
|
|||||||
#endif
|
#endif
|
||||||
NPC170 = NPC169 + 84,
|
NPC170 = NPC169 + 84,
|
||||||
SPECK_PLAYABLE = 191,// anv
|
SPECK_PLAYABLE = 191,// anv
|
||||||
|
|
||||||
|
// Those 4 only available in JA2 113 and not in JA2 UB!
|
||||||
|
JOHN_MERC = 195,
|
||||||
|
ELIO = 196,
|
||||||
|
JUAN = 197,
|
||||||
|
WAHAN = 198,
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
BOOLEAN LoadMercProfiles(void);
|
BOOLEAN LoadMercProfiles(void);
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
// *****************************
|
// *****************************
|
||||||
// WANNE: With these define we can build JA2 DEMO version that runs with 1.13
|
// WANNE: With this defin we can build JA2 DEMO version that runs with 1.13
|
||||||
// The 2 UB defines (JA2UB and JA2UBMAPS) should be disabled, because we only want to build the demo version from the JA2 code!
|
// The 2 UB defines (JA2UB and JA2UBMAPS) should be disabled, because we only want to build the demo version from the JA2 code!
|
||||||
|
|
||||||
//#define JA113DEMO
|
//#define JA113DEMO
|
||||||
|
|||||||
Reference in New Issue
Block a user