mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
New merc (somewhat): Similar to Larry's two personalities, Buns now has an alternate personality as well.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=tree&th=23806&goto=354149&#msg_354149 Requires GameDir >= r2430. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8588 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+2
-2
@@ -55,8 +55,8 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CHAR8 czVersionNumber[16] = { "Build 18.07.21" }; //YY.MM.DD
|
CHAR8 czVersionNumber[16] = { "Build 18.07.25" }; //YY.MM.DD
|
||||||
CHAR16 zTrackingNumber[16] = { L"Z" };
|
CHAR16 zTrackingNumber[16] = { L"Z" };
|
||||||
CHAR16 zRevisionNumber[16] = { L"Revision 8580" };
|
CHAR16 zRevisionNumber[16] = { L"Revision 8588" };
|
||||||
|
|
||||||
// SAVE_GAME_VERSION is defined in header, change it there
|
// SAVE_GAME_VERSION is defined in header, change it there
|
||||||
|
|||||||
+92
-66
@@ -347,28 +347,30 @@ UINT16 LarryItems[ NUM_LARRY_ITEMS ][ 3 ] =
|
|||||||
{ WINE, 3, 50 },
|
{ WINE, 3, 50 },
|
||||||
{ REGEN_BOOSTER, 3, 100 },
|
{ REGEN_BOOSTER, 3, 100 },
|
||||||
{ BEER, 2, 100 },
|
{ BEER, 2, 100 },
|
||||||
};*/
|
};
|
||||||
|
|
||||||
#define LARRY_FALLS_OFF_WAGON 8
|
#define LARRY_FALLS_OFF_WAGON 8*/
|
||||||
|
|
||||||
void HourlyLarryUpdate()
|
void HourlyLarryUpdate()
|
||||||
{
|
{
|
||||||
SOLDIERTYPE * pSoldier = NULL;
|
SOLDIERTYPE * pSoldier = NULL;
|
||||||
SOLDIERTYPE * pOtherSoldier = NULL;
|
SOLDIERTYPE * pOtherSoldier = NULL;
|
||||||
INT8 bSlot = NO_SLOT, bBoozeSlot;
|
INT8 bSlot = NO_SLOT, bBoozeSlot;
|
||||||
INT8 bLarryItemLoop;
|
|
||||||
UINT16 usTemptation = 0;
|
UINT16 usTemptation = 0;
|
||||||
UINT16 usCashAmount;
|
UINT16 usCashAmount;
|
||||||
BOOLEAN fBar = FALSE;
|
BOOLEAN fBar = FALSE;
|
||||||
OBJECTTYPE* pObj = NULL;
|
OBJECTTYPE* pObj = NULL;
|
||||||
|
BOOLEAN fTookDrugs = FALSE;
|
||||||
|
|
||||||
for( UINT32 cnt = gTacticalStatus.Team[ OUR_TEAM ].bFirstID; cnt <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; ++cnt )
|
for( UINT32 cnt = gTacticalStatus.Team[ OUR_TEAM ].bFirstID; cnt <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; ++cnt )
|
||||||
{
|
{
|
||||||
pSoldier = MercPtrs[ cnt ];
|
pSoldier = MercPtrs[ cnt ];
|
||||||
|
|
||||||
if ( pSoldier && pSoldier->bAssignment < ON_DUTY && !pSoldier->flags.fBetweenSectors && pSoldier->bActive && pSoldier->bInSector && !(gTacticalStatus.fEnemyInSector || guiCurrentScreen == GAME_SCREEN ) )
|
if ( pSoldier && pSoldier->bActive && ( pSoldier->ubProfile == LARRY_NORMAL || pSoldier->ubProfile == LARRY_DRUNK || pSoldier->HasBackgroundFlag( BACKGROUND_DRUGUSE ) ) )
|
||||||
{
|
{
|
||||||
if ( pSoldier->ubProfile == LARRY_NORMAL || pSoldier->ubProfile == LARRY_DRUNK || pSoldier->HasBackgroundFlag( BACKGROUND_DRUGUSE ) )
|
fTookDrugs = FALSE;
|
||||||
|
|
||||||
|
if ( pSoldier->bAssignment < ON_DUTY && !pSoldier->flags.fBetweenSectors && pSoldier->bInSector && !( gTacticalStatus.fEnemyInSector || guiCurrentScreen == GAME_SCREEN ) )
|
||||||
{
|
{
|
||||||
// Flugente: reworked this for the new drug system. We now loop over our entire inventory
|
// Flugente: reworked this for the new drug system. We now loop over our entire inventory
|
||||||
INT8 invsize = (INT8)pSoldier->inv.size(); // remember inventorysize, so we don't call size() repeatedly
|
INT8 invsize = (INT8)pSoldier->inv.size(); // remember inventorysize, so we don't call size() repeatedly
|
||||||
@@ -447,73 +449,80 @@ void HourlyLarryUpdate()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( fSnitchStoppedBehaviour )
|
if ( !fSnitchStoppedBehaviour )
|
||||||
continue;
|
{
|
||||||
|
fTookDrugs = TRUE;
|
||||||
|
|
||||||
if ( pSoldier->ubProfile == LARRY_DRUNK )
|
// Flugente: dynamic opinion
|
||||||
|
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ADDICT, TRUE, FALSE );
|
||||||
|
|
||||||
|
if ( fBar )
|
||||||
|
{
|
||||||
|
// take $ from player's account
|
||||||
|
// silversurfer: changed the price to reflect the changed amount of 25% below
|
||||||
|
//usCashAmount = Item[ ALCOHOL ].usPrice;
|
||||||
|
usCashAmount = (UINT16)( Item[ALCOHOL].usPrice / 4.0f );
|
||||||
|
AddTransactionToPlayersBook ( TRANSFER_FUNDS_TO_MERC, pSoldier->ubProfile, GetWorldTotalMin(), -( usCashAmount ) );
|
||||||
|
// give Larry some booze and set slot etc values appropriately
|
||||||
|
// CHRISL: Change final parameter to allow dynamic control of inventory slots
|
||||||
|
bBoozeSlot = FindEmptySlotWithin( pSoldier, HANDPOS, NUM_INV_SLOTS );
|
||||||
|
if ( bBoozeSlot != NO_SLOT )
|
||||||
|
{
|
||||||
|
// give Larry booze here
|
||||||
|
// silversurfer: only give the merc a 25% bottle. This fixes the problem that the bottle of alcohol can go to any inventory slot even one that isn't available.
|
||||||
|
// Now the bottle will be fully consumed below and vanishes from inventory before the player even gets to see it. This simulates going to a bar to have a drink there.
|
||||||
|
//CreateItem( ALCOHOL, 100, &(pSoldier->inv[bBoozeSlot]) );
|
||||||
|
CreateItem( ALCOHOL, 25, &( pSoldier->inv[bBoozeSlot] ) );
|
||||||
|
}
|
||||||
|
bSlot = bBoozeSlot;
|
||||||
|
|
||||||
|
if ( bSlot != NO_SLOT )
|
||||||
|
{
|
||||||
|
UseKitPoints( &( pSoldier->inv[bSlot] ), 25/*LarryItems[ bLarryItemLoop ][ 2 ]*/, pSoldier );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( pObj )
|
||||||
|
UseKitPoints( pObj, 100/*LarryItems[ bLarryItemLoop ][ 2 ]*/, pSoldier );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// special treatment for Larry, he switches personality if takes drugs
|
||||||
|
if ( pSoldier->ubProfile == LARRY_NORMAL || pSoldier->ubProfile == LARRY_DRUNK )
|
||||||
|
{
|
||||||
|
if ( fTookDrugs )
|
||||||
|
{
|
||||||
|
if ( pSoldier->ubProfile == LARRY_NORMAL )
|
||||||
|
{
|
||||||
|
SwapToProfile( pSoldier, LARRY_DRUNK );
|
||||||
|
|
||||||
|
gMercProfiles[LARRY_NORMAL].bNPCData = LARRY_FALLS_OFF_WAGON;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// NB store all drunkenness info in LARRY_NORMAL profile (to use same values)
|
// NB store all drunkenness info in LARRY_NORMAL profile (to use same values)
|
||||||
// so long as he keeps consuming, keep number above level at which he cracked
|
// so long as he keeps consuming, keep number above level at which he cracked
|
||||||
gMercProfiles[ LARRY_NORMAL ].bNPCData = __max( gMercProfiles[ LARRY_NORMAL ].bNPCData, LARRY_FALLS_OFF_WAGON );
|
gMercProfiles[LARRY_NORMAL].bNPCData += (INT8)Random( usTemptation );
|
||||||
gMercProfiles[ LARRY_NORMAL ].bNPCData += (INT8) Random( usTemptation );
|
|
||||||
// allow value to keep going up to 24 (about 2 days since we subtract Random( 2 ) when he has no access )
|
// allow value to keep going up to 24 (about 2 days since we subtract Random( 2 ) when he has no access )
|
||||||
gMercProfiles[ LARRY_NORMAL ].bNPCData = __min( gMercProfiles[ LARRY_NORMAL ].bNPCData, 24 );
|
gMercProfiles[LARRY_NORMAL].bNPCData = __min( gMercProfiles[LARRY_NORMAL].bNPCData, 24 );
|
||||||
}
|
gMercProfiles[LARRY_NORMAL].bNPCData = __max( gMercProfiles[LARRY_NORMAL].bNPCData, LARRY_FALLS_OFF_WAGON );
|
||||||
else
|
|
||||||
{
|
|
||||||
gMercProfiles[ pSoldier->ubProfile ].bNPCData += (INT8) Random( usTemptation );
|
|
||||||
|
|
||||||
if ( gMercProfiles[ pSoldier->ubProfile ].bNPCData < LARRY_FALLS_OFF_WAGON )
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Flugente: dynamic opinion
|
|
||||||
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ADDICT, TRUE, FALSE );
|
|
||||||
|
|
||||||
if ( fBar )
|
|
||||||
{
|
|
||||||
// take $ from player's account
|
|
||||||
// silversurfer: changed the price to reflect the changed amount of 25% below
|
|
||||||
//usCashAmount = Item[ ALCOHOL ].usPrice;
|
|
||||||
usCashAmount = (UINT16)(Item[ ALCOHOL ].usPrice / 4.0f );
|
|
||||||
AddTransactionToPlayersBook ( TRANSFER_FUNDS_TO_MERC, pSoldier->ubProfile, GetWorldTotalMin() , -( usCashAmount ) );
|
|
||||||
// give Larry some booze and set slot etc values appropriately
|
|
||||||
// CHRISL: Change final parameter to allow dynamic control of inventory slots
|
|
||||||
bBoozeSlot = FindEmptySlotWithin( pSoldier, HANDPOS, NUM_INV_SLOTS );
|
|
||||||
if ( bBoozeSlot != NO_SLOT )
|
|
||||||
{
|
|
||||||
// give Larry booze here
|
|
||||||
// silversurfer: only give the merc a 25% bottle. This fixes the problem that the bottle of alcohol can go to any inventory slot even one that isn't available.
|
|
||||||
// Now the bottle will be fully consumed below and vanishes from inventory before the player even gets to see it. This simulates going to a bar to have a drink there.
|
|
||||||
//CreateItem( ALCOHOL, 100, &(pSoldier->inv[bBoozeSlot]) );
|
|
||||||
CreateItem( ALCOHOL, 25, &(pSoldier->inv[bBoozeSlot]) );
|
|
||||||
}
|
|
||||||
bSlot = bBoozeSlot;
|
|
||||||
bLarryItemLoop = 1;
|
|
||||||
|
|
||||||
if ( pSoldier->ubProfile == LARRY_DRUNK )
|
|
||||||
{
|
|
||||||
SwapLarrysProfiles( pSoldier );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( bSlot != NO_SLOT )
|
|
||||||
{
|
|
||||||
UseKitPoints( &(pSoldier->inv[ bSlot ]), 25/*LarryItems[ bLarryItemLoop ][ 2 ]*/, pSoldier );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( pObj )
|
|
||||||
UseKitPoints( pObj, 100/*LarryItems[ bLarryItemLoop ][ 2 ]*/, pSoldier );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( pSoldier->ubProfile == LARRY_DRUNK )
|
else
|
||||||
{
|
{
|
||||||
gMercProfiles[ LARRY_NORMAL ].bNPCData -= (INT8) Random( 2 );
|
if ( pSoldier->ubProfile == LARRY_DRUNK )
|
||||||
if ( gMercProfiles[ LARRY_NORMAL ].bNPCData <= 0 )
|
|
||||||
{
|
{
|
||||||
// goes sober!
|
gMercProfiles[LARRY_NORMAL].bNPCData -= (INT8)Random( 2 );
|
||||||
SwapLarrysProfiles( pSoldier );
|
|
||||||
|
if ( gMercProfiles[LARRY_NORMAL].bNPCData <= 0 )
|
||||||
|
{
|
||||||
|
// goes sober!
|
||||||
|
SwapToProfile( pSoldier, LARRY_NORMAL );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -563,10 +572,10 @@ void HourlyDisabilityUpdate( )
|
|||||||
{
|
{
|
||||||
pSoldier = MercPtrs[cnt];
|
pSoldier = MercPtrs[cnt];
|
||||||
|
|
||||||
if ( pSoldier && pSoldier->bActive && !pSoldier->flags.fMercAsleep )
|
if ( pSoldier && pSoldier->bActive )
|
||||||
{
|
{
|
||||||
// possibl self-harm
|
// possible self-harm
|
||||||
if ( Chance(20) && DoesMercHaveDisability( pSoldier, SELF_HARM ) )
|
if ( !pSoldier->flags.fMercAsleep && Chance(20) && DoesMercHaveDisability( pSoldier, SELF_HARM ) )
|
||||||
{
|
{
|
||||||
// don't do this if we are at low health, or in combat, or travelling, or a patient or doctor
|
// don't do this if we are at low health, or in combat, or travelling, or a patient or doctor
|
||||||
// only do this if we are rather healed
|
// only do this if we are rather healed
|
||||||
@@ -633,6 +642,23 @@ void HourlyDisabilityUpdate( )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If Buns is in her alternate personality, she will eventually change back.
|
||||||
|
if ( pSoldier->ubProfile == BUNS_CHAOTIC )
|
||||||
|
{
|
||||||
|
gMercProfiles[BUNS].bNPCData = max(0, gMercProfiles[BUNS].bNPCData - 1 );
|
||||||
|
|
||||||
|
if ( gMercProfiles[BUNS].bNPCData <= 0 )
|
||||||
|
{
|
||||||
|
SwapToProfile( pSoldier, BUNS );
|
||||||
|
|
||||||
|
extern void SpecialDialogue( SOLDIERTYPE* pSoldier, STR8 azSoundString, STR16 azTextString );
|
||||||
|
|
||||||
|
SpecialDialogue( pSoldier, "Speech\\Special\\buns_ptsd_deactivation.MP3", L"I'm better now." );
|
||||||
|
|
||||||
|
//TacticalCharacterDialogue( pSoldier, QUOTE_WORK_UP_AND_RETURNING_TO_ASSIGNMENT );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -939,6 +939,15 @@ BOOLEAN StrategicRemoveMerc( SOLDIERTYPE *pSoldier )
|
|||||||
EndCurrentContractRenewal( );
|
EndCurrentContractRenewal( );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Flugente: if this is Buns alternate personality, change her back.
|
||||||
|
// This way we don't have to deal with her transformation while she is absent (and we don't need additional laptop soundfiles).
|
||||||
|
if ( pSoldier->ubProfile == BUNS_CHAOTIC )
|
||||||
|
{
|
||||||
|
gMercProfiles[BUNS].bNPCData = 0;
|
||||||
|
|
||||||
|
SwapToProfile( pSoldier, BUNS );
|
||||||
|
}
|
||||||
|
|
||||||
// anv: let buddies react
|
// anv: let buddies react
|
||||||
HandleBuddiesReactionToFiringMerc(pSoldier, MORALE_BUDDY_FIRED);
|
HandleBuddiesReactionToFiringMerc(pSoldier, MORALE_BUDDY_FIRED);
|
||||||
|
|
||||||
|
|||||||
@@ -2231,6 +2231,25 @@ BOOLEAN LuaCallsToDoDialogueStuff( UINT8 ubProfile, INT32 iFaceIndex, const char
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Flugente: play sound file like normal dialogue or, if someone else is already talking, just play the sound
|
||||||
|
void SpecialDialogue( SOLDIERTYPE* pSoldier, STR8 azSoundString, STR16 azTextString )
|
||||||
|
{
|
||||||
|
// if possible, set up a proper dialogue. Otherwise just play the file
|
||||||
|
if ( !DialogueActive() && pSoldier->ubProfile != NO_PROFILE )
|
||||||
|
{
|
||||||
|
gpCurrentTalkingFace = &gFacesData[pSoldier->iFaceIndex];
|
||||||
|
gubCurrentTalkingID = pSoldier->ubID;
|
||||||
|
|
||||||
|
SetQuoteStr( azTextString );
|
||||||
|
|
||||||
|
LuaCallsToDoDialogueStuff( pSoldier->ubProfile, pSoldier->iFaceIndex, azSoundString );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PlayJA2SampleFromFile( azSoundString, RATE_11025, SoundVolume( MIDVOLUME, pSoldier->sGridNo ), 1, SoundDir( pSoldier->sGridNo ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CreateTalkingUI( INT8 bUIHandlerID, INT32 iFaceIndex, UINT8 ubCharacterNum, SOLDIERTYPE *pSoldier, STR16 zQuoteStr )
|
void CreateTalkingUI( INT8 bUIHandlerID, INT32 iFaceIndex, UINT8 ubCharacterNum, SOLDIERTYPE *pSoldier, STR16 zQuoteStr )
|
||||||
{
|
{
|
||||||
// Show text, if on
|
// Show text, if on
|
||||||
|
|||||||
@@ -376,9 +376,8 @@ void AdditionalTacticalCharacterDialogue_AllInSector( INT16 aSectorX, INT16 aSec
|
|||||||
void AdditionalTacticalCharacterDialogue_AllInSectorRadiusCall( UINT8 ausIgnoreProfile, UINT16 usEventNr,
|
void AdditionalTacticalCharacterDialogue_AllInSectorRadiusCall( UINT8 ausIgnoreProfile, UINT16 usEventNr,
|
||||||
UINT32 aData1 = 0, UINT32 aData2 = 0, UINT32 aData3 = 0, INT32 aAroundGridno = -1, INT32 aRadius = 0 );
|
UINT32 aData1 = 0, UINT32 aData2 = 0, UINT32 aData3 = 0, INT32 aAroundGridno = -1, INT32 aRadius = 0 );
|
||||||
|
|
||||||
void SetQuoteStr( STR16 aStr );
|
// Flugente: play sound file like normal dialogue or, if someone else is already talking, just play the sound
|
||||||
|
void SpecialDialogue( SOLDIERTYPE* pSoldier, STR8 azSoundString, STR16 azTextString );
|
||||||
BOOLEAN LuaCallsToDoDialogueStuff( UINT8 ubProfile, INT32 iFaceIndex, const char* azSoundString );
|
|
||||||
|
|
||||||
// Flugente: replace text with other text
|
// Flugente: replace text with other text
|
||||||
BOOLEAN ReplaceTextWithOtherText( CHAR16 *pFinishedString, CHAR16 compare[32], CHAR16 replace[32] );
|
BOOLEAN ReplaceTextWithOtherText( CHAR16 *pFinishedString, CHAR16 compare[32], CHAR16 replace[32] );
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ enum
|
|||||||
#define DISEASE_PROPERTY_HIDESYMBOL 0x00000008 // do not show a symbol for this disease on the merc's face, even if diagnosed
|
#define DISEASE_PROPERTY_HIDESYMBOL 0x00000008 // do not show a symbol for this disease on the merc's face, even if diagnosed
|
||||||
|
|
||||||
#define DISEASE_PROPERTY_DISGUSTING 0x00000010 // other merc's will be disgusted by anyone with this disease if broken out
|
#define DISEASE_PROPERTY_DISGUSTING 0x00000010 // other merc's will be disgusted by anyone with this disease if broken out
|
||||||
|
#define DISEASE_PROPERTY_PTSD_BUNS 0x00000020 // if Buns has this disease, she can change personality
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -151,13 +151,21 @@ BOOLEAN ApplyDrugs_New( SOLDIERTYPE *pSoldier, UINT16 usItem, UINT16 uStatusUsed
|
|||||||
// do switch for Larry!!
|
// do switch for Larry!!
|
||||||
if ( pSoldier->ubProfile == LARRY_NORMAL )
|
if ( pSoldier->ubProfile == LARRY_NORMAL )
|
||||||
{
|
{
|
||||||
pSoldier = SwapLarrysProfiles( pSoldier );
|
SwapToProfile( pSoldier, LARRY_DRUNK );
|
||||||
|
|
||||||
|
gMercProfiles[LARRY_NORMAL].bNPCData = LARRY_FALLS_OFF_WAGON;
|
||||||
}
|
}
|
||||||
else if ( pSoldier->ubProfile == LARRY_DRUNK )
|
else if ( pSoldier->ubProfile == LARRY_DRUNK )
|
||||||
{
|
{
|
||||||
gMercProfiles[LARRY_DRUNK].bNPCData = 0;
|
// NB store all drunkenness info in LARRY_NORMAL profile (to use same values)
|
||||||
}
|
// so long as he keeps consuming, keep number above level at which he cracked
|
||||||
|
gMercProfiles[LARRY_NORMAL].bNPCData += (INT8)Random( 5 );
|
||||||
|
|
||||||
|
// allow value to keep going up to 24 (about 2 days since we subtract Random( 2 ) when he has no access )
|
||||||
|
gMercProfiles[LARRY_NORMAL].bNPCData = __min( gMercProfiles[LARRY_NORMAL].bNPCData, 24 );
|
||||||
|
gMercProfiles[LARRY_NORMAL].bNPCData = __max( gMercProfiles[LARRY_NORMAL].bNPCData, LARRY_FALLS_OFF_WAGON );
|
||||||
|
}
|
||||||
|
|
||||||
if ( NewDrug[drugused].opinionevent )
|
if ( NewDrug[drugused].opinionevent )
|
||||||
{
|
{
|
||||||
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ADDICT, TRUE, TRUE );
|
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ADDICT, TRUE, TRUE );
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ enum {
|
|||||||
HUNGOVER,
|
HUNGOVER,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define LARRY_FALLS_OFF_WAGON 8
|
||||||
|
|
||||||
BOOLEAN ApplyDrugs_New( SOLDIERTYPE *pSoldier, UINT16 usItem, UINT16 uStatusUsed );
|
BOOLEAN ApplyDrugs_New( SOLDIERTYPE *pSoldier, UINT16 usItem, UINT16 uStatusUsed );
|
||||||
|
|
||||||
void HandleEndTurnDrugAdjustments_New( SOLDIERTYPE *pSoldier );
|
void HandleEndTurnDrugAdjustments_New( SOLDIERTYPE *pSoldier );
|
||||||
|
|||||||
+13
-2
@@ -3577,9 +3577,8 @@ void HandlePlayerTeamMemberDeath( SOLDIERTYPE *pSoldier )
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Make a call to handle the strategic things, such as Life Insurance, record it in history file etc.
|
//Make a call to handle the strategic things, such as Life Insurance, record it in history file etc.
|
||||||
StrategicHandlePlayerTeamMercDeath( pSoldier );
|
StrategicHandlePlayerTeamMercDeath( pSoldier );
|
||||||
|
|
||||||
@@ -8573,6 +8572,18 @@ void HandleSuppressionFire( UINT8 ubTargetedMerc, UINT8 ubCausedAttacker )
|
|||||||
// If soldier is visible on-screen, report to player that they are cowering.
|
// If soldier is visible on-screen, report to player that they are cowering.
|
||||||
if ( pSoldier->bVisible != -1 )
|
if ( pSoldier->bVisible != -1 )
|
||||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113HAMMessage[0], pSoldier->GetName() );
|
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113HAMMessage[0], pSoldier->GetName() );
|
||||||
|
|
||||||
|
// Flugente: if we are Buns, and we have PTSD, this shock causes us to switch to a different personality
|
||||||
|
if ( pSoldier->ubProfile == BUNS && pSoldier->HasDiseaseWithFlag( DISEASE_PROPERTY_PTSD_BUNS ) )
|
||||||
|
{
|
||||||
|
SwapToProfile( pSoldier, BUNS_CHAOTIC );
|
||||||
|
|
||||||
|
gMercProfiles[BUNS].bNPCData += 3 + Random( 3 );
|
||||||
|
|
||||||
|
extern void SpecialDialogue( SOLDIERTYPE* pSoldier, STR8 azSoundString, STR16 azTextString );
|
||||||
|
|
||||||
|
SpecialDialogue( pSoldier, "Speech\\Special\\buns_ptsd_activation.MP3", L"Mustn't... get... angry... HOW COULD YOU LET THAT HAPPEN TO ME???" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10279,7 +10279,7 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sBr
|
|||||||
}
|
}
|
||||||
|
|
||||||
// possibly get traumatized if damage gets close to killing us (not if we're slowly bleeding)
|
// possibly get traumatized if damage gets close to killing us (not if we're slowly bleeding)
|
||||||
if ( this->stats.bLife < OKLIFE && ubReason != TAKE_DAMAGE_BLOODLOSS )
|
if ( this->stats.bLife < OKLIFE )//&& ubReason != TAKE_DAMAGE_BLOODLOSS )
|
||||||
HandlePossibleInfection( this, NULL, INFECTION_TYPE_TRAUMATIC );
|
HandlePossibleInfection( this, NULL, INFECTION_TYPE_TRAUMATIC );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -18937,7 +18937,25 @@ BOOLEAN SOLDIERTYPE::HasDisease( BOOLEAN fDiagnosedOnly, BOOLEAN fHealableOnly,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the magnitude os a disease we might have, used to determine wether there are any effects
|
// Do we have an outbroken disease with a special property?
|
||||||
|
BOOLEAN SOLDIERTYPE::HasDiseaseWithFlag( UINT32 aFlag )
|
||||||
|
{
|
||||||
|
if ( !gGameExternalOptions.fDisease )
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
for ( int i = 0; i < NUM_DISEASES; ++i )
|
||||||
|
{
|
||||||
|
// disease is relevant if we are infected and are not looking for symbols only while the disease has no symbol
|
||||||
|
if ( ( Disease[i].usDiseaseProperties & aFlag ) && this->sDiseasePoints[i] > 0 && ( this->sDiseaseFlag[i] & SOLDIERDISEASE_OUTBREAK ) )
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// get the magnitude of a disease we might have, used to determine wether there are any effects
|
||||||
FLOAT SOLDIERTYPE::GetDiseaseMagnitude( UINT8 aDisease )
|
FLOAT SOLDIERTYPE::GetDiseaseMagnitude( UINT8 aDisease )
|
||||||
{
|
{
|
||||||
if ( !gGameExternalOptions.fDisease )
|
if ( !gGameExternalOptions.fDisease )
|
||||||
@@ -19071,6 +19089,12 @@ void SOLDIERTYPE::PrintDiseaseDesc( CHAR16* apStr, BOOLEAN fFullDesc )
|
|||||||
wcscat( apStr, atStr );
|
wcscat( apStr, atStr );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( (this->ubProfile == BUNS || this->ubProfile == BUNS_CHAOTIC) && ( Disease[i].usDiseaseProperties & DISEASE_PROPERTY_PTSD_BUNS ) )
|
||||||
|
{
|
||||||
|
swprintf( atStr, szDiseaseText[TEXT_DISEASE_PTSD_BUNS_SPECIAL] );
|
||||||
|
wcscat( apStr, atStr );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( fShowExactPoints && this->sDiseasePoints[i] > 0 )
|
else if ( fShowExactPoints && this->sDiseasePoints[i] > 0 )
|
||||||
|
|||||||
@@ -1934,7 +1934,8 @@ public:
|
|||||||
// fHealableOnly: check wether it can be healed
|
// fHealableOnly: check wether it can be healed
|
||||||
// fSymbolOnly: only show if symbol should be shown
|
// fSymbolOnly: only show if symbol should be shown
|
||||||
BOOLEAN HasDisease(BOOLEAN fDiagnosedOnly, BOOLEAN fHealableOnly, BOOLEAN fSymbolOnly = FALSE);
|
BOOLEAN HasDisease(BOOLEAN fDiagnosedOnly, BOOLEAN fHealableOnly, BOOLEAN fSymbolOnly = FALSE);
|
||||||
FLOAT GetDiseaseMagnitude( UINT8 aDisease ); // get the magnitude os a disease we might have, used to determine wether there are any effects
|
BOOLEAN HasDiseaseWithFlag(UINT32 aFlag);
|
||||||
|
FLOAT GetDiseaseMagnitude( UINT8 aDisease ); // get the magnitude of a disease we might have, used to determine wether there are any effects
|
||||||
void PrintDiseaseDesc( CHAR16* apStr, BOOLEAN fFullDesc = FALSE );
|
void PrintDiseaseDesc( CHAR16* apStr, BOOLEAN fFullDesc = FALSE );
|
||||||
void PrintFoodDesc( CHAR16* apStr, BOOLEAN fFullDesc = FALSE );
|
void PrintFoodDesc( CHAR16* apStr, BOOLEAN fFullDesc = FALSE );
|
||||||
void PrintSleepDesc( CHAR16* apStr );
|
void PrintSleepDesc( CHAR16* apStr );
|
||||||
|
|||||||
@@ -2367,22 +2367,13 @@ BOOLEAN MercIsInTropicalSector( SOLDIERTYPE * pSoldier )
|
|||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
SOLDIERTYPE * SwapLarrysProfiles( SOLDIERTYPE * pSoldier )
|
SOLDIERTYPE* SwapToProfile( SOLDIERTYPE * pSoldier, UINT8 ubDestProfile )
|
||||||
{
|
{
|
||||||
UINT8 ubSrcProfile;
|
MERCPROFILESTRUCT* pNewProfile;
|
||||||
UINT8 ubDestProfile;
|
UINT8 ubSrcProfile = pSoldier->ubProfile;
|
||||||
MERCPROFILESTRUCT * pNewProfile;
|
|
||||||
|
|
||||||
ubSrcProfile = pSoldier->ubProfile;
|
// need a stop criteria...
|
||||||
if ( ubSrcProfile == LARRY_NORMAL )
|
if ( FALSE )
|
||||||
{
|
|
||||||
ubDestProfile = LARRY_DRUNK;
|
|
||||||
}
|
|
||||||
else if ( ubSrcProfile == LARRY_DRUNK )
|
|
||||||
{
|
|
||||||
ubDestProfile = LARRY_NORMAL;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
// I don't think so!
|
// I don't think so!
|
||||||
return( pSoldier );
|
return( pSoldier );
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ extern BOOLEAN LoadNewSystemMercsToSaveGameFile( HWFILE hFile );
|
|||||||
enum NPCIDs
|
enum NPCIDs
|
||||||
{
|
{
|
||||||
VICKI = 4,// anv: check when hiring Speck
|
VICKI = 4,// anv: check when hiring Speck
|
||||||
|
BUNS = 17,
|
||||||
BIFF = 40,
|
BIFF = 40,
|
||||||
HAYWIRE,
|
HAYWIRE,
|
||||||
GASKET,
|
GASKET,
|
||||||
@@ -248,6 +249,8 @@ enum NPCIDs
|
|||||||
ELIO = 196,
|
ELIO = 196,
|
||||||
JUAN = 197,
|
JUAN = 197,
|
||||||
WAHAN = 198,
|
WAHAN = 198,
|
||||||
|
|
||||||
|
BUNS_CHAOTIC = 215,
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
BOOLEAN LoadMercProfiles(void);
|
BOOLEAN LoadMercProfiles(void);
|
||||||
@@ -285,7 +288,7 @@ extern BOOLEAN gubNumTerrorists;
|
|||||||
|
|
||||||
void MakeRemainingTerroristsTougher( void );
|
void MakeRemainingTerroristsTougher( void );
|
||||||
void MakeRemainingAssassinsTougher( void );
|
void MakeRemainingAssassinsTougher( void );
|
||||||
SOLDIERTYPE * SwapLarrysProfiles( SOLDIERTYPE * pSoldier );
|
SOLDIERTYPE* SwapToProfile( SOLDIERTYPE * pSoldier, UINT8 ubDestProfile );
|
||||||
|
|
||||||
BOOLEAN DoesNPCOwnBuilding( SOLDIERTYPE *pSoldier, INT32 sGridNo );
|
BOOLEAN DoesNPCOwnBuilding( SOLDIERTYPE *pSoldier, INT32 sGridNo );
|
||||||
|
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ diseaseStartElementHandle( void *userData, const XML_Char *name, const XML_Char
|
|||||||
strcmp( name, "fCanReInfect" ) == 0 ||
|
strcmp( name, "fCanReInfect" ) == 0 ||
|
||||||
strcmp( name, "fHideSymbol" ) == 0 ||
|
strcmp( name, "fHideSymbol" ) == 0 ||
|
||||||
strcmp( name, "fDisgusting" ) == 0 ||
|
strcmp( name, "fDisgusting" ) == 0 ||
|
||||||
|
strcmp( name, "fSpecialFlagPTSDBuns" ) == 0 ||
|
||||||
strcmp( name, "sEffStatAGI" ) == 0 ||
|
strcmp( name, "sEffStatAGI" ) == 0 ||
|
||||||
strcmp( name, "sEffStatDEX" ) == 0 ||
|
strcmp( name, "sEffStatDEX" ) == 0 ||
|
||||||
strcmp( name, "sEffStatSTR" ) == 0 ||
|
strcmp( name, "sEffStatSTR" ) == 0 ||
|
||||||
@@ -302,6 +303,12 @@ diseaseEndElementHandle( void *userData, const XML_Char *name )
|
|||||||
if ( atol( pData->szCharData ) )
|
if ( atol( pData->szCharData ) )
|
||||||
pData->curItem.usDiseaseProperties |= DISEASE_PROPERTY_DISGUSTING;
|
pData->curItem.usDiseaseProperties |= DISEASE_PROPERTY_DISGUSTING;
|
||||||
}
|
}
|
||||||
|
else if ( strcmp( name, "fSpecialFlagPTSDBuns" ) == 0 )
|
||||||
|
{
|
||||||
|
pData->curElement = ELEMENT;
|
||||||
|
if ( atol( pData->szCharData ) )
|
||||||
|
pData->curItem.usDiseaseProperties |= DISEASE_PROPERTY_PTSD_BUNS;
|
||||||
|
}
|
||||||
else if ( strcmp( name, "sEffStatAGI" ) == 0 )
|
else if ( strcmp( name, "sEffStatAGI" ) == 0 )
|
||||||
{
|
{
|
||||||
pData->curElement = ELEMENT;
|
pData->curElement = ELEMENT;
|
||||||
@@ -480,6 +487,7 @@ BOOLEAN WriteDiseaseStats( )
|
|||||||
FilePrintf( hFile, "\t\t<fCanReInfect>%d</fCanReInfect>\r\n", (Disease[cnt].usDiseaseProperties & DISEASE_PROPERTY_CANREINFECT) ? 1 : 0 );
|
FilePrintf( hFile, "\t\t<fCanReInfect>%d</fCanReInfect>\r\n", (Disease[cnt].usDiseaseProperties & DISEASE_PROPERTY_CANREINFECT) ? 1 : 0 );
|
||||||
FilePrintf( hFile, "\t\t<fHideSymbol>%d</fHideSymbol>\r\n", (Disease[cnt].usDiseaseProperties & DISEASE_PROPERTY_HIDESYMBOL) ? 1 : 0 );
|
FilePrintf( hFile, "\t\t<fHideSymbol>%d</fHideSymbol>\r\n", (Disease[cnt].usDiseaseProperties & DISEASE_PROPERTY_HIDESYMBOL) ? 1 : 0 );
|
||||||
FilePrintf( hFile, "\t\t<fDisgusting>%d</fDisgusting>\r\n", (Disease[cnt].usDiseaseProperties & DISEASE_PROPERTY_DISGUSTING) ? 1 : 0 );
|
FilePrintf( hFile, "\t\t<fDisgusting>%d</fDisgusting>\r\n", (Disease[cnt].usDiseaseProperties & DISEASE_PROPERTY_DISGUSTING) ? 1 : 0 );
|
||||||
|
FilePrintf( hFile, "\t\t<fSpecialFlagPTSDBuns>%d</fSpecialFlagPTSDBuns>\r\n", ( Disease[cnt].usDiseaseProperties & DISEASE_PROPERTY_PTSD_BUNS ) ? 1 : 0 );
|
||||||
FilePrintf( hFile, "\t\t<sEffStatAGI>%d</sEffStatAGI>\r\n", Disease[cnt].sEffStat[INFST_AGI] );
|
FilePrintf( hFile, "\t\t<sEffStatAGI>%d</sEffStatAGI>\r\n", Disease[cnt].sEffStat[INFST_AGI] );
|
||||||
FilePrintf( hFile, "\t\t<sEffStatDEX>%d</sEffStatDEX>\r\n", Disease[cnt].sEffStat[INFST_DEX] );
|
FilePrintf( hFile, "\t\t<sEffStatDEX>%d</sEffStatDEX>\r\n", Disease[cnt].sEffStat[INFST_DEX] );
|
||||||
FilePrintf( hFile, "\t\t<sEffStatSTR>%d</sEffStatSTR>\r\n", Disease[cnt].sEffStat[INFST_STR] );
|
FilePrintf( hFile, "\t\t<sEffStatSTR>%d</sEffStatSTR>\r\n", Disease[cnt].sEffStat[INFST_STR] );
|
||||||
|
|||||||
@@ -2715,7 +2715,7 @@ void HandleArmedObjectImpact( REAL_OBJECT *pObject )
|
|||||||
// any merc nearby that can see this can warn us
|
// any merc nearby that can see this can warn us
|
||||||
if ( ( *pObj )[0]->data.misc.bDelay > 0 && pObject->ubOwner != NOBODY )//&& MercPtrs[pObject->ubOwner]->bTeam != gbPlayerNum )
|
if ( ( *pObj )[0]->data.misc.bDelay > 0 && pObject->ubOwner != NOBODY )//&& MercPtrs[pObject->ubOwner]->bTeam != gbPlayerNum )
|
||||||
{
|
{
|
||||||
AdditionalTacticalCharacterDialogue_AllInSectorRadiusCall( NO_PROFILE, ADE_GRENADEWARNING, 0, 0, 0, pObject->sGridNo, 5 );
|
AdditionalTacticalCharacterDialogue_AllInSectorRadiusCall( NO_PROFILE, ADE_GRENADEWARNING, pObj->usItem, 0, 0, pObject->sGridNo, 5 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( fDoImpact )
|
if ( fDoImpact )
|
||||||
|
|||||||
+3
-1
@@ -2963,7 +2963,9 @@ enum
|
|||||||
TEXT_DISEASE_CANCEL,
|
TEXT_DISEASE_CANCEL,
|
||||||
|
|
||||||
// (undiagnosed)
|
// (undiagnosed)
|
||||||
TEXT_DISEASE_UNDIAGNOSED
|
TEXT_DISEASE_UNDIAGNOSED,
|
||||||
|
|
||||||
|
TEXT_DISEASE_PTSD_BUNS_SPECIAL,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
|||||||
@@ -10999,6 +10999,8 @@ STR16 szDiseaseText[] =
|
|||||||
L"取消", //L"Cancel",
|
L"取消", //L"Cancel",
|
||||||
|
|
||||||
L"\n\n%s (未诊断的) - %d / %d\n", //L"\n\n%s (undiagnosed) - %d / %d\n",
|
L"\n\n%s (未诊断的) - %d / %d\n", //L"\n\n%s (undiagnosed) - %d / %d\n",
|
||||||
|
|
||||||
|
L"High amount of distress can cause a personality split\n", // TODO.Translate
|
||||||
};
|
};
|
||||||
|
|
||||||
STR16 szSpyText[] =
|
STR16 szSpyText[] =
|
||||||
|
|||||||
@@ -11017,6 +11017,8 @@ STR16 szDiseaseText[] =
|
|||||||
L"Cancel",
|
L"Cancel",
|
||||||
|
|
||||||
L"\n\n%s (undiagnosed) - %d / %d\n", // TODO.Translate
|
L"\n\n%s (undiagnosed) - %d / %d\n", // TODO.Translate
|
||||||
|
|
||||||
|
L"High amount of distress can cause a personality split\n", // TODO.Translate
|
||||||
};
|
};
|
||||||
|
|
||||||
STR16 szSpyText[] =
|
STR16 szSpyText[] =
|
||||||
|
|||||||
@@ -11001,6 +11001,8 @@ STR16 szDiseaseText[] =
|
|||||||
L"Cancel",
|
L"Cancel",
|
||||||
|
|
||||||
L"\n\n%s (undiagnosed) - %d / %d\n",
|
L"\n\n%s (undiagnosed) - %d / %d\n",
|
||||||
|
|
||||||
|
L"High amount of distress can cause a personality split\n",
|
||||||
};
|
};
|
||||||
|
|
||||||
STR16 szSpyText[] =
|
STR16 szSpyText[] =
|
||||||
|
|||||||
@@ -10999,6 +10999,8 @@ STR16 szDiseaseText[] =
|
|||||||
L"Cancel",
|
L"Cancel",
|
||||||
|
|
||||||
L"\n\n%s (undiagnosed) - %d / %d\n", // TODO.Translate
|
L"\n\n%s (undiagnosed) - %d / %d\n", // TODO.Translate
|
||||||
|
|
||||||
|
L"High amount of distress can cause a personality split\n", // TODO.Translate
|
||||||
};
|
};
|
||||||
|
|
||||||
STR16 szSpyText[] =
|
STR16 szSpyText[] =
|
||||||
|
|||||||
@@ -10829,6 +10829,8 @@ STR16 szDiseaseText[] =
|
|||||||
L"Cancel",
|
L"Cancel",
|
||||||
|
|
||||||
L"\n\n%s (undiagnosed) - %d / %d\n", // TODO.Translate
|
L"\n\n%s (undiagnosed) - %d / %d\n", // TODO.Translate
|
||||||
|
|
||||||
|
L"High amount of distress can cause a personality split\n", // TODO.Translate
|
||||||
};
|
};
|
||||||
|
|
||||||
STR16 szSpyText[] =
|
STR16 szSpyText[] =
|
||||||
|
|||||||
@@ -11008,6 +11008,8 @@ STR16 szDiseaseText[] =
|
|||||||
L"Cancel",
|
L"Cancel",
|
||||||
|
|
||||||
L"\n\n%s (undiagnosed) - %d / %d\n", // TODO.Translate
|
L"\n\n%s (undiagnosed) - %d / %d\n", // TODO.Translate
|
||||||
|
|
||||||
|
L"High amount of distress can cause a personality split\n", // TODO.Translate
|
||||||
};
|
};
|
||||||
|
|
||||||
STR16 szSpyText[] =
|
STR16 szSpyText[] =
|
||||||
|
|||||||
@@ -11021,6 +11021,8 @@ STR16 szDiseaseText[] =
|
|||||||
L"Cancel",
|
L"Cancel",
|
||||||
|
|
||||||
L"\n\n%s (undiagnosed) - %d / %d\n", // TODO.Translate
|
L"\n\n%s (undiagnosed) - %d / %d\n", // TODO.Translate
|
||||||
|
|
||||||
|
L"High amount of distress can cause a personality split\n", // TODO.Translate
|
||||||
};
|
};
|
||||||
|
|
||||||
STR16 szSpyText[] =
|
STR16 szSpyText[] =
|
||||||
|
|||||||
@@ -11001,6 +11001,8 @@ STR16 szDiseaseText[] =
|
|||||||
L"Отмена",
|
L"Отмена",
|
||||||
|
|
||||||
L"\n\n%s (недиагностирована) - %d / %d\n",
|
L"\n\n%s (недиагностирована) - %d / %d\n",
|
||||||
|
|
||||||
|
L"High amount of distress can cause a personality split\n", // TODO.Translate
|
||||||
};
|
};
|
||||||
|
|
||||||
STR16 szSpyText[] =
|
STR16 szSpyText[] =
|
||||||
|
|||||||
Reference in New Issue
Block a user