diff --git a/Laptop/IMP Attribute Selection.cpp b/Laptop/IMP Attribute Selection.cpp index 0a0d84fa..245aacdf 100644 --- a/Laptop/IMP Attribute Selection.cpp +++ b/Laptop/IMP Attribute Selection.cpp @@ -94,9 +94,9 @@ INT32 iHealthMinimum = gGameExternalOptions.iMinAttribute; INT32 iLeaderShipMinimum = gGameExternalOptions.iMinAttribute; INT32 iWisdomMinimum = gGameExternalOptions.iMinAttribute; INT32 iMarkmanshipMinimum = gGameExternalOptions.iMinAttribute; -INT32 iMechanicalMinimum = gGameExternalOptions.iMinAttribute; -INT32 iMedicalMinimum = gGameExternalOptions.iMinAttribute; -INT32 iExplosivesMinimum = gGameExternalOptions.iMinAttribute; +INT32 iMechanicalMinimum = 0; +INT32 iMedicalMinimum = 0; +INT32 iExplosivesMinimum = 0; @@ -613,79 +613,79 @@ UINT8 IncrementStat( INT32 iStatToIncrement ) switch( iStatToIncrement ) { case( STRENGTH_ATTRIBUTE ): - if( iCurrentStrength > iMaxAttribute -1 ) + if( iCurrentStrength > iMaxAttribute -1 ) { // too high, leave return( SLIDER_OUT_OF_RANGE ); - } - else + } + else { iCurrentStrength++; - iCurrentBonusPoints--; + iCurrentBonusPoints--; } break; - case( DEXTERITY_ATTRIBUTE ): - if( iCurrentDexterity > iMaxAttribute -1 ) + case( DEXTERITY_ATTRIBUTE ): + if( iCurrentDexterity > iMaxAttribute -1 ) { // too high, leave return( SLIDER_OUT_OF_RANGE ); - } - else + } + else { iCurrentDexterity++; - iCurrentBonusPoints--; + iCurrentBonusPoints--; } break; case( AGILITY_ATTRIBUTE ): - if( iCurrentAgility > iMaxAttribute -1 ) + if( iCurrentAgility > iMaxAttribute -1 ) { // too high, leave return( SLIDER_OUT_OF_RANGE ); - } - else + } + else { iCurrentAgility++; - iCurrentBonusPoints--; + iCurrentBonusPoints--; } break; case( WISDOM_ATTRIBUTE ): - if( iCurrentWisdom > iMaxAttribute -1 ) + if( iCurrentWisdom > iMaxAttribute -1 ) { // too high, leave return( SLIDER_OUT_OF_RANGE ); - } - else + } + else { iCurrentWisdom++; - iCurrentBonusPoints--; + iCurrentBonusPoints--; } break; - case( HEALTH_ATTRIBUTE ): - if( iCurrentHealth > iMaxAttribute -1 ) + case( HEALTH_ATTRIBUTE ): + if( iCurrentHealth > iMaxAttribute -1 ) { // too high, leave return( SLIDER_OUT_OF_RANGE ); - } - else + } + else { iCurrentHealth++; - iCurrentBonusPoints--; + iCurrentBonusPoints--; } break; case( LEADERSHIP_ATTRIBUTE ): - if( iCurrentLeaderShip > iMaxAttribute -1 ) + if( iCurrentLeaderShip > iMaxAttribute -1 ) { // too high, leave return( SLIDER_OUT_OF_RANGE ); } - else + else { if( iCurrentLeaderShip == 0) { if( DoWeHaveThisManyBonusPoints( iMaxZeroBonus ) == TRUE ) { - iCurrentLeaderShip+=iLeaderShipMinimum; - iCurrentBonusPoints-=iMaxZeroBonus; + iCurrentLeaderShip+=iLeaderShipMinimum; + iCurrentBonusPoints-=iMaxZeroBonus; fSkillAtZeroWarning = FALSE; } else @@ -695,25 +695,25 @@ UINT8 IncrementStat( INT32 iStatToIncrement ) } else { - iCurrentLeaderShip++; - iCurrentBonusPoints--; + iCurrentLeaderShip++; + iCurrentBonusPoints--; } } break; case( MARKSMANSHIP_SKILL ): - if( iCurrentMarkmanship > iMaxAttribute -1 ) + if( iCurrentMarkmanship > iMaxAttribute -1 ) { // too high, leave return( SLIDER_OUT_OF_RANGE ); - } - else + } + else { if( iCurrentMarkmanship == 0) { if( DoWeHaveThisManyBonusPoints( iMaxZeroBonus ) == TRUE ) { - iCurrentMarkmanship+=iMarkmanshipMinimum; - iCurrentBonusPoints-=iMaxZeroBonus; + iCurrentMarkmanship+=iMarkmanshipMinimum; + iCurrentBonusPoints-=iMaxZeroBonus; fSkillAtZeroWarning = FALSE; } else @@ -723,25 +723,25 @@ UINT8 IncrementStat( INT32 iStatToIncrement ) } else { - iCurrentMarkmanship++; - iCurrentBonusPoints--; + iCurrentMarkmanship++; + iCurrentBonusPoints--; } } break; case( MECHANICAL_SKILL ): - if( iCurrentMechanical > iMaxAttribute -1 ) + if( iCurrentMechanical > iMaxAttribute -1 ) { // too high, leave return( SLIDER_OUT_OF_RANGE ); - } - else + } + else { if( iCurrentMechanical == 0) { if( DoWeHaveThisManyBonusPoints( iMaxZeroBonus ) == TRUE ) { - iCurrentMechanical+=iMechanicalMinimum; - iCurrentBonusPoints-=iMaxZeroBonus; + iCurrentMechanical+=iMechanicalMinimum; + iCurrentBonusPoints-=iMaxZeroBonus; fSkillAtZeroWarning = FALSE; } else @@ -751,25 +751,25 @@ UINT8 IncrementStat( INT32 iStatToIncrement ) } else { - iCurrentMechanical++; - iCurrentBonusPoints--; + iCurrentMechanical++; + iCurrentBonusPoints--; } } break; case( MEDICAL_SKILL ): - if( iCurrentMedical > iMaxAttribute -1 ) + if( iCurrentMedical > iMaxAttribute -1 ) { // too high, leave return( SLIDER_OUT_OF_RANGE ); - } - else + } + else { - if( iCurrentMedical == 0) + if( iCurrentMedical == 0) { if( DoWeHaveThisManyBonusPoints( iMaxZeroBonus ) == TRUE ) { - iCurrentMedical+=iMedicalMinimum; - iCurrentBonusPoints-=iMaxZeroBonus; + iCurrentMedical+=iMedicalMinimum; + iCurrentBonusPoints-=iMaxZeroBonus; fSkillAtZeroWarning = FALSE; } else @@ -779,25 +779,25 @@ UINT8 IncrementStat( INT32 iStatToIncrement ) } else { - iCurrentMedical++; - iCurrentBonusPoints--; + iCurrentMedical++; + iCurrentBonusPoints--; } } break; case( EXPLOSIVE_SKILL ): - if( iCurrentExplosives > iMaxAttribute -1 ) + if( iCurrentExplosives > iMaxAttribute -1 ) { // too high, leave return( SLIDER_OUT_OF_RANGE ); - } - else + } + else { if( iCurrentExplosives == 0) { if( DoWeHaveThisManyBonusPoints( iMaxZeroBonus ) == TRUE ) { - iCurrentExplosives+=iExplosivesMinimum; - iCurrentBonusPoints-=iMaxZeroBonus; + iCurrentExplosives+=iExplosivesMinimum; + iCurrentBonusPoints-=iMaxZeroBonus; fSkillAtZeroWarning = FALSE; } else @@ -807,8 +807,8 @@ UINT8 IncrementStat( INT32 iStatToIncrement ) } else { - iCurrentExplosives++; - iCurrentBonusPoints--; + iCurrentExplosives++; + iCurrentBonusPoints--; } } break; @@ -1916,7 +1916,7 @@ INT32 GetCurrentAttributeValue( INT32 iAttribute ) void SetAttributes( void ) { INT32 iExtraPoints = 0; - + // added externilized multiplier for starting level - SADNRO iLevelCostMultiplier = gGameExternalOptions.iIMPStartingLevelCostMultiplier; @@ -2077,6 +2077,19 @@ void SetAttributes( void ) ///////////////////////////////////////////////////////////////////////////////////////////////// else // ORIGINAL { + // default + iStrengthMinimum = gGameExternalOptions.iMinAttribute; + iAgilityMinimum = gGameExternalOptions.iMinAttribute; + iDexterityMinimum = gGameExternalOptions.iMinAttribute; + iHealthMinimum = gGameExternalOptions.iMinAttribute; + iLeaderShipMinimum = gGameExternalOptions.iMinAttribute; + iWisdomMinimum = gGameExternalOptions.iMinAttribute; + + iMarkmanshipMinimum = gGameExternalOptions.iMinAttribute; + iMechanicalMinimum = gGameExternalOptions.iMinAttribute; + iMedicalMinimum = gGameExternalOptions.iMinAttribute; + iExplosivesMinimum = gGameExternalOptions.iMinAttribute; + iCurrentBonusPoints = gGameExternalOptions.iImpAttributePoints; //Determine if the player has any extra points diff --git a/Laptop/IMP Minor Trait.cpp b/Laptop/IMP Minor Trait.cpp index ddd38c56..4b459acb 100644 --- a/Laptop/IMP Minor Trait.cpp +++ b/Laptop/IMP Minor Trait.cpp @@ -774,6 +774,12 @@ INT8 GetLastSelectedMinorTrait( void ) UINT8 StrengthRequiredAdjustmentForMinorTraits( INT32 iInitialValue ) { + // Only for new trait system + if (!gGameOptions.fNewTraitSystem) + { + return 0; + } + if ( gfMinorTraitQuestions[ IMP_SKILL_TRAITS_NEW_MELEE ] ) { // 60 is minimum, +10 is addition to other preset requirements @@ -792,6 +798,12 @@ UINT8 StrengthRequiredAdjustmentForMinorTraits( INT32 iInitialValue ) } UINT8 DexterityRequiredAdjustmentForMinorTraits( INT32 iInitialValue ) { + // Only for new trait system + if (!gGameOptions.fNewTraitSystem) + { + return 0; + } + if ( gfMinorTraitQuestions[ IMP_SKILL_TRAITS_NEW_AMBIDEXTROUS ] && gfMinorTraitQuestions[ IMP_SKILL_TRAITS_NEW_THROWING ] ) { // 70 is minimum if having both, +20 is addition to other preset requirements @@ -839,6 +851,12 @@ UINT8 DexterityRequiredAdjustmentForMinorTraits( INT32 iInitialValue ) } UINT8 AgilityRequiredAdjustmentForMinorTraits( INT32 iInitialValue ) { + // Only for new trait system + if (!gGameOptions.fNewTraitSystem) + { + return 0; + } + if ( gfMinorTraitQuestions[ IMP_SKILL_TRAITS_NEW_ATHLETICS ] && gfMinorTraitQuestions[ IMP_SKILL_TRAITS_NEW_STEALTHY ] ) { // 70 is minimum if having both, +20 is addition to other preset requirements @@ -886,6 +904,12 @@ UINT8 AgilityRequiredAdjustmentForMinorTraits( INT32 iInitialValue ) } UINT8 HealthRequiredAdjustmentForMinorTraits( INT32 iInitialValue ) { + // Only for new trait system + if (!gGameOptions.fNewTraitSystem) + { + return 0; + } + if ( gfMinorTraitQuestions[ IMP_SKILL_TRAITS_NEW_BODYBUILDING ] ) { // 60 is minimum, +10 is addition to other preset requirements @@ -905,6 +929,12 @@ UINT8 HealthRequiredAdjustmentForMinorTraits( INT32 iInitialValue ) } UINT8 WisdomRequiredAdjustmentForMinorTraits( INT32 iInitialValue ) { + // Only for new trait system + if (!gGameOptions.fNewTraitSystem) + { + return 0; + } + if ( gfMinorTraitQuestions[ IMP_SKILL_TRAITS_NEW_NIGHT_OPS ] && gfMinorTraitQuestions[ IMP_SKILL_TRAITS_NEW_SCOUTING ] ) { // 70 is minimum if having both, +20 is addition to other preset requirements @@ -952,6 +982,12 @@ UINT8 WisdomRequiredAdjustmentForMinorTraits( INT32 iInitialValue ) } UINT8 LeaderShipRequiredAdjustmentForMinorTraits( INT32 iInitialValue ) { + // Only for new trait system + if (!gGameOptions.fNewTraitSystem) + { + return 0; + } + if ( gfMinorTraitQuestions[ IMP_SKILL_TRAITS_NEW_TEACHING ] ) { // 60 is minimum, +10 is addition to other preset requirements diff --git a/Laptop/IMP Skill Trait.cpp b/Laptop/IMP Skill Trait.cpp index 8127d083..59c9f3d2 100644 --- a/Laptop/IMP Skill Trait.cpp +++ b/Laptop/IMP Skill Trait.cpp @@ -1314,7 +1314,7 @@ INT32 StrengthRequiredDueToMajorSkills( void ) // Only for new trait system if (!gGameOptions.fNewTraitSystem) { - return (0); + return 0; } // Check first skill trait (plus second for double trait) @@ -1360,7 +1360,7 @@ INT32 AgilityRequiredDueToMajorSkills( void ) // Only for new trait system if (!gGameOptions.fNewTraitSystem) { - return (0); + return 0; } // Check first skill trait (plus second for double trait) @@ -1406,7 +1406,7 @@ INT32 DexterityRequiredDueToMajorSkills( void ) // Only for new trait system if (!gGameOptions.fNewTraitSystem) { - return (0); + return 0; } // Check first skill trait (plus second for double trait) @@ -1496,7 +1496,7 @@ INT32 HealthRequiredDueToMajorSkills( void ) // Only for new trait system if (!gGameOptions.fNewTraitSystem) { - return (0); + return 0; } // Check first skill trait (plus second for double trait) @@ -1542,7 +1542,7 @@ INT32 LeadershipRequiredDueToMajorSkills( void ) // Only for new trait system if (!gGameOptions.fNewTraitSystem) { - return (0); + return 0; } // Check first skill trait (plus second for double trait) @@ -1577,7 +1577,7 @@ INT32 WisdomRequiredDueToMajorSkills( void ) // Only for new trait system if (!gGameOptions.fNewTraitSystem) { - return (0); + return 0; } // Check first skill trait (plus second for double trait) @@ -1645,7 +1645,7 @@ INT32 MarksmanshipRequiredDueToMajorSkills( void ) // Only for new trait system if (!gGameOptions.fNewTraitSystem) { - return (0); + return 0; } // Check first skill trait (plus second for double trait) @@ -1702,7 +1702,7 @@ INT32 MechanicalRequiredDueToMajorSkills( void ) // Only for new trait system if (!gGameOptions.fNewTraitSystem) { - return (0); + return 0; } // Check first skill trait (plus second for double trait) @@ -1726,7 +1726,7 @@ INT32 MedicalRequiredDueToMajorSkills( void ) // Only for new trait system if (!gGameOptions.fNewTraitSystem) { - return (0); + return 0; } // Check first skill trait (plus second for double trait) @@ -1750,7 +1750,7 @@ INT32 ExplosivesRequiredDueToMajorSkills( void ) // Only for new trait system if (!gGameOptions.fNewTraitSystem) { - return (0); + return 0; } // Check first skill trait (plus second for double trait)