- renamed AC_SUPPRESSOR to AC_MUZZLE

- mercs with average refinement get a morale penalty if they care extremely about refinement and the other merc is a slob or snob
- added code for soldier-specific interrupt modifier
- added belgian and portoguese nationalities
- Fix: race, sexism etc. xml data didn't correctly overwrite PROF.DAT data

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6519 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-10-21 17:57:39 +00:00
parent 8007db56dc
commit 596b08ca70
17 changed files with 56 additions and 3 deletions
+1 -1
View File
@@ -171,7 +171,7 @@ BobbyRayPurchaseStruct BobbyRayPurchases[ 100 ];
//Madd: new BR filters //Madd: new BR filters
#define BR_MISC_FILTER_OPTICS (AC_SCOPE | AC_SIGHT | AC_IRONSIGHT) #define BR_MISC_FILTER_OPTICS (AC_SCOPE | AC_SIGHT | AC_IRONSIGHT)
#define BR_MISC_FILTER_SIDE_BOTTOM (AC_LASER | AC_FOREGRIP | AC_BIPOD) #define BR_MISC_FILTER_SIDE_BOTTOM (AC_LASER | AC_FOREGRIP | AC_BIPOD)
#define BR_MISC_FILTER_MUZZLE (AC_SUPPRESSOR | AC_EXTENDER) #define BR_MISC_FILTER_MUZZLE (AC_MUZZLE | AC_EXTENDER)
#define BR_MISC_FILTER_STOCK AC_STOCK #define BR_MISC_FILTER_STOCK AC_STOCK
#define BR_MISC_FILTER_INTERNAL (AC_MAGWELL | AC_INTERNAL | AC_EXTERNAL) #define BR_MISC_FILTER_INTERNAL (AC_MAGWELL | AC_INTERNAL | AC_EXTERNAL)
#define BR_MISC_FILTER_STD_ATTACHMENTS (BR_MISC_FILTER_OPTICS | BR_MISC_FILTER_SIDE_BOTTOM | BR_MISC_FILTER_MUZZLE | BR_MISC_FILTER_STOCK | BR_MISC_FILTER_INTERNAL) #define BR_MISC_FILTER_STD_ATTACHMENTS (BR_MISC_FILTER_OPTICS | BR_MISC_FILTER_SIDE_BOTTOM | BR_MISC_FILTER_MUZZLE | BR_MISC_FILTER_STOCK | BR_MISC_FILTER_INTERNAL)
+1 -1
View File
@@ -644,7 +644,7 @@ extern OBJECTTYPE gTempObject;
// redesigned by Flugente on 12-04-10 // redesigned by Flugente on 12-04-10
// Chrisl: Define attachment classes // Chrisl: Define attachment classes
#define AC_BIPOD 0x00000001 //1 #define AC_BIPOD 0x00000001 //1
#define AC_SUPPRESSOR 0x00000002 //2 #define AC_MUZZLE 0x00000002 //2
#define AC_LASER 0x00000004 //4 #define AC_LASER 0x00000004 //4
#define AC_SIGHT 0x00000008 //8 #define AC_SIGHT 0x00000008 //8
#define AC_SCOPE 0x00000010 //16 #define AC_SCOPE 0x00000010 //16
+11
View File
@@ -1172,10 +1172,16 @@ void HourlyMoraleUpdate( void )
} }
// some people care about how distuingished other people are. Malus if on different ends of the spectrum, a small bonus if on the same and its really important to the person // some people care about how distuingished other people are. Malus if on different ends of the spectrum, a small bonus if on the same and its really important to the person
// also give a malus if the other person is a slob or snob and we are average but care extremely (we don't like people who behave differently)
switch ( gMercProfiles[ pOtherSoldier->ubProfile ].bRefinement ) switch ( gMercProfiles[ pOtherSoldier->ubProfile ].bRefinement )
{ {
case REFINEMENT_SLOB: case REFINEMENT_SLOB:
{ {
if ( pProfile->bRefinement == REFINEMENT_AVERAGE )
{
if ( pProfile->bRefinementCareLevel == CARELEVEL_EXTREME )
bOpinion -= gGameExternalOptions.sMoraleModRefinement;
}
if ( pProfile->bRefinement == REFINEMENT_SLOB ) if ( pProfile->bRefinement == REFINEMENT_SLOB )
{ {
if ( pProfile->bRefinementCareLevel == CARELEVEL_EXTREME ) if ( pProfile->bRefinementCareLevel == CARELEVEL_EXTREME )
@@ -1192,6 +1198,11 @@ void HourlyMoraleUpdate( void )
break; break;
case REFINEMENT_SNOB: case REFINEMENT_SNOB:
{ {
if ( pProfile->bRefinement == REFINEMENT_AVERAGE )
{
if ( pProfile->bRefinementCareLevel == CARELEVEL_EXTREME )
bOpinion -= gGameExternalOptions.sMoraleModRefinement;
}
if ( pProfile->bRefinement == REFINEMENT_SNOB ) if ( pProfile->bRefinement == REFINEMENT_SNOB )
{ {
if ( pProfile->bRefinementCareLevel == CARELEVEL_EXTREME ) if ( pProfile->bRefinementCareLevel == CARELEVEL_EXTREME )
+7
View File
@@ -16873,6 +16873,13 @@ UINT8 SOLDIERTYPE::GetMoraleThreshold()
return min(threshold, max(0, threshold - moraledamage)); return min(threshold, max(0, threshold - moraledamage));
} }
INT16 SOLDIERTYPE::GetInterruptModifier( UINT8 usDistance )
{
INT16 bonus = 0;
return bonus;
}
void SOLDIERTYPE::SoldierPropertyUpkeep() void SOLDIERTYPE::SoldierPropertyUpkeep()
{ {
// these flags are only used for the first turn, and thus always removed // these flags are only used for the first turn, and thus always removed
+1
View File
@@ -1603,6 +1603,7 @@ public:
INT16 GetAPBonus(); INT16 GetAPBonus();
INT8 GetFearResistanceBonus(); // fear resistance lowers shock and morale damage from horror INT8 GetFearResistanceBonus(); // fear resistance lowers shock and morale damage from horror
UINT8 GetMoraleThreshold(); UINT8 GetMoraleThreshold();
INT16 GetInterruptModifier( UINT8 usDistance );
void SoldierPropertyUpkeep(); // update functions for various properties (updating counters, resetting flags etc.) void SoldierPropertyUpkeep(); // update functions for various properties (updating counters, resetting flags etc.)
+11
View File
@@ -2587,6 +2587,17 @@ void OverwriteMercProfileWithXMLData( UINT32 uiLoop )
gMercProfiles[ uiLoop ].bLearnToHate = tempProfiles[ uiLoop ].bLearnToHate ; gMercProfiles[ uiLoop ].bLearnToHate = tempProfiles[ uiLoop ].bLearnToHate ;
gMercProfiles[ uiLoop ].bLearnToHateTime = tempProfiles[ uiLoop ].bLearnToHateTime ; gMercProfiles[ uiLoop ].bLearnToHateTime = tempProfiles[ uiLoop ].bLearnToHateTime ;
gMercProfiles[ uiLoop ].bRace = tempProfiles[ uiLoop ].bRace;
gMercProfiles[ uiLoop ].bNationality = tempProfiles[ uiLoop ].bNationality;
gMercProfiles[ uiLoop ].bAppearance = tempProfiles[ uiLoop ].bAppearance;
gMercProfiles[ uiLoop ].bAppearanceCareLevel = tempProfiles[ uiLoop ].bAppearanceCareLevel;
gMercProfiles[ uiLoop ].bRefinement = tempProfiles[ uiLoop ].bRefinement;
gMercProfiles[ uiLoop ].bRefinementCareLevel = tempProfiles[ uiLoop ].bRefinementCareLevel;
gMercProfiles[ uiLoop ].bHatedNationality = tempProfiles[ uiLoop ].bHatedNationality;
gMercProfiles[ uiLoop ].bHatedNationalityCareLevel = tempProfiles[ uiLoop ].bHatedNationalityCareLevel;
gMercProfiles[ uiLoop ].bRacist = tempProfiles[ uiLoop ].bRacist;
gMercProfiles[ uiLoop ].bSexist = tempProfiles[ uiLoop ].bSexist;
gMercProfiles[ uiLoop ].sSalary = tempProfiles[ uiLoop ].sSalary ; gMercProfiles[ uiLoop ].sSalary = tempProfiles[ uiLoop ].sSalary ;
gMercProfiles[ uiLoop ].uiWeeklySalary = tempProfiles[ uiLoop ].uiWeeklySalary ; gMercProfiles[ uiLoop ].uiWeeklySalary = tempProfiles[ uiLoop ].uiWeeklySalary ;
gMercProfiles[ uiLoop ].uiBiWeeklySalary = tempProfiles[ uiLoop ].uiBiWeeklySalary ; gMercProfiles[ uiLoop ].uiBiWeeklySalary = tempProfiles[ uiLoop ].uiBiWeeklySalary ;
+4 -1
View File
@@ -1943,7 +1943,10 @@ INT8 CalcInterruptDuelPts( SOLDIERTYPE * pSoldier, UINT8 ubOpponentID, BOOLEAN f
else if ( pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_PERCEPTION ] ) else if ( pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_PERCEPTION ] )
{ {
iPoints -= 1; iPoints -= 1;
} }
// Flugente: interrupt modifier from special stats
iPoints += pSoldier->GetInterruptModifier( ubDistance );
// if he's a computer soldier // if he's a computer soldier
+2
View File
@@ -273,6 +273,8 @@ typedef enum
SWEDISH, SWEDISH,
IRAQI, // 40 IRAQI, // 40
SYRIAN, SYRIAN,
BELGIAN,
PORTOGUESE,
NUM_NATIONALITIES NUM_NATIONALITIES
} Nationalities; } Nationalities;
+2
View File
@@ -7788,6 +7788,8 @@ STR16 szNationalityText[]=
L"swedish", L"swedish",
L"iraqi", // 40 L"iraqi", // 40
L"syrian", L"syrian",
L"belgian",
L"portoguese",
}; };
// special text used if we do not hate any nation (value of -1) // special text used if we do not hate any nation (value of -1)
+2
View File
@@ -7805,6 +7805,8 @@ STR16 szNationalityText[]=
L"swedish", L"swedish",
L"iraqi", // 40 L"iraqi", // 40
L"syrian", L"syrian",
L"belgian",
L"portoguese",
}; };
// special text used if we do not hate any nation (value of -1) // special text used if we do not hate any nation (value of -1)
+2
View File
@@ -7788,6 +7788,8 @@ STR16 szNationalityText[]=
L"swedish", L"swedish",
L"iraqi", // 40 L"iraqi", // 40
L"syrian", L"syrian",
L"belgian",
L"portoguese",
}; };
// special text used if we do not hate any nation (value of -1) // special text used if we do not hate any nation (value of -1)
+2
View File
@@ -7790,6 +7790,8 @@ STR16 szNationalityText[]=
L"swedish", L"swedish",
L"iraqi", // 40 L"iraqi", // 40
L"syrian", L"syrian",
L"belgian",
L"portoguese",
}; };
// special text used if we do not hate any nation (value of -1) // special text used if we do not hate any nation (value of -1)
+2
View File
@@ -7614,6 +7614,8 @@ STR16 szNationalityText[]=
L"swedish", L"swedish",
L"iraqi", // 40 L"iraqi", // 40
L"syrian", L"syrian",
L"belgian",
L"portoguese",
}; };
// special text used if we do not hate any nation (value of -1) // special text used if we do not hate any nation (value of -1)
+2
View File
@@ -7792,6 +7792,8 @@ STR16 szNationalityText[]=
L"swedish", L"swedish",
L"iraqi", // 40 L"iraqi", // 40
L"syrian", L"syrian",
L"belgian",
L"portoguese",
}; };
// special text used if we do not hate any nation (value of -1) // special text used if we do not hate any nation (value of -1)
+2
View File
@@ -7816,6 +7816,8 @@ STR16 szNationalityText[]=
L"swedish", L"swedish",
L"iraqi", // 40 L"iraqi", // 40
L"syrian", L"syrian",
L"belgian",
L"portoguese",
}; };
// special text used if we do not hate any nation (value of -1) // special text used if we do not hate any nation (value of -1)
+2
View File
@@ -7790,6 +7790,8 @@ STR16 szNationalityText[]=
L"swedish", L"swedish",
L"iraqi", // 40 L"iraqi", // 40
L"syrian", L"syrian",
L"belgian",
L"portoguese",
}; };
// special text used if we do not hate any nation (value of -1) // special text used if we do not hate any nation (value of -1)
+2
View File
@@ -7807,6 +7807,8 @@ STR16 szNationalityText[]=
L"swedish", L"swedish",
L"iraqi", // 40 L"iraqi", // 40
L"syrian", L"syrian",
L"belgian",
L"portoguese",
}; };
// special text used if we do not hate any nation (value of -1) // special text used if we do not hate any nation (value of -1)