mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	Replace some usage of Rand.Range with Rand.Chance
This commit is contained in:
		
							parent
							
								
									c8d32f883f
								
							
						
					
					
						commit
						98cfa23b88
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -1331,7 +1331,7 @@ namespace RJW_Menstruation
 | 
			
		|||
 | 
			
		||||
            float totalFertPower = eligibleCum.Sum(cum => cum.FertVolume);
 | 
			
		||||
            
 | 
			
		||||
            if (Rand.Range(0.0f, 1.0f) > 1.0f - Mathf.Pow(1.0f - Configurations.FertilizeChance, totalFertPower * Props.basefertilizationChanceFactor))
 | 
			
		||||
            if (Rand.Chance(Mathf.Pow(1.0f - Configurations.FertilizeChance, totalFertPower * Props.basefertilizationChanceFactor)))
 | 
			
		||||
                return null;
 | 
			
		||||
 | 
			
		||||
            Pawn.records.AddTo(VariousDefOf.AmountofFertilizedEggs, 1);
 | 
			
		||||
| 
						 | 
				
			
			@ -1372,7 +1372,7 @@ namespace RJW_Menstruation
 | 
			
		|||
                    deadeggs.Add(egg);
 | 
			
		||||
                    continue;
 | 
			
		||||
                }
 | 
			
		||||
                else if (Rand.Range(0.0f, 1.0f) <= Configurations.ImplantationChance * ImplantChance * InterspeciesImplantFactor(egg.fertilizer))
 | 
			
		||||
                else if (Rand.Chance(Configurations.ImplantationChance * ImplantChance * InterspeciesImplantFactor(egg.fertilizer)))
 | 
			
		||||
                {
 | 
			
		||||
                    if (Configurations.Debug) Log.Message($"Implanting fertilized egg of {Pawn} into {parent}, father {egg.fertilizer}");
 | 
			
		||||
                    if (pregnancy != null)
 | 
			
		||||
| 
						 | 
				
			
			@ -1634,7 +1634,7 @@ namespace RJW_Menstruation
 | 
			
		|||
            if (curStageHrs >= currentIntervalHours)
 | 
			
		||||
            {
 | 
			
		||||
                eggs.Clear();
 | 
			
		||||
                if (EggHealth < 1f / 4f || (EggHealth < 1f / 3f && Rand.Range(0.0f, 1.0f) < 0.3f)) //skips bleeding
 | 
			
		||||
                if (EggHealth < 1f / 4f || (EggHealth < 1f / 3f && Rand.Chance(0.3f))) //skips bleeding
 | 
			
		||||
                {
 | 
			
		||||
                    GoNextStage(Stage.Follicular);
 | 
			
		||||
                }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue