PathOfBuilding
PathOfBuilding copied to clipboard
Add support for socketed in specific socket color mods found on Dialla's Malefaction and Malachai's Artifice and Doomsower
Fixes #4912 .
Description of the problem being solved:
Adds support for mods found on Dialla's Malefaction.
Steps taken to verify a working solution:
-Equip Dialla's Malefaction and test. -Equip Malachai's Artifice and test -Equip Doomsower and test
Link to a build that showcases this PR:
https://pobb.in/SsGKk-Zz6COO
https://user-images.githubusercontent.com/91493239/186270110-6db3b45a-db1b-4545-900b-e6ca02b1ee2d.mp4
If your adding logic for socket colours, is it possible to do the opposite and add logic for gem colours, particularly Doomsower and Malachai's Artifice?
@Regisle I'm not sure but likely doable. I'll look into it.
I removed some checks from the SocketedIn condition. This allows for more flexibility with negation and simplifies code but could also cause issues if used incorrectly.
Yeah I see what you mean like that now if use neg = true with keywords and socketColour it will ignore the socketColour bit and just match negative of the keyword. I guess there are just so many keys in this code now it can produce some uncertain interactions with tag.neg because there are mutliple things that could be negated. A maintainer should probably decide if we apply tag.neg only for socketColours/sockets or do this extended/unclear implementation of it.
The last change seemed to break some stuff as well. Namely the vaal pact mod because we check if socketColour ~= cfg.socketColour before we use this for all socket colour. Socketed mods other than diallas/added seem broken. Socket color seems to trigger when it shouldn't as nil is always ~= a colour.
I think this can be resolved by moving the socket colour comparasion after the socket stuff and adding a nil check. And fixing the keyword check back to the original or an equivilent version. "tag.keyword and not (cfg.skillGem and calcLib.gemIsType(cfg.skillGem, tag.keyword))" As if we just want to check if something is socketed in something then keyword is nil and we should let this pass. You could also use your tag.keyword ~= nil or cfg.skillGem ~= nil in replace of the direct comparisons if you were afraid of these being 0 or false.
@QuickStick123 VaalPact from DoomSower doesn't work but can't replicate the other issues you're having. Dialla's mods, Malachai and Doomsower phys as extra seem to work fine. I'll try to reorder the checks like you said.
Sorry should've been clearer mods like +1 to level of socket's gems doesn't work.
Note GroupProperty is applied to every group. This is only a problem on the Doomsower mod You have Vaal Pact while all Socketed Gems are Red as it is possible to have multiple groups that count as socketed in the same item.
If there exist two groups both socketed into Doomsower, one with a single red gem and the other with a green gem the group with the single red gem will be enough to satisfy the all condition of the mod.
This seems to behave correctly it has merge conflict though and it would be nice to get https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/5179 merged first to check the tests.