Purging Staff Spec at Yama#130
Closed
Lexer747 wants to merge 2 commits into
Closed
Conversation
715d8eb to
9cd012c
Compare
Merged
Lexer747
added a commit
that referenced
this pull request
May 10, 2026
## Summary Supersedes #130, this has all the same functionality but also handles the shadow crashing :) this makes Yama fully functional with the plugin and it shouldn't mis-count anymore! This is the first feature which is working outside the `onGameTick` as it's graphics object based. ### Yama Shadow Crash This is implemented unfortunately in `onRender` since we use the literal graphics of the fireballs to determine, if the player is in the correct tile and the timing is right. Timing was easy as we can just look for animation frame to be the correct tick. The location was a bit trickier since this was the first time I've really thought about that part of the client API. Because this is being called in `onRender` we make sure to return early if the player is not in the correct region and yama isn't actually in P3. However once those conditions are true there is some wasteful computation as every cycle we re-compute all the fireball lines, however I don't think this takes long enough to actually affect performance negatively. ### Purging Staff Original description for Purging staff spec: Some reasoning about why this is hard coded to Yama, **there's 3 pieces to the purging staff puzzle**: 1. Are we specing on this attack? 2. How much damage are we hitting? 3. How much hp does our target have? If we can answer all three questions we can solve the spec. This PR currently answers (1.) and (2.) albeit quite poorly and in a brittle way [1], however the 3rd question is actually the hardest 😅 because the client isn't given an NPC's health directly only a funny ratio number: ```java /** * Gets the health of the actor in {@link #getHealthScale()} units. * * The server does not transmit actors' real health, only this value * between zero and {@link #getHealthScale()}. Some actors may be * missing this info, in which case -1 is returned. */ int getHealthRatio(); /** * Gets the maximum value {@link #getHealthRatio()} can return * * For actors with the default size health bar this is 30, but * for bosses with a larger health bar this can be a larger number. * Some actors may be missing this info, in which case -1 is returned. */ int getHealthScale(); ``` Therefore the best way to tackle question 3. is just to hard code the hp values we care about and IMO the only relevant usage of the purging staff spec is void flares so that's all this PR tackles. Also this leads me to next PR which will be the 1 tick speed up when you perfectly the dodge the shadow meteors because the plugin still gets confused by that during P3. ----- #### Implementation Add a new variable speed implementor and change the signature to include the hp and spec [1]. This new class will only work when in the yama region and it does the following things: * Tracks the phase of yama (so that we can infer the void flare starting health) * Tracks void flare's we attack and their current hp * Finally if the current attack would kill a void flare and the spec has drained by 25% then we reduce the speed by 2 ticks [2]. [1] = Note these still need work as they will pass stale data ATM [2] = this also needs work if you eat during those 3 ticks the plugin is bugged see wiki for details fixes #80 ## Testing Melee testing: https://youtu.be/nTnF5Pd0gBI Mage testing: https://youtu.be/viyEn7mcdDw Range i don't care about
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacks on #129
Fixes #80
Some reasoning about why this is hard coded to Yama, there's 3 pieces to the purging staff puzzle:
If we can answer all three questions we can solve the spec. This PR currently answers (1.) and (2.) albeit quite poorly and in a brittle way [1], however the 3rd question is actually the hardest 😅 because the client isn't given an NPC's health directly only a funny ratio number:
Therefore the best way to tackle question 3. is just to hard code the hp values we care about and IMO the only relevant usage of the purging staff spec is void flares so that's all this PR tackles.
Also this leads me to next PR which will be the 1 tick speed up when you perfectly the dodge the shadow meteors because the plugin still gets confused by that during P3.
Implementation
Add a new variable speed implementor and change the signature to include the hp and spec [1].
This new class will only work when in the yama region and it does the following things:
[1] = Note these still need work as they will pass stale data ATM
[2] = this also needs work if you eat during those 3 ticks the plugin is bugged see wiki for details
Testing
https://www.youtube.com/watch?v=VISRalz_6nE