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