added insurance cost modifier to backgrounds

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6360 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-09-04 23:31:34 +00:00
parent 251d96ccb6
commit c78568cb2a
12 changed files with 20 additions and 0 deletions
+4
View File
@@ -25,6 +25,7 @@
#include "Strategic Status.h"
#include "Assignments.h"
#include "Map Screen Interface.h"
#include "Interface.h" // added by Flugente
#endif
#include <vector>
@@ -1188,6 +1189,9 @@ INT32 CalculateInsuranceContractCost( INT32 iLength, UINT8 ubMercID )
// calculate the overall insurability risk factor for this merc by combining all the subfactors
flRiskFactor = flSkillFactor * flFitnessFactor * flExpFactor * flSurvivalFactor;
// Flugente: backgrounds
flRiskFactor = flRiskFactor * (100 + pSoldier->GetBackgroundValue(BG_PERC_INSURANCE)) / 100;
// restrict the overall factor to within reasonable limits
if (flRiskFactor < MIN_INSURANCE_RATIO)
{