You need to return `effective_race` from `procreate`. All you're doing is creating a local variable called `effective_race`, then it gets destroyed when the function exits.
i have added a function to attempt to test whether or not the player will allow fate to decide their gender or not