mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
- added Captain J's coverage armor mod
- updated some German strings git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@568 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -991,6 +991,7 @@ INT32 ArmourPercent( SOLDIERTYPE * pSoldier )
|
||||
}
|
||||
else
|
||||
{
|
||||
iVest = 65 * iVest / ( Armour[ Item[ SPECTRA_VEST_18 ].ubClassIndex ].ubProtection + Armour[ Item[ CERAMIC_PLATES ].ubClassIndex ].ubProtection );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1003,6 +1004,7 @@ INT32 ArmourPercent( SOLDIERTYPE * pSoldier )
|
||||
iHelmet = EffectiveArmour( &(pSoldier->inv[HELMETPOS]) );
|
||||
iDivideValue = ( Armour[ Item[ SPECTRA_HELMET_18 ].ubClassIndex ].ubProtection * Armour[ Item[ SPECTRA_HELMET_18 ].ubClassIndex ].ubCoverage );
|
||||
|
||||
// WANNE: Just to be on the save side
|
||||
if (iDivideValue > 0)
|
||||
{
|
||||
// convert to % of best; ignoring bug-treated stuff
|
||||
@@ -1010,6 +1012,7 @@ INT32 ArmourPercent( SOLDIERTYPE * pSoldier )
|
||||
}
|
||||
else
|
||||
{
|
||||
iHelmet = 15 * iHelmet / Armour[ Item[ SPECTRA_HELMET_18 ].ubClassIndex ].ubProtection;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1022,6 +1025,7 @@ INT32 ArmourPercent( SOLDIERTYPE * pSoldier )
|
||||
iLeg = EffectiveArmour( &(pSoldier->inv[LEGPOS]) );
|
||||
iDivideValue = ( Armour[ Item[ SPECTRA_LEGGINGS_18 ].ubClassIndex ].ubProtection * Armour[ Item[ SPECTRA_LEGGINGS_18 ].ubClassIndex ].ubCoverage );
|
||||
|
||||
// WANNE: Just to be on the save side
|
||||
if (iDivideValue > 0)
|
||||
{
|
||||
// convert to % of best; ignoring bug-treated stuff
|
||||
@@ -1029,6 +1033,7 @@ INT32 ArmourPercent( SOLDIERTYPE * pSoldier )
|
||||
}
|
||||
else
|
||||
{
|
||||
iLeg = 25 * iLeg / Armour[ Item[ SPECTRA_LEGGINGS_18 ].ubClassIndex ].ubProtection;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -286,6 +286,7 @@ typedef struct
|
||||
{
|
||||
UINT8 ubArmourClass;
|
||||
UINT16 ubProtection;
|
||||
UINT8 ubCoverage; // Captain J
|
||||
UINT8 ubDegradePercent;
|
||||
UINT32 uiIndex;
|
||||
} ARMOURTYPE;
|
||||
|
||||
@@ -86,6 +86,7 @@ armourStartElementHandle(void *userData, const char *name, const char **atts)
|
||||
(strcmp(name, "uiIndex") == 0 ||
|
||||
strcmp(name, "ubArmourClass") == 0 ||
|
||||
strcmp(name, "ubProtection") == 0 ||
|
||||
strcmp(name, "ubCoverage") == 0 ||
|
||||
strcmp(name, "ubDegradePercent") == 0 ))
|
||||
{
|
||||
pData->curElement = ELEMENT_PROPERTY;
|
||||
@@ -148,6 +149,14 @@ armourEndElementHandle(void *userData, const char *name)
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curArmour.ubProtection = (UINT8) atol(pData->szCharData);
|
||||
}
|
||||
else if(strcmp(name, "ubCoverage") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
if ( gGameExternalOptions.fEnableArmorCoverage )
|
||||
pData->curArmour.ubCoverage = (UINT8) atol(pData->szCharData);
|
||||
else
|
||||
pData->curArmour.ubCoverage = 100;
|
||||
}
|
||||
else if(strcmp(name, "ubDegradePercent") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
@@ -248,6 +257,7 @@ BOOLEAN WriteArmourStats()
|
||||
FilePrintf(hFile,"\t\t<uiIndex>%d</uiIndex>\r\n", cnt );
|
||||
FilePrintf(hFile,"\t\t<ubArmourClass>%d</ubArmourClass>\r\n", Armour[cnt].ubArmourClass );
|
||||
FilePrintf(hFile,"\t\t<ubProtection>%d</ubProtection>\r\n", Armour[cnt].ubProtection );
|
||||
FilePrintf(hFile,"\t\t<ubCoverage>%d</ubCoverage>\r\n", Armour[cnt].ubCoverage );
|
||||
FilePrintf(hFile,"\t\t<ubDegradePercent>%d</ubDegradePercent>\r\n", Armour[cnt].ubDegradePercent );
|
||||
|
||||
FilePrintf(hFile,"\t</ARMOUR>\r\n");
|
||||
|
||||
Reference in New Issue
Block a user