- 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:
Wanne
2013-07-29 11:48:53 +00:00
parent 0e3865a4ef
commit c74e13fb5c
13 changed files with 538 additions and 285 deletions
+8
View File
@@ -2731,6 +2731,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
if( pSoldier->ubProfile == FLO )
{
SetFactTrue( FACT_PC_MARRYING_DARYL_IS_FLO );
#ifdef JA2UB
#else
// 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:
AddJohnsGunShipment();
#ifdef JA2UB
#else
// anv: recruitable Kulba
if( gGameExternalOptions.fEnableRecruitableJohnKulba == TRUE )
AddJohnAsMerc();
#endif
// also close panel
DeleteTalkingMenu();
break;
+38
View File
@@ -65,6 +65,12 @@
#include "ub_config.h"
#endif
#ifdef JA2UB
#else
// anv: for Kulba's odyssey
#include "email.h"
#endif
//forward declarations of common classes to eliminate includes
class OBJECTTYPE;
class SOLDIERTYPE;
@@ -452,6 +458,38 @@ void MercArrivesCallback( UINT8 ubSoldierID )
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
AddCharacterToAnySquad( pSoldier );
+6
View File
@@ -242,6 +242,12 @@ enum NPCIDs
#endif
NPC170 = NPC169 + 84,
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);