mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +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:
@@ -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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user