mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
New parameter in DifficultySettings.xml:
LootStatusModifier defines how much his dropped equipment can get damaged when an opponent dies. This externalizes the hardcoded values that depended on difficulty level. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8056 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -43,6 +43,7 @@ typedef struct
|
||||
UINT32 iGracePeriodInDaysAfterPatrolDestroyed;
|
||||
BOOLEAN bAggressiveQueenAi;
|
||||
INT32 iMaxMercDeaths;
|
||||
UINT8 usLootStatusModifier;
|
||||
|
||||
//Creatures Settings
|
||||
UINT16 iCreatureSpreadTime;
|
||||
|
||||
+9
-9
@@ -15,9 +15,9 @@
|
||||
#ifdef JA2EDITOR
|
||||
|
||||
#ifdef JA2UB
|
||||
CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8052 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8056 (Development Build)" };
|
||||
#else
|
||||
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8052 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8056 (Development Build)" };
|
||||
#endif
|
||||
|
||||
// ------------------------------
|
||||
@@ -27,11 +27,11 @@
|
||||
|
||||
//DEBUG BUILD VERSION
|
||||
#ifdef JA2UB
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8052 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8056 (Development Build)" };
|
||||
#elif defined (JA113DEMO)
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8052 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8056 (Development Build)" };
|
||||
#else
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8052 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8056 (Development Build)" };
|
||||
#endif
|
||||
|
||||
#elif defined CRIPPLED_VERSION
|
||||
@@ -46,16 +46,16 @@
|
||||
|
||||
//RELEASE BUILD VERSION
|
||||
#ifdef JA2UB
|
||||
CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8052 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8056 (Development Build)" };
|
||||
#elif defined (JA113DEMO)
|
||||
CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8052 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8056 (Development Build)" };
|
||||
#else
|
||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.8052 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.8056 (Development Build)" };
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
CHAR8 czVersionNumber[16] = { "Build 16.02.06" }; //YY.MM.DD
|
||||
CHAR8 czVersionNumber[16] = { "Build 16.02.13" }; //YY.MM.DD
|
||||
CHAR16 zTrackingNumber[16] = { L"Z" };
|
||||
|
||||
// SAVE_GAME_VERSION is defined in header, change it there
|
||||
|
||||
@@ -1017,7 +1017,9 @@ BOOLEAN TurnSoldierIntoCorpse( SOLDIERTYPE *pSoldier, BOOLEAN fRemoveMerc, BOOLE
|
||||
|
||||
if ( Item[pObj->usItem].damageable && Item[pObj->usItem].usItemClass != IC_THROWING_KNIFE ) // Madd: drop crappier items from enemies on higher difficulty levels - note the quick fix for throwing knives
|
||||
{
|
||||
(*pObj)[0]->data.objectStatus -= (gGameOptions.ubDifficultyLevel - 1) * Random(20);
|
||||
// silversurfer: externalized this
|
||||
//(*pObj)[0]->data.objectStatus -= (gGameOptions.ubDifficultyLevel - 1) * Random(20);
|
||||
(*pObj)[0]->data.objectStatus -= Random( zDiffSetting[gGameOptions.ubDifficultyLevel].usLootStatusModifier );
|
||||
(*pObj)[0]->data.objectStatus = min(max((*pObj)[0]->data.objectStatus,1),100); // never below 1% or above 100%
|
||||
|
||||
(*pObj)[0]->data.sRepairThreshold = max(1, min(100, ((*pObj)[0]->data.objectStatus + 200)/3 ));
|
||||
|
||||
@@ -67,6 +67,7 @@ DifficultySettingsParseDataStartElementHandle(void *userData, const XML_Char *na
|
||||
strcmp(name, "GracePeriodInDaysAfterPatrolDestroyed") == 0 ||
|
||||
strcmp(name, "AggressiveQueenAi") == 0 ||
|
||||
strcmp(name, "MaxMercDeaths") == 0 ||
|
||||
strcmp(name, "LootStatusModifier") == 0 ||
|
||||
strcmp(name, "CreatureSpreadTime") == 0 ||
|
||||
strcmp(name, "QueenReproductionBase") == 0 ||
|
||||
strcmp(name, "QueenReproductionBonus") == 0 ||
|
||||
@@ -171,6 +172,7 @@ difficultySettingsEndElementHandle(void *userData, const XML_Char *name)
|
||||
zDiffSetting[pData->curDifficultySettings.uiIndex].iGracePeriodInDaysAfterPatrolDestroyed = pData->curDifficultySettings.iGracePeriodInDaysAfterPatrolDestroyed;
|
||||
zDiffSetting[pData->curDifficultySettings.uiIndex].bAggressiveQueenAi = pData->curDifficultySettings.bAggressiveQueenAi;
|
||||
zDiffSetting[pData->curDifficultySettings.uiIndex].iMaxMercDeaths = pData->curDifficultySettings.iMaxMercDeaths;
|
||||
zDiffSetting[pData->curDifficultySettings.uiIndex].usLootStatusModifier = pData->curDifficultySettings.usLootStatusModifier;
|
||||
|
||||
//Creatures Settings
|
||||
zDiffSetting[pData->curDifficultySettings.uiIndex].iCreatureSpreadTime = pData->curDifficultySettings.iCreatureSpreadTime;
|
||||
@@ -347,6 +349,11 @@ difficultySettingsEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curDifficultySettings.iMaxMercDeaths = (INT32) atol(pData->szCharData);
|
||||
}
|
||||
else if(strcmp(name, "LootStatusModifier") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curDifficultySettings.usLootStatusModifier = (UINT8) atol(pData->szCharData);
|
||||
}
|
||||
//Creatures Settings
|
||||
else if(strcmp(name, "CreatureSpreadTime") == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user