public virtual bool IsMate(Pawn pawn, Pawn pawn2) { float fert = FertilityChecker.getFetility(pawn) + FertilityChecker.getFetility(pawn2) / 2.0f; fert *= MateChance(); //TODO dice roll if (pawn.gender == pawn2.gender && !WoohooSettingHelper.latest.sameGender) { return(false); } return(Rand.Value < fert); }
public virtual bool IsMate(Pawn pawn, Pawn pawn2) { float fert = FertilityChecker.getFetility(pawn) + FertilityChecker.getFetility(pawn2) / 2.0f; fert *= MateChance(); if (pawn.gender == pawn2.gender && !WoohooSettingHelper.latest.sameGender) { return(false); } var rand = Rand.Value; bool isMate = rand < fert; //Log.Message("TRACE:ROLL ["+rand+"] < ["+fert+"] = ["+isMate+"]"); if (isMate) { Log.Message("Doing A Risky Woohoo! [" + rand + "] < [" + fert + "] = [" + isMate + "]"); } return(isMate); }