-
-
Notifications
You must be signed in to change notification settings - Fork 817
feat: protocol 15.11 (weapon proficiency and new imbuement scroll) #3845
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
Open
dudantas
wants to merge
54
commits into
main
Choose a base branch
from
dudantas/protocol-15.11
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.
+30,268
−539
Open
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
303a87e
Add weapon proficiency component for players
dudantas c428ef9
Merge branch 'main' into dudantas/protocol-15.11
dudantas 03baa00
style: auto-formatting (clang/stylua/cmake)
github-actions[bot] be0db22
feat: protocol 15.11 (proficiency and imbuement scroll)
dudantas bfb8d7b
style: auto-formatting (clang/stylua/cmake)
github-actions[bot] b0846c7
Add weapon proficiency system and assorted fixes
dudantas baf30a7
Validate weapon proficiency and remove mapping
dudantas 0dad47e
Remove paralysis imbuement; fix wound cleansing
dudantas ab7600e
Update loot_functions.cpp
dudantas 44dd0c4
Include monster name in Loot and Lua warnings
dudantas e6f5d9e
Use item id for transcendence potion loot
dudantas 8624319
Include weapon_proficiency.hpp in items.cpp
dudantas 70ff382
Refactor weapon proficiency & assorted fixes
dudantas 820cb49
Use config save time; refactor weapon & imbuements
dudantas 402300e
Fix item weight and add weapon XP failure message
dudantas 234c992
Simplify registerAugment lambda and remove set
dudantas b46023e
Remove unused nlohmann/json include
dudantas 7c66369
Return 0 when proficiency maxLevel is 0
dudantas 7b7e7ef
Accumulate spell area bonuses instead of OR
dudantas ec0d7c0
Apply weapon proficiency defense bonuses always
dudantas 11c4c29
Fix typo in imbuement error messages
dudantas e72aa34
Simplify perfect shot item checks
dudantas 3eb2c64
Use distinct iterator names in deserialize
dudantas 362293f
Fix argc check for Lua CreateLoot
dudantas d17f845
Merge branch 'main' into dudantas/protocol-15.11
dudantas f2ac8b4
Fix area flag combine; localize perfectShotRange
dudantas cbc078d
Simplify Loot creation in luaCreateLoot
dudantas d7d4596
Guard weapon proficiency calls against null
dudantas 07a723d
Rename iterator var to profIt
dudantas 899f7a2
Move critical base vars into player scope
dudantas 5090fe7
Improve duplicate scroll ID handling
dudantas bf5ba3c
Use fixed-size types for monster crit vars
dudantas e076389
Increase augments value from 1 to 2
dudantas 37fbe29
Make perfect shot additive; safer damage negation
dudantas 3c0cec6
Refactor perfect-shot API and minor fixes
dudantas 1a4cee6
Apply rounded skill bonus preserving damage sign
dudantas aae9ffd
Handle COMBAT_NONE in getElementCritical
dudantas 46e5267
Add exercise wraps offers to store
dudantas 8c11b62
Merge branch 'main' into dudantas/protocol-15.11
dudantas ffa3822
Load weapon proficiencies from JSON file
dudantas e3bdc0e
Merge branch 'main' into dudantas/protocol-15.11
dudantas 351c71a
Remove duplicate loading of proficiencies.json
dudantas 55eab76
Validate element critical bounds and avoid exceptions
dudantas 0057a6a
Fix weapon proficiency weapon ID validation and knight thresholds
dudantas 430a4a7
Harden imbuement item selection validation from client actions
dudantas a4da470
Validate imbuement prerequisites before applying scrolls
dudantas 48b6661
style: auto-formatting (clang/stylua/cmake)
github-actions[bot] fdea25a
Merge branch 'main' into dudantas/protocol-15.11
dudantas 138801d
Refactor weapon proficiency perk handling
dudantas daaac9c
fix: make AccountRepositoryDB tests DST-resilient
dudantas 7c1ccb8
Annotate APIs with [[nodiscard]] and modernize code
dudantas b8342b6
Fix weapon proficiency var and return constness
dudantas 1002625
Merge branch 'main' into dudantas/protocol-15.11
dudantas 669b139
fix: failed when trying to imbue items (#3891)
andreoam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| local etcher = Action() | ||
|
|
||
| function etcher.onUse(player, item, fromPosition, target, toPosition, isHotkey) | ||
| if not item or not item:isItem() then | ||
| return false | ||
| end | ||
|
|
||
| if not target or not target:isItem() then | ||
| return false | ||
| end | ||
|
|
||
| local clearImbuements = player:clearAllImbuements(target) | ||
|
|
||
| if clearImbuements then | ||
| player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have cleared all imbuements from the item.") | ||
| item:remove(1) | ||
| player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) | ||
| else | ||
| player:sendCancelMessage("This item has no imbuements to clear.") | ||
| end | ||
|
|
||
| return true | ||
| end | ||
|
|
||
| etcher:id(51443) | ||
| etcher:register() |
1 change: 1 addition & 0 deletions
1
data-otservbr-global/scripts/actions/object/greater_proficiency_catalyst.lua
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| createProficiencyCatalyst(51589, 100000) |
32 changes: 32 additions & 0 deletions
32
data-otservbr-global/scripts/actions/object/imbuement_scrolls.lua
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| local imbuement = Action() | ||
|
|
||
| function imbuement.onUse(player, item, fromPosition, target, toPosition, isHotkey) | ||
| if not item or not item:isItem() then | ||
| return true | ||
| end | ||
|
|
||
| if not target or not target:isItem() then | ||
| return true | ||
| end | ||
|
|
||
| if target:getType():getImbuementSlot() <= 0 then | ||
| player:sendCancelMessage("This item is not imbuable.") | ||
| return true | ||
| end | ||
|
|
||
| player:applyImbuementScroll(target, item) | ||
|
|
||
| return true | ||
| end | ||
|
|
||
| -- Register Powerful Scrolls | ||
| for scrollId = 51444, 51467 do | ||
| imbuement:id(scrollId) | ||
| end | ||
|
|
||
| -- Register Intricate Scrolls | ||
| for scrollId = 51724, 51747 do | ||
| imbuement:id(scrollId) | ||
| end | ||
|
|
||
| imbuement:register() | ||
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
1 change: 1 addition & 0 deletions
1
data-otservbr-global/scripts/actions/object/proficiency_catalyst.lua
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| createProficiencyCatalyst(51588, 25000) |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.