mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
If DISABLE_EVOLUTION is TRUE, learning evolution is not used.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=20659&goto=352514&#msg_352514 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8525 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
+9
-9
@@ -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
|
||||
|
||||
+13
-10
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user