Properly apply cycleSpeed to PeriodRandomizer

This commit is contained in:
lutepickle 2022-07-08 10:28:21 -07:00
parent 98f0580577
commit f612e0df24
2 changed files with 3 additions and 3 deletions

Binary file not shown.

View file

@ -1745,13 +1745,13 @@ namespace RJW_Menstruation
{
case Stage.Follicular:
case Stage.ClimactericFollicular:
return (int)(Props.follicularIntervalDays * 24 * (cycleSpeed * 1.5f) * (1 + Rand.Range(-cycleVariability, cycleVariability) * 1.5f * variabilityFactor));
return (int)(Props.follicularIntervalDays * 24 * (1 + Rand.Range(-cycleVariability, cycleVariability) * 1.5f * variabilityFactor) / (1 + (cycleSpeed - 1) * 1.5f));
case Stage.Luteal:
case Stage.ClimactericLuteal:
return (int)(Props.lutealIntervalDays * 24 * (cycleSpeed * 0.5f) * (1 + Rand.Range(-cycleVariability, cycleVariability) * 0.5f * variabilityFactor));
return (int)(Props.lutealIntervalDays * 24 * (1 + Rand.Range(-cycleVariability, cycleVariability) * 0.5f * variabilityFactor) / (1 + (cycleSpeed - 1) * 0.5f));
case Stage.Bleeding:
case Stage.ClimactericBleeding:
return (int)(Props.bleedingIntervalDays * 24 * (cycleSpeed * 0.5f) * (1 + Rand.Range(-cycleVariability, cycleVariability) * 0.5f * variabilityFactor));
return (int)(Props.bleedingIntervalDays * 24 * (1 + Rand.Range(-cycleVariability, cycleVariability) * 0.5f * variabilityFactor) / (1 + (cycleSpeed - 1) * 0.5f));
case Stage.Recover:
return (int)(Props.recoveryIntervalDays * 24 * Rand.Range(-0.05f, 0.05f));
default: // Often unused