Fix mod parsing for "enemies you <verb> have ..."#2378
Conversation
|
|
||
| -- Convert condition verb forms to their proper condition variable names | ||
| local function getConditionVar(verb) | ||
| local conditionMap = { |
There was a problem hiding this comment.
Maybe this conditionMap could go next to statusToEffectMap or otherwise be combined in a clever way, as they are essentially just converting the same terms in opposite directions.
There was a problem hiding this comment.
I can see the connection, but I'm not sure how they could be combined. There's not much of an overlap between the two.
There was a problem hiding this comment.
yeah, not sure "combining" is actually feasible, but it would be nice to only maintain one if someone actually figured out a way.
My main point was that imo they should be located in similar places in the code though since they serve similar functions. It's just that mod wording is not 100% consistent for e.g. "Enemies you ..." and "Enemies ... by you" and similar mods. Some use the verb, some the participle, which is why we apparently need to map both ways.
No idea which place is actually better in the code, but having those maps close to each other does seem to make sense 🤷
Description of the problem being solved:
Some mods like
Enemies you Curse have -6% to Chaos Resistancewere parsed but did not function.This PR:
enemies you .. have ..enemies you .. cannot recharge energy shieldenemies you electrocute have ..andenemies you mark have #% reduced accuracy ratingSteps taken to verify a working solution:
Essence DrainTemporal ChainsEnemies you Curse have -6% to Chaos Resistance