Closed DarrenPR closed 1 year ago
Yeah Jagex have actually changed the behavior of this a few times now, which makes this a bit frustrating to fix. Can you specify which akkha-related invocations you have on where you've confirmed this bug happens so that I can more easily reproduce? I'm not entirely sure if they changed how specials work with fast specials but not with the slower ones, or if RaidLevel somehow matters too. Will need to do a bit of testing (which is unfortunately time consuming ... why do I have to do Akkha puzzle every time lol)
I'll try to get around to this sometime this month if/when I have time. Sorry for the delay, haven't had much time to work on this plugin lately.
Thanks for responding. This issue is happening with or without any Akkha related invocations. I believe raid level does not matter either. I have tested 8 cases for this bug:
I'll post a video of the clips where I'm correctly and incorrectly getting mistakes later. I'm not a video maker so it'll be pretty bare and unedited. In some testing around in the code a bit, it appears that if you add an "and player has taken damage" bit of logic to the line where the quadrant bomb mistake logic is, you can fix most cases of this bug happening. However, if Akkha damages you and you skip the damage at the same time, it would still appear as a mistake which does not 100% fix things so I'm sure there's a better way to handle it.
Here's a link to that video I was mentioning before - https://youtu.be/E8RXQg2p6oc
I put "chapters" in the description but they don't appear to show up on the video. You can just click the timestamps and read the descriptions I gave them though to see what I'm showing in the clips.
@QuestingPet I do have an easy fix for this (which involves using similar checks for detecting whether the player was hit by unstable orbs) For example adding a simple check of:
if (quadrantBombTiles.getActiveHitTiles().contains(raider.getPreviousWorldLocation())
&& appliedHitsplats.popHitsplatApplied(raider.getName())) {
mistakes.add(AKKHA_SPECIAL_QUADRANT_BOMB);
}
But like Yak has stated, this is not consistent for 100% of all cases, since a player could take damage from an external source on the same tick as they are skipping the quadrant attack. I noticed that there is graphics changed detection within the AkkhaDetector
file which may be a better indicator (since the position of the player could be checked against the position of a graphics object) and that would be more reliable.
However, if we did want a quick and dirty fix, implementing appliedHitsplats.popHitsplatApplied(raider.getName())
could be the way to go.
I think either they changed Akkha again since my comment on 10/03/2022 (at the top of the class), or I just introduced a bug at that time that I never realized.
I think I have a quick and simple bug fix that should work 100% of the time. I'll try to get it out today or tomorrow when I have time. Should be tomorrow by the latest. Sorry for the delay, and thanks for your patience!
Note in the image the different hit tiles being activated at different times. Green was activated this tick, red in the next tick, and I don't have a mistake text over my head, or a hitsplat (now, correctly)
Though for the special timer timeout, using the same logic produces different results, as by looking at the tile activation ticks (as shown below), it tells a different story than the skip you did in your video. My guess is it's just an inconsistency with how the graphics are displayed for that attack. Will come back to this later.
Looks like the graphicsObjects for the timeout special are not actually reliable for detecting when you'll get hit based on the animation. Jagex has the animation play out much faster than when it actually hits you, so you could be standing still a few tiles North of your skip tile and it will hit you a tick later (much later than the animation shows). This is different than how it works for the other quadrant special attacks, unfortunately. I believe the actual hit tiles are the same as the memory special, so I may just need to hardcode their locations :/
Also @DarrenPR message me on Discord iTry#2761 for easier communication and testing
Alright, doing some math and some other detection, I can get the expected behavior for the hourglass special (inversed hit tiles of memory special) without hardcoding the tiles:
Play at half speed to see how awkward the animation time is compared to when you actually get hit...
There might still be a rare edge case when the hourglass special is going off at the same time as the "explode" special, but that requires more than 1 person so testing is hard, and it seems like that might be pretty rare anyway. I'll leave it at that, unless someone encounters it, as this is already complex enough.
I created a PR (#8) that should fix all of these issues. Feel free to take a look at the code, and pull it locally if you want to confirm the behavior yourself. If it looks good to you (code-wise and/or testing-wise), I'll merge it in and create a PR on the plugin hub. I'll probably merge it in sometime this week if I don't hear back one way or another. Thanks!
Here's the PR for the Plugin Hub: https://github.com/runelite/plugin-hub/pull/4172
When in the Akkha fight, during the memory game, if you abuse some of the game's mechanics to avoid the damage without being in the correct quadrant, the mistake tracker still adds a mistake. I believe this also happens when the DPS check timer runs out and the damage is skipped as well. I saw this issue was raised before and fix was put in place, but it is still happening.