[Rulesets with effectmanager and IF operator] IF does not check targeted effects
Hi :)
At least for 3.5E/PF1 there is some edge case in the logic of effect operators, here IF. Assume I have an effect like IF: invisible, then this would not return true, if I have an invisible effect which is targeted. The reason is simple: The code for IF does not use any target information (if there is any), one should hopefully be able to easily fix it by adding the code information about targets for its code.
For example, in the effect manager of 3.5E one has in the function of getEffectsByType the following piece of code:
Code:
if rEffectComp.type == "IF" then
if not checkConditional(rActor, v, rEffectComp.remainder)
break;
end
One should be able to account targeted conditions, as in my example above, by using the following code instead (rFilterActor is the code information about the target in that part of the code):
Code:
if rEffectComp.type == "IF" then
if not checkConditional(rActor, v, rEffectComp.remainder, rFilterActor)
break;
end
In my tests it looks like that this should work :) but there are several of such pieces of code in the effect manager. If there is no target information, then this should not cause any problem because the code already handles nil values well :) Only the function for effect activation on the start of a turn should not need this change (because there is no target information at all for such kind of stuff)
I assume that it might be a similar problem for 5E and so on, which is why I posted it here :) Let me know if you see any problem with that suggestion of code change :)
Best wishes
Kelrugem