Eggs implant at half luteal or 30 days, whichever comes first.

This commit is contained in:
lutepickle 2022-07-07 07:52:43 -07:00
parent a1250f4141
commit 60a842fd2b

View file

@ -66,6 +66,8 @@ namespace RJW_Menstruation
//const int ovarypowerthreshold = 72;
public const int tickInterval = GenDate.TicksPerHour;
public const int maxImplantDelayDays = 30;
public const int minImplantAgeHours = 72;
public CompProperties_Menstruation Props;
public Stage curStage = Stage.Follicular;
public int curStageHrs = 0;
@ -1152,7 +1154,10 @@ namespace RJW_Menstruation
bool pregnant = false;
foreach (Egg egg in eggs)
{
if (!egg.fertilized || egg.fertstage < 168) continue;
if (!egg.fertilized ||
egg.fertstage < minImplantAgeHours ||
egg.position < Math.Min(Props.lutealIntervalDays / 2, maxImplantDelayDays) * 24)
continue;
else if (egg.fertilizer is null)
{
deadeggs.Add(egg);