diff --git a/GameVersion.cpp b/GameVersion.cpp index d5d9c117..301a5bc8 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -55,8 +55,8 @@ #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 zRevisionNumber[16] = { L"Revision 8580" }; +CHAR16 zRevisionNumber[16] = { L"Revision 8588" }; // SAVE_GAME_VERSION is defined in header, change it there diff --git a/Strategic/Hourly Update.cpp b/Strategic/Hourly Update.cpp index 85cfd333..33d46d25 100644 --- a/Strategic/Hourly Update.cpp +++ b/Strategic/Hourly Update.cpp @@ -347,28 +347,30 @@ UINT16 LarryItems[ NUM_LARRY_ITEMS ][ 3 ] = { WINE, 3, 50 }, { REGEN_BOOSTER, 3, 100 }, { BEER, 2, 100 }, -};*/ +}; -#define LARRY_FALLS_OFF_WAGON 8 +#define LARRY_FALLS_OFF_WAGON 8*/ void HourlyLarryUpdate() { SOLDIERTYPE * pSoldier = NULL; SOLDIERTYPE * pOtherSoldier = NULL; INT8 bSlot = NO_SLOT, bBoozeSlot; - INT8 bLarryItemLoop; UINT16 usTemptation = 0; UINT16 usCashAmount; BOOLEAN fBar = FALSE; OBJECTTYPE* pObj = NULL; + BOOLEAN fTookDrugs = FALSE; for( UINT32 cnt = gTacticalStatus.Team[ OUR_TEAM ].bFirstID; cnt <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; ++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 INT8 invsize = (INT8)pSoldier->inv.size(); // remember inventorysize, so we don't call size() repeatedly @@ -447,73 +449,80 @@ void HourlyLarryUpdate() } } - if ( fSnitchStoppedBehaviour ) - continue; + if ( !fSnitchStoppedBehaviour ) + { + 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) // 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 ) - gMercProfiles[ LARRY_NORMAL ].bNPCData = __min( gMercProfiles[ LARRY_NORMAL ].bNPCData, 24 ); - } - 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 ); + gMercProfiles[LARRY_NORMAL].bNPCData = __min( gMercProfiles[LARRY_NORMAL].bNPCData, 24 ); + gMercProfiles[LARRY_NORMAL].bNPCData = __max( gMercProfiles[LARRY_NORMAL].bNPCData, LARRY_FALLS_OFF_WAGON ); } } - else if ( pSoldier->ubProfile == LARRY_DRUNK ) + else { - gMercProfiles[ LARRY_NORMAL ].bNPCData -= (INT8) Random( 2 ); - if ( gMercProfiles[ LARRY_NORMAL ].bNPCData <= 0 ) + if ( pSoldier->ubProfile == LARRY_DRUNK ) { - // goes sober! - SwapLarrysProfiles( pSoldier ); + gMercProfiles[LARRY_NORMAL].bNPCData -= (INT8)Random( 2 ); + + if ( gMercProfiles[LARRY_NORMAL].bNPCData <= 0 ) + { + // goes sober! + SwapToProfile( pSoldier, LARRY_NORMAL ); + } } } } @@ -563,10 +572,10 @@ void HourlyDisabilityUpdate( ) { pSoldier = MercPtrs[cnt]; - if ( pSoldier && pSoldier->bActive && !pSoldier->flags.fMercAsleep ) + if ( pSoldier && pSoldier->bActive ) { - // possibl self-harm - if ( Chance(20) && DoesMercHaveDisability( pSoldier, SELF_HARM ) ) + // possible 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 // 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 ); + } + } } } } diff --git a/Strategic/Merc Contract.cpp b/Strategic/Merc Contract.cpp index 604f3233..8515fd9a 100644 --- a/Strategic/Merc Contract.cpp +++ b/Strategic/Merc Contract.cpp @@ -939,6 +939,15 @@ BOOLEAN StrategicRemoveMerc( SOLDIERTYPE *pSoldier ) 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 HandleBuddiesReactionToFiringMerc(pSoldier, MORALE_BUDDY_FIRED); diff --git a/Tactical/Dialogue Control.cpp b/Tactical/Dialogue Control.cpp index c31dd49e..74a9c934 100644 --- a/Tactical/Dialogue Control.cpp +++ b/Tactical/Dialogue Control.cpp @@ -2231,6 +2231,25 @@ BOOLEAN LuaCallsToDoDialogueStuff( UINT8 ubProfile, INT32 iFaceIndex, const char 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 ) { // Show text, if on diff --git a/Tactical/Dialogue Control.h b/Tactical/Dialogue Control.h index 3aeeea16..6cd3c6d6 100644 --- a/Tactical/Dialogue Control.h +++ b/Tactical/Dialogue Control.h @@ -376,9 +376,8 @@ void AdditionalTacticalCharacterDialogue_AllInSector( INT16 aSectorX, INT16 aSec void AdditionalTacticalCharacterDialogue_AllInSectorRadiusCall( UINT8 ausIgnoreProfile, UINT16 usEventNr, UINT32 aData1 = 0, UINT32 aData2 = 0, UINT32 aData3 = 0, INT32 aAroundGridno = -1, INT32 aRadius = 0 ); -void SetQuoteStr( STR16 aStr ); - -BOOLEAN LuaCallsToDoDialogueStuff( UINT8 ubProfile, INT32 iFaceIndex, const char* azSoundString ); +// 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 ); // Flugente: replace text with other text BOOLEAN ReplaceTextWithOtherText( CHAR16 *pFinishedString, CHAR16 compare[32], CHAR16 replace[32] ); diff --git a/Tactical/Disease.h b/Tactical/Disease.h index 4268c918..b4a12747 100644 --- a/Tactical/Disease.h +++ b/Tactical/Disease.h @@ -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_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 { diff --git a/Tactical/Drugs And Alcohol.cpp b/Tactical/Drugs And Alcohol.cpp index da4aa2a7..3fa3df90 100644 --- a/Tactical/Drugs And Alcohol.cpp +++ b/Tactical/Drugs And Alcohol.cpp @@ -151,13 +151,21 @@ BOOLEAN ApplyDrugs_New( SOLDIERTYPE *pSoldier, UINT16 usItem, UINT16 uStatusUsed // do switch for Larry!! 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 ) { - 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 ) { HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ADDICT, TRUE, TRUE ); diff --git a/Tactical/Drugs And Alcohol.h b/Tactical/Drugs And Alcohol.h index 118ec4c6..887a89b7 100644 --- a/Tactical/Drugs And Alcohol.h +++ b/Tactical/Drugs And Alcohol.h @@ -57,6 +57,8 @@ enum { HUNGOVER, }; +#define LARRY_FALLS_OFF_WAGON 8 + BOOLEAN ApplyDrugs_New( SOLDIERTYPE *pSoldier, UINT16 usItem, UINT16 uStatusUsed ); void HandleEndTurnDrugAdjustments_New( SOLDIERTYPE *pSoldier ); diff --git a/Tactical/Overhead.cpp b/Tactical/Overhead.cpp index ec5e4261..439bddc8 100644 --- a/Tactical/Overhead.cpp +++ b/Tactical/Overhead.cpp @@ -3577,9 +3577,8 @@ void HandlePlayerTeamMemberDeath( SOLDIERTYPE *pSoldier ) } break; } - } - + //Make a call to handle the strategic things, such as Life Insurance, record it in history file etc. 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 ( pSoldier->bVisible != -1 ) 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???" ); + } } } diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index cb906902..9af6b3c0 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -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) - if ( this->stats.bLife < OKLIFE && ubReason != TAKE_DAMAGE_BLOODLOSS ) + if ( this->stats.bLife < OKLIFE )//&& ubReason != TAKE_DAMAGE_BLOODLOSS ) HandlePossibleInfection( this, NULL, INFECTION_TYPE_TRAUMATIC ); } @@ -18937,7 +18937,25 @@ BOOLEAN SOLDIERTYPE::HasDisease( BOOLEAN fDiagnosedOnly, BOOLEAN fHealableOnly, 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 ) { if ( !gGameExternalOptions.fDisease ) @@ -19071,6 +19089,12 @@ void SOLDIERTYPE::PrintDiseaseDesc( CHAR16* apStr, BOOLEAN fFullDesc ) 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 ) diff --git a/Tactical/Soldier Control.h b/Tactical/Soldier Control.h index 14a49b74..7dbd5800 100644 --- a/Tactical/Soldier Control.h +++ b/Tactical/Soldier Control.h @@ -1934,7 +1934,8 @@ public: // fHealableOnly: check wether it can be healed // fSymbolOnly: only show if symbol should be shown 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 PrintFoodDesc( CHAR16* apStr, BOOLEAN fFullDesc = FALSE ); void PrintSleepDesc( CHAR16* apStr ); diff --git a/Tactical/Soldier Profile.cpp b/Tactical/Soldier Profile.cpp index 60062c13..eb98b7b4 100644 --- a/Tactical/Soldier Profile.cpp +++ b/Tactical/Soldier Profile.cpp @@ -2367,22 +2367,13 @@ BOOLEAN MercIsInTropicalSector( SOLDIERTYPE * pSoldier ) return( FALSE ); } -SOLDIERTYPE * SwapLarrysProfiles( SOLDIERTYPE * pSoldier ) +SOLDIERTYPE* SwapToProfile( SOLDIERTYPE * pSoldier, UINT8 ubDestProfile ) { - UINT8 ubSrcProfile; - UINT8 ubDestProfile; - MERCPROFILESTRUCT * pNewProfile; + MERCPROFILESTRUCT* pNewProfile; + UINT8 ubSrcProfile = pSoldier->ubProfile; - ubSrcProfile = pSoldier->ubProfile; - if ( ubSrcProfile == LARRY_NORMAL ) - { - ubDestProfile = LARRY_DRUNK; - } - else if ( ubSrcProfile == LARRY_DRUNK ) - { - ubDestProfile = LARRY_NORMAL; - } - else + // need a stop criteria... + if ( FALSE ) { // I don't think so! return( pSoldier ); diff --git a/Tactical/Soldier Profile.h b/Tactical/Soldier Profile.h index f852b36d..b50845d9 100644 --- a/Tactical/Soldier Profile.h +++ b/Tactical/Soldier Profile.h @@ -88,6 +88,7 @@ extern BOOLEAN LoadNewSystemMercsToSaveGameFile( HWFILE hFile ); enum NPCIDs { VICKI = 4,// anv: check when hiring Speck + BUNS = 17, BIFF = 40, HAYWIRE, GASKET, @@ -248,6 +249,8 @@ enum NPCIDs ELIO = 196, JUAN = 197, WAHAN = 198, + + BUNS_CHAOTIC = 215, } ; BOOLEAN LoadMercProfiles(void); @@ -285,7 +288,7 @@ extern BOOLEAN gubNumTerrorists; void MakeRemainingTerroristsTougher( void ); void MakeRemainingAssassinsTougher( void ); -SOLDIERTYPE * SwapLarrysProfiles( SOLDIERTYPE * pSoldier ); +SOLDIERTYPE* SwapToProfile( SOLDIERTYPE * pSoldier, UINT8 ubDestProfile ); BOOLEAN DoesNPCOwnBuilding( SOLDIERTYPE *pSoldier, INT32 sGridNo ); diff --git a/Tactical/XML_Disease.cpp b/Tactical/XML_Disease.cpp index 30ee6b28..c2c3b5c8 100644 --- a/Tactical/XML_Disease.cpp +++ b/Tactical/XML_Disease.cpp @@ -82,6 +82,7 @@ diseaseStartElementHandle( void *userData, const XML_Char *name, const XML_Char strcmp( name, "fCanReInfect" ) == 0 || strcmp( name, "fHideSymbol" ) == 0 || strcmp( name, "fDisgusting" ) == 0 || + strcmp( name, "fSpecialFlagPTSDBuns" ) == 0 || strcmp( name, "sEffStatAGI" ) == 0 || strcmp( name, "sEffStatDEX" ) == 0 || strcmp( name, "sEffStatSTR" ) == 0 || @@ -302,6 +303,12 @@ diseaseEndElementHandle( void *userData, const XML_Char *name ) if ( atol( pData->szCharData ) ) 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 ) { pData->curElement = ELEMENT; @@ -480,6 +487,7 @@ BOOLEAN WriteDiseaseStats( ) FilePrintf( hFile, "\t\t%d\r\n", (Disease[cnt].usDiseaseProperties & DISEASE_PROPERTY_CANREINFECT) ? 1 : 0 ); FilePrintf( hFile, "\t\t%d\r\n", (Disease[cnt].usDiseaseProperties & DISEASE_PROPERTY_HIDESYMBOL) ? 1 : 0 ); FilePrintf( hFile, "\t\t%d\r\n", (Disease[cnt].usDiseaseProperties & DISEASE_PROPERTY_DISGUSTING) ? 1 : 0 ); + FilePrintf( hFile, "\t\t%d\r\n", ( Disease[cnt].usDiseaseProperties & DISEASE_PROPERTY_PTSD_BUNS ) ? 1 : 0 ); FilePrintf( hFile, "\t\t%d\r\n", Disease[cnt].sEffStat[INFST_AGI] ); FilePrintf( hFile, "\t\t%d\r\n", Disease[cnt].sEffStat[INFST_DEX] ); FilePrintf( hFile, "\t\t%d\r\n", Disease[cnt].sEffStat[INFST_STR] ); diff --git a/TileEngine/physics.cpp b/TileEngine/physics.cpp index 31c1609d..faec7c4a 100644 --- a/TileEngine/physics.cpp +++ b/TileEngine/physics.cpp @@ -2715,7 +2715,7 @@ void HandleArmedObjectImpact( REAL_OBJECT *pObject ) // 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 ) { - 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 ) diff --git a/Utils/Text.h b/Utils/Text.h index b2d27431..fada613b 100644 --- a/Utils/Text.h +++ b/Utils/Text.h @@ -2963,7 +2963,9 @@ enum TEXT_DISEASE_CANCEL, // (undiagnosed) - TEXT_DISEASE_UNDIAGNOSED + TEXT_DISEASE_UNDIAGNOSED, + + TEXT_DISEASE_PTSD_BUNS_SPECIAL, }; enum diff --git a/Utils/_ChineseText.cpp b/Utils/_ChineseText.cpp index 28921ca5..37978272 100644 --- a/Utils/_ChineseText.cpp +++ b/Utils/_ChineseText.cpp @@ -10999,6 +10999,8 @@ STR16 szDiseaseText[] = L"取消", //L"Cancel",  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[] = diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index 59e13b02..e455ecb7 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -11017,6 +11017,8 @@ STR16 szDiseaseText[] = L"Cancel", 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[] = diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index 7fb18484..dfb10a3b 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -11001,6 +11001,8 @@ STR16 szDiseaseText[] = L"Cancel", L"\n\n%s (undiagnosed) - %d / %d\n", + + L"High amount of distress can cause a personality split\n", }; STR16 szSpyText[] = diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index df3f7fed..82c180e2 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -10999,6 +10999,8 @@ STR16 szDiseaseText[] = L"Cancel", 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[] = diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index 04bc19db..0e4cf9f7 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -10829,6 +10829,8 @@ STR16 szDiseaseText[] = L"Cancel", 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[] = diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index 45d478c0..06e83639 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -11008,6 +11008,8 @@ STR16 szDiseaseText[] = L"Cancel", 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[] = diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index b79ae44c..86f7dcfc 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -11021,6 +11021,8 @@ STR16 szDiseaseText[] = L"Cancel", 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[] = diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index 96d5ce6b..bde54504 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -11001,6 +11001,8 @@ STR16 szDiseaseText[] = L"Отмена", L"\n\n%s (недиагностирована) - %d / %d\n", + + L"High amount of distress can cause a personality split\n", // TODO.Translate }; STR16 szSpyText[] =