diff --git a/Common/Defs/Genes/GeneDefs_LifeForce.xml b/Common/Defs/Genes/GeneDefs_LifeForce.xml
index efa275e..41cba40 100644
--- a/Common/Defs/Genes/GeneDefs_LifeForce.xml
+++ b/Common/Defs/Genes/GeneDefs_LifeForce.xml
@@ -78,7 +78,7 @@
rjw_genes_cockeatercockeater
- Carriers of this gene are able eat cocks to restore their fertilin supply.
+ Carriers of this gene are able eat cocks to restore their fertilin supply. Cocks are consumed during that process.Things/Mote/Heartrjw_genes_lifeforce11
@@ -154,7 +154,7 @@
rjw_genes_cum_eater
- Carriers of this gene are able to absorb fertilin through eating cum.
+ Carriers of this gene are able to absorb fertilin through eating cum. This includes oral sex, eating cum for food or sucking out cumflated pawns. Things/Mote/Heartrjw_genes_lifeforce1
@@ -187,7 +187,7 @@
rjw_genes_drainer
- Carriers of this gene are able to absorb a great amount of fertilin by draining the vitality of the partner.
+ Carriers of this gene are able to absorb a great amount of fertilin by draining the vitality of the partner. This is done passively through having sex with a non-drained pawn that does not have this gene.Things/Mote/Heartrjw_genes_lifeforce4
diff --git a/Common/Defs/HediffDefs/Hediffs_Fertilin.xml b/Common/Defs/HediffDefs/Hediffs_Fertilin.xml
index cb01a23..8c29092 100644
--- a/Common/Defs/HediffDefs/Hediffs_Fertilin.xml
+++ b/Common/Defs/HediffDefs/Hediffs_Fertilin.xml
@@ -45,13 +45,13 @@
rjw_genes_succubus_drainedHediffWithComps
- The vitality of this pawn has been drained.
+ The vitality of this pawn has been drained. Cannot be drained again until fully recovered.(1,0,0.5)1.01.0
- -1.0
+ -0.25
@@ -63,6 +63,10 @@
-0.1
+ 0.1
+
+ -0.1
+
0.5
@@ -73,6 +77,11 @@
-0.2
+ 0.05
+ 0.20
+
+ -0.1
+
0.8
@@ -80,9 +89,15 @@
Consciousness
- -0.4
+ -0.3
+
+ -0.2
+
+ 0.05
+ 0.1
+ 0.35
diff --git a/Source/Genes/Life_Force/Patches/Patch_SatisfyPersonal_LifeForceGain.cs b/Source/Genes/Life_Force/Patches/Patch_SatisfyPersonal_LifeForceGain.cs
index fb032d2..b368c1b 100644
--- a/Source/Genes/Life_Force/Patches/Patch_SatisfyPersonal_LifeForceGain.cs
+++ b/Source/Genes/Life_Force/Patches/Patch_SatisfyPersonal_LifeForceGain.cs
@@ -1,12 +1,8 @@
using HarmonyLib;
using rjw;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using RimWorld;
using Verse;
+
namespace RJW_Genes
{
///
@@ -16,6 +12,8 @@ namespace RJW_Genes
[HarmonyPatch(typeof(SexUtility), nameof(SexUtility.SatisfyPersonal))]
public static class Patch_SatisfyPersonal_LifeForceGain
{
+ public const float LIFEFORCE_GAINED_FROM_DRAINER_GENE = 0.25f;
+
public static void Postfix(SexProps props)
{
// ShortCuts: Exit Early if Pawn or Partner are null (can happen with Animals or Masturbation)
@@ -31,7 +29,6 @@ namespace RJW_Genes
//Summary//
//We use the positions of the pawn (dom or sub) and based on that which interactions will transfer fertilin
//By checking isreceiver we know if the succubus is the dom or the sub and if the situation is reverse we also swap the function we use
- //
float absorb_factor = 0f;
if (GeneUtility.HasLifeForce(props.partner))
{
@@ -70,10 +67,16 @@ namespace RJW_Genes
TransferFertilin(props, absorb_factor);
}
- if (GeneUtility.HasGeneNullCheck(PawnWithLifeForce, GeneDefOf.rjw_genes_drainer) && !props.pawn.health.hediffSet.HasHediff(HediffDefOf.rjw_genes_succubus_drained))
+ // Handle Gene: Sexual_Drainer
+ // to be drained, a pawn must not-be-drained-already and drainers cannot be drained either.
+ if (GeneUtility.IsSexualDrainer(PawnWithLifeForce)
+ && !props.pawn.health.hediffSet.HasHediff(HediffDefOf.rjw_genes_succubus_drained)
+ && !GeneUtility.IsSexualDrainer(props.pawn))
{
+ if (RJW_Genes_Settings.rjw_genes_detailed_debug)
+ ModLog.Message($"{props.pawn.Name} has been (sexually) drained by {PawnWithLifeForce.Name}");
props.pawn.health.AddHediff(HediffDefOf.rjw_genes_succubus_drained);
- GeneUtility.OffsetLifeForce(GeneUtility.GetLifeForceGene(PawnWithLifeForce), 0.25f);
+ GeneUtility.OffsetLifeForce(GeneUtility.GetLifeForceGene(PawnWithLifeForce), LIFEFORCE_GAINED_FROM_DRAINER_GENE);
}
}
}
@@ -82,6 +85,7 @@ namespace RJW_Genes
{
Pawn_GeneTracker genes = props.partner.genes;
Gene_LifeForce gene = genes.GetFirstGeneOfType();
+
Hediff fertilin_lost = props.pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.rjw_genes_fertilin_lost);
//Around quarter get ejected everytime pawn cums
float multiplier = Rand.Range(0.10f, 0.40f);
@@ -106,11 +110,12 @@ namespace RJW_Genes
if (props.partner.IsAnimal())
{
+ if (RJW_Genes_Settings.rjw_genes_detailed_debug)
+ ModLog.Message($"Fertilin-Source of {props.pawn.Name} was an Animal, Fertilin-Gain is being adjusted by {RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor}%");
valuechange *= RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor;
}
GeneUtility.OffsetLifeForce(GeneUtility.GetLifeForceGene(props.partner), valuechange);
- //gene.Resource.Value += CumUtility.GetTotalFluidAmount(props.pawn) / 100 * absorb_factor * multiplier;
}
public static float TotalFertilinAmount(SexProps props, float multiplier)
@@ -139,7 +144,7 @@ namespace RJW_Genes
public static float BaseDom(SexProps props, Pawn PawnWithLifeForce)
{
float absorb_factor = 0f;
- if (props.sexType == xxx.rjwSextype.Sixtynine && GeneUtility.HasGeneNullCheck(PawnWithLifeForce, GeneDefOf.rjw_genes_cum_eater))
+ if (props.sexType == xxx.rjwSextype.Sixtynine && GeneUtility.IsCumEater(PawnWithLifeForce))
{
absorb_factor += 1f;
}
@@ -147,7 +152,7 @@ namespace RJW_Genes
}
///
- /// Handles the Case that the Life-Force wielder got initiated into sex (They are "Sub").
+ /// Handles the Case that the Life-Force wielder got initiated into sex (They are "Sub").
///
/// The summary of the sex act, used for checking conditions.
/// The pawn that might gain LifeForce through this method.
@@ -156,7 +161,7 @@ namespace RJW_Genes
{
float absorb_factor = 0f;
if ((props.sexType == xxx.rjwSextype.Oral || props.sexType == xxx.rjwSextype.Fellatio || props.sexType == xxx.rjwSextype.Sixtynine)
- && GeneUtility.HasGeneNullCheck(PawnWithLifeForce, GeneDefOf.rjw_genes_cum_eater))
+ && GeneUtility.IsCumEater(PawnWithLifeForce))
{
absorb_factor += 1f;
}