-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add support for Kingmaker ally rarity mod #8556
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
Draft
Blitz54
wants to merge
1
commit into
PathOfBuildingCommunity:dev
Choose a base branch
from
Blitz54:kingmaker-rarity
base: dev
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.
Draft
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
Example on how you could filter out IIQ/IIR mods. May need to be modified as right now it just removes all IIQ and IIR mods from extra auras and items. diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua
index 0f89c7ea..d4f8168b 100644
--- a/src/Modules/CalcPerform.lua
+++ b/src/Modules/CalcPerform.lua
@@ -1108,7 +1108,11 @@ function calcs.perform(env, skipEHP)
end
if item then
env.minion.itemList[slotName] = item
- env.minion.modDB:AddList(item.modList or item.slotModList[slot.slotNum])
+ for _, mod in ipairs(item.modList or item.slotModList[slot.slotNum]) do
+ if mod.name ~= "LootRarity" and mod.name ~= "LootQuantity" then
+ env.minion.modDB:AddMod(mod)
+ end
+ end
end
end
end
@@ -2941,9 +2945,13 @@ function calcs.perform(env, skipEHP)
end
if not modDB:Flag(nil, "SelfAurasCannotAffectAllies") then
if env.minion then
- local inc = env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
- local more = env.minion.modDB:More(nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
- env.minion.modDB:ScaleAddList(modList, (1 + inc / 100) * more)
+ for _, mod in ipairs(modList) do
+ if mod.name ~= "LootRarity" and mod.name ~= "LootQuantity" then
+ local inc = env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
+ local more = env.minion.modDB:More(nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
+ env.minion.modDB:ScaleAddList(mod, (1 + inc / 100) * more)
+ end
+ end
end
buffExports["Aura"]["extraAura"].modList:AddMod(value.mod)
local totemModBlacklist = value.mod.name and (value.mod.name == "Speed" or value.mod.name == "CritMultiplier" or value.mod.name == "CritChance")
@@ -2965,9 +2973,13 @@ function calcs.perform(env, skipEHP)
local more = modDB:More(nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
modDB:ScaleAddList(modList, (1 + inc / 100) * more)
if env.minion then
- local inc = env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
- local more = env.minion.modDB:More(nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
- env.minion.modDB:ScaleAddList(modList, (1 + inc / 100) * more)
+ for _, mod in ipairs(modList) do
+ if mod.name ~= "LootRarity" and mod.name ~= "LootQuantity" then
+ local inc = env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
+ local more = env.minion.modDB:More(nil, "BuffEffectOnSelf", "AuraEffectOnSelf")
+ env.minion.modDB:ScaleAddList(mod, (1 + inc / 100) * more)
+ end
+ end
end
end
end
diff --git a/src/Modules/CalcSetup.lua b/src/Modules/CalcSetup.lua
index fb87b788..7bd98e7f 100644
--- a/src/Modules/CalcSetup.lua
+++ b/src/Modules/CalcSetup.lua
@@ -900,12 +900,14 @@ function calcs.initEnv(build, mode, override, specEnv)
-- Special handling for Necromantic Aegis
env.aegisModList = new("ModList")
for _, mod in ipairs(srcList) do
- -- Filter out mods that apply to socketed gems, or which add supports
- local add = true
- for _, tag in ipairs(mod) do
- if tag.type == "SocketedIn" then
- add = false
- break
+ -- Filter out mods that apply to socketed gems, which add supports, or modify IIQ/IIR
+ local add = mod.name ~= "LootRarity" and mod.name ~= "LootQuantity"
+ if add then
+ for _, tag in ipairs(mod) do
+ if tag.type == "SocketedIn" then
+ add = false
+ break
+ end
end
end
if add then
diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua
index 6eec4fb7..e4ce2674 100644
--- a/src/Modules/ModParser.lua
+++ b/src/Modules/ModParser.lua
@@ -5026,6 +5026,7 @@ local specialModList = {
-- Conditional Player Quantity / Rarity
["(%d+)%% increased quantity of items dropped by slain normal enemies"] = function(num) return { mod("LootQuantityNormalEnemies", "INC", num) } end,
["(%d+)%% increased rarity of items dropped by slain magic enemies"] = function(num) return { mod("LootRarityMagicEnemies", "INC", num) } end,
+ ["nearby allies have (%d+)%% increased item rarity"] = function(num) return { mod("ExtraAura", "LIST", {onlyAllies = true, mod = mod("LootRarity", "INC", num) }) } end,
-- Pantheon: Soul of Tukohama support
["while stationary, gain ([%d%.]+)%% of life regenerated per second every second, up to a maximum of (%d+)%%"] = function(num, _, limit) return {
mod("LifeRegenPercent", "BASE", num, { type = "Multiplier", var = "StationarySeconds", limit = tonumber(limit), limitTotal = true }, { type = "Condition", var = "Stationary" }), |
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 of the problem being solved:
EDIT: Needs work. Reasons below.

If this is still true, then a few things need to be fixed. Necromantic Aegis currently applies INC rarity to the minion from a shield, like Wheel of the Stormsail.
Animated Guardian also should not gain rarity from his gear. PoB currently let's AG gain rarity.
Still unsure if Kingmaker Aura should give minions rarity or not. Can't find an answer about auras giving rarity.
Kingmaker give allies 30% inc rarity. Implemented now
Steps taken to verify a working solution:
Link to a build that showcases this PR:
https://pobb.in/X7roDK_p0zJD
After screenshot: