Skip to content
This repository was archived by the owner on Apr 29, 2020. It is now read-only.
This repository was archived by the owner on Apr 29, 2020. It is now read-only.

Sneak Attack Hit Rate and Crit Rate Fail when facing East-ish #6415

Description

@Hokuten85

I have:

  • searched existing issues (http://github.com/darkstarproject/darkstar/issues/) to see if the issue I am posting has already been addressed or opened by another contributor
  • checked the commit log to see if my issue has been resolved since my server was last updated

Client Version (type /ver in game) :

Source Branch (master/stable) :

Additional Information (Steps to reproduce/Expected behavior) :
When determining a successful sneak attack it compares the Attacker's rotation vs Mobs rotation. This is problematic when facing East-ish. Dead East is rotation 0. Facing slightly SE is rotation 1. Facing slightly NE is rotation 255.

The rotation comparison below is what determines success.
abs(PDefender->loc.p.rotation - PAttacker->loc.p.rotation) < 23

This doesn't account for that scenarios where the mob and player are rotating toward different quadrants right around 0. This is used in both GetCritHitRate and GetHitRateEX within battleutils.cpp

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions