Ok, time for someone to fact check me here, because if I'm reading this correctly, I'm very confused:
Code:
iskrit = ( kritProbRnd < kritProb )
if iskrit then
if receiver_human and not receiver_glot then
kritProb = kritProb - skill_power("weakness_lore", 2)
if kritProbRnd < kritProb then
iskrit = false
is_weakness_lore = true
end
end
end
Basically, what this is doing it checking if someone made a critical hit. kritProb is the chance of performing a critical hit, kritProbRnd is a random number from 0-99.
Now, if I'm understanding this right, if a critical hit was made (kritProbRnd is less than kritProb), it then subtracts the value from "weakness_lore", which is the Sense Weakness skill. However, let's assume that you don't have the Sense Weakness skill. Shouldn't skill_power("weakness_lore", 2) return 0? And if that's the case, then kritProb = kritProb - skill_power("weakness_lore", 2) becomes kritProb = kritProb - 0, or kritProb = kritProb. In which case the
second if kritProbRnd < kritProb then is guarunteed to also be true because kritProb hasn't changed. Which means that iskrit should automatically be set false, and the game should think Sense Weakness kicked in.
Even worse, I'm sitting here and I can't remember if I've actually had the enemy perform a critical hit on me. It could be my memory letting me down, or it could be that you can't actually get a critical hit on your troops until you take the Sense Weakness skill. Unfortunately I can't set up a test case for "enemy performs a critical hit". So have I mis-analyzed the code? Can anyone without the Sense Weakness skill verify that they've taken (not given) a critical hit?