Topic: Hit chance calculation of shield-ignoring attacks

  • Author
    Posts
  • #27734
    Avatar photoSogartar
    Participant

    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.

    #27810
    Avatar photojennifergram
    Participant

    Amazing

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