-
-
Notifications
You must be signed in to change notification settings - Fork 537
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
feat: augments #2602
feat: augments #2602
Conversation
changes: - Added AugmentTypeNames map in tools - Added AugmentTypes_t to items_definitions - Added augments properties on items - Added Augments type using std::map<std::string, std::map<AugmentTypes_t, uint8_t>>
c5518ac
to
c90e87d
Compare
https://github.com/opentibiabr/canary/blob/main/src/items/functions/item/item_parse.cpp#L80 ItemParse::parseAugment(tmpStrValue, attributeNode, valueAttribute, itemType); in parse const phmap::flat_hash_map<std::string, AugmentsTypes_t> AugmentsTypeMap = {
{ "powerful impact", AUGMENT_VALUE_POWERFUL_IMPACT },
{ "strong impact", AUGMENT_VALUE_STRONG_IMPACT },
{ "increased damage", AUGMENT_VALUE_INCREASED_DAMAGE },
{ "cooldown", AUGMENT_VALUE_COOLDOWN },
{ "critical extra damage", AUGMENT_VALUE_CRITICALHITDAMAGE },
{ "life leech", AUGMENT_VALUE_LIFELEECHAMOUNT },
{ "mana leech", AUGMENT_VALUE_MANALEECHAMOUNT },
}; |
changes: - Added ITEM_PARSE_AUGMENT into item parse mapping - Update parseAugment item parse (working)
19e9ef9
to
76ebe99
Compare
changes: - Improvements - Parse augment description
…nary into feat_weapons_augment
changes: - Added augments to all items that have it
Update! Added augments to all sanguine and grand sanguine items. |
changes: - Added config key to load default values for: increase damage, powerful impact and strong impact - Added to item parse the load of the augment value for these augments that do not display description - Added keys to config.lua.dist
changes: - Added augment description parser on utils tools - Added augment description in market
…nary into feat_weapons_augment
changes: - Added cooldown as miliseconds
changes: - Added spell cooldown reduction to spells - Added method to retrieve the augment items by spell name and/or by type - Added spell method to get the spell cooldown reduction from the augment items
…nary into feat_weapons_augment
Update! Cooldown augments working (except for avatar, avatar spells cooldown are calculated in the casting, after this PR I'll be investigating to fix it). 2024-05-04.08-52-14.mp4 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
changes: - Minor improvements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few suggestions that could enhance performance and address other issues. Please remember to test these changes before implementing them, as my review is based solely on the code, and I haven’t applied them locally. Additional adjustments might be necessary to prevent compilation errors.
I will conduct the review in a way that locks the PR, because some modifications are optional, while others, like unnecessary copying that directly impacts performance, or dividing by zero without checking the divisor, could potentially cause more serious issues. Feel free to reach out to me for another review when you're ready.
changes: - Applying suggestions and comments
changes: - Applying suggestions and comments
All fixed and working as expected. |
…nary into feat_weapons_augment
d07b570
to
e701a72
Compare
- Added doc to config.lua.dist as requested by elsongabriel
- Added const auto &augments to avoid unnecessary copies
changes: - Improvements
changes: - Improvements
…nary into feat_weapons_augment
changes: - Updated augmentStrongImpactPercent from 100 to 10
# Description This PR fixes the avatar cooldown reduction spells to be done in the source and remove from scripts, this is being done to work with #2602. ## Behaviour ### **Actual** The avatar cooldown reduction is via script. ### **Expected** The avatar cooldown reduction is via source. ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - [x] Cast Avatar spell of each vocation with stage 1 in wheel, the cooldown should be 120 minutes (two hours) - [x] Cast Avatar spell of each vocation with stage 2 in wheel, the cooldown should be 90 minutes (one and a half hour) - [x] Cast Avatar spell of each vocation with stage 3 in wheel, the cooldown should be 60 minutes (one hour) **Test Configuration**: - Server Version: Latest - Client: 13.32 - Operating System: Windows 11 ## Checklist - [X] My code follows the style guidelines of this project - [X] I have performed a self-review of my own code - [X] I checked the PR checks reports - [X] I have commented my code, particularly in hard-to-understand areas - [X] I have made corresponding changes to the documentation - [X] My changes generate no new warnings - [X] I have added tests that prove my fix is effective or that my feature works --------- Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
9a71bc0
to
3c2d298
Compare
fix: extract augment name in own variable fix: remove continue
changes: - Called method to add spaces before capital letters on item augment description
3c2d298
to
d98880d
Compare
Description
Implementing Augments system.
Please check the system in the following links:
https://tibia.fandom.com/wiki/Augments
https://www.tibia.com/news/?subtopic=newsarchive&id=7356
What must be done:
Suggestions are welcome.
How to configure an item augment:
Supported augment types are:
Example of augment that have default value::
NOTE: The key value of the key "augments" is to enable (1) and disable (0) the augments of the item.
Example of augment that don't have default value, the value must be set:
NOTE: The values represent percentagel, except for cooldown, it should be fill in miliseconds (120 seconds = 120000).
How to customize an augment that already has a default value?
Just add attribute tag with the key value and the value that you which, example: