Project-Epoch / bugtracker

3 stars 0 forks source link

Generic issues with AP calculation #8338

Open Shadownflame opened 2 months ago

Shadownflame commented 2 months ago

There are anomalies when a player has multiple effects that affect attack power value (different buffs from the buff bot on internal or AP from gear colliding with AP reduction effects of NPCs such as Demoralizing shout) For example AP values aren't resetting properly after removing buff bot buffs: before: WoWScrnShot_071724_014920 after: WoWScrnShot_071724_014949

PS: also lost 4 points of every base stat and like 150 health somewhere in the process

Shadownflame commented 2 weeks ago

Reproduce cases for Dunemaul Enforcer's Demoralizing shout - it's a tad bit more complex than I anticipated, therefore many different scenarios: Test char is a lvl 60 paladin (class doesn't matter but the item IDs I used are for paladin).

Test case 1 - character with unmodified (white) AP value (naked no talents, or gear with just +STR but not +AP) 1) Apply .aura 89521 to yourself or allow a Dunemaul Enforcer (5472) to cast it on you (both cases return same result, with the AP reduction value changing around depending on your own level if you self-cast. At level 60, it reduces 151 attack power, while the enemy's natural cast scales to lvl 48 and is only reducing like 80-90 AP. This will be important later). When your AP is reduced, it shows up as a red number. 2) Wait for it to expire or .unaura 89521 and see number return to the same value you had before (and same white color)

Test case 2 - character with minor AP bonus from gear or buffs (green AP value) 1) Equip item 22150 OR cast blessing of might rank 1 (spell ID 19740) 2) Repeat above (.aura 89521 then .unaura 89521) and see your AP remain red and lower than intended (whether it expires or you .unaura makes no difference)

Test case 3 - character with large AP bonus from gear or buffs (green AP value) 1) Unequip all gear and cast Blessing of Might rank 6 (19838) OR equip items 22150, 12784, 17713, 11815, 22089) 2) Repeat above (.aura 89521 then unaura 89521) and see your AP remain green all the while it is reduced, and then return to the correct number you had before

The difference between "minor" and "large" AP bonus seems to be that if the AP bonus exceeds the power of the Demoralizing shout, it will calculate properly because it never needs to go in a "negative" value. Here is when the difference between mob-casting or self-casting comes in. If selfcasting at level 60, the AP reduction from demoralizing shout is 151, which means you need at least 151 AP from buff or gear, or the combination of the two in order for the values to not bug. So a blessing of might rank 5 will bug out, but rank 6 will not. If you use the mob's own Demo Shout cast, rank 5 would be enough to avoid the bug happen as well. The specific IDs I used are a test case to reach the 151 value that I tested with self casting, but it might be different for other spells.

What does this mean in practice? If you have a lot of AP it never bugs? Wrong. Most classes have a lot of AP from STR or AGI, and very little from direct + attack power effects. In solo gameplay or PVP scenarios, the power of the Demoralizing shout is typically stronger than the minor AP buffs they have, thus it frequently bugs out. Note, I confirmed in a separate test earlier that the bugged red values aren't just visual and actually reduce your damage output.