Skip to content

Yama#140

Merged
Lexer747 merged 2 commits into
ngraves95:mainfrom
Lexer747:pr-yama-shadow-crash
May 10, 2026
Merged

Yama#140
Lexer747 merged 2 commits into
ngraves95:mainfrom
Lexer747:pr-yama-shadow-crash

Conversation

@Lexer747
Copy link
Copy Markdown
Collaborator

@Lexer747 Lexer747 commented 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:

	/**
	 * 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

@Lexer747 Lexer747 force-pushed the pr-yama-shadow-crash branch 10 times, most recently from 7fb23b0 to 5e4a80f Compare May 10, 2026 21:03
@Lexer747 Lexer747 changed the title WIP Yama Yama May 10, 2026
@Lexer747 Lexer747 force-pushed the pr-yama-shadow-crash branch from 5e4a80f to c2efc2f Compare May 10, 2026 21:26
@Lexer747 Lexer747 force-pushed the pr-yama-shadow-crash branch from c2efc2f to da08885 Compare May 10, 2026 21:27
@Lexer747 Lexer747 marked this pull request as ready for review May 10, 2026 21:27
@Lexer747
Copy link
Copy Markdown
Collaborator Author

Also this PR bumps the plugin to v2 and uses the new gradle to do so.

@Lexer747 Lexer747 merged commit 7fa62c5 into ngraves95:main May 10, 2026
1 check passed
Lexer747 added a commit that referenced this pull request May 13, 2026
## Summary

Fixes #142

Which I can conclude was caused by #140, this is because with the extra logging i could see that on exp drop would trigger too late and then essentially and one tick to the timer by accident.

This PR centralises the pre attack window logic.

This also adds logs, this was how I was able to draw such a conclusion.

## Testing

I did a whole Yama kill and the problem didn't occur again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Purging Staff special attack support.

1 participant