Fix periodic ovulator cycle variability
This commit is contained in:
parent
045e9548f6
commit
12c760d16c
|
@ -75,14 +75,14 @@ namespace RJW_Menstruation
|
||||||
base.PregnantAction();
|
base.PregnantAction();
|
||||||
if (curStage != Stage.Pregnant)
|
if (curStage != Stage.Pregnant)
|
||||||
// Go halfway into the cycle
|
// Go halfway into the cycle
|
||||||
hoursToNextCycle = (int)(averageCycleIntervalHours * Rand.Range(-cycleVariability, cycleVariability)) / 2;
|
hoursToNextCycle = (int)(averageCycleIntervalHours * (1 + Rand.Range(-cycleVariability, cycleVariability))) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void AnestrusAction()
|
protected override void AnestrusAction()
|
||||||
{
|
{
|
||||||
if (hoursToNextCycle <= 0)
|
if (hoursToNextCycle <= 0)
|
||||||
{
|
{
|
||||||
hoursToNextCycle = (int)(averageCycleIntervalHours * Rand.Range(-cycleVariability, cycleVariability));
|
hoursToNextCycle = (int)(averageCycleIntervalHours * (1 + Rand.Range(-cycleVariability, cycleVariability)));
|
||||||
if (IsBreedingSeason()) GoNextStage(Stage.Follicular);
|
if (IsBreedingSeason()) GoNextStage(Stage.Follicular);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue