Prevent fabricated Uncanny Dodge and Evasion refunds - #187
Merged
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe PR adds authoritative Uncanny Dodge and Evasion handling. It validates class and combat state, applies damage on the server, resolves Evasion during Dexterity saves, updates combat state, and restricts synchronization events to appropriate private channels. ChangesAuthoritative combat abilities
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant DM
participant SaveResolver
participant CharacterState
participant PrivateOutput
DM->>SaveResolver: resolve Dexterity save
SaveResolver->>CharacterState: load class, level, and HP
SaveResolver->>CharacterState: apply zero or floor-half damage
SaveResolver->>PrivateOutput: report Evasion result and damage notes
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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.
Summary\n- remove the client-reported HP refund behavior from Uncanny Dodge and Evasion\n- make Evasion automatic in the DM's authoritative DEX save-for-half resolver\n- make Uncanny Dodge apply reduced incoming damage directly through CombatService, with strict current-map/class/reaction validation\n- synchronize HP, versions, death saves, conditions, concentration, and action economy through privacy-scoped fanout\n- update command help and add focused security/rules coverage\n\n## Verification\n- 20 focused Uncanny Dodge/Evasion tests\n- 177 focused plus adjacent chat-command tests\n- 1,696/1,696 full tests\n- shared, client, and server production builds\n- strict lint with zero warnings\n- npm audit: zero vulnerabilities\n\n## Deliberate boundary\nUncanny Dodge no longer permits fabricated healing, but its attack trigger is still DM/player-adjudicated because the current attack resolver does not issue a server-bound damage/reaction transaction. A later UI/resolver task should prompt the defending Rogue after a verified hit and before damage.
Summary by CodeRabbit