Topic: Hit chance calculation of shield-ignoring attacks

  • Author
  • #27734
    Avatar photoSogartar

    I was looking at the code of how hit chance is calculated in skill.attackEntity. There actor.getDefense is used to calculate toHit. This function halves all defense above 50. Later toHit is “fixed” if shield and shieldwall bonuses should be ignored. In the scenario of defense above 50, this results in the erroneous calculation when removing these effects, resulting in an overall lower defense.

    What seems to be a solution is to move shield/shieldwall ignoring calculations in actor.getDefense before doing the defense reduction if above 50.

    Avatar photojennifergram


Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.