afritz1/OpenTESArena

Hit Chance Calculation. Clarification/Verification requested for wiki

gmjack opened this issue · 1 comments

https://github.com/afritz1/OpenTESArena/wiki/Combat#armor-class

Hit Chance given as

if attacker.race in (REDGUARD, DARKELF, WOODELF) then
   racial <- attacker.level*256/100
else
   racial <- 0
endif

chance1 <- 128+((attacker.level-defender.level)*5)*256/100+(attacker.luckBonus-defender.luckBonus)+racial+(attacker.hitBonus-defender.defenceBonus)-defender.AC[slot]
chance2 <- player.level*256/100+51

return (rnd(256)<max(chance1,chance2))

According to this code, "chance2" is affected solely by the PLAYER's level. This seems to imply that player's will be hit MORE often by an enemy as the player level ups. Is this correct? Should this not be chance2 <- attacker.level*256/100 +51??

Thanks,
gmjack

The code is correct. I think it was intended as a balancing measure.