danr wrote:So the penalty is a die roll based on each of your EV penalties. The shield EV penalty to hit is doubled if using a 1.5 handed weapon with a shield.
The shield and armour penalties themselves are calculated in player.cc starting around line 2049, but I can't figure it out, mostly because a "scale" variable is used that I don't know what it is.
I'd like to figure this out so I can add it to my weapon damage calculation spreadsheet.
Nice thread highjacking
The scale variable is used only to avoid rounding down errors, because we use integers all over. We do all calculations at a factor of 100, and we divide the result at the end (which is in a different function). So, you can just ignore it and assume everything is done with float.
Henzell says that :
AEVP = [base_penalty + max(0, 3*base_penalty - str)] * [45 - armour_skill]/45
ASEVP = base penalty - (shield skill / (5 + size factor))
Seems there is also an extra delay when using a shield. Haven't look at that code yet.
I've made a
little chart of the evasion penalties. For shields, I have only done normal size. For armour, I have assumed no extra penalty from low str (str>=3*EVP). As you can see, plate unskilled AEVP is 6, and I think 1d6 penalty to hit isn't much.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...