-
-
Notifications
You must be signed in to change notification settings - Fork 668
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: wrong calculation from elemental damage for weapons #3187
Open
dudantas
wants to merge
14
commits into
main
Choose a base branch
from
dudantas/fix-elemental-damage-wrong-calculation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
murilo09
approved these changes
Dec 31, 2024
majestyotbr
approved these changes
Dec 31, 2024
…ps://github.com/opentibiabr/canary into dudantas/fix-elemental-damage-wrong-calculation
|
This is ready for testing now. |
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.
Description
This PR fixes an issue with the calculation of elemental weapon damage. Previously, the damage calculation for elemental weapons duplicated the damage instead of distributing it as 60% elemental and 40% physical. This resulted in incorrect damage values and an overpowered effect for certain weapons.
The corrected logic ensures that the total damage remains consistent, splitting appropriately based on the elemental and physical proportions while applying target resistances/weaknesses correctly.
Behaviour
Actual
Using elemental weapons caused the damage calculation to incorrectly duplicate the total damage, leading to inflated results that did not respect the intended 60/40% distribution.
Expected
Using elemental weapons distributes the total damage correctly as 60% elemental and 40% physical, with adjustments for the target's resistances or weaknesses to the specific element.
Type of change
How Has This Been Tested
The fix has been tested thoroughly to verify the proper distribution of elemental and physical damage. Test cases include:
Checklist
Font: https://forum.portaltibia.com.br/topic/36599-armas-dano-elemental/