Skip to content

Conversation

@Paliak
Copy link
Contributor

@Paliak Paliak commented Apr 4, 2025

Description of the problem being solved:

I've tried to keep the solution generic. Currently the type specific cap is implemented before the global one from "maximum damage reduction for any damage type is (%d+)%%"

Now the effective damage reduction cap is m_min(typeSpecificMax, genericMax). I've updated the rest of the code to use damage type specific cap values; though it seems like this is only currently used for PDR/Armour related calcs.

This just reuses the existing code. I tried making the parsing more generic by making it piece wise but it then failed to parse the already existing mods.

Again generic solution. Kept the parsing for the maximum ES mod above separate as this could would differently with max/unreserved sources.

Again fairly generic here. Added a display as it seems Ailment Threshold was not implemented at all. Although this is just a modDB:Sum display currently.

Link to a build that showcases this PR:

eNqtW1tT4zoSfp78ClWqtmq3pobcCDCpMKdCAgNVwOQkMLP7NCVsJdEiWzm2DOScOv99uyXfkkGODMsD2FZ_Lalv6m6b4W8vgSBPLIq5DE-bnYN2k7DQkz4Pl6fN-7uLTyfN3740hlOqVt8WZwkXONL90vgw1DdEsCcmANgknqBxfEsDdtqc0XDJoiahscdCf1wM3MqQNYmi0ZKp79mk7Z-IXtGIeopF18hwlCh5I31AqCgBREB5OJfeI1NfI5ms9XxPnD0bmqub6bfZXRMW9WE4FXTDormiisTw67Q5gs3RJZvQAH4DiooEIO2D9uFJs1UJOUuiWNXBzdeM-Tlp56BrI5xG7HyxYJ7iT2wccTVe0dArTWLD1aW9SYTia8FRFym9dU2Xv7DuWGnvpKJiMp2XxdI_Pqoml2r_on9wtToTIEV35gi5WoZcsXqYqeSxDOtvYgthFX4iBPiJE-2MxSx6oorvrMbKWwYPPKwjohsa0rGMHeSPlFMWgdeqWoA58yQ4et05aiKv-YK5U9baRwqou5q37eN87kpXm_HbFjSDEOdGOZeJcKRURdA5thFN2EsRbvp2D_mjTGjldhWq_UTAzIluwp4k-uT-nerIcH45LWJsv3vQPukf93rH3eOTnvUUWG1i7lFxQ194kAQQgO_oIysm7LUP7ba3XKkQIowN22lbpXnBI_YG2FgK_y2wFZWxFXfctUcJHl7S0B95XgKJ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XqWVmeH1k9QABb8zwxwNiVcuHYj7j4tNUH68AY31GVANt4kvd_m3oq1FxoSbXzq4lyDK_nInrdQ_qaAQPasKG6jCLbq65SyF0RVSOsDsw84PlPET0K1Z_OMebSNt1eNrJEzLTgddvP7VOO9_9ivvfwdQZGw==

@Paliak Paliak marked this pull request as ready for review April 4, 2025 14:18
Paliak added 5 commits April 4, 2025 16:22
This commit converts the maximum damage reduction for any damage type is (%d+)%% mod to also use the MAX mod type instead of OVERRIDE and implements a more general solution in case other damage types have simillar mods in the future.

Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com>
The cap is applied after all calculations.

Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com>
This uses the logis from simillar mods. I tried making it more generic with piece wise parsing but i wouldn't work with the existing mods.

Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com>
Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com>
…reshold

Solution is general and should work for other simillar mods. This also adds general Ailment Threshold parsing and adds it under the "Other Ailment Defenses" section on the calcs tab. This is currently just a modDB:Sum display without any extra processing.

Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com>
@Paliak Paliak added the enhancement New feature, calculation, or mod label Apr 4, 2025
Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com>
Paliak and others added 6 commits April 4, 2025 17:25
… Maximum Cold and Lightning Resistance

Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com>
…d Lightning Resistance at 50% of their value

Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com>
Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com>
20% increased Movement Speed while an enemy with an Open Weakness is in your Presence

40% increased Skill Speed while an enemy with an Open Weakness is in your Presence

50% more damage against enemies with an Open Weakness

Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com>
@Wires77 Wires77 merged commit be1e1e7 into PathOfBuildingCommunity:dev Apr 4, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, calculation, or mod

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants