As far as I can tell, the sex function is extremely bugged... if that's not the case... I really need an explanation of how it's supposed to work. I can't even tell you what's bugged and what's not because none of it makes any sense to me.
I think I've determined a few things:
1. Purity and Energy don't do anything.
2. Arousal can increase but the triggers for its decrease don't always work, and you remain Overwhelmed at all times if your Arousal has ever reached maximum regardless of its current value.
3. There are for some reason always three people in sex scenes, rather than what is probably the intended up to three, and if there's only one physical person it will slot in nonexistent people with the same name who can't properly be interacted with.
4. NPCs sometimes just use the wrong words for body parts/actions in sex scenes.
Oh! If the NPC doesn't have a name, the text uses your character's name for their actions. I think that's what was confusing me about saying the wrong actions/body parts.
I did find more bugs though.
1. Wise is the only available personality option.
2. Social actions with enemies just cause you be defeated instantly.
I don't know the exact issue, but I think I have an idea of where to look: I believe there's an issue with variables used for character names. Some characters don't have names but should, some have repeated names, and some use the wrong name variable in the text.
I know you said you are a programmer (and I am not), so it seems odd that it would be this simple to solve, but... it almost seems like you have a single variable repeatedly being reassigned new values instead of a new variable being generated.