- new feature: backgrounds allow more personalisation of mercenaries

- background feature replaces overheating on startup screen, moved overheating opion to ini

WARNING: GameDir revision >= 1748 is required.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6353 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-09-03 20:55:33 +00:00
parent 0bff118f10
commit 4ccc6a5b2a
66 changed files with 3128 additions and 303 deletions
+25
View File
@@ -915,13 +915,38 @@ UINT8 CalcDesireToTalk( UINT8 ubNPC, UINT8 ubMerc, INT8 bApproach )
else if ( bApproach == APPROACH_THREATEN )
{
iEffectiveLeadership = CalcThreateningEffectiveness( ubMerc ) * pMercProfile->usApproachFactor[bApproach - 1] / 100;
// Flugente: backgrounds
SOLDIERTYPE* pSoldier = FindSoldierByProfileID( ubMerc, TRUE );
if ( pSoldier )
{
if ( bApproach == APPROACH_THREATEN )
iEffectiveLeadership = (iEffectiveLeadership * (100 + pSoldier->GetBackgroundValue(BG_PERC_APPROACH_THREATEN))) / 100;
}
iApproachVal = pNPCProfile->ubApproachVal[bApproach - 1] * iEffectiveLeadership / 50;
}
else
{
iEffectiveLeadership = ((INT32) pMercProfile->bLeadership) * pMercProfile->usApproachFactor[bApproach - 1] / 100;
// Flugente: backgrounds
SOLDIERTYPE* pSoldier = FindSoldierByProfileID( ubMerc, TRUE );
if ( pSoldier )
{
if ( bApproach == APPROACH_FRIENDLY )
iEffectiveLeadership = (iEffectiveLeadership * (100 + pSoldier->GetBackgroundValue(BG_PERC_APPROACH_FRIENDLY))) / 100;
else if ( bApproach == APPROACH_DIRECT )
iEffectiveLeadership = (iEffectiveLeadership * (100 + pSoldier->GetBackgroundValue(BG_PERC_APPROACH_DIRECT))) / 100;
else if ( bApproach == APPROACH_RECRUIT )
iEffectiveLeadership = (iEffectiveLeadership * (100 + pSoldier->GetBackgroundValue(BG_PERC_APPROACH_RECRUIT))) / 100;
}
iApproachVal = pNPCProfile->ubApproachVal[bApproach - 1] * iEffectiveLeadership / 50;
}
// NB if town attachment is less than 100% then we should make personal value proportionately more important!
if ( pNPCProfile->bTownAttachment < 100 )
{