Skip to content

combat-trainer: match throw success text so limb-shatter throws don't stall (#7529) - #7565

Open
MahtraDR wants to merge 1 commit into
elanthia-online:mainfrom
MahtraDR:fix/thrown-attack-no-roundtime
Open

combat-trainer: match throw success text so limb-shatter throws don't stall (#7529)#7565
MahtraDR wants to merge 1 commit into
elanthia-online:mainfrom
MahtraDR:fix/thrown-attack-no-roundtime

Conversation

@MahtraDR

Copy link
Copy Markdown
Collaborator

Problem

Fixes #7529. When an offhand thrown weapon's strike shatters a mob's limb, the game resolves the throw but never prints a roundtime line. AttackProcess#attack_thrown waited on DRC.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 lets waitrt? handle the actual roundtime. This mirrors how shoot_aimed keys off the fire verb (/you (fire|poach|snipe)/i). The existing roundtime / What are you trying to matchers are kept, so nothing regresses.

The verb is derived rather than hard-coded, so it covers lob (weak/lodging), throw (normal), hurl (bonded), and custom attack_override verbs alike.

Validation

Against ~1 month of my own combat logs:

  • 3164 unique throw lines, all matching you (lob|throw|hurl) … at <target> → the success match fires on every real throw.
  • 0 throw-verb lines lacking an at <target> → no false positives (e.g. the you throw your head back pray emote never collides).

Testing

  • Adds spec/combat-trainer_spec.rb with regression coverage using the exact strike line from combat-hunter error with Offhand throwing weapon #7529, plus verb-derivation cases for lob/throw/hurl.
  • Full suite green (3022 examples, 0 failures); rubocop clean on changed files under Ruby 4.0.

🤖 Generated with Claude Code

… 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>
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b45b4860-8cf4-4915-a77f-bf0693eb04aa

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

combat-hunter error with Offhand throwing weapon

1 participant