This is how my var analcategories looks like, see for yourself.
var analcategories = ['assfingering','rimjob','missionaryanal','doggyanal','lotusanal','revlotusanal','doubledildoass','inserttaila','analvibrator','enemaplug','insertinturnsass','cowgirlanal','revcowgirlanal']
My code is a mess, I know, but it works. With it implemented, I had two slaves have sex in Cowgirl Anal position while entranced. As result, the slave who was riding did get the trait but the slave being ridden did not. Just how I wanted it to be and exact opposite to how it originally worked.
In my code the slave getting the orgasm gets the trait IF they are the receiving party of any anal activity EXCEPT in Cowgirl Anal or Rev. Cowgirl Anal, OR if they are the performing party in Double Dildo Anal, Cowgirl Anal or Rev. Cowgirl Anal. Double Dildo Anal is already included in analcategories, so it's on both sides of the line. So, just like it's supposed to be.