combat-trainer: match throw success text so limb-shatter throws don't stall (#7529) - #7565
Open
MahtraDR wants to merge 1 commit into
Open
combat-trainer: match throw success text so limb-shatter throws don't stall (#7529)#7565MahtraDR wants to merge 1 commit into
MahtraDR wants to merge 1 commit into
Conversation
… stall (elanthia-online#7529) An offhand thrown weapon whose strike shatters a mob's limb resolves without the game printing a 'roundtime' line, so attack_thrown's bput (matching only 'roundtime'/'What are you trying to') waited its full timeout before giving up. Also match the throw's own success text ('you lob/throw/hurl ...'), derived from the attack verb, so it returns as soon as the throw resolves and lets waitrt? handle the actual roundtime from XML -- mirroring how shoot_aimed keys off the fire verb. Adds spec/combat-trainer_spec.rb with regression coverage using the exact strike line from issue elanthia-online#7529. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Problem
Fixes #7529. When an offhand thrown weapon's strike shatters a mob's limb, the game resolves the throw but never prints a
roundtimeline.AttackProcess#attack_thrownwaited onDRC.bput(attack_action, 'roundtime', 'What are you trying to'), so bput matched neither pattern and burned its full ~15s timeout before giving up (No match was found after 15 seconds for command 'lob left').waitrt?still honored the real roundtime from XML, so the script recovered — the only symptom was the stall and the error log, matching the reporter's "it continues as normal."Fix
Also match the throw's own success text, derived from the attack verb (
/you #{verb}/i), so bput returns the moment the throw resolves and letswaitrt?handle the actual roundtime. This mirrors howshoot_aimedkeys off the fire verb (/you (fire|poach|snipe)/i). The existingroundtime/What are you trying tomatchers are kept, so nothing regresses.The verb is derived rather than hard-coded, so it covers
lob(weak/lodging),throw(normal),hurl(bonded), and customattack_overrideverbs alike.Validation
Against ~1 month of my own combat logs:
you (lob|throw|hurl) … at <target>→ the success match fires on every real throw.at <target>→ no false positives (e.g. theyou throw your head backpray emote never collides).Testing
spec/combat-trainer_spec.rbwith regression coverage using the exact strike line from combat-hunter error with Offhand throwing weapon #7529, plus verb-derivation cases forlob/throw/hurl.rubocopclean on changed files under Ruby 4.0.🤖 Generated with Claude Code