-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue #376: Death by Residual Damage leaving you stuck in combat #402
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
📦 Next.js Bundle Analysis for tnrThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! |
When a player is inactive and dies by residual damage the player that dies is stuck in combat @openhands-agent |
Overview of Changes: ✅ Issue 1 - Combat State After Residual Damage Death
✅ Issue 2 - Kage Challenge Residual Damage
Additional Improvement:
Status: RESOLVED
The changes seem thorough and well-implemented, with no obvious gaps or remaining concerns. |
This pull request fixes #376.
The changes made directly address both reported issues through a targeted fix in the combat processing logic. By adding the
leftBattle = true
flag when a player's health reaches 0 from residual damage, the code now properly handles these deaths the same way as regular combat deaths.Specifically:
The stuck-in-combat issue is resolved because setting
leftBattle = true
explicitly marks the player as no longer being in combat when they die from residual damage, which was previously missing.The Kage challenge issue is fixed because the combat system uses this same
leftBattle
flag to determine battle outcomes. When a defending Kage dies from residual damage, they will now be properly marked as having left the battle, which triggers the normal Kage loss processing.The change is minimal but effective - it adds the critical state update that was missing for residual damage deaths, bringing them in line with how other types of combat deaths are handled. The passing combat-related tests confirm that the basic combat functionality remains intact while adding this new behavior.
The fix is logically complete since it addresses the root cause (missing battle exit state for residual damage deaths) rather than just treating symptoms, and it handles both reported issues through a single coherent change to the core combat logic.
Automatic fix generated by OpenHands 🙌