Matsyir / pvp-performance-tracker

External plugin for RuneLite: Tracks PvP performance by keeping track of various stats during combat
BSD 2-Clause "Simplified" License
4 stars 15 forks source link

Dharoks set not considered in melee maxhit #23

Open pwatts6060 opened 3 years ago

pwatts6060 commented 3 years ago

Describe the bug Melee maxhit calculation does not account for the Dharok's set effect which increases the maximum damage possible.

To reproduce Steps to reproduce the behavior:

  1. Go to LMS and get a Dharok's set (or in normal game I checked the code and melee maxhit has no Dharok's/armor consideration at all).
  2. Attack while using a full Dharok's set and relatively low hp (below 50 for example)
  3. Maxhit giving in the fight log is significantly lower than what it actually is.

Expected behavior Damage calculation for dharok's: https://oldschool.runescape.wiki/w/Dharok_the_Wretched%27s_equipment#Set_effect

Screenshots image

If you are too busy to fix this soon I can do it and make a pull request

Matsyir commented 2 years ago

Correct, it's currently not accounted for at all. There's a problem though - we can't accurately get other players' HP, only our own. Because of this, we have to use approximations based on the HP bar, which could give the opponent an advantage or disadvantage at times when compared to "real" HP - so I think if it was added, the approximate HP should be used for both players rather than using the "real HP" for the client player - just so that it's as fair as it can be to both players.

I don't really see myself adding this anytime soon no, but it would be nice to have - it's something I'll keep in mind for sure. If you think you could add it yourself and make a PR then go for it!

For what it's worth, I don't think DH is ever really worth the risk in a proper deathmatch, or at least it's extremely hard to use in a way that is worthwhile, yet doesn't put you at unnecessary risk. It's definitely fun though and would be interesting to see the stats with it.

pwatts6060 commented 2 years ago

The Dharok's uses your own hp, never needs the other player's hp. Oh lol forgot the plugin works both ways. I'll have to think about that, I think people are more curious about their own hits so even if the enemy's was semi accurate it's better than seeing 47 when I'm hitting 80s.

Matsyir commented 2 years ago

I do agree, but at the same time I'd really rather avoid including anything that isn't balanced in the deserved damage statistic, just so no players are accidentally given an advantage or disadvantage. For example, we could properly account for offensive prayers in the deserved damage calculation, but for only the main player. Instead, we just assume they're always correct for both players, so that it's even for both players.

At the same time, in this case it likely wouldn't be a big deal if it's imperfect because DH is unlikely to be used in tournament-level fights, where people really care about the plugin's accuracy/fairness. This could possibly also be integrated into the Fight Analysis/Fight merge so that it's properly accounted for on both sides.

pwatts6060 commented 2 years ago

Well as it is now whenever I use dharok's in lms I know my deserved damage is wrong. Even if it was partially off for the opponent it would still be more accurate statistics than not having it at all. Can always checkbox the feature to include the dharok's and estimated dharok's.