PathOfBuilding icon indicating copy to clipboard operation
PathOfBuilding copied to clipboard

Add support for socketed in specific socket color mods found on Dialla's Malefaction and Malachai's Artifice and Doomsower

Open Paliak opened this issue 3 years ago • 7 comments

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

Paliak avatar Aug 23 '22 21:08 Paliak

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 avatar Aug 24 '22 02:08 Regisle

@Regisle I'm not sure but likely doable. I'll look into it.

Paliak avatar Aug 24 '22 16:08 Paliak

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.

Paliak avatar Sep 19 '22 10:09 Paliak

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.

QuickStick123 avatar Sep 19 '22 10:09 QuickStick123

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 avatar Sep 19 '22 11:09 QuickStick123

@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.

Paliak avatar Sep 19 '22 16:09 Paliak

Sorry should've been clearer mods like +1 to level of socket's gems doesn't work.

QuickStick123 avatar Sep 19 '22 21:09 QuickStick123

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.

Paliak avatar Nov 28 '22 15:11 Paliak

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.

QuickStick123 avatar Dec 08 '22 14:12 QuickStick123