diff --git a/GameSettings.cpp b/GameSettings.cpp index 4b41f2de..f84c8d53 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -2295,6 +2295,8 @@ void LoadGameExternalOptions() gGameExternalOptions.ubTeachBonusToTrain = iniReader.ReadInteger("Strategic Assignment Settings","TEACHER_TRAIT_BONUS_TO_TRAINING_EFFICIENCY",30, 0, 100); gGameExternalOptions.ubMinSkillToTeach = iniReader.ReadInteger("Strategic Assignment Settings","MIN_SKILL_REQUIRED_TO_TEACH_OTHER",25, 0, 100); + gGameExternalOptions.bDisableEvolution = iniReader.ReadBoolean("Strategic Assignment Settings", "DISABLE_EVOLUTION", TRUE ); + // HEADROCK HAM B2.8: New Trainer Relations: 2 = Trainees will go to sleep when their trainer goes to sleep. 3 = Trainer will go to sleep if all trainees are asleep. 1 = Both. 0 = Neither. gGameExternalOptions.ubSmartTrainingSleep = iniReader.ReadInteger("Strategic Assignment Settings","SYNCHRONIZED_SLEEPING_HOURS_WHEN_TRAINING_TOGETHER", 0, 0, 3); diff --git a/GameSettings.h b/GameSettings.h index 45432b4b..1fd9f9eb 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -738,6 +738,9 @@ typedef struct INT32 ubRpcBonusToTrainMilitia; INT32 ubMinSkillToTeach; + // Flugente: disable evolution setting in MercProfiles.xml + BOOLEAN bDisableEvolution; + INT32 ubLowActivityLevel; INT32 ubMediumActivityLevel; INT32 ubHighActivityLevel; diff --git a/GameVersion.cpp b/GameVersion.cpp index fbcbcb3e..71325151 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -15,9 +15,9 @@ #ifdef JA2EDITOR #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8522 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8525 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8522 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8525 (Development Build)" }; #endif // ------------------------------ @@ -27,11 +27,11 @@ //DEBUG BUILD VERSION #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8522 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8525 (Development Build)" }; #elif defined (JA113DEMO) - CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8522 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8525 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8522 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8525 (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.8522 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8525 (Development Build)" }; #elif defined (JA113DEMO) - CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8522 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8525 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Release v1.13.8522 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release v1.13.8525 (Development Build)" }; #endif #endif -CHAR8 czVersionNumber[16] = { "Build 18.02.18" }; //YY.MM.DD +CHAR8 czVersionNumber[16] = { "Build 18.02.22" }; //YY.MM.DD CHAR16 zTrackingNumber[16] = { L"Z" }; // SAVE_GAME_VERSION is defined in header, change it there diff --git a/Tactical/Campaign.cpp b/Tactical/Campaign.cpp index 1f73364e..8d6619ae 100644 --- a/Tactical/Campaign.cpp +++ b/Tactical/Campaign.cpp @@ -171,14 +171,18 @@ void ProcessStatChange(MERCPROFILESTRUCT *pProfile, UINT8 ubStat, UINT16 usNumCh INT8 bCurrentRating; UINT16 *psStatGainPtr; BOOLEAN fAffectedByWisdom = TRUE; + INT8 evolution = NORMAL_EVOLUTION; Assert(pProfile != NULL); - if ( pProfile->bEvolution == NO_EVOLUTION ) + if ( !gGameExternalOptions.bDisableEvolution ) + evolution = pProfile->bEvolution; + + if ( evolution == NO_EVOLUTION ) return; // No change possible, quit right away // if this is a Reverse-Evolving merc who attempting to train - if ( ( ubReason == FROM_TRAINING ) && ( pProfile->bEvolution == DEVOLVE ) ) + if ( ( ubReason == FROM_TRAINING ) && ( evolution == DEVOLVE ) ) return; // he doesn't get any benefit, but isn't penalized either if (usNumChances == 0) @@ -269,9 +273,9 @@ void ProcessStatChange(MERCPROFILESTRUCT *pProfile, UINT8 ubStat, UINT16 usNumCh } // loop once for each chance to improve - for (uiCnt = 0; uiCnt < usNumChances; uiCnt++) + for (uiCnt = 0; uiCnt < usNumChances; ++uiCnt) { - if (pProfile->bEvolution != DEVOLVE) // Evolves! + if ( evolution != DEVOLVE) // Evolves! { // if this is improving from a failure, and a successful roll would give us enough to go up a point if ((ubReason == FROM_FAILURE) && ((*psStatGainPtr + 1) >= usSubpointsPerPoint)) @@ -329,18 +333,17 @@ void ProcessStatChange(MERCPROFILESTRUCT *pProfile, UINT8 ubStat, UINT16 usNumCh } // Buggler: more evolution rate choices - if (pProfile->bEvolution == THREEQUARTER_EVOLUTION) + if ( evolution == THREEQUARTER_EVOLUTION) usChance = max(1, usChance * 0.75); - else if (pProfile->bEvolution == HALF_EVOLUTION) + else if ( evolution == HALF_EVOLUTION) usChance = max(1, usChance * 0.5); - else if (pProfile->bEvolution == ONEQUARTER_EVOLUTION) + else if ( evolution == ONEQUARTER_EVOLUTION) usChance = max(1, usChance * 0.25); - - + // maximum possible usChance is 99% if (usChance > 99) { - usChance = 99; + usChance = 99; } if (PreRandom(100) < usChance )