diff --git a/Tactical/SkillCheck.cpp b/Tactical/SkillCheck.cpp index bbe132d8..6ae737e0 100644 --- a/Tactical/SkillCheck.cpp +++ b/Tactical/SkillCheck.cpp @@ -553,8 +553,6 @@ INT32 SkillCheck( SOLDIERTYPE * pSoldier, INT8 bReason, INT8 bChanceMod ) iSkill -= GetSkillCheckPenaltyForFatigue( pSoldier, iSkill ); - iChance = iSkill + bChanceMod; - //////////////////////////////////////////////////////////////////////// // SANDRO - STOMP - character traits and disabilities modifiers @@ -634,6 +632,13 @@ INT32 SkillCheck( SOLDIERTYPE * pSoldier, INT8 bReason, INT8 bChanceMod ) } ////////////////////////////////////////////////////////////////////// + // CHRISL: If lock is flagged OPENING_NOT_POSSIBLE, then reset iChance to 0 regardless of mercs skills. Also, moved this check to after personality and + // disability checks since an unopenable door isn't going to suddenly be openable just cause we have some other bonus. + if(bChanceMod != -100) + iChance = iSkill + bChanceMod; + else + iChance = 0; + // silversurfer: moved this down here where it belongs // if this wasn't the last check a merc with certain disability modifiers would never completely fail // to do something and would never do his speech telling that he can't do this