mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Added new records: diseases caught, interrogations, total damage taken, total damage dealt
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8376 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+28
-9
@@ -8644,8 +8644,6 @@ void AssignPersonnelAssistsHelpText( INT32 ubProfile )
|
||||
// Set region help text
|
||||
SetRegionFastHelpText( &(gSkillTraitHelpTextRegion[8]), apStr );
|
||||
SetRegionHelpEndCallback( &gSkillTraitHelpTextRegion[8], MSYS_NO_CALLBACK );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void AssignPersonnelHitPercentageHelpText( INT32 ubProfile )
|
||||
@@ -8689,12 +8687,15 @@ void AssignPersonnelHitPercentageHelpText( INT32 ubProfile )
|
||||
swprintf(atStr, pPersonnelRecordsHelpTexts[ 16 ], gMercProfiles[ubProfile].records.usShotsHit );
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
if ( gMercProfiles[ubProfile].records.usDamageDealt > 0 || fShowRecordsIfZero )
|
||||
{
|
||||
swprintf( atStr, pPersonnelRecordsHelpTexts[52], gMercProfiles[ubProfile].records.usDamageDealt );
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
|
||||
// Set region help text
|
||||
SetRegionFastHelpText( &(gSkillTraitHelpTextRegion[9]), apStr );
|
||||
SetRegionHelpEndCallback( &gSkillTraitHelpTextRegion[9], MSYS_NO_CALLBACK );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void AssignPersonnelAchievementsHelpText( INT32 ubProfile )
|
||||
@@ -8800,12 +8801,15 @@ void AssignPersonnelAchievementsHelpText( INT32 ubProfile )
|
||||
swprintf(atStr, pPersonnelRecordsHelpTexts[ 30 ], gMercProfiles[ubProfile].records.ubQuestsHandled );
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
if ( gMercProfiles[ubProfile].records.usInterrogations > 0 || fShowRecordsIfZero )
|
||||
{
|
||||
swprintf( atStr, pPersonnelRecordsHelpTexts[49], gMercProfiles[ubProfile].records.usInterrogations );
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
|
||||
// Set region help text
|
||||
SetRegionFastHelpText( &(gSkillTraitHelpTextRegion[10]), apStr );
|
||||
SetRegionHelpEndCallback( &gSkillTraitHelpTextRegion[10], MSYS_NO_CALLBACK );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void AssignPersonnelBattlesHelpText( INT32 ubProfile )
|
||||
@@ -8899,6 +8903,18 @@ void AssignPersonnelWoundsHelpText( INT32 ubProfile )
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
|
||||
if ( gMercProfiles[ubProfile].records.usTimesInfected > 0 || fShowRecordsIfZero )
|
||||
{
|
||||
swprintf( atStr, pPersonnelRecordsHelpTexts[50], gMercProfiles[ubProfile].records.usTimesInfected );
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
|
||||
if ( gMercProfiles[ubProfile].records.usDamageTaken > 0 || fShowRecordsIfZero )
|
||||
{
|
||||
swprintf( atStr, pPersonnelRecordsHelpTexts[51], gMercProfiles[ubProfile].records.usDamageTaken );
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
|
||||
// Set region help text
|
||||
SetRegionFastHelpText( &(gSkillTraitHelpTextRegion[12]), apStr );
|
||||
SetRegionHelpEndCallback( &gSkillTraitHelpTextRegion[12], MSYS_NO_CALLBACK );
|
||||
@@ -8946,8 +8962,9 @@ INT8 CalculateMercsAchievementPercentage( INT32 ubProfile )
|
||||
+
|
||||
( gMercProfiles[ pTeamSoldier->ubProfile ].records.usMilitiaTrained /4)
|
||||
+
|
||||
( gMercProfiles[ pTeamSoldier->ubProfile ].records.ubQuestsHandled *2);
|
||||
|
||||
( gMercProfiles[ pTeamSoldier->ubProfile ].records.ubQuestsHandled *2)
|
||||
+
|
||||
(gMercProfiles[pTeamSoldier->ubProfile].records.usInterrogations);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8978,7 +8995,9 @@ INT8 CalculateMercsAchievementPercentage( INT32 ubProfile )
|
||||
+
|
||||
( gMercProfiles[ ubProfile ].records.usMilitiaTrained /4)
|
||||
+
|
||||
( gMercProfiles[ ubProfile ].records.ubQuestsHandled *2);
|
||||
( gMercProfiles[ ubProfile ].records.ubQuestsHandled *2)
|
||||
+
|
||||
( gMercProfiles[ubProfile].records.usInterrogations );
|
||||
|
||||
// Calculate percentage
|
||||
if( ulTotalMercPoints != 0 )
|
||||
|
||||
@@ -7277,6 +7277,10 @@ void HandlePrisonerProcessingInSector( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
||||
StatChange( pSoldier, WISDOMAMT, max( 0, exppoints ), TRUE );
|
||||
StatChange( pSoldier, EXPERAMT, max( 0, exppoints - 1 ), TRUE );
|
||||
}
|
||||
|
||||
// add to our records. Screw exact values, just add them all and call it a day
|
||||
if ( pSoldier->ubProfile != NO_PROFILE )
|
||||
gMercProfiles[pSoldier->ubProfile].records.usInterrogations += prisonersinterrogated;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9930,6 +9930,14 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sBr
|
||||
|
||||
VehicleTakeDamage( this->bVehicleID, ubReason, sLifeDeduct, this->sGridNo, ubAttacker );
|
||||
HandleTakeDamageDeath( this, bOldLife, ubReason );
|
||||
|
||||
// add to our records.
|
||||
if ( ubAttacker != NOBODY && MercPtrs[ubAttacker] && MercPtrs[ubAttacker]->ubProfile != NO_PROFILE )
|
||||
gMercProfiles[MercPtrs[ubAttacker]->ubProfile].records.usDamageDealt += sLifeDeduct;
|
||||
|
||||
if ( this->ubProfile != NO_PROFILE )
|
||||
gMercProfiles[this->ubProfile].records.usDamageTaken += sLifeDeduct;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -10096,6 +10104,13 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sBr
|
||||
this->usPendingAnimation = NO_PENDING_ANIMATION;
|
||||
}
|
||||
|
||||
// add to our records.
|
||||
if ( ubAttacker != NOBODY && MercPtrs[ubAttacker] && MercPtrs[ubAttacker]->ubProfile != NO_PROFILE )
|
||||
gMercProfiles[MercPtrs[ubAttacker]->ubProfile].records.usDamageDealt += sLifeDeduct;
|
||||
|
||||
if ( this->ubProfile != NO_PROFILE )
|
||||
gMercProfiles[this->ubProfile].records.usDamageTaken += sLifeDeduct;
|
||||
|
||||
if ( fShowDamage )
|
||||
{
|
||||
this->sDamage += sLifeDeduct;
|
||||
@@ -18478,6 +18493,10 @@ void SOLDIERTYPE::AnnounceDisease( UINT8 aDisease )
|
||||
|
||||
if ( this->bTeam == gbPlayerNum )
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szDiseaseText[TEXT_DISEASE_DIAGNOSE_GENERAL], this->GetName( ), Disease[aDisease].szName );
|
||||
|
||||
// add to our records.
|
||||
if ( this->ubProfile != NO_PROFILE )
|
||||
gMercProfiles[this->ubProfile].records.usTimesInfected += 1;
|
||||
}
|
||||
|
||||
// do we have any disease? fDiagnosedOnly: check for wether we know of this infection fHealableOnly: check wether it can be healed
|
||||
|
||||
@@ -442,13 +442,11 @@ public:
|
||||
UINT16 usNPCsDiscovered;
|
||||
UINT16 usSectorsDiscovered;
|
||||
UINT8 ubQuestsHandled;
|
||||
|
||||
UINT16 zFiller1;
|
||||
UINT16 zFiller2;
|
||||
UINT16 zFiller3;
|
||||
UINT16 zFiller4;
|
||||
UINT16 zFiller5;
|
||||
UINT16 zFiller6;
|
||||
|
||||
UINT16 usInterrogations;
|
||||
UINT32 usDamageTaken;
|
||||
UINT32 usDamageDealt;
|
||||
UINT16 usTimesInfected;
|
||||
UINT16 zFiller7;
|
||||
UINT16 zFiller8;
|
||||
UINT8 zFiller9;
|
||||
|
||||
@@ -3082,6 +3082,11 @@ STR16 pPersonnelRecordsHelpTexts[] =
|
||||
|
||||
L"背景:",
|
||||
L"性格:",
|
||||
|
||||
L"Prisoners interrogated: %d\n", // TODO.Translate
|
||||
L"Diseases caught: %d\n",
|
||||
L"Total damage received: %d\n",
|
||||
L"Total damage caused: %d\n",
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -3082,6 +3082,11 @@ STR16 pPersonnelRecordsHelpTexts[] =
|
||||
|
||||
L"Background:", // TODO.Translate
|
||||
L"Personality:", // TODO.Translate
|
||||
|
||||
L"Prisoners interrogated: %d\n", // TODO.Translate
|
||||
L"Diseases caught: %d\n",
|
||||
L"Total damage received: %d\n",
|
||||
L"Total damage caused: %d\n",
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -3082,6 +3082,11 @@ STR16 pPersonnelRecordsHelpTexts[] =
|
||||
|
||||
L"Background:",
|
||||
L"Personality:",
|
||||
|
||||
L"Prisoners interrogated: %d\n",
|
||||
L"Diseases caught: %d\n",
|
||||
L"Total damage received: %d\n",
|
||||
L"Total damage caused: %d\n",
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -3090,6 +3090,11 @@ STR16 pPersonnelRecordsHelpTexts[] =
|
||||
|
||||
L"Passif :",
|
||||
L"Personnalité :",
|
||||
|
||||
L"Prisoners interrogated: %d\n", // TODO.Translate
|
||||
L"Diseases caught: %d\n",
|
||||
L"Total damage received: %d\n",
|
||||
L"Total damage caused: %d\n",
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -3098,6 +3098,11 @@ STR16 pPersonnelRecordsHelpTexts[] =
|
||||
|
||||
L"Werdegang:",
|
||||
L"Personalität:",
|
||||
|
||||
L"Prisoners interrogated: %d\n", // TODO.Translate
|
||||
L"Diseases caught: %d\n",
|
||||
L"Total damage received: %d\n",
|
||||
L"Total damage caused: %d\n",
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -3078,6 +3078,11 @@ STR16 pPersonnelRecordsHelpTexts[] =
|
||||
|
||||
L"Background:", // TODO.Translate
|
||||
L"Personality:", // TODO.Translate
|
||||
|
||||
L"Prisoners interrogated: %d\n", // TODO.Translate
|
||||
L"Diseases caught: %d\n",
|
||||
L"Total damage received: %d\n",
|
||||
L"Total damage caused: %d\n",
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -3088,6 +3088,11 @@ STR16 pPersonnelRecordsHelpTexts[] =
|
||||
|
||||
L"Background:", // TODO.Translate
|
||||
L"Personality:", // TODO.Translate
|
||||
|
||||
L"Prisoners interrogated: %d\n", // TODO.Translate
|
||||
L"Diseases caught: %d\n",
|
||||
L"Total damage received: %d\n",
|
||||
L"Total damage caused: %d\n",
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -3082,6 +3082,11 @@ STR16 pPersonnelRecordsHelpTexts[] =
|
||||
|
||||
L"Биография:",
|
||||
L"Характер:",
|
||||
|
||||
L"Prisoners interrogated: %d\n", // TODO.Translate
|
||||
L"Diseases caught: %d\n",
|
||||
L"Total damage received: %d\n",
|
||||
L"Total damage caused: %d\n",
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user