From bf4ae66494966afd088b62b668303ac35a55d1d4 Mon Sep 17 00:00:00 2001 From: ChrisL Date: Tue, 21 Jun 2011 16:54:24 +0000 Subject: [PATCH] BUGFIX 538 - Added a condition so that if a door is not openable, iChance will be reset to 0 in time for the merc to make the "this is impossible" speech. 2nd correction. My fix left iChance uninitialized when the personality modifiers were being applied, meaning they no longer counted. I've put the iChance initialization back where it was and slightly altered the condition so we simply resent iChance to 0 when the lock is impossible. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4519 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/SkillCheck.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tactical/SkillCheck.cpp b/Tactical/SkillCheck.cpp index 6ae737e00..23c624058 100644 --- a/Tactical/SkillCheck.cpp +++ b/Tactical/SkillCheck.cpp @@ -553,6 +553,8 @@ INT32 SkillCheck( SOLDIERTYPE * pSoldier, INT8 bReason, INT8 bChanceMod ) iSkill -= GetSkillCheckPenaltyForFatigue( pSoldier, iSkill ); + iChance = iSkill + bChanceMod; + //////////////////////////////////////////////////////////////////////// // SANDRO - STOMP - character traits and disabilities modifiers @@ -634,9 +636,7 @@ 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 + if(bChanceMod == -100) iChance = 0; // silversurfer: moved this down here where it belongs