Compare commits

..

No commits in common. "de2da85558b3bddb82a9ebafd8bca4c38f4a7380" and "2798d923b1fbd57872045b6a838129fae0fb5f0a" have entirely different histories.

4 changed files with 9 additions and 17 deletions

Binary file not shown.

View file

@ -307,7 +307,6 @@ namespace RJW_Menstruation
}
else part.TransformValue(StatRequest.For(Pawn), ref ovulationChance);
}
if (Pawn.Has(Quirk.Breeder)) ovulationChance *= 10.0f;
try
{
calculatingOvulationChance = true;
@ -323,6 +322,8 @@ namespace RJW_Menstruation
get
{
float factor = 1.0f;
if (Pawn.Has(Quirk.Breeder)) factor = 10.0f;
if (ModsConfig.BiotechActive && xxx.is_human(Pawn))
{
// Implant factor will be based solely on pawn age, plus any rollover from ovulation chance
@ -332,10 +333,7 @@ namespace RJW_Menstruation
if (ovulationOverflow > 1.0f) factor *= ovulationOverflow;
return Props.baseImplantationChanceFactor * FertilityModifier * factor;
}
else
{
return Pawn.health.capacities.GetLevel(xxx.reproduction) * Props.baseImplantationChanceFactor * FertilityModifier * factor;
}
else return Pawn.health.capacities.GetLevel(xxx.reproduction) * Props.baseImplantationChanceFactor * FertilityModifier * factor;
}
}
@ -1595,6 +1593,7 @@ namespace RJW_Menstruation
{
estrusflag = false;
float eggnum;
int ovulated;
try
{
eggnum = Math.Max(Rand.ByCurve(Pawn.def.race.litterSizeCurve), 1f);
@ -1609,19 +1608,13 @@ namespace RJW_Menstruation
eggnum = 1f;
}
eggnum *= ovulationFactor;
int toOvulate = (int)eggnum + eggstack;
ovulated = (int)eggnum + eggstack;
float ovulationChance = OvulationChance;
int ovulated = 0;
for (int i = 0; i < toOvulate; i++)
for (int i = 0; i < ovulated; i++)
if (i < eggstack || Rand.Chance(ovulationChance)) // eggstack comes from drugs and are guaranteed ovulated
{
eggs.Add(new Egg((int)(EggLifespanHours / CycleFactor)));
++ovulated;
}
ovarypower -= ovulated;
if (Configurations.Debug && ovulated != toOvulate)
Log.Message($"{Pawn} ovulated {ovulated}/{toOvulate} eggs ({ovulationChance.ToStringPercent()} chance)");
eggstack = 0;
if (EggHealth <= 0)

View file

@ -228,7 +228,7 @@ namespace RJW_Menstruation
string fainfo = PregnancyCommon.GetFatherInfo(babiescomp?.babies, babiescomp.Pawn, true) + " "; // Keep all parents known, for now
if (feinfo == "Null") feinfo = "1 " + p.Mother.def.label + " " + Translations.Dialog_WombInfo02;
if (fainfo == "Null ")
if (fainfo == "Null")
{
string father = p.Father?.LabelShort ?? Translations.Dialog_FatherUnknown;
fainfo = Translations.Dialog_WombInfo03 + ": " + father + " ";

View file

@ -1,7 +1,6 @@
Version 1.0.8.8
- Fix pawns skipping straight to menopause instead of going through climacteric stages.
- Fix father appearing as "Null" in womb dialog for some Biotech pregnancies.
- Rework ovulation mechanics. A pawn's implantation chance is now dependent only on their age.
- Rework ovulation mechanics. A pawn's implantation chance is now dependent on their age.
- All other fertility-altering effects instead change the odds of ovulation occuring, rolled per-egg. This chance appears in the womb dialog.
- If the chance of ovulation goes above 100%, the implantation chance is increased.
- Drugs that increase the number of eggs ovulated are still guaranteed to work.