Idk if this'll help much, but
function frostwyrmPCLoss()
{
if (flags["FROSTWYRM_VICTORY_COUNT"] >= 3 && ((pc.hasCock() && pc.cumQuality() > 0) || (pc.hasVagina() && pc.fertility() > 0)))
As AF666 says, you need to not be sterile or infertile in any way, via temporary drugs, perks, or...