- 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
+17
View File
@@ -16,6 +16,7 @@
#include "GameSettings.h"
#include "Animation Data.h"
#include "Soldier Control.h"
#include "Interface.h" // added by Flugente for zBackground
#endif
extern void ReducePointsForHunger( SOLDIERTYPE *pSoldier, UINT32 *pusPoints );
@@ -47,6 +48,8 @@ INT16 EffectiveStrength( SOLDIERTYPE *pSoldier, BOOLEAN fTrainer )
{
iEffStrength = 0;
}
iEffStrength = (iEffStrength * (100 + pSoldier->GetBackgroundValue(BG_STRENGTH))) / 100;
// ATE: Make sure at least 2...
iEffStrength = __max( iEffStrength, 2 );
@@ -84,6 +87,8 @@ INT16 EffectiveAgility( SOLDIERTYPE * pSoldier, BOOLEAN fTrainer )
iEffAgility = (iEffAgility * 100) / pSoldier->sWeightCarriedAtTurnStart;
}
iEffAgility = (iEffAgility * (100 + pSoldier->GetBackgroundValue(BG_AGILITY))) / 100;
return( (INT16) iEffAgility );
}
@@ -96,6 +101,8 @@ INT8 EffectiveMechanical( SOLDIERTYPE * pSoldier )
iEffMechanical = EffectStatForBeingDrunk( pSoldier, iEffMechanical );
iEffMechanical = (iEffMechanical * (100 + pSoldier->GetBackgroundValue(BG_MECHANICAL))) / 100;
return( (INT8) iEffMechanical );
}
@@ -108,6 +115,8 @@ INT8 EffectiveExplosive( SOLDIERTYPE * pSoldier )
iEffExplosive = EffectStatForBeingDrunk( pSoldier, iEffExplosive );
iEffExplosive = (iEffExplosive * (100 + pSoldier->GetBackgroundValue(BG_EXPLOSIVE_ASSIGN))) / 100;
return( (INT8) iEffExplosive );
}
@@ -120,6 +129,8 @@ INT8 EffectiveMedical( SOLDIERTYPE * pSoldier )
iEffMedical = EffectStatForBeingDrunk( pSoldier, iEffMedical );
iEffMedical = (iEffMedical * (100 + pSoldier->GetBackgroundValue(BG_MEDICAL))) / 100;
return( (INT8) iEffMedical );
}
@@ -138,6 +149,8 @@ INT8 EffectiveLeadership( SOLDIERTYPE * pSoldier )
iEffLeadership = ( iEffLeadership * 120 / 100 );
}
iEffLeadership = (iEffLeadership * (100 + pSoldier->GetBackgroundValue(BG_LEADERSHIP))) / 100;
return( (INT8) iEffLeadership );
}
@@ -206,6 +219,8 @@ INT8 EffectiveMarksmanship( SOLDIERTYPE * pSoldier )
iEffMarksmanship = EffectStatForBeingDrunk( pSoldier, iEffMarksmanship );
iEffMarksmanship = (iEffMarksmanship * (100 + pSoldier->GetBackgroundValue(BG_MARKSMANSHIP))) / 100;
return( (INT8) iEffMarksmanship );
}
@@ -220,6 +235,8 @@ INT16 EffectiveDexterity( SOLDIERTYPE * pSoldier, BOOLEAN fTrainer )
iEffDexterity = EffectStatForBeingDrunk( pSoldier, iEffDexterity );
iEffDexterity = (iEffDexterity * (100 + pSoldier->GetBackgroundValue(BG_DEXTERITY))) / 100;
return( (INT16) iEffDexterity );
}