Show a notification when a critical hit occurs while using a spell. #14696
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.
Fixes #8128
Changes
In this PR, a "critBonus" return value is added to the "cast" method for spells. This value can be any of the following:
After calling the cast method, this PR will evaluate the "critBonus" return value and show a critical hit message if one is applicable. This has been added to all 3 of the spells that can cause a critical hit. (Brutal Smash, Burst of Flames, and Backstab)
Additionally, it seems that "package-lock.json" was added to this PR. I don't have experience with what that is but I asked ChatGPT and it said: "Including the package-lock.json file in the PR helps ensure that everyone working on the project is working with the same dependencies and reduces the likelihood of version conflicts or unexpected behavior due to inconsistent package versions. It is generally recommended to include the package-lock.json file in your version control system (e.g., Git) to ensure consistent and reproducible builds across different environments and collaborators."
That being said, if you would like me to remove that file from the PR, I can do that.
UUID: 88cf9b3e-5150-4298-ae14-b8b64e0b36a2